Anna Schumaker
d0212d47aa
gui: Create QueueToolbar from a single place
...
Derived classes should already have this available to configure as they
see fit.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker
319838138a
gui: Set up tab builder from a single place
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker
682dca2339
gui: Set up each tab page vbox from a single place
...
This is better than having the same code in 4 places.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker
c9ca2604ee
gui: Move on_row_activated() into the QueueWindow
...
And out of the Tab class.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
83414ca3ad
gui: Trigger refiltering from the QueueToolbar
...
I also modify the QueueWindow to do the actual filtering.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
8c3b1489bd
gui: Set up queue model and filter inside the QueueWindow
...
This lets me move functions affecting the treeview into the QueueWindow
class.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
5bf861b9f3
gui: Remove Tab post_init() function
...
Nothing uses this anymore.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
3d89bf2563
gui: Set up the switch from inside the toolbar
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
343426ddc3
gui: Tab labels should inherit from common type
...
This allows me to pass a pointer to the generic type to be used by other
classes.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
1423fe2b6e
gui: Set up the repeat button from inside the toolbar
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
fa2bf4637a
gui: Set up the random button from inside the toolbar
...
This lets me change this variable to be completely internal to the
QueueToolbar.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
acbafd2361
gui: Give the QueueToolbar an init() function
...
GtkBuilder doesn't let me pass additional parameters to classes
constructed with get_widget_derived(), so I have to use an init()
function for flags and other parameters.
This patch adds flags for which buttons to show on the queue toolbar.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
3ed32813da
gui: Force playing on GST_MESSAGE_ERROR
...
I frequently hit a problem where playback stops when a track has an
error. My gstreamer code was written assuming that the pipeline stayed
in GST_STATE_PLAYING if there was an error, but I think this assumption
is wrong. For now, let's always restart playing on error.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-08-25 10:06:58 -04:00
Anna Schumaker
8f570f1f24
gui: Convert the playlist tab to use the new template files
...
I also created a new PlaylistWindow class for displaying the names of
each playlist.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:31 -04:00
Anna Schumaker
b2b23bec46
gui: Convert the history tab to use the new template files
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:31 -04:00
Anna Schumaker
3dd123fbfd
gui: History tab cleanups
...
This is a statically defined class, so we don't need to separate out the
function definitions.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:31 -04:00
Anna Schumaker
a581b42649
gui: Convert the collection tab use the new template files
...
I expect most of the new constructor code to disappear once I start
using the .ui files in the parent class.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:31 -04:00
Anna Schumaker
2f1d0a3bb8
gui: Collection tab cleanups
...
This is a statically defined class, so we don't need to separate the
class and function code.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:31 -04:00
Anna Schumaker
d746db6624
gui: Add a scrolled window around the treeview
...
I'm going to want this on all tab pages, so let's just add this to the
treeview widget definition.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:31 -04:00
Anna Schumaker
d9a9b2b9ca
gui: Set queue scale factor using GtkBuilder
...
Now I don't need to keep resetting the label's markup.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:31 -04:00
Anna Schumaker
494ef04e67
gui: Build TempLabel from a .ui file
...
This is better than needing to hard code in all of the widgets.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:31 -04:00
Anna Schumaker
da89012c7b
gui: Build QueueToolbar from a separate file
...
This should help clean up the code a bit, especially once I convert all
queues to load with the template files.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:31 -04:00
Anna Schumaker
1e29ba8cc6
gui: Create a custom Gtk::TreeView for queues
...
The QueueView doesn't contain too much in terms of code, but the
corresponding QueueView.ui file lets me remove a lot of unnecessary
stuff from temporary queue creation!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:31 -04:00
Anna Schumaker
6dfb3c31e2
gui: Rename model.cpp -> queue/model.cpp
...
I'm going to have a lot of queue-related files soon, so let's make
things easier by keeping everything in a new directory.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-17 08:51:30 -04:00
Anna Schumaker
9edce54571
gui: xalign is deprecated
...
Remove references to it, fixing up the code where necessary.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-14 10:24:50 -04:00
Anna Schumaker
4a6c0dbaa5
gui: The treeview rules_hint property is deprecated
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-14 10:23:34 -04:00
Anna Schumaker
3375e921c4
gui: Use the search entry's "search_changed" signal
...
This greatly improves usability while searching, since we no longer have
to refilter the song list for every key press.
Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2015-04-14 09:06:45 -04:00
Anna Schumaker
ec4d3b945e
audio: Fix seeking on ARM
...
The on_seek() function needs to take an int64_t to avoid truncating on
ARM.
Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2015-04-14 09:05:09 -04:00
Anna Schumaker
657ce8f0f4
audio: Ensure position and duration results are 64 bits
...
A long int is shorter on ARM than x86, which could cause position and
duration values to get truncated. Additionally, quering gstreamer with
a long int causes a compile error on ARM. Let's just do the right thing
and make this value an int64_t.
Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2015-04-14 09:05:05 -04:00
Anna Schumaker
1ec9d830cc
gui: Remove references to the on_remove() notification
...
It no longer exists.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-09 09:28:32 -04:00
Anna Schumaker
9ebb31e09b
gui: Remove usage of Q_NOTIFY_REMOVE
...
The notification no longer exists, and the flag will soon be removed.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-09 09:27:32 -04:00
Anna Schumaker
f15ed8635a
gui: Disable Q_NOTIFY_REMOVED for temporary queues
...
Using this notification was causing segmentation faults when Ocarina was
closed with at least one temporary queue. I can handle everything I
need directly in the GUI without problems, so this notification really
isn't necessary.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-09 09:26:26 -04:00
Anna Schumaker
c80468a739
callback: Remove all references to callbacks
...
Callbacks have no remaining users and can safely be removed :)
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-04 10:21:31 -04:00
Anna Schumaker
e4ea994728
gui: QueueTabs should implement the on_remove() notification
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-04 10:21:15 -04:00
Anna Schumaker
44c702a302
gui: Implement on_track_updated() in the Tab class
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 20:59:01 -04:00
Anna Schumaker
3b206948e1
gui: Implement on_track_removed() in the Tab class
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 12:27:32 -04:00
Anna Schumaker
67228ef8b1
gui: Turn the Tab class into a QNotifier
...
Now we can respond to notifications directly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-04-03 12:19:18 -04:00
Anna Schumaker
5026e80eab
gui: Fix setting autopause count
...
Once the check box was enabled, we were never setting the count again.
This means that changing pause count from 1 to 2 did not change the
count in the backend.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-02-04 08:39:40 -05:00
Anna Schumaker
cc6f4c9293
string: Add a function for creating a detailed time string
...
I use this to display the total running time of queues in the gui.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-29 08:27:25 -05:00
Anna Schumaker
ed43fd3689
More utos() cleanups
...
I found a few other places where I can use utos() instead of
stringstreams.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-27 14:03:12 -05:00
Anna Schumaker
12260a3de9
string: Add a function for converting seconds to string
...
This is used to get a string representation of the number of seconds
passed in.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-27 09:23:14 -05:00
Anna Schumaker
6c6437c2bd
string: Create a utos() function
...
This function converts unsigned ints into strings. This allows me to
replace several almost identical functions with one function call.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-27 08:37:27 -05:00
Anna Schumaker
e47eb69859
gui: Set a proper application_id
...
This silences a warning from gtk.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-26 17:13:09 -05:00
Anna Schumaker
5045e3a8c8
gui: Remove unnecessary #includes
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-22 08:19:45 -05:00
Anna Schumaker
ec83acbdfe
gui: Initialization cleanups
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-21 09:08:45 -05:00
Anna Schumaker
8b4d99c50c
gui: Rename main.cpp to ocarina.cpp
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-21 08:44:38 -05:00
Anna Schumaker
e6d9a58be2
gui: Remove CONFIG_TEST macros
...
I haven't had gui unit tests in months, so these can be removed for now.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-21 08:43:55 -05:00
Anna Schumaker
74a557739d
lib: Remove rest of lib/
...
This is all contained in the gui code now.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-21 08:39:02 -05:00
Anna Schumaker
dc3e770c28
gui: Move GtkBuilder object into the gui
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-21 08:29:59 -05:00
Anna Schumaker
7f6f6395d7
gui: Schedule timeout function from gstreamer code directly
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-21 08:10:59 -05:00
Anna Schumaker
4cae9aaf2b
gui: Have collection manager handle keypresses directly
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-21 08:06:10 -05:00
Anna Schumaker
2824ac33eb
gui: Start idle callbacks directly from the collection manager
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-21 08:03:48 -05:00
Anna Schumaker
0f61114e15
gui: Remove unused connect_button() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-20 08:48:32 -05:00
Anna Schumaker
f5ed438735
gui: Move the queue TreeModel class into the gui code
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-20 08:46:45 -05:00
Anna Schumaker
c61dca7504
gui: Various collection manager cleanups
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-19 11:43:27 -05:00
Anna Schumaker
98ff0b79cd
colmgr: Merge lib/ and gui/ code back together
...
The code is still messy now, but I'll be cleaning it up soon!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-17 13:19:41 -05:00
Anna Schumaker
1935cf9c5e
gui: Various playlist cleanups
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-17 11:27:32 -05:00
Anna Schumaker
4bfdb2d0d4
gui: Merge lib/plist.cpp back into gui/plist.cpp
...
The lib/ experiment made the gui code a little more complicated than I
was expecting, so I'm going to begin merging everything back into gui/
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-17 10:41:04 -05:00
Anna Schumaker
b4db3ba98f
gui: Put exported gst functions in a new namespace
...
I intend to put most gui functions in their own namespaces eventually.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-17 10:19:31 -05:00
Anna Schumaker
6a5eaa32f8
gui: Preserve "is playing" status when banning tracks
...
Just calling audio :: next() will advance to the next song, but won't
change if we're playing music or not. I think this is what we want to
do when banning tracks.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-16 08:22:01 -05:00
Anna Schumaker
ea49b374ee
gui: Remove gui.cpp
...
This file doesn't do anything anymore, so move the init functions into
main.cpp and remove the file.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-15 09:40:17 -05:00
Anna Schumaker
4643a5ff22
gui: Move pause count widgets into gst.cpp
...
These values affect audio playback, so they should go with the other
audio widgets.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-15 09:35:33 -05:00
Anna Schumaker
d299bc464c
gui: Move ban and favorite buttons into playlist code
...
These buttons directly change the playlists, so let's handle them there.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-15 09:08:02 -05:00
Anna Schumaker
b940fe710c
gui: Rearrange playlist tab
...
Other files in the gui implement their classes directly, rather than
making extra functions. Let's do that here, too.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-15 08:33:20 -05:00
Anna Schumaker
300acde068
gui: Set artist, album, title, and duration from gst code
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-14 20:16:28 -05:00
Anna Schumaker
6fec8876a9
gui: Rename position and duration widgets
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-14 19:57:15 -05:00
Anna Schumaker
ed88bb08bd
gui: Move toggle function to gst code
...
This lets me remove the controls.cpp and controls.h files.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-14 19:50:26 -05:00
Anna Schumaker
434b278b61
gui: Move position tracking into gst code
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-14 19:50:25 -05:00
Anna Schumaker
e539a2d208
gui: Move remaining buttons into gstreamer code
...
These buttons directly affect audio playback, so let's move them with
the rest of the audio buttons.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-14 19:19:50 -05:00
Anna Schumaker
694d3f0316
build: Add gstreamer package from gui/Sconscript
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-01-02 10:31:14 -05:00
Anna Schumaker
92d264d4ac
audio: Move Driver into audio.h
...
I also rename from Driver -> AudioDriver.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 15:48:07 -05:00
Anna Schumaker
50147ef070
gui: Handle pause counts from the GSTDriver
...
I think it makes sense to handle this directly from the driver, rather
than going through a callback.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 15:27:18 -05:00
Anna Schumaker
cd8c76e1b2
gst: Move play and pause button handling into gst code
...
I can handle these widgets directly from within the gst driver. I think
this is easier (and more straightforward) than handling this in a
separate file.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 15:02:17 -05:00
Anna Schumaker
6a117c762e
driver: play() and pause() shouldn't return a boolean
...
This value is never used in the audio layer so let's stop returning it
from the driver.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 14:32:31 -05:00
Anna Schumaker
b633f3fa0c
gst: Update the "now playing" fields through the GST driver
...
This lets me remove the on_track_loaded() callback function by handling
this event directly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 12:05:22 -05:00
Anna Schumaker
d7113cb124
driver: Pass Tracks to the load() function
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 12:01:38 -05:00
Anna Schumaker
9aaa8649ce
gst: More driver cleanups
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 11:49:22 -05:00
Anna Schumaker
3da3c8aeea
gst: Move the on_message() function out of the driver
...
This function doesn't use anything in the driver class anymore, so it
can be removed.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 11:34:29 -05:00
Anna Schumaker
955129edce
gst: Various driver cleanups
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 11:16:19 -05:00
Anna Schumaker
a4ad0aa79b
driver: Fold eos() into the driver
...
With this patch I no longer need a Driver :: init() function to handle
picking the next track.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 11:04:14 -05:00
Anna Schumaker
882da67480
gst: Begin reworking gst driver
...
I removed the need for an overridden constructor and destructor.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 10:47:17 -05:00
Anna Schumaker
fd2a251c14
audio: Initialize GST from the gui layer
...
This means I no longer need to pass argc and argv parameters to core/,
so I can eventually work towards removing the Driver :: init() function.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-20 10:16:44 -05:00
Anna Schumaker
e7a8ad54bd
Audio: Remove the driver on_error() callback function
...
This was used to get around layering issues with the gstreamer driver.
Now that the gstreamer implementation is in the gui code we can have it
call audio::next() directly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 17:26:39 -05:00
Anna Schumaker
b9d4c6749d
audio: Move the get_driver() function into the audio namespace
...
It's already in the audio.cpp file, so just reshuffle things a little
bit.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 14:54:12 -05:00
Anna Schumaker
1d2b52cc98
driver: Move the GST driver into the gui
...
This is a straight copy-and-paste of the header file and the code
implementing it. I intent to clean this up with future patches.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 14:25:59 -05:00
Anna Schumaker
c12dbae73a
driver: Track current driver with a pointer
...
This will let me implement drivers outside of this file allowing for
easier customization.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-19 14:20:30 -05:00
Anna Schumaker
c7fe5b18d5
tagdb: Rip out most tagdb functions
...
Most of this are a straight replacement with the new versions in
tags/track.cpp.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:52 -05:00
Anna Schumaker
cdd20da5c0
Track: Convert length_str into a function
...
I don't think this value needs to be stored anywhere in the Track class
since it's fairly easy to calculate. Let's convert it into a function
for now and reevaluate later!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:51 -05:00
Anna Schumaker
2540a6aa7a
Track: Use GenericTag's _name and _lowercase fields
...
This lets me remove the duplicate title and title_lowercase fields from
the Track tag.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:51 -05:00
Anna Schumaker
c6029f13f2
Track: Hide the album tag from the public
...
And set it using the new constructor.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:51 -05:00
Anna Schumaker
0a6ace3c14
Track: Hide the artist tag from the public
...
Also set it using our new constructor.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:51 -05:00
Anna Schumaker
2d9d87afc9
Album: Move Album tag into a new file
...
Also make it inherit from the GenericTag base class. Also also, add a
unit test specific to Album tags. Finally, I remove the corresponding
section of the DESIGN file since it is no longer needed.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-04 08:31:49 -05:00
Anna Schumaker
a9fc53964c
Artist: The ArtistTag should inherit from GenericTag
...
The GenericTag class provides most of the implementation, so use it!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-12-03 13:03:11 -05:00
Anna Schumaker
48b25945cc
DatabaseEntry: Rename id to _index (and make it private)
...
This variable should only be set by the Database when a DatabaseItem is
first created. This means I should hide _index from the rest of the
world to prevent accidental modifications. I also add an accessor
function for other code that needs to read _index.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-11-02 10:25:41 -05:00
Anna Schumaker
1be4c57244
gui: Use Gtk::Application() instead of Gtk::Main()
...
Gtk::Main() is deprecated, and causes several warnings to show up when
closing Ocarina. I guess it's time to switch to Gtk::Application()!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-10-29 18:08:28 -04:00
Anna Schumaker
5eeebe7854
gui: Move idle function into the collection manager
...
The collection manager is the only thing that uses the idle queue, so
let's keep all this code together.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-12 08:16:26 -04:00
Anna Schumaker
0b5478c591
lib: Move idle function setup into lib/
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-12 08:07:12 -04:00
Anna Schumaker
bc5e53a423
gui: Store pointers to play and pause buttons
...
We use these every half-second, so let's not waste time looking them up
every call.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:28:23 -04:00
Anna Schumaker
a2987c2952
gui: Call on_track_loaded() during startup
...
Also move the controls_init() function to be with other init()
functions.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:23:23 -04:00
Anna Schumaker
8152327f65
gui: Move o_seek() into controls.cpp
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:16:36 -04:00
Anna Schumaker
5e7a25e007
gui: Store position and progress widgets
...
Now we don't need to keep looking them up, and the code looks a little
bit cleaner =)
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:09:57 -04:00
Anna Schumaker
62cdc4c909
gui: Move remaning window setup into window.cpp
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:03:57 -04:00
Anna Schumaker
acdeb785f5
gui: Move window keypress handling to window.cpp
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:01:08 -04:00
Anna Schumaker
253898e9b5
gui: Set tab size and runtime on startup
...
This used to happen by itself, but changing the order of how tabs are
initialized broke this.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:01:08 -04:00
Anna Schumaker
9b98788106
gui: Begin breaking out window code
...
I think this will help with maintainability. We'll see ...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:01:08 -04:00
Anna Schumaker
df0d1496de
lib: Create a schedule() function
...
This lets me clean up some of the code in controls.cpp
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:01:07 -04:00
Anna Schumaker
1c437c4957
gui: Move init() steps into controls.cpp
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:01:07 -04:00
Anna Schumaker
922830a2ab
gui: Move o_next() into the controls.cpp file
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-11 08:01:06 -04:00
Anna Schumaker
78624a6d98
gui: Fix up how the gui pauses
...
I make it look more like o_play().
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-09 08:28:18 -04:00
Anna Schumaker
d68d5f2b40
gui: Create o_play() for handling the play function
...
This calls the audio :: play() function, rather than having the button
call into the audio layer directly. With this patch, the on_play()
callback is unused.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-09-08 17:21:40 -04:00
Anna Schumaker
412dc67e1f
Merge branch 'master' into Ocarina-next
...
Conflicts:
Sconstruct
gui/collection_mgr.cpp
2014-08-19 08:08:55 -04:00
Anna Schumaker
41506f3177
gui: Remove banned songs from Collection when re-enabling
...
I wasn't doing this before, so banned songs were showing up in the
collection list again. I think this is kind of an ugly fix, though.
Perhaps there is a better way to do it?
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-08-17 17:17:29 -04:00
Anna Schumaker
cfa61fa816
gui: Play next song after banning
...
If the user tells us they don't like the current song then we shouldn't
keep playing it!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-08-17 17:01:52 -04:00
Anna Schumaker
2890819cd3
playlist tab cleanups
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-07-27 11:52:36 -04:00
Anna Schumaker
160d2ac3be
plist: Move more playlist functions into lib/
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-07-27 11:41:40 -04:00
Anna Schumaker
97a8646977
plist: Move liststore into lib/
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-07-27 11:25:12 -04:00
Anna Schumaker
09af8d81d2
model: Move the custom TreeModel from gui/ to lib/
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-29 10:48:23 -04:00
Anna Schumaker
76f0b7b55f
lib: Move keyval parsing into lib/
...
I'll eventually add in checks for keypad vs top row number keys.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-22 11:42:01 -04:00
Anna Schumaker
80bed8b956
collection manager: Rename widgets in the glade file
...
o_collection_* was easily confused with widgets on the collection tab,
so I renamed everything to be less confusing.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-22 11:19:05 -04:00
Anna Schumaker
fdb31916a6
gui: Change chooser directory when selected path is changed
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-22 10:41:46 -04:00
Anna Schumaker
2094227f91
collection_mgr: Rename functions
...
Since these are all static functions, I don't need the _collection
part.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-22 10:22:05 -04:00
Anna Schumaker
3d067878f2
colmgr: Add a function for updating a specific path
...
On the gui end, call this function when a row in the "collected paths"
list is double-clicked.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-22 10:14:23 -04:00
Anna Schumaker
42ec504b90
gui: Collection manager cleanups
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-21 12:44:22 -04:00
Anna Schumaker
a5f47e46a8
colmgr: Move some collection manager code into lib/
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-21 12:27:34 -04:00
Anna Schumaker
194a09bed4
lib: Initialize the GtkBuilder from the middle layer
...
This will provide an interface for accessing widgets, and make it easier
to swap out different builder files.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-15 11:31:04 -04:00
Anna Schumaker
4ed36c79df
lib: Add support for looking up files from share/ocarina/
...
I replace the /proc/self/exe method with a simple hard-coded string.
This means that binaries run from the source directory need to be run
from the root of the source directory.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-15 10:12:55 -04:00
Anna Schumaker
5b3f8b13e0
lib: Initialize core libraries from a new middle layer
...
My hope is that putting lib/ between core/ and gui/ will help clean up
gui code, since everything will no longer be in a single place.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-14 20:06:07 -04:00
Anna Schumaker
ec2bd92bef
gui: collection manager fixes
...
- Fill out the list of library paths
- Update size during scan
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-06 09:20:50 -04:00
Anna Schumaker
43c8130ecc
gui: Fix adding tracks to an existing queue
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-05 11:05:40 -04:00
Anna Schumaker
95064e4537
Rename lib/ -> core/
...
I plan to introduce a new lib/ that sits between the gui and the backend
files (similar to how glibc sits between the kernel and userspace).
This gets the rename out of the way before I change my mind again.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-05 10:21:32 -04:00
Anna Schumaker
87af56ba85
Header file roundup
...
Create include/lib/ and include/gui/. Move header files into the
appropriate directory.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-04 13:59:42 -04:00
Anna Schumaker
72a51fb78f
gui: Properly create queue tabs
...
Changes to the deck removed the on_pq_created() callback that we looked
for to create new tabs. This patch creates tabs correctly.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-04 09:35:41 -04:00
Anna Schumaker
06b36afec6
gui: Updates for the recent audio changes
...
Now the gui compiles again, yay!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-06-01 17:59:27 -04:00
Anna Schumaker
36322a6ff8
Update code to match new deck layout
...
This patch actually breaks a bunch of things, but I just want to be done
with the deck changes for now. I'll go back and fix things before
releasing!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-05-26 22:33:16 -04:00
Anna Schumaker
9ba4dbc218
Updates for recent library changes
...
This fixes the gui, deck, and audio code due to the library changes I
just did.
NOTE: Library updating callbacks have been disabled in the gui.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-05-24 13:07:54 -04:00
Anna Schumaker
208e53c7e9
library: Update the code and unit test
...
Lots of changes here! I switched from using track and library ids to
passing pointers, renamed some functions, and made the code much
cleaner.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-05-24 12:48:47 -04:00
Anna Schumaker
11df56139d
playlist: Update the design and unit test
...
I updated the code to better match how I use playlists and to make sure
that everything is tested.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-05-18 21:34:14 -04:00
Anna Schumaker
9a5caa29b3
queue: Update sorting code
...
I now have a single function rather than 4 individual functions. The
code is cleaner, and I've added it to the unit test.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-05-18 14:12:16 -04:00
Anna Schumaker
7aa5f22777
Add valgrind support to testing
...
To help find memory leaks!
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-05-14 17:49:03 -04:00
Anna Schumaker
38ae4ba0f3
queue: Fix up queue :: add()
...
It should take a Track pointer, rather than a track_id. This makes the
code easier to work with.
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-05-11 10:41:50 -04:00
Anna Schumaker
24fe8e7ee2
queue: Fix compile errors related to recent changes
...
Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2014-05-11 09:20:42 -04:00
Anna Schumaker
5ff68140b5
Rip out import stuff
...
I only needed this to make the jump from Ocarina 5.10 -> Ocarina 6.0.
It's not needed anymore, now that 6.0 is out.
Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2014-04-10 08:42:53 -04:00
Anna Schumaker
1c743239a0
Rename playqueue -> queue
...
Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2014-04-09 21:10:08 -04:00
Anna Schumaker
a14f6145a5
Switch over to the new tagdb implementation
...
Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2014-04-09 21:10:08 -04:00
Anna Schumaker
2960b72967
audio: Save and load current trackid
...
Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2014-04-06 19:57:06 -04:00
Anna Schumaker
959cac0fe1
Database: Update design for database entries
...
I changed primary_key() into a function since it is only called once,
and there is no point in using more mmemory than I need to. I also
created a basic unit test for everything that database entries are
supposed to do.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:05 -04:00
Anna Schumaker
2e727ed704
gui: Add a switch to enable / disable queues
...
I also select the first enabled queue during startup.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
1394aaf37c
gui: Show the first tab on startup
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
9b0499b3ce
gui: Add to queue menu items
...
This commit finishes my tab rewrite.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
3c8e967895
gui: Connect a menu item for creating new queues
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
a529d569f6
gui: Implement add to {favorites, banned} menu items
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
2abc498fde
gui: Rename wires.cpp
...
I think gui.cpp is a better name, since this file controls most of the
random gui components.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
968d723ec7
gui: Add a window icon
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
5b34b11dd8
gui: Move ocarina6.glade to share/ocarina/
...
This directory will be copied directly into /usr/ during an install.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
6f7ce86091
gui: Remove some old code
...
All that is left in the giant commented out section is right click menu
stuff.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
ff925cf573
gui: Add songs to favorite playlist
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
d83609bc21
gui: Delete key removes tracks from queues
...
This was the behavior before I started my rewrite.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
463409acdf
gui: Playlists respond to the delete key
...
This key is used to remove tracks from a playlist.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
6c8ef37b2a
gui: Ban tracks with the "delete" key
...
Press the delete key on the collection tab to ban all selected tracks.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
cb59febd1c
gui: Reenable sorting
...
This time I don't keep a global "sorting count". Instead, this count
belongs to individual tabs so flipping between them quickly could
display different sorting fields.
Signed-off-by: Anna Schumaker <schuamker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
1da8c52b0c
gui: Remove old glade file
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
58423c92e5
gui: Use common code for adding tracks to queue
...
Called both for adding and for creating a new queue
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
f0006873b6
gui: Use number keys to add tracks to a queue
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
196088dcfa
gui: Add columns to a queue treeview
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:04 -04:00
Anna Schumaker
871914ea90
Clean up the build system
...
I'm taking a break from gui code to clean up the build system and update
my unit tests. This patch updates how code is built, and reworks my
"print" test to test version number instead.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
bfcc94de21
gui: Generic toggle button function
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
73c4de13be
gui: Update the repeat button
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
34de6874ff
gui: Queue tabs now have a search bar
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
83a2908eb6
gui: Remove some reimplemented code
...
This helps to clean out tab.cpp so I can keep track of what still needs
to be done. I also adjusted some of the spacing and section divisions.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
5acf8239c8
gui: Make sure queue tabs are removed from the notebook
...
This appears to happen automatically, but appearances can be deceiving.
Remove pages anywa just to be safe.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
eb5a65069a
gui: update tab reordering
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
587eacfdd4
gui: Reactivate the close queue tab button
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
d465c2e894
gui: Begin creating playqueue tabs
...
I've been putting this off for a while since it seemed like a lot of
work. Time to get it done!
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
6ecb8f6b7f
gui: Reactivate the "slash" keyboard shortcut
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
697c07e2df
gui: Update the track changed callback
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
3654644b1c
gui: Update the row_activated signal
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
99e849a106
gui: Set the runtime label for each tab
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
4ce08ef22e
gui: Begin yet another tab framework
...
This one is based on inheritance, and I think it will be the best way to
create several tab types that do things just slightly differently.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
e3612b6e38
gui: Create a register_tab_type() function
...
Rather than returning tab types from init functions.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
f68f03c057
gui: Create generic filtering functions
...
I need to create a FilterDesc struct with needed widgets and then
filtering can happen generically on all tabs!
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
5d365afae1
gui: Reenable filtering in the history tab
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
1ac05c6b52
gui: Rip out some code from tabs.cpp
...
Most of this was related to the playlist tab.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
1d4ba1474d
gui: Begin the new playlist tab
...
The list of playlists is now created in glade, too =)
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
4104a4cede
gui: Begin the redesigned history tab
...
This code will be in its own self-contained file: history.cpp
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
97511f82a9
gui: Begin a tab redesign
...
I'm creating as many "static tabs" as I can using GtkBuilder, and
splitting their code out of tabs.cpp. This should help to contain the
growth of this file and make all the code easier to work with.
This patch begins the redesign and adds beginning code for a new
collection tab.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
1434618381
gui: More widget and spacing cleanups
...
Signed-off-by: Anna Schumaker <Schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
be60f9bff3
gui: Split out collection manager tab
...
This makes the code a little bit cleaner, since this tab is self
contained.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
480cf92519
gui: Improve functions for accessing widgets
...
I made a couple of templated functions to get widgets and objects out of
the Gtk::Builder easier.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
3eb5bd3adb
gui: Disable focus on pause togglebutton
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
38c0009acd
gui: Configure more keyboard shortcuts
...
- Number keys to switch pages
- c, h, p, m to switch to collection, history, playlist and collection
manager tabs.
- Slash key to focus on the search entry
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
2957ea01d4
gui: Teach playlists about the f key
...
This key is used to add songs to the "favorites" playlist.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
b161048f7f
gui: Teach playqueues about the delete key
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:03 -04:00
Anna Schumaker
d665b7f167
gui: Use RefPtrs for menu items during init
...
I'm honestly not sure why this is needed, but using ref pointers
prevents several lines of warning messages.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
5761740f6b
gui: Add a right click menu
...
At the moment it only adds tracks to a playqueue. I will add in
removing tracks soon!
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
5f582e639b
playqueue: Add a path_selected function
...
This is called by the GUI to tell the playqueue that a track has been
selected. This gives the PQ a chance to (possibly) remove it.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
04ffffb4e8
gui: Fix flags on playlist manager tab
...
I wasn't initializing the variable, so it was sometimes drawing buttons
next to the filter entry bar.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
48cc1f992a
gui: Add a playlist manager tab
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
3fb8dfa534
gui: Playqueue spacing improvements
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
d16ce77c0a
gui: Change justify for some tabs
...
I think justify center looks better.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
82243cfdd1
gui: Add tracks to playqueue
...
I added tab numbers to make it easier to specify what playqueue to add
tracks to.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
0929418fb7
gui: Adjust toolbar spacing
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
2f2b01100e
gui: Add playqueue filtering!
...
I love tis feature, and I've been missing it the last few days of
Ocarina 6.0 preview testing.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
444e48f93b
gui: Custom model fixes
...
- Initialize stamp with a random integer (this is how a Gtk::ListStore
works)
- Increment the stamp in a way that it will never be 0 (AKA: invalid)
- iter_n_root_children() does not take any arguments, so fix up my
function.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
b2b1620116
gui: Change tab close name
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
0e4c05350a
gui: Implement tab reordering
...
And prevent tabs from being moved into the perma-tab area.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
cefd8b865b
gui: Disable focus on click for buttons
...
Because I think this looks a bit nicer.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
946b1a1bc9
gui: Add better sorting display
...
I show the column that is currently being sorted by.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
b571018a53
gui: Spacing improvements
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
5df8c94ae5
gui: Add a close tab button
...
Only visible for playqueue tabs
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
07a7f3d4a7
gui: Clean up tabs
...
Create various helper functions to call during construction
Create multiple tab label classes to use for each type of tab.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
4f0b7070f9
tabs: Turn OcarinaTab into a pointer
...
And have in inherit from Gtk::HBox
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
6bd02bd46b
gui: Press "s" to create a new playqueue
...
This playqueue will have random enabled.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:02 -04:00
Anna Schumaker
86e35d4fae
gui: Add a repeat button in temporary tabs
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker
7ce3c4268f
gui: Create new playqueue tabs
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker
1e4faeaff0
gui: Add basic keyboard shortcuts
...
n: play the next song
N: play the previous song
spacebar: play or pause
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker
e9c398f5ef
model: Don't escape all fields
...
Only the tooltip column needs to have escaped text.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker
bf010f2a84
gui: re-add by / from lines to current track
...
These were accidentally removed a few days ago. Put them back!
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker
92f466c310
model: Escape text before setting column values
...
Otherwise there could be gtk errors.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker
30c0d97d56
gui: Use track filepath as tooltip
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker
d240ff44bc
playqueue: Change cur when tracks are directly selected
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker
782bcf0143
gui: Compress some of the model functions
...
This is to have a single function to set the user pointer value.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker
6706a998ca
gui: Improve sorting visuals
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:01 -04:00
Anna Schumaker
f83f8d47fa
gui: Click columns to sort
...
I set up a 3-second timeout to decrement the count. When the count is
at 0, I reset sorting on the playlist.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
8ab973cd85
gui: Play tracks when rows are selected
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
cde7e5d96c
gui: Change default page
...
Start on the collection page. I eventually want to display the first
enable playqueue, though.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
1b8c55b0fc
gui: Escape text before setting labels
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
97be413bcf
gui: Add a second-stage init function for tabs
...
This gives them a chance to check playqueue flags after the queues are
loaded.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
018c4747a2
gui: Watch for clicks on the random button
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
e7ecbeacda
gui: Use the playqueue flags for displaying the random button
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
a4d680b00e
gui: Make OcarinaPage inherit from a vbox
...
Now we are passed the page on the switch_page() signal. This saves time
iterating and comparing.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
aa40f1dfd5
gui: Create a history tab
...
Used to show tracks that have recently played.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
7d10ebe5c3
gui: Split apart tab and tab label
...
I made a new tab label class to make it easier to have a few labels with
different layouts.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
9e68f8213b
gui: Adjust tab sizing
...
Because "year" only had 1 pixel and wasn't showing up.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
60c35219c2
gui: Implement seeking
...
You can either click + drag the slider or use the keyboard to change the
current position.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:57:00 -04:00
Anna Schumaker
00d5258902
gui: Begin playback when pressing the next() button
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:59 -04:00
Anna Schumaker
3d44d20b31
gui: Fix arguments to ocarina_init()
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:59 -04:00
Anna Schumaker
05148ba832
gui: Add UI controls for changing pause status
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:59 -04:00
Anna Schumaker
c346a5860a
gui: Implement control buttons
...
Play, pause, stop and so on. I also update labels and progress bars
during playback.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:59 -04:00
Anna Schumaker
a865ac36a3
gui: Respond to changing current tab
...
I display the runtime of the currently visible playqueue in the bottom
right of the screen. When the collection manager is visible, I hide
this label.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:59 -04:00
Anna Schumaker
0f11ba0ee6
gui: Create a new test for the Collection tab
...
This is a bit cleaner that having one giant switch-statement based test.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:59 -04:00
Anna Schumaker
62a1b4dcb6
gui: Change name of library tab
...
Now it says "Collection" to match "Collection Manager" it was either
this or have a "Library" tab and a "Library Manager"
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:59 -04:00
Anna Schumaker
3d1e8872d3
gui: Create a common ocarina_init()
...
To initialize the needed backend modules, shared by normal main() and
testing main().
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
2ecb37f6dc
Everything for a custom Gtk::TreeModel
...
I implemented an entire Gtk::TreeModel in this commit, plus some minor
supporting code in the library to look up playlist entries by index.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
6c58f9bc2f
gui: Create a treeview and add columns
...
I haven't created the model for the treeview yet, but it's coming!
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
a0067c4542
gui: Respond to playqueue changed callbacks
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
ea687408aa
gui: Begin developing playqueue tabs
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
2724b90281
gui: Add initial extra notebook tab
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
f80203c5fe
gui: Delete and disable library paths
...
The signal connections for these features are really difficult to test
programmatically, but I can test the effects by calling each function
directly.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
ae91d33baa
gui: Show files in filechooser
...
I had these hidden so the users really, really know that they are
supposed to select directories. Now I've made it easier to browse the
filesystem through the Collection Manager, so hiding files doesn't make
sense.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
a077b8cbad
gui: Change directory on row double click
...
This allows a user to explore what has been added in each of their
library paths. Right now I filter for directories only, but it may be a
good idea to change this in the future.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
31af8482de
gui: Adjust widget spacing
...
I add a little bit of spacing between widgets so they're not so crowded
together. I also adjust things away from the edges of the window
because I tihnk it looks better this way.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
4c16f8370b
gui: Listen for current library callbacks
...
This adds support for callbacks telling us when a new library path is
added and when a path has been updated.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
11704b2bfa
gui: Add some collection manager tests
...
Test ok, update, and import buttons in a Glib::timeout based simulator.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
becf7f94bc
gui: Begin implementing the gui
...
This adds the ocarina6.glade file and code for clicking the library
import button.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:58 -04:00
Anna Schumaker
e4364e6ea2
gui: Add a button for importing a legacy library
...
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:57 -04:00
Anna Schumaker
2c243194d7
gui: Create a glade file
...
I've taken a first pass at the Ocarina 6.0 GUI. The backend will need
some tweaking before this design can be used.
Signed-off-by: Anna Schumaker <schumaker.anna@gmail.com>
2014-04-06 19:56:56 -04:00
Bryan Schumaker
7b48c3311d
ocarina: Rename gui/ to ocarina/
...
I think ocarina/ is a better name for this directory, and now that I've
named the executable "ocarina.bin" I can do this again. I also added
functions for creating a page footer with the basic controls.
2011-09-07 08:12:02 -04:00
Bryan Schumaker
a097e751b2
ocarina: Remove custom icon size from button constructor
...
All buttons are the same size, so there is no point in requesting the
size for each button.
2011-09-06 07:57:06 -04:00
Bryan Schumaker
39a8f861c7
ocarina: Added a fast-forward button
...
Clicking it advances the song by 5 seconds
2011-09-03 23:15:30 -04:00
Bryan Schumaker
c2c3a1eea9
ocarina: Added a rewind button
...
Pressing the rewind button rewinds the song by 5 seconds.
2011-09-03 23:06:13 -04:00
Bryan Schumaker
937fbc1111
Move volume helper functions
...
I moved these to a volume.h file to keep them separate from controls.
2011-09-03 21:31:21 -04:00
Bryan Schumaker
ef3e18ba25
ocarina: Use the new libsaria convenience functions
...
When libsaria changes, I won't have to recompile as much (in theory)
2011-09-03 21:10:41 -04:00
Bryan Schumaker
7cdd6b1664
ocarina: Set volume button to current audio levels
...
When the button is created, it should be set to the current volume of
the gstreamer pipeline. If I don't do this, the icon will default to a
"muted" status.
2011-09-03 10:25:53 -04:00
Bryan Schumaker
ef2b716047
ocarina: Change volume when volume slider changed
...
I pass along the new value to libsaria to set in the gstreamer pipeline.
2011-09-03 09:49:53 -04:00
Bryan Schumaker
6137ec8a83
ocarina: Added volume button
...
This button will eventually be used to control the libsaria volume. It
doesn't do anything useful yet.
2011-09-02 08:26:44 -04:00
Bryan Schumaker
f49b5e1d6d
gui: Move stop button
...
It's in the controls.cpp file with the play and pause button code.
2011-08-31 08:29:02 -04:00
Bryan Schumaker
f6ac48219e
ocarina: Move pause button code
...
I moved it from the generic button.cpp file to the controls.cpp file to
keep everything together. I also changed the button list to use the new
show / hide functions.
2011-08-31 08:26:40 -04:00
Bryan Schumaker
bd907ecfe0
ocarina: Remove show_play_buttons() and hide_play_buttons()
...
I replaced these functions with a generic show_button_list() and
hide_button_list() functions.
2011-08-31 08:20:45 -04:00
Bryan Schumaker
8234e4072b
ocarina: Move play button to new file
...
I moved all the button code into a new subdirectory. From there, I
moved the play button code into a file named controls.cpp. This should
help clean up button code.
2011-08-30 08:26:23 -04:00
Bryan Schumaker
ac03eed3f5
ocarina: Show and hide play and pause buttons
...
I hide the play button when music is playing and show it when music has
been stopped. I hide the pause button when music is not playing and
show it when music has been stopped. This can give the effect of one
button replacing the other.
2011-08-27 13:38:01 -04:00
Bryan Schumaker
0075c01991
ocarina: Added initial callbacks
...
These functions will be triggered when the libsaria play or pause
functions are called. Right now they just print out a message, but I
plan on doing more.
2011-08-27 12:36:41 -04:00
Bryan Schumaker
11f972aee4
ocarina: Load a file through the gui
...
I call the new libsaria load function with a file selected through the
gui.
2011-08-23 08:29:46 -04:00
Bryan Schumaker
20756aac14
Created an open button
...
Clicking the button will open a file chooser to select a file to play.
2011-08-23 08:26:23 -04:00
Bryan Schumaker
7d3769a1a2
ocarina: Clean up button code
...
I didn't like using macros...
2011-08-23 07:53:25 -04:00
Bryan Schumaker
b23d912f64
ocarina: Added a stop button
...
This calls the Libsaria stop function
2011-08-22 08:29:23 -04:00
Bryan Schumaker
edc46f9ced
ocarina: Smaller window
...
I only have two buttons. I don't need to take up an 800 x 600 window
yet.
2011-08-21 19:28:54 -04:00
Bryan Schumaker
c716f62aaa
ocarina: Use new play and pause functions
...
Eventually the global functions are going away, so I convert to using
the functions as part of the Libsaria instance.
2011-08-21 18:11:17 -04:00
Bryan Schumaker
0173f97fba
Call libsaria_quit()
...
This should free up any memory currently in use.
2011-08-21 15:46:00 -04:00
Bryan Schumaker
bf3d41f8d2
Set window icon
...
Just to my basic ocarina image for now.
2011-08-21 15:19:56 -04:00
Bryan Schumaker
b802b31d42
Set window title
...
I set the title based on the current version, but I do this through a
function to make it easier to change later.
2011-08-21 15:15:40 -04:00
Bryan Schumaker
ae5b3a358e
Play and pause buttons work
...
They play and pause music...
2011-08-20 12:12:53 -04:00
Bryan Schumaker
8c49544efd
Created helper for connecting signals
...
This should make connecting signals easier, since I don't need to use
any conversion macros.
2011-08-20 11:47:26 -04:00
Bryan Schumaker
1413a31aa7
Create wrapper function for gtk_container_add()
...
I don't want to have to keep typing out the conversion macros, so this
function puts them all in one place.
2011-08-20 11:36:29 -04:00
Bryan Schumaker
d75227b6af
Added a wrapper function for gtk_box_pack_start()
...
This will call the conversion macros for packing items into a box.
2011-08-20 11:32:20 -04:00
Bryan Schumaker
467cedf828
Added a pause button
...
I just put in next to the play button for now.
2011-08-20 11:17:01 -04:00
Bryan Schumaker
0f5303503c
Improve play button creation
...
I made a function to create a play button. I suspect that
pre-configured buttons will be easier to use than having to build them
up every time.
2011-08-20 11:08:42 -04:00
Bryan Schumaker
7efcfddcde
Add a button to the window
...
The button doesn't do anything yet, but I may eventually modify it for
playing and pausing music.
2011-08-18 08:20:56 -04:00
Bryan Schumaker
53d8718053
Open a window and play a song
...
I start ocarina with a file. I play the song right away, and open a
window so that gtk_main() can quit when closed.
2011-08-15 07:53:25 -04:00
Bryan Schumaker
c0ace6fed6
Basic initializiation code
...
I print some messages to the screen and I have a makefile to compile
libsaria and gui code.
2011-08-14 11:35:37 -04:00