GNOME Bugzilla – Bug 370028
simplify volume button theme handling
Last modified: 2006-11-04 00:35:42 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.
Created attachment 75933 [details] [review] patch
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...)
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)
(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)
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? :-)
(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).