Commit Graph

41 Commits

Author SHA1 Message Date
Anna Schumaker 1d0f392835 gui: Give tab labels a set_size() function
This lets them set themselves whenever values change.  Additionally, I
update the Tab class to take a QueueLabel instead of the "size label"

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker 2c45cf3972 gui: Remove tab_finish_init()
It is no longer needed.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
Anna Schumaker 9ddae1275f gui: Set up QueueWindow from a single place
I can't pack it directly into the tab_vbox because playlists need a way
to pack in their special window.

Signed-off-by: Anna Schumaker <Anna@OcarinaProject.net>
2015-09-02 14:24:42 -04:00
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 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 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 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 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 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 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 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 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 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 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 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 1c743239a0 Rename playqueue -> queue
Signed-off-by: Anna Schumaker <anna@ocarinaproject.net>
2014-04-09 21:10:08 -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 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 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 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 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