Commit Graph

1948 Commits

Author SHA1 Message Date
Bryan Schumaker
681aa4b611 libsaria: Remove flags from initdata
I wasn't doing anything with these, so they're just getting in the way
and increasing complexity.  This change also allows me to remove the
"enabled" variable from the idle queue.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-07-29 14:31:35 -04:00
Bryan Schumaker
59b79b6575 ocarina: Begin switching to GtkBuilder for the UI
I feel that hand-written UI code is slowing me down, so I'm going to
switch to using glade / GtkBuilder to manage the UI as much as possible.
So far, I create, show, and destroy a window.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-07-29 11:27:50 -04:00
Bryan Schumaker
bfb00ec812 libsaria: Remove the remove_tracks() function from playlists
It doesn't make sense to keep it around anymore since I have the
single-track removal function.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-07-01 12:02:11 -04:00
Bryan Schumaker
94cbcd9a5d libsaria: Give playlists a remove_track() function
This makes more sense than pushing a single track into a list and then
iterating over the single item...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-07-01 11:38:50 -04:00
Bryan Schumaker
1ba1c72e3f libsaria: Use a flags variable for initdata
I was using multiple boolean fields, but I think it'll be easier to set
up a single bit-flag field instead.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-07-01 11:24:06 -04:00
Bryan Schumaker
aed5a023b3 libsaria: Remove second library path list
I kept around the old list while I was converting everything over to the
new list.  Now that I support all the needed features, I can remove the
old variable.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-07-01 11:24:02 -04:00
Bryan Schumaker
a7d1f57403 libsaria: Switch the update code to use the new list
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-07-01 09:59:48 -04:00
Bryan Schumaker
250a8b9bfe libsaria: Rename List::last() -> List::end()
To better match C++ iterators.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-30 12:08:04 -04:00
Bryan Schumaker
e0074525f3 libsaria: Convert the idle queue to use the new list class
- The erase() function returns the previous item
- Implement a push_front() function
- Implement a pop_front() function

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-30 11:59:32 -04:00
Bryan Schumaker
e2242359d4 libsaria: Create iterators for lists
Not really C++ iterators, but close enough.  I can get the first and
last values values to use in for loops, I also made a next() function
for list items.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-30 11:28:12 -04:00
Bryan Schumaker
743caa85e6 libsaria: Add tracks to new library lists too
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-16 14:59:59 -04:00
Bryan Schumaker
28eaba41e0 libsaria: Use find_item() for updating library paths
I need to check if the file is already in the library.  I also made a
note for how this check could be done faster using a tree.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-16 14:51:47 -04:00
Bryan Schumaker
065feedee2 libsaria: Save tracks using for_each_item()
It's simpler than custom writing my own for each loop...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-16 14:51:47 -04:00
Bryan Schumaker
bd8cdee041 libsaria: Implement a find_item() for lists
This function takes a function pointer argument that should return
"true" if the current item is the item we're looking for and "false"
otherwise.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-16 14:51:45 -04:00
Bryan Schumaker
8b56659b1c libsaria: Created a list for_each_item()
Useful for accessing each item in the list sequentially without having
to write a lot of loops.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-16 14:04:55 -04:00
Bryan Schumaker
311e404af9 libsaria: Give Lists a size()
Return the "count" variable and hope we don't have more than
MAX_UNSIGNED_INT objects in the list...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-16 13:37:38 -04:00
Bryan Schumaker
bf0e340a53 libsaria: Rename ListNode -> ListItem
I like ListItem better.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-14 17:48:44 -04:00
Bryan Schumaker
34c13bc93e libsaria: Add items to a List
I free the memory in the destructor, too!  Be careful, though, the copy
constructor isn't actually a copy constructor.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-14 17:18:22 -04:00
Bryan Schumaker
da776eeebf libsaria: Initialize list objects
I point the list head towards itself.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-14 08:11:16 -04:00
Bryan Schumaker
4aac603b85 libsaria: Begin a custom List class
I'm going to gradually replace the stl list with my own implementation.
This should make everything more efficient and I won't have to deal with
those pesky iterators.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-13 21:34:45 -04:00
Bryan Schumaker
14fe5661a5 libsaria: Rename List -> Stack
I want to recycle the "class List" name, so I need to free it up from
the playlist code.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-13 21:34:44 -04:00
Bryan Schumaker
d12c5bac75 Begin Ocarina 5.10 2012-06-13 21:34:44 -04:00
Bryan Schumaker
a3e149e7c0 Ocarina 5.9 2012-06-02 13:21:22 -04:00
Bryan Schumaker
7390c65d63 scripts: Move ocarina -> %APP
It'll try to run a command passed through the shell, if the command
can't be found it'll run %APP-player.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 13:21:22 -04:00
Bryan Schumaker
7816dea1cf build: Improve PKGBUILD.tmpl
Simpler package function and use $MAKEFLAGS.  There is no longer a need
for DESTDIR or POSTFIX in the Sconstruct file anymore, either.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 13:21:21 -04:00
Bryan Schumaker
f64bf65b37 build: Generate the PKGBUILD file during scons release
This is better than needing to update it manually...

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 12:42:05 -04:00
Bryan Schumaker
faadd138c4 build: Turn off debugging
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 12:19:45 -04:00
Bryan Schumaker
7cc5cded9f libsaria: Directly set version in version.h
Rather than building it up as part of a function call

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 12:16:34 -04:00
Bryan Schumaker
698ed1508a build: Remove bin/ and lib/ as part of scons clean
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 12:06:10 -04:00
Bryan Schumaker
304e8005f1 build: Remove lib/ and bin/ during a scons -c
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 11:53:32 -04:00
Bryan Schumaker
e4a3b8902f build: Improve install target and create uninstall target
Install files in bin and lib.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 11:50:32 -04:00
Bryan Schumaker
3d9f21837e build: Alias "ocarina" to the entire ocarina project
Otherwise it'll build just the ocarina subdirectory, which isn't useful
if I ever have multiple projects using libsaria.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 10:47:45 -04:00
Bryan Schumaker
80cf0bb28e ocarina: Use files in the lib directory
I copy images and other files to lib/ocarina/ during the build to make
installing easier.  The lib directory should always be relative to the
bin (executable) path, so I can easily find the lib path based on
executable path (/proc/self/exe).

