changeset 5018:f82e6763e039

[gaim-migrate @ 5354] javabsp pointed out that it was actually Taso N. Devetzis (devetzis) that did that right-click event patch. this is a patch from robot101 to fix the tooltips on the buttons at the bottom of the blist. I wonder what the land speed record for cvs commits is committer: Tailor Script <tailor@pidgin.im>
author Nathan Walp <nwalp@pidgin.im>
date Sat, 05 Apr 2003 02:55:12 +0000
parents 2f25407917f2
children eb1d45bffe66
files src/buddy.c src/gtklist.h
diffstat 2 files changed, 8 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/src/buddy.c	Sat Apr 05 02:41:44 2003 +0000
+++ b/src/buddy.c	Sat Apr 05 02:55:12 2003 +0000
@@ -259,6 +259,7 @@
 		show_add_buddy(NULL, NULL, NULL, NULL);
 	}
 }
+
 static void
 gaim_gtk_blist_remove_cb (GtkWidget *w, GaimBlistNode *node) 
 {
@@ -1138,7 +1139,6 @@
 	GtkTreeViewColumn *column;
 	GtkWidget *sw;
 	GtkWidget *button;
-	GtkTooltips *tooltips;
 	GtkSizeGroup *sg;
 	GtkTreeSelection *selection;
 	GtkTargetEntry gte[] = {{"GAIM_BLIST_NODE", GTK_TARGET_SAME_APP, DRAG_ROW},
@@ -1260,7 +1260,7 @@
 	/**************************** Button Box **************************************/
 	/* add this afterwards so it doesn't force up the width of the window         */
 
-	tooltips = gtk_tooltips_new();
+	gtkblist->tooltips = gtk_tooltips_new();
 
 	sg = gtk_size_group_new(GTK_SIZE_GROUP_BOTH);
 	gtkblist->bbox = gtk_hbox_new(TRUE, 0);
@@ -1273,7 +1273,7 @@
 	gtk_size_group_add_widget(sg, button);
 	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(gtk_blist_button_im_cb),
 			 gtkblist->treeview);
-	gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), button, _("Send an Instant Message to the selected buddy"), NULL);
+	gtk_tooltips_set_tip(GTK_TOOLTIPS(gtkblist->tooltips), button, _("Send a message to the selected buddy"), NULL);
 	gtk_widget_show(button);
 
 	button = gaim_pixbuf_button_from_stock(_("Get Info"), GAIM_STOCK_INFO, GAIM_BUTTON_VERTICAL);
@@ -1282,7 +1282,7 @@
 	gtk_size_group_add_widget(sg, button);
 	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(gtk_blist_button_info_cb),
 			 gtkblist->treeview);
-	gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), button, _("Get information on the selected buddy"), NULL);
+	gtk_tooltips_set_tip(GTK_TOOLTIPS(gtkblist->tooltips), button, _("Get information on the selected buddy"), NULL);
 	gtk_widget_show(button);
 
 	button = gaim_pixbuf_button_from_stock(_("Chat"), GAIM_STOCK_CHAT, GAIM_BUTTON_VERTICAL);
@@ -1290,7 +1290,7 @@
 	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
 	gtk_size_group_add_widget(sg, button);
 	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(gtk_blist_button_chat_cb), NULL);
-	gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), button, _("Join a chat room"), NULL);
+	gtk_tooltips_set_tip(GTK_TOOLTIPS(gtkblist->tooltips), button, _("Join a chat room"), NULL);
 	gtk_widget_show(button);
 
 	button = gaim_pixbuf_button_from_stock(_("Away"), GAIM_STOCK_AWAY, GAIM_BUTTON_VERTICAL);
@@ -1298,12 +1298,9 @@
 	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
 	gtk_size_group_add_widget(sg, button);
 	g_signal_connect(G_OBJECT(button), "clicked", G_CALLBACK(gtk_blist_button_away_cb), NULL);
-	gtk_tooltips_set_tip(GTK_TOOLTIPS(tooltips), button, _("Set an away message"), NULL);
+	gtk_tooltips_set_tip(GTK_TOOLTIPS(gtkblist->tooltips), button, _("Set an away message"), NULL);
 	gtk_widget_show(button);
 
-	/* we're done setting tooltips */
-	gtk_object_sink(GTK_OBJECT(tooltips));
-
 	/* this will show the right image/label widgets for us */
 	gaim_gtk_blist_update_toolbar();
 
@@ -1653,6 +1650,7 @@
 		return;
 
 	gtk_widget_destroy(gtkblist->window);
+	gtk_object_sink(GTK_OBJECT(gtkblist->tooltips));
 
 	if (gtkblist->refresh_timer)
 		g_source_remove(gtkblist->refresh_timer);
--- a/src/gtklist.h	Sat Apr 05 02:41:44 2003 +0000
+++ b/src/gtklist.h	Sat Apr 05 02:55:12 2003 +0000
@@ -56,6 +56,7 @@
 		*buddy_icon_column;
 
 	GtkWidget *bbox;                /**< A Button Box. */
+	GtkTooltips *tooltips;           /**< Tooltips for the buttons. */
 
 	guint refresh_timer;            /**< The timer for refreshing every 30 seconds */