After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 316238 - use toolbar for controls
use toolbar for controls
Status: RESOLVED FIXED
Product: rhythmbox
Classification: Other
Component: User Interface
HEAD
Other Linux
: Normal normal
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-09-13 20:14 UTC by William Jon McCann
Modified: 2005-12-05 19:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (14.39 KB, patch)
2005-09-13 20:17 UTC, William Jon McCann
none Details | Review
updated patch (19.97 KB, patch)
2005-09-14 15:45 UTC, William Jon McCann
none Details | Review
screenshot (242.41 KB, image/png)
2005-09-15 14:38 UTC, William Jon McCann
  Details
screenshot - small display mode (55.26 KB, image/png)
2005-09-15 14:39 UTC, William Jon McCann
  Details
updated patch (21.07 KB, patch)
2005-10-12 21:59 UTC, William Jon McCann
none Details | Review
new patch (24.33 KB, patch)
2005-10-29 07:29 UTC, James "Doc" Livingston
none Details | Review
patch with ideas from ML (50.37 KB, patch)
2005-11-10 03:31 UTC, James "Doc" Livingston
none Details | Review
sync with cvs (51.12 KB, patch)
2005-11-30 21:07 UTC, William Jon McCann
none Details | Review
impoved patch (61.34 KB, patch)
2005-12-01 15:41 UTC, James "Doc" Livingston
none Details | Review
latest screenshot (105.57 KB, image/png)
2005-12-01 17:16 UTC, William Jon McCann
  Details
new patch (68.40 KB, patch)
2005-12-01 18:29 UTC, William Jon McCann
none Details | Review
yet another patch (67.74 KB, patch)
2005-12-02 09:39 UTC, James "Doc" Livingston
none Details | Review
patch (71.16 KB, patch)
2005-12-02 19:41 UTC, William Jon McCann
committed Details | Review
Toolbar layout suggestion with two toolbars. (39.32 KB, image/png)
2005-12-03 16:33 UTC, Amadeus
  Details
Toolbar layout suggestion with three toolbars. (46.20 KB, image/png)
2005-12-03 16:36 UTC, Amadeus
  Details

Description William Jon McCann 2005-09-13 20:14:32 UTC
Here is a patch that moves controls into a toolbar.

Some reasons for this are outlined in:
http://mail.gnome.org/archives/rhythmbox-devel/2005-May/msg00151.html

Some other reasons for it include:
 * We can remove code by getting a toolbar from UI manager for free instead of
using our own custom one.
 * The repeat and shuffle are visible when in small mode or when the statusbar
is hidden.
 * We don't have to worry about the messy synchronization between menu and
shuffle/repeat toggle states.
 * It is what people expect in a GNOME app
 * It looks less like a certain patented interface
 * The "targets" for the controls are bigger and therefore easier to use

Some points against it:
 * It takes up more space
 * There is more blank space in the UI
 * It looks less like a certain patented interface
Comment 1 William Jon McCann 2005-09-13 20:17:32 UTC
Created attachment 52190 [details] [review]
patch

Check out all the "-" lines :)
Comment 2 James "Doc" Livingston 2005-09-14 02:32:26 UTC
This would also let us avoid having to find a solution to 313158, because we
don't have to worry about synchronisation.
Comment 3 James "Doc" Livingston 2005-09-14 03:58:42 UTC
This looks good, but there are a couple of issues, and I have a few ideas:

* For some reason Rhythmbox has a pause button when the playing source is
selected, and a stop button when another source is selected. This makes the
pause button on the toolbar disappear when a different source is selected. I
think the solution is to just have pause displayed irrespective of which source
is selected. Alternatively we could just add <toolitem name="Stop"
action="ControlStop"/> to the toolbar.

* The shuffle and repeat buttons aren't set correctly on startup, which is the
same issue as in bug 313158.

* The wider seek bar is okay, but it should probably shrink when the window is
made thinner. The minimum with on the window is now ~400px, at which point you
can't see the song info any more.