I can also use this to find bugs in the buld process, such as adding a
file to the images/ directory but forgetting to add it as an install
target.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 10:41:04 -04:00
Bryan Schumaker
dcaeb8cbd1 build: Copy images to lib/%APP/ during build
From here, I can copy the entire directory when I choose to install.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 10:17:22 -04:00
Bryan Schumaker
e23ecd4bfb Build: make a directory using application name
The app_directory() function sets the config.application variable, then
calls the Sconscript file in that directory.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-06-02 09:41:46 -04:00
Bryan Schumaker
0ffd1ad4d6 Ocarina 5.9-rc 2012-06-01 08:05:14 -04:00
Bryan Schumaker
fbcc660bd6 build: Create a configuration script
Users set values here to be used by the build system.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-28 11:34:37 -04:00
Bryan Schumaker
0dfb02c612 libsaria: Added a "toggle" command
This toggles between play and pause states.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-28 11:07:05 -04:00
Bryan Schumaker
794580b4d0 libsaria: Add "stop" command
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-28 11:02:54 -04:00
Bryan Schumaker
949e635651 scripts: Remove old write-pipe command
I've replaced this with a function call

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-28 10:59:09 -04:00
Bryan Schumaker
e632ff1012 libsaria: Added "next" and "prev" commands
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-28 10:55:49 -04:00
Bryan Schumaker
838b2b3d8f libsaria: Recognize a "pause" command
Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-28 10:51:14 -04:00
Bryan Schumaker
bba2989866 scripts: Create functions file in lib/ocarina/
Makes it easier to install and keeps functions separate from the ocarina
commands.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-28 10:47:27 -04:00
Bryan Schumaker
de5cdc1cbc build: Use "C++" instead of "CXX" for building
I don't like the look of "CXX" as much.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-28 10:29:17 -04:00
Bryan Schumaker
d6dff5290f scripts: Create an %APP-play for sending play commands
I'm currently using the "ocarina" script as a functions file, but this
will change eventually.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-27 23:16:56 -04:00
Bryan Schumaker
62c3ef2684 build: Create ocarina.bin as a symlink to ocarina-player
I want to add in more ocarina-* commands, so the first step is making
the player its own command.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-27 17:37:25 -04:00
Bryan Schumaker
30375bbdff build: Compile libsaria using an Sconscript file
To extract libsaria-related stuff from the main build script.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-27 10:40:19 -04:00
Bryan Schumaker
cc32587917 build: Create an ocarina Sconscript file
This file will set up building the ocarina/ subdirectory.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-27 10:36:45 -04:00
Bryan Schumaker
5f5f23bf9e Build: Create version.h using an Sconscript file
This lets me pull code out of the generic Sconstruct, so it can't be
bad!  I also removed the test directory since I never made unit tests.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-27 10:23:47 -04:00
Bryan Schumaker
3d722f364d Honor banned tracks when enabling a library path
Before this I was always putting them into the Library playlist.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-26 19:47:30 -04:00