? account-dialog.patch
? register.patch
? tooltip.patch
? src/gossip-accounts-dialog.c.new
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/gossip/ChangeLog,v
retrieving revision 1.421
diff -u -b -B -p -r1.421 ChangeLog
--- ChangeLog	27 Jan 2005 13:21:18 -0000	1.421
+++ ChangeLog	8 Feb 2005 15:05:26 -0000
@@ -1,3 +1,9 @@
+2005-02-08  Martyn Russell  <martyn.russell@bt.com>
+
+	* src/gossip-contact-list.c (contact_list_motion_notify_event_cb): 
+	- Add function to update the tooltip of the GtkTreeView to show
+	the contact name/presence, first patch for bug #130983.
+
 2005-01-27  Martyn Russell  <martyn.russell@bt.com>
 
 	* src/gossip-session.[ch]:
Index: src/gossip-contact-list.c
===================================================================
RCS file: /cvs/gnome/gossip/src/gossip-contact-list.c,v
retrieving revision 1.8
diff -u -b -B -p -r1.8 gossip-contact-list.c
--- src/gossip-contact-list.c	20 Jan 2005 22:08:52 -0000	1.8
+++ src/gossip-contact-list.c	8 Feb 2005 15:05:26 -0000
@@ -123,6 +122,9 @@ static void contact_list_row_activated_c
 						GtkTreePath       *path,
 						GtkTreeViewColumn *col,
 						gpointer           unused);
+static gboolean contact_list_motion_notify_event_cb      (GossipContactList      *list,
+							  GdkEventMotion         *event,
+							  gpointer                unused);
 static gint contact_list_sort_func             (GtkTreeModel      *model,
 						GtkTreeIter       *iter_a,
 						GtkTreeIter       *iter_b,
@@ -379,6 +382,10 @@ gossip_contact_list_init (GossipContactL
 			  "row-activated",
 			  G_CALLBACK (contact_list_row_activated_cb),
 			  NULL);
+	g_signal_connect (list,
+			  "motion-notify-event",
+			  G_CALLBACK (contact_list_motion_notify_event_cb),
+			  NULL);
 }
 
 static void
@@ -886,6 +893,67 @@ contact_list_row_activated_cb (GossipCon
 	g_signal_emit (list, signals[CONTACT_ACTIVATED], 0, contact);
 }
 
+static gboolean 
+contact_list_motion_notify_event_cb (GossipContactList *list,
+				     GdkEventMotion    *event,
+				     gpointer           unused)
+{
+	GtkTooltips     *tips = NULL;
+	GtkTooltipsData *tips_data;
+	gchar           *str = NULL;
+
+	GtkTreePath     *path;
+	GtkTreeModel    *model;
+	gboolean         row_exists;
+	gboolean         tip_set = FALSE;
+
+	tips_data = gtk_tooltips_data_get (GTK_WIDGET (list));
+	if (tips_data) {
+		tips = tips_data->tooltips;
+	}
+
+	if (!tips) {
+		tips = gtk_tooltips_new ();
+	}
+
+	/* get information under the mouse */
+	row_exists = gtk_tree_view_get_path_at_pos (GTK_TREE_VIEW (list), 
+						    event->x, event->y, 
+						    &path, NULL, NULL, NULL);
+	if (row_exists) {
+		GtkTreeIter  iter;
+		gboolean     is_group;
+		gchar       *name;
+		gchar       *status;
+
+		model = gtk_tree_view_get_model (GTK_TREE_VIEW (list));
+		gtk_tree_model_get_iter (model, &iter, path);
+		gtk_tree_model_get (model, &iter, 
+				    MODEL_COL_NAME, &name, 
+				    MODEL_COL_STATUS, &status, 
+				    MODEL_COL_IS_GROUP, &is_group,
+				    -1);
+
+		if (name && !is_group) {
+			str = g_strdup_printf ("%s%s%s", 
+					       name,
+					       status ? "\n\n" : "",
+					       status ? status : "");
+			tip_set = TRUE;
+		}
+
+		g_free (name);
+		g_free (status);
+	}
+
+	gtk_tooltips_set_tip (tips, GTK_WIDGET (list), str, NULL);
+
+	gtk_tree_path_free (path);
+	g_free (str);
+
+	return FALSE;
+}
+
 static gint
 contact_list_sort_func (GtkTreeModel *model,
 			GtkTreeIter  *iter_a,
