Commit Graph

1730 Commits

Author SHA1 Message Date
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
Bryan Schumaker
4afce6300c Turn off library paths
I set the "visible" field to "false" and then remove each track from the
library playlist.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-23 07:48:10 -04:00
Bryan Schumaker
f5181c50b1 libsaria: Fix deck::prev()
Having tracks add themselves to the recent playlist means that it also
adds itself when going backwards through the playlist, resetting the
cur iterator and causing the same 2 songs to be played.  To get around
this, I gave tracks a new load_unlisted() function to load without
adding themselves to the recently played list.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 20:48:25 -04:00
Bryan Schumaker
ce6782558d libsaria: Bugfix Track playlist list
I was sometimes trying to remove a playlist from an invalid pointer.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 20:32:08 -04:00
Bryan Schumaker
057bce8809 Show last played date on each playlist tab
I like to know when I last listened to a song.

Signed-off-by: Bryan Schumaker <bjchuma@gmail.com>
2012-05-19 20:09:21 -04:00
Bryan Schumaker
ca9f3e6cf9 Show the play count in the playlist renderer
I created a new renderer function for updating tracks when they change.
Using this, I can show the new playcount of tracks as it is incremented.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 19:47:11 -04:00
Bryan Schumaker
61769f74fd libsaria: Keep a pointer to each playlist a Track is on
Useful for removing them later without having to check every playlist.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 19:01:55 -04:00
Bryan Schumaker
e874345596 ocarina: Ban and unban songs using delete key
Banning: Use the delete key on selected tracks from the library tab.
Unbanning: Use the delete key on selected tracks from the banned tab.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 18:48:08 -04:00
Bryan Schumaker
01b5eeb10f ocarina: Make "add to playlist" menu items
These menu items add tracks to a specific playlist instead of creating a
new one.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 18:35:05 -04:00
Bryan Schumaker
77225d4d9f libsaria: Define MAX_PLAYLISTS in a header file
So applications can use this value too.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-19 18:34:30 -04:00
Bryan Schumaker
0e6632ce45 ocarina: Use yes / no images for banning songs
I think this makes more sense than using the GTK_STOCK_DIALOG_ERROR for
both states.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 12:17:45 -04:00
Bryan Schumaker
dea787d576 ocarina: Disable tab label text when playlists are disabled
To make it more obvious which playlists are disabled when you are on
other tabs.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 12:11:19 -04:00
Bryan Schumaker
d74d008223 ocarina: Change disable playlist button image
I do this whenever the playlist disabled flag changes.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 12:05:03 -04:00
Bryan Schumaker
706f07b6f7 ocarina: Disable playlist widgets with a playlist
To emphasize that the playlist has been disabled.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 11:57:28 -04:00
Bryan Schumaker
973b5d3d31 Save playlist disabled status to file
This allows me to restore it when restarting ocarina.  I also need to
notify the renderer that the playlist status has changed so I can change
the button state.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 11:51:52 -04:00
Bryan Schumaker
35d71efe58 Disable temporary playlists
When a playlist is disabled I won't pick songs from it until the user
re-enables it.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 11:25:51 -04:00
Bryan Schumaker
f6cdcae79c ocarina: Create a make_toggle_button_data() function
Used to pass extra data to the toggle function.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 11:24:38 -04:00
Bryan Schumaker
01e63da4f7 ocarina: Don't show playlist tabs immediately
Instead, I want to show them when they have tracks added to them.  This
keeps the banned tab from being shown and then hidden right away during
startup.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 10:46:38 -04:00
Bryan Schumaker
376fe67115 ocarina: Bugfix the ban button
- Use g_signal_connect() when creating toggle buttons
- Only set the banned state on a track if it has changed

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
2012-05-18 10:39:26 -04:00