[Xfce4-commits] [panel-plugins/xfce4-pulseaudio-plugin] 01/01: Simplify icon-loading in the menu
noreply at xfce.org
noreply at xfce.org
Fri Mar 20 23:18:31 CET 2015
This is an automated email from the git hooks/post-receive script.
andrzejr pushed a commit to branch master
in repository panel-plugins/xfce4-pulseaudio-plugin.
commit fc315b4e5206f9efe7976b8b20d1f57a7db69264
Author: Simon Steinbeiss <simon.steinbeiss at elfenbeinturm.at>
Date: Fri Mar 20 23:10:12 2015 +0100
Simplify icon-loading in the menu
---
panel-plugin/pulseaudio-menu.c | 15 +++------------
1 file changed, 3 insertions(+), 12 deletions(-)
diff --git a/panel-plugin/pulseaudio-menu.c b/panel-plugin/pulseaudio-menu.c
index 980b1ec..35f4d3d 100644
--- a/panel-plugin/pulseaudio-menu.c
+++ b/panel-plugin/pulseaudio-menu.c
@@ -212,9 +212,6 @@ pulseaudio_menu_new (PulseaudioVolume *volume,
GdkScreen *gscreen;
GtkWidget *mi;
GtkWidget *img = NULL;
- GdkPixbuf *pix;
- GtkIconInfo *info;
- GtkStyleContext *context;
g_return_val_if_fail (IS_PULSEAUDIO_VOLUME (volume), NULL);
g_return_val_if_fail (IS_PULSEAUDIO_CONFIG (config), NULL);
@@ -239,15 +236,9 @@ pulseaudio_menu_new (PulseaudioVolume *volume,
/* output volume slider */
mi = scale_menu_item_new_with_range (0.0, 100.0, 1.0);
- /* attempt to load and display the brightness icon */
- context = gtk_widget_get_style_context (GTK_WIDGET (mi));
- info = gtk_icon_theme_lookup_icon (gtk_icon_theme_get_default (), "audio-volume-high-symbolic", 24, GTK_ICON_LOOKUP_GENERIC_FALLBACK);
- pix = gtk_icon_info_load_symbolic_for_context (info, context, NULL, NULL);
- if (pix)
- {
- img = gtk_image_new_from_pixbuf (pix);
- gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), img);
- }
+ img = gtk_image_new_from_icon_name ("audio-volume-high-symbolic", GTK_ICON_SIZE_DND);
+ gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (mi), img);
+ gtk_image_set_pixel_size (GTK_IMAGE (img), 24);
scale_menu_item_set_description_label (SCALE_MENU_ITEM (mi), _("<b>Audio output volume</b>"));
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list