* Having a View->Show/Hide Toolbar menu item would be nice.
Comment 4 William Jon McCann 2005-09-14 15:45:30 UTC
Created attachment 52234 [details] [review]
updated patch

* Added View/Toolbar menu item.
* Show only icons in toolbar when in small display mode
* Added ControlStop action to toolbar
* Changed seek bar back to original size
Comment 5 Jonathan Matthew 2005-09-14 23:36:40 UTC
With the most recent patch, the pause button disappears when I press it, leaving
an empty space in the toolbar where the play button should be.  I have to change
to another source and then back to get the play button to reappear.
Comment 6 Bastien Nocera 2005-09-15 09:56:37 UTC
Jon, could you upload a screenshot as well?
Comment 7 William Jon McCann 2005-09-15 14:38:38 UTC
Created attachment 52282 [details]
screenshot
Comment 8 William Jon McCann 2005-09-15 14:39:20 UTC
Created attachment 52283 [details]
screenshot - small display mode
Comment 9 William Jon McCann 2005-09-15 14:41:21 UTC
Jonathan, I think the button disappearing is a GTK+ bug.  I'll try to write a
test-case.  The button actually reappears when you press down but don't release
any of the other toolbar buttons.  Odd.
Comment 10 William Jon McCann 2005-10-12 21:57:30 UTC
The pause button doesn't disappear anymore.  But now we don't have any shuffle
and repeat icons.  I think these might have been deleted from cvs during all the
icon changes lately.
Comment 11 William Jon McCann 2005-10-12 21:59:00 UTC
Created attachment 53383 [details] [review]
updated patch

Synced with CVS and added a Burn CD action to the toolbar.
Comment 12 James "Doc" Livingston 2005-10-13 00:28:32 UTC
The icon name is "stock_media-shuffle"
Comment 13 James "Doc" Livingston 2005-10-29 07:29:37 UTC
Created attachment 54028 [details] [review]
new patch

Updated patch, which has correctly working icons with current cvs.

This also implements the button-seperation from bug 159824. Aside from being a
HIG recommentation and fixing some a11y issues mentioned on that bug, it also
fixes the odd graphical glitches, and allows you to use either pause or stop
irrespective of what the selected source is.
Comment 14 Amadeus 2005-11-08 06:52:45 UTC
See Bug #320937 for a solution suggestion for the Search Entry and Hide Browser
problem, if a toolbar is introduced.

This have been discussed in
http://mail.gnome.org/archives/rhythmbox-devel/2005-November/msg00015.html
Comment 15 Amadeus 2005-11-08 07:06:10 UTC
If a toggle button was used for play, there would be no need for changing icons
or seperated play/pause buttons. 

The play button would then be be "play/not play". Sort of a music On/Off switch.



Comment 16 James "Doc" Livingston 2005-11-10 03:31:58 UTC
Created attachment 54554 [details] [review]
patch with ideas from ML

This is an updated patch taking into account some of the suggestions from the
mailing list. The header (song info and seek bar) is put onto line, so that it
doesn't take up as much vertical space, the volume control has been moved up,
and the play button is not a toggle action.

There are some issues with the volume button, because it's not actually in the
toolbar, but I'm planning to work on that if people like this layout.
Comment 17 William Jon McCann 2005-11-10 14:49:25 UTC
This looks very nice!  Maybe we should make the volume control a proper toolbar
button.  I think you are right that it belongs there.

With the song and artist info on one line we need to make sure that we ellipsize
each field when necessary or wrap the text.  Preferrably both.  It would be nice
to wrap first on the break between the song and artist.
Comment 18 James "Doc" Livingston 2005-11-10 15:01:45 UTC
Currently how the song header works is that is displays "Title from Album by
Artist" is that will fit, but will leave out the album to display "Title by
Artist" if it won't (with the artist being ellipsised). I guess we should fix it
to remove the artist if it's too small for that, and just have the ellipsised title.

Wrapping would also be good, but I'm not sure how to do that with several
different widgets.


