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