patches/gnome-panel-05-notificationarea-tooltip.diff
author dcarbery
Fri, 24 Nov 2006 16:37:59 +0000
branch217update
changeset 19096 d542fc2c823e
parent 8382 5340d1f7700f
child 9136 d6c8f3b2455f
permissions -rw-r--r--
Merged trunk changes r9797:9829 into 217update branch.

--- gnome-panel-2.16.1.old/applets/notification_area/main.c	2006-10-19 17:33:13.535025000 +0100
+++ gnome-panel-2.16.1/applets/notification_area/main.c	2006-10-19 17:44:43.544988000 +0100
@@ -53,7 +53,9 @@
   GtkWidget *box;
   GtkWidget *about_dialog;
   GtkWidget *frame;
+  GtkTooltips *tooltips;
 
+  GSList *icons;
   GtkOrientation orientation;
 } SystemTray;
 
@@ -82,6 +84,18 @@
 static void icon_tip_show_next (IconTip *icontip);
 
 static void
+set_tooltip (SystemTray *tray)
+{
+  tray->tooltips = gtk_tooltips_new ();
+  g_object_ref (tray->tooltips);
+  gtk_object_sink (GTK_OBJECT (tray->tooltips));
+  g_object_set_data_full (G_OBJECT (tray->tooltips), "tooltips", tray->tooltips,
+                          (GDestroyNotify) g_object_unref);
+  gtk_tooltips_set_tip (tray->tooltips, GTK_WIDGET (tray->applet),
+                        _("Area where notification icons appear"), NULL);
+}
+
+static void
 help_cb (BonoboUIComponent *uic,
 	 SystemTray        *tray,	  
 	 const gchar       *verbname)   
@@ -213,6 +227,10 @@
   g_hash_table_insert (tray->trays_screen->icon_table, icon, tray);
 
   gtk_box_pack_end (GTK_BOX (tray->box), icon, FALSE, FALSE, 0);
+
+  tray->icons = g_slist_append (tray->icons, icon);
+
+  gtk_tooltips_disable (tray->tooltips);
   
   gtk_widget_show (icon);
   force_redraw (tray);
@@ -692,6 +710,8 @@
   panel_applet_set_background_widget (tray->applet, GTK_WIDGET (tray->applet));
 
   update_size_and_orientation (tray);
+
+  set_tooltip (tray);
   
   gtk_container_add (GTK_CONTAINER (tray->applet), tray->frame);