I though I'd check with people to see if they liked the volume-on-toolbar before
actually putting it on the toolbar, because of the amount of work involved.
Making it a real toolbar item is moderately difficult, because BaconVolumeButton
will need to be modified to handle size changes and the like.
Comment 19 William Jon McCann 2005-11-10 15:11:34 UTC
For me with this patch, when I play a song with a long title the RB window
expands to fit (even off the screen).
Comment 20 William Jon McCann 2005-11-30 21:07:58 UTC
Created attachment 55450 [details] [review]
sync with cvs

Sync patch with cvs.  No additional changes.  Still looks great.
Comment 21 Baptiste Mille-Mathias 2005-11-30 21:36:23 UTC
The toolbar is really better, and I really like it, but ... :)

One small problem is that the toolbar doesn't respect the menu layout define in
GNOME.
ie: I set "text beside icons" and rb doesn't set this layout as other application

One is the border beside the volume control which is not really beautiful

the third (sorry) is to know if the link to album and artist to last.fm should
dropped.

Thanks for your work
Comment 22 William Jon McCann 2005-11-30 21:54:31 UTC
You are right, the toolbar item text position should follow the GNOME setting
when not using Small Display mode.

The volume control should be made into a GtkToolButton (perhaps something like a
GtkMenuToolButton?).  Then it will be added to the toolbar proper and fix the
problem you mention.

As for the web links, hopefully, we can fix the broken GnomeURL widget or get a
replacement in GTK.
Comment 23 Baptiste Mille-Mathias 2005-11-30 21:59:13 UTC
humm ok, disregard the last "problem" concerning the artist link.

I have another comments

I saw that RB enables to remove the toolbar, but when it is remove, a big empty
space remains with just the volume control a the right.Perhaps the volume
control has to be moved elsewhere ?

I saw anoter tricky thing:
In the browser select an artist whith one song only
Make sure the random and shuffle are off
press "play"
now press the button "Repeat"

Result: the button 'Press' become sensitive.

thanks
Comment 24 Bastien Nocera 2005-11-30 22:12:03 UTC
It really shouldn't allow for the toolbar to be removed (and I'm also wondering
who on earth uses the small mode).
Comment 25 William Jon McCann 2005-11-30 22:18:54 UTC
The toolbar hiding option is part of the HIG. 
http://developer.gnome.org/projects/gup/hig/2.0/toolbars.html

The space that remains is also because the volume button is not a toolbar-item.

Bastien, I think you're right that small mode doesn't fit with the music service
approach.  In a manner of speaking we use the notification icon as the small
mode now.
Comment 26 Jonathan Matthew 2005-11-30 23:49:52 UTC
I use small mode, but I wouldn't really miss it if it went away.  If I found I
still wanted it, I'd probably write a pygtk/dbus client to display the same
information in a more compact form, which wouldn't be a bad thing.  Small mode
is just good enough to keep me from having to do that.
Comment 27 James "Doc" Livingston 2005-12-01 00:45:10 UTC
The issue of the border near the volume control and the fact that it stays when
the toolbar is hidden, is caused because it isn't actually in the toolbar - I've
got a half-done version with that fixed.

If we want to keep the artist/album link, something like SexyUrlLabel[0] would
work well, and let us put all the track-artist-album info in one label.


[0] from libsexy: http://wiki.chipx86.com/wiki/Libsexy
Comment 28 James "Doc" Livingston 2005-12-01 15:41:09 UTC
Created attachment 55480 [details] [review]
impoved patch

The volume control is now a proper toolbar item, so it works properly in small
mode and doesn't have the border glitches. I've moved the last.fm link code
inside rb-song-display-box, where it belongs.
Comment 29 William Jon McCann 2005-12-01 15:59:34 UTC
The volume button looks really nice.  I'm not sure about moving the time to the
left side though.  One reason is that because we don't use a fixed width for the
text the whole line jumps side to side every second.  Another reason is that I
think the title is more fundamental and is easier to see against the left edge.

