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 370028 - simplify volume button theme handling
simplify volume button theme handling
Status: RESOLVED FIXED
Product: totem
Classification: Core
Component: general
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: General Totem maintainer(s)
General Totem maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2006-11-03 14:37 UTC by Christian Persch
Modified: 2006-11-04 00:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (7.79 KB, patch)
2006-11-03 14:40 UTC, Christian Persch
none Details | Review
same for totem-playlist (plus nits fixed) (7.02 KB, patch)
2006-11-03 14:59 UTC, Christian Persch
committed Details | Review
another patch (8.56 KB, patch)
2006-11-03 18:33 UTC, Christian Persch
none Details | Review

Description Christian Persch 2006-11-03 14:37:54 UTC
We don't really need to connect to icon theme: we can simply use style-set.
While I was at it, I fixed a few nits and compile warnings.
Comment 1 Christian Persch 2006-11-03 14:40:47 UTC
Created attachment 75933 [details] [review]
patch
Comment 2 Christian Persch 2006-11-03 14:59:22 UTC
Created attachment 75936 [details] [review]
same for totem-playlist (plus nits fixed)

(Btw, I don't understand why the icon theme code in bacon-volume is #ifndef HAVE_GTK_ONLY but not in totem-playlist...)
Comment 3 Bastien Nocera 2006-11-03 16:49:50 UTC
2006-11-03  Bastien Nocera  <hadess@hadess.net>

        * src/totem-playlist.c: (drag_begin_cb),
        (totem_playlist_style_set), (update_repeat_cb), (update_lockdown),
        (init_config), (totem_playlist_init), (totem_playlist_finalize),
        (totem_playlist_new), (totem_playlist_add_one_mrl),
        (totem_playlist_clear), (totem_playlist_get_current_mrl),
        (totem_playlist_get_current_title),
        (totem_playlist_get_current_metadata),
        (totem_playlist_has_previous_mrl), (totem_playlist_has_next_mrl),
        (totem_playlist_set_title), (totem_playlist_set_playing),
        (totem_playlist_set_previous), (totem_playlist_set_next),
        (totem_playlist_get_repeat), (totem_playlist_set_repeat),
        (totem_playlist_get_shuffle), (totem_playlist_set_shuffle),
        (totem_playlist_set_at_start), (totem_playlist_set_at_end),
        (totem_playlist_get_current), (totem_playlist_get_last),
        (totem_playlist_set_current), (totem_playlist_class_init):
        * src/totem-playlist.h: Patch from Christian Persch
        <chpe@cvs.gnome.org> to simplify the icon theme use, and fix a few nits
        (and catch left-overs from when TotemPlaylist was GtkPlaylist, circa
        2003) (Closes: #370028)
Comment 4 Bastien Nocera 2006-11-03 16:57:52 UTC
(In reply to comment #2)
> Created an attachment (id=75936) [edit]
> same for totem-playlist (plus nits fixed)
> 
> (Btw, I don't understand why the icon theme code in bacon-volume is #ifndef
> HAVE_GTK_ONLY but not in totem-playlist...)

Probably left-overs from when it was GnomeIconTheme instead. I blame Ronald anyway...

2006-11-03  Bastien Nocera  <hadess@hadess.net>

        * src/bacon-volume.c: (bacon_volume_button_class_init),
        (bacon_volume_button_new), (bacon_volume_button_style_set),
        (bacon_volume_scale_class_init), (bacon_volume_button_update_icon),
        (bacon_volume_scale_value_changed),
        (bacon_volume_button_load_icons):
        * src/bacon-volume.h: Patch from Christian Persch
        <chpe@cvs.gnome.org> to simplify the icon theme use, and remove the
        old useless HAVE_GTK_ONLY bits, they looked naf anyway
        (Closes: #370028)
Comment 5 Christian Persch 2006-11-03 18:33:52 UTC
Created attachment 75952 [details] [review]
another patch

So I've noticed that we can simplify this more by just using gtk_image_set_icon_name which does internally all the same things and monitors the theme for us. Any reason not to do it like this? :-)
Comment 6 Bastien Nocera 2006-11-04 00:35:42 UTC
(In reply to comment #5)
> Created an attachment (id=75952) [edit]
> another patch
> 
> So I've noticed that we can simplify this more by just using
> gtk_image_set_icon_name which does internally all the same things and monitors
> the theme for us. Any reason not to do it like this? :-)

For bacon-volume, that means there's no caching anymore. Not sure whether it's a problem (would be nicer though). Commit if you think it's right (don't forget to commit to libbacon as well, for bacon-volume).