[gtk+/native-layout] Add a way to set wm_class on statusicons
- From: Tristan Van Berkom <tvb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/native-layout] Add a way to set wm_class on statusicons
- Date: Sun, 4 Apr 2010 02:20:47 +0000 (UTC)
commit c81131ff2195566cc7375c6df81a3f2cbcd03508
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Jan 19 13:00:47 2010 -0500
Add a way to set wm_class on statusicons
Since the shell uses wm_class for sorting statusicons.
docs/reference/gtk/gtk-sections.txt | 1 +
gtk/gtk.symbols | 1 +
gtk/gtkstatusicon.c | 30 ++++++++++++++++++++++++++++++
gtk/gtkstatusicon.h | 2 ++
4 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gtk/gtk-sections.txt b/docs/reference/gtk/gtk-sections.txt
index 1369c72..89631a8 100644
--- a/docs/reference/gtk/gtk-sections.txt
+++ b/docs/reference/gtk/gtk-sections.txt
@@ -3674,6 +3674,7 @@ gtk_status_icon_set_has_tooltip
gtk_status_icon_get_has_tooltip
gtk_status_icon_set_title
gtk_status_icon_get_title
+gtk_status_icon_set_name
gtk_status_icon_set_visible
gtk_status_icon_get_visible
gtk_status_icon_set_blinking
diff --git a/gtk/gtk.symbols b/gtk/gtk.symbols
index ffbab48..871a22b 100644
--- a/gtk/gtk.symbols
+++ b/gtk/gtk.symbols
@@ -1244,6 +1244,7 @@ gtk_status_icon_get_geometry
gtk_status_icon_get_x11_window_id
gtk_status_icon_get_title
gtk_status_icon_set_title
+gtk_status_icon_set_name
#endif
#endif
diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c
index 2492af8..1fe5744 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"
diff --git a/gtk/gtkstatusicon.h b/gtk/gtkstatusicon.h
index e850c64..0c08cfe 100755
--- a/gtk/gtkstatusicon.h
+++ b/gtk/gtkstatusicon.h
@@ -123,6 +123,8 @@ void gtk_status_icon_set_tooltip_markup (GtkStatusIcon *st
void gtk_status_icon_set_title (GtkStatusIcon *status_icon,
const gchar *title);
G_CONST_RETURN gchar *gtk_status_icon_get_title (GtkStatusIcon *status_icon);
+void gtk_status_icon_set_name (GtkStatusIcon *status_icon,
+ const gchar *name);
void gtk_status_icon_set_visible (GtkStatusIcon *status_icon,
gboolean visible);
gboolean gtk_status_icon_get_visible (GtkStatusIcon *status_icon);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]