I'm starting to wonder how useful the song position slider is - as it is now. 
When I don't need to use it, it is just clutter and steals space from the title
and artist links.  When I do need to use it, it is way too small and the
granularity is way too large.  Maybe we should remove it from the interface by
default and have it optionally appear on a separate hbox underneath the title. 
The time text could still be displayed on the right hand side.  What do you think?

Anyway, thanks for your efforts with this James!  It is looking really nice.
Comment 30 James "Doc" Livingston 2005-12-01 17:08:23 UTC
Moving the time to the right was one of the suggestions from the ML, but after
using it for a while I agree that it's probably better on the left.

IIRC Muine has a menu command to bring up the seek bar. Perhaps we could do
something like that, or add an option to the View menu to control visibility -
which would let us make it bigger.
Comment 31 James "Doc" Livingston 2005-12-01 17:08:54 UTC
Err, swap left and right in that.
Comment 32 William Jon McCann 2005-12-01 17:16:56 UTC
Created attachment 55484 [details]
latest screenshot

I may not be communicating this well.  Here's the way it looks with the latest
patch.
Comment 33 Amadeus 2005-12-01 17:38:48 UTC
To #31. Is it this email you think of?
http://mail.gnome.org/archives/rhythmbox-devel/2005-November/msg00135.html

In case it is, here is an ASCII muck up =)

[Previous][Play][Next]|[Repeat][Shuffle]|[Create Audio CD]         [Volume]
[   Duration slider  ] [Time] [         Title Artist Album                ]

My suggestion is that the duration slider should have same length as the length
of Previous+Play+Next buttons.
Comment 34 William Jon McCann 2005-12-01 18:29:50 UTC
Created attachment 55489 [details] [review]
new patch

Updated James' patch to move the time to the right, move the slider to a
separate row, not show slider by default, add menu option to show slider.  What
do you think?
Comment 35 Amadeus 2005-12-01 19:03:36 UTC
If I am quick, then can I drop a comment before James =)

To me the most important feature of the duration slider is, that I can visually
see the progress of the song. I close to never look at the time.

So I would atleast miss that information.

Perhaps something can be worked out using the statusbar in Bug #320938 ?
Comment 36 William Jon McCann 2005-12-01 19:14:19 UTC
With my last patch you can Ctrl-S or use the View menu to show the slider.
Comment 37 Amadeus 2005-12-01 19:38:37 UTC
Cool patch =)

But I think people would expect a duration slider as default in a music player.

I think removing the duration slider from the default interface have a much too
high prize for the those using it.
Comment 38 James "Doc" Livingston 2005-12-02 09:39:38 UTC
Created attachment 55514 [details] [review]
yet another patch

This fixes some refcounting problems, and adds the gconf keys to the schema.

I agree with Martin that the seek bar should be present by default, but having
an option to remove it is fine. Whether it is next to or below the other song
info doesn't worry me personally.
Comment 39 James "Doc" Livingston 2005-12-02 12:09:01 UTC
I'm not sure why the toolbar doesn't change when you modify the layout (with
Menus & Toolbars preference), GtkToolButton should handle that automatically -
and looking at the code for it, it looks like it would.
Comment 40 Amadeus 2005-12-02 15:51:21 UTC
I have now been using the long duration bar for a day or so, and come up with
this suggestion for a toolbar layout, that might satisfy everybody? =)

[Play] [              Title Artist Album             ] [Vol.]
[Prev] [Next] [         Duration slider            ] [ Time ]

My reason for this suggestion is, that the play button is closely related to
SongInfo (play current song on/off), and Previous and Next are closely related
to Time.

Placing the Play button and Volume button at each end of the SongInfo gives a
centered SongInfo.

The length of Time is the same as the length of Previous+Next buttons, so the
Duration Slider is centered.

Would this work?
Comment 41 William Jon McCann 2005-12-02 19:41:13 UTC
Created attachment 55539 [details] [review]
patch

