patches/gnome-panel-05-notificationarea-tooltip.diff
author mattman
Mon, 29 Jan 2007 17:33:30 +0000
changeset 9136 d6c8f3b2455f
parent 8382 5340d1f7700f
child 9147 3d91c998b3e1
permissions -rw-r--r--
* gnome-panel.spec : Bump to 2.17.90 * patches/gnome-panel-02-fish-applet.diff : Rework * patches/gnome-panel-03-concurrent-login.diff : Rework * patches/gnome-panel-05-notificationarea-tooltip.diff : Rework * patches/gnome-panel-07-restrict-app-launching.diff : Rework * patches/gnome-panel-13-lockdown-applets.diff : Rework

--- gnome-panel-2.17.90.old/applets/notification_area/main.c	2007-01-29 14:00:07.023183000 +0000
+++ gnome-panel-2.17.90/applets/notification_area/main.c	2007-01-29 14:19:09.246412000 +0000
@@ -194,6 +194,20 @@
   g_slice_free (AppletData, data);
 }
 
+static void
+set_tooltip (AppletData *applet, NaTray *tray)
+{
+  NaTrayPrivate *priv;
+  priv = tray->priv;
+
+  priv->tooltips = gtk_tooltips_new ();
+  g_object_ref (priv->tooltips);
+  gtk_object_sink (GTK_OBJECT (priv->tooltips), "tooltips", priv->tooltips,
+                   (GDestroyNotify) g_object_unref);
+  gtk_tooltips_set_tip (priv->tooltips, GTK_WIDGET (applet),
+                        _("Area where notification icons appear"), NULL);
+}
+
 static gboolean
 applet_factory (PanelApplet *applet,
                 const gchar *iid,
@@ -235,6 +249,8 @@
 
   panel_applet_set_background_widget (applet, GTK_WIDGET (applet));
 
+  set_tooltip (applet, tray);
+
   gtk_container_add (GTK_CONTAINER (applet), GTK_WIDGET (tray));
   
 #ifndef NOTIFICATION_AREA_INPROCESS
--- gnome-panel-2.17.90.old/applets/notification_area/na-tray.c	2007-01-29 14:00:07.023810000 +0000
+++ gnome-panel-2.17.90/applets/notification_area/na-tray.c	2007-01-29 14:18:03.258719000 +0000
@@ -54,6 +54,9 @@
   GtkWidget *box;
   GtkWidget *frame;
 
+  GtkTooltips *tooltips;
+  GSList *icons;
+
   guint idle_redraw_id;
 
   GtkOrientation orientation;
@@ -119,6 +122,9 @@
 
   gtk_box_pack_end (GTK_BOX (priv->box), icon, FALSE, FALSE, 0);
 
+  priv->icons = g_slist_append (priv->icons, icon);
+  gtk_tooltips_disable (priv->tooltips);
+
   gtk_widget_show (icon);
   na_tray_force_redraw (tray);
 }