summaryrefslogtreecommitdiff
path: root/gtk/gtkstatusicon.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2010-01-19 13:00:47 -0500
committerMatthias Clasen <mclasen@redhat.com>2010-01-20 12:25:24 -0500
commit97a1a28bcb926e9e8f0f738f09f7ffe95dcbfdf5 (patch)
tree7bc023c3624e45d951fa65f28986d492b089833b /gtk/gtkstatusicon.c
parent3d9d002bed4ec90505a5a65665f5d6de36ad6f67 (diff)
downloadgtk+-97a1a28bcb926e9e8f0f738f09f7ffe95dcbfdf5.tar.gz
Add a way to set wm_class on statusicons
Since the shell uses wm_class for sorting statusicons.
Diffstat (limited to 'gtk/gtkstatusicon.c')
-rw-r--r--gtk/gtkstatusicon.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c
index 2492af8850..1fe57442e6 100644
--- a/gtk/gtkstatusicon.c
+++ b/gtk/gtkstatusicon.c
@@ -2969,5 +2969,35 @@ gtk_status_icon_get_title (GtkStatusIcon *status_icon)
}
+/**
+ * gtk_status_icon_set_name:
+ * @status_icon: a #GtkStatusIcon
+ * @name: the name
+ *
+ * Sets the name of this tray icon.
+ * This should be a string identifying this icon. It is may be
+ * used for sorting the icons in the tray and will not be shown to
+ * the user.
+ *
+ * Since: 2.20
+ */
+void
+gtk_status_icon_set_name (GtkStatusIcon *status_icon,
+ const gchar *name)
+{
+ GtkStatusIconPrivate *priv;
+
+ g_return_if_fail (GTK_IS_STATUS_ICON (status_icon));
+
+ priv = status_icon->priv;
+
+#ifdef GDK_WINDOWING_X11
+ gtk_window_set_wmclass (GTK_WINDOW (priv->tray_icon), name, name);
+#endif
+
+ g_object_notify (G_OBJECT (status_icon), "name");
+}
+
+
#define __GTK_STATUS_ICON_C__
#include "gtkaliasdef.c"