Now follows preferred toolbar layout.  Fixed the tooltip for ControlPlay to say
"Stop playback" when playing.  Removed the hseparator from below the
shell-player since the seek bar kinda serves that purpose now.

After doing some user testing, I now agree that the seek bar should be visible
by default.  The test scenario I used was:
"Listen to the second half of the audio program in the most recent episode of
the xxx podcast feed".

Should note that some people aren't figuring out that the play button is a
toggle and can be used to stop/pause.  Hopefully, the updated tooltip will
help.
Comment 42 Amadeus 2005-12-02 20:24:20 UTC
The patch from #41 gives me Segmentation Fault with latest cvs checkout. =(

(rhythmbox:31672): GdkPixbuf-CRITICAL **: gdk_pixbuf_new_from_file: assertion
`filename != NULL' failed

(rhythmbox:31672): Rhythmbox-WARNING **: Unable to load icon rhythmbox-podcast

(rhythmbox:31672): Gtk-WARNING **: ControlPauseMenu: missing action

(rhythmbox:31672): Gtk-WARNING **: ControlStopMenu: missing action

(rhythmbox:31672): Gtk-CRITICAL **: find_menu_position: assertion `GTK_IS_WIDGET
(prev_child)' failed

(rhythmbox:31672): Gtk-CRITICAL **: find_menu_position: assertion `GTK_IS_WIDGET
(prev_child)' failed

(rhythmbox:31672): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(rhythmbox:31672): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion
`G_TYPE_CHECK_INSTANCE (instance)' failed

(rhythmbox:31672): Gtk-CRITICAL **: find_menu_position: assertion `GTK_IS_WIDGET
(prev_child)' failed

(rhythmbox:31672): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(rhythmbox:31672): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion
`G_TYPE_CHECK_INSTANCE (instance)' failed

(rhythmbox:31672): Gtk-CRITICAL **: find_menu_position: assertion `GTK_IS_WIDGET
(prev_child)' failed

(rhythmbox:31672): Gtk-CRITICAL **: find_menu_position: assertion `GTK_IS_WIDGET
(prev_child)' failed

(rhythmbox:31672): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(rhythmbox:31672): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion
`G_TYPE_CHECK_INSTANCE (instance)' failed

(rhythmbox:31672): Gtk-CRITICAL **: find_menu_position: assertion `GTK_IS_WIDGET
(prev_child)' failed

(rhythmbox:31672): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(rhythmbox:31672): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion
`G_TYPE_CHECK_INSTANCE (instance)' failed

(rhythmbox:31672): Gtk-WARNING **: PauseTray: missing action

(rhythmbox:31672): Gtk-CRITICAL **: find_menu_position: assertion `GTK_IS_WIDGET
(prev_child)' failed

(rhythmbox:31672): Gtk-CRITICAL **: find_menu_position: assertion `GTK_IS_WIDGET
(prev_child)' failed

(rhythmbox:31672): GLib-GObject-WARNING **: invalid (NULL) pointer instance

(rhythmbox:31672): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion
`G_TYPE_CHECK_INSTANCE (instance)' failed
Segmentation fault

Comment 43 James "Doc" Livingston 2005-12-03 09:30:50 UTC
Martin: That kind of layout can't really be done with a toolbar. I guess it
would be possible with two vertically packed toolbar, but a) that pretty dodgy
and b) toolbars generally only contain "action" items which do something, and
the information doesn't.


Those errors usually occur if you run Rhythmbox uninstalled (shell/rhythmbox)
but didn't compile it with --enable-uninstalled-build.
Comment 44 Amadeus 2005-12-03 16:32:43 UTC
James: You surdenly know your stuff =) --enable-uninstalled-build did the trick.

I understand your point about action only widgets in one toolbar, but I don't
think it look too bad =)
Comment 45 Amadeus 2005-12-03 16:33:55 UTC
Created attachment 55578 [details]
Toolbar layout suggestion with two toolbars.
Comment 46 Amadeus 2005-12-03 16:36:13 UTC
Created attachment 55579 [details]
Toolbar layout suggestion with three toolbars.

