summaryrefslogtreecommitdiff
path: root/src/gpm-tray-icon.c
diff options
context:
space:
mode:
authorSorokin Alexei <[email protected]>2016-06-07 18:53:50 +0300
committerraveit65 <[email protected]>2016-06-07 20:08:42 +0200
commit7703c9e3e480629a7eeab8b4310f313b9b1784df (patch)
tree9738116d2b4ee8b3bd317cca3ac5039aaa08f086 /src/gpm-tray-icon.c
parentb8f642a86d8d18747a0b970b4420435603ee5a5f (diff)
downloadmate-power-manager-7703c9e3e480629a7eeab8b4310f313b9b1784df.tar.bz2
mate-power-manager-7703c9e3e480629a7eeab8b4310f313b9b1784df.tar.xz
rely less on GtkStock
Diffstat (limited to 'src/gpm-tray-icon.c')
-rw-r--r--src/gpm-tray-icon.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/gpm-tray-icon.c b/src/gpm-tray-icon.c
index 28e30c5..6d4b2f9 100644
--- a/src/gpm-tray-icon.c
+++ b/src/gpm-tray-icon.c
@@ -46,7 +46,7 @@
#include "gpm-upower.h"
#include "gpm-engine.h"
#include "gpm-common.h"
-#include "gpm-stock-icons.h"
+#include "gpm-icon-names.h"
#include "gpm-tray-icon.h"
static void gpm_tray_icon_finalize (GObject *object);
@@ -111,20 +111,21 @@ gpm_tray_icon_get_status_icon (GpmTrayIcon *icon)
}
/**
- * gpm_tray_icon_set_image_from_stock:
- * @filename: The icon name, e.g. GPM_STOCK_APP_ICON, or NULL to remove.
+ * gpm_tray_icon_set_icon:
+ * @icon_name: The icon name, e.g. GPM_ICON_APP_ICON, or NULL to remove.
*
- * Loads a pixmap from disk, and sets as the tooltip icon
+ * Loads a pixmap from disk, and sets as the tooltip icon.
**/
gboolean
-gpm_tray_icon_set_icon (GpmTrayIcon *icon, const gchar *filename)
+gpm_tray_icon_set_icon (GpmTrayIcon *icon, const gchar *icon_name)
{
g_return_val_if_fail (icon != NULL, FALSE);
g_return_val_if_fail (GPM_IS_TRAY_ICON (icon), FALSE);
- if (filename != NULL) {
- egg_debug ("Setting icon to %s", filename);
- gtk_status_icon_set_from_icon_name (icon->priv->status_icon, filename);
+ if (icon_name != NULL) {
+ egg_debug ("Setting icon to %s", icon_name);
+ gtk_status_icon_set_from_icon_name (icon->priv->status_icon,
+ icon_name);
/* make sure that we are visible */
gpm_tray_icon_show (icon, TRUE);
@@ -328,7 +329,7 @@ gpm_tray_icon_create_menu (GpmTrayIcon *icon, guint32 timestamp)
/* preferences */
item = gtk_image_menu_item_new_with_mnemonic (_("_Preferences"));
- image = gtk_image_new_from_icon_name (GTK_STOCK_PREFERENCES, GTK_ICON_SIZE_MENU);
+ image = gtk_image_new_from_icon_name ("preferences-system", GTK_ICON_SIZE_MENU);
gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (item), image);
g_signal_connect (G_OBJECT (item), "activate",
G_CALLBACK (gpm_tray_icon_show_preferences_cb), icon);