It is likely that the third toolbar should be beneath the two others. Perhaps
the third toolbar could have the Hide Browser and Search Entry aswell?
Comment 47 James "Doc" Livingston 2005-12-05 04:43:35 UTC
Rather than debating the virtues of different layouts here, I think it would be
better to land the base toolbar stuff in cvs, and then discuss layout changes on
the ML. I think the general consensus is that using toolbar(s) is good, and
there are a couple of related things (source-specific toolbar items, and the
play-order menu) that are blocking on this.

I think the patch from comment #41 is fine, and if people don't like the moved
seek bar, we can always move it back.
Comment 48 William Jon McCann 2005-12-05 17:33:50 UTC
OK, I committed it.  I agree about the seek bar.  Thanks James!

2005-12-05  William Jon McCann  <mccann@jhu.edu>

	* widgets/rb-song-display-box.[ch] (rb_song_display_box_init):
	Hide internals and add tooltips.
	(rb_song_display_box_size_allocate): Hide internals.
	(sanitize_string, info_url): Copied from rb-header.
	(rb_song_display_box_sync): New public function.

	* widgets/rb-header.[ch]: Use G_DEFINE_TYPE.
	(rb_header_init): Use a separate row for the seek bar.
	(rb_header_finalize): Don't unref widgets.
	(rb_header_sync): Use rb_song_display_box_sync.
	(rb_header_set_urldata)
	(rb_header_set_show_artist_album): Hide instead of remove widgets.
	(rb_header_set_show_position_slider): Set visibility of seek bar.
	(rb_header_set_show_timeline): Set sensitivity of seek bar.
	(rb_header_get_elapsed_string): Don't shift when you first start playback.

	* shell/rb-statusbar.c (rb_statusbar_init)
	(rb_statusbar_sync_state): Remove shuffle and repeat controls.

	* shell/rb-shell.c (rb_shell_finalize): Destroy tooltips.
	(rb_shell_constructor): Remove hseparator.  Monitor
	toolbar visibility settings.  Add toolbar.  Add
	volume button to toolbar.  Add tooltips for volume button.
	(rb_shell_view_toolbar_changed_cb) 
	(rb_shell_sync_toolbar_visibility)
	(toolbar_visibility_changed_cb): Set visibility of
	toolbar.
	(rb_shell_sync_smalldisplay): Set the toolbar style to
	icons only when in small display mode.
	(rb_shell_volume_widget_changed_cb): Save volume setting.

	* shell/rb-shell-player.c (rb_shell_player_constructor):
	Remove pause and stop actions.  Make play action "important"
	so that text is visible in horizontal toolbar position.
	Remove control buttons.
	(rb_shell_player_init) 
	(rb_shell_player_sync_song_position_slider_visibility):
	Set visbibility of seek bar.
	(rb_shell_player_cmd_play, rb_shell_player_playpause):
	Make play action a toggle.
	(rb_shell_player_sync_volume): Volume control moved
	to player.
	(gconf_song_position_slider_visibility_changed):
	Set visbibility of seek bar.
	(rb_shell_player_sync_buttons):
	Set sensitivity of actions instead of buttons.
	(rb_shell_player_playing_changed_cb): Add callback
	for player notify::playing changes.

	* lib/rb-preferences.h: Add hide toolbar and seek
	bar key names.

	* data/ui/rhythmbox-ui.xml: Add hide toolbar and
	seek bar menu items.  Remove pause and stop actions
	from the control menu.  Add a toolbar.

	* data/rhythmbox.schemas: Add toolbar_hidden
	song_position_slider_hidden keys.

	Patch by: James Livingston  <jrl@ids.org.au>
	          William Jon McCann  <mccann@jhu.edu>
	Fixes #316238.
Comment 49 Amadeus 2005-12-05 19:07:41 UTC
Okay. I keep them for after 0.9.3. Perhaps I might prefure the just submitted
layout =)