Tooltip patch



Just a little patch to add tooltips to the "check crypto" and "attachment" icons beside the message headers.

Plays nice with both HEAD and 2.2 branches.


--- balsa/src/balsa-message.c	2005-02-18 15:07:08.458605952 -0500
+++ localBalsa/src/balsa-message.c	2005-02-18 15:05:44.667344160 -0500
@@ -432,6 +432,8 @@
 	GtkWidget *button;

 	/* the event box is needed to set the background correctly */
+	GtkTooltips *tooltips = gtk_tooltips_new();
+
 	ebox = gtk_event_box_new();
 	gtk_box_pack_start(GTK_BOX(hbox), ebox, FALSE, FALSE, 0);
 	g_object_set_data(G_OBJECT(widget), BALSA_MESSAGE_HEADER_BTNBOX,
@@ -446,10 +448,12 @@
 	gtk_box_pack_start(GTK_BOX(hbox2), vbox, FALSE, FALSE, 0);

 	button = gtk_button_new();
-        g_signal_connect(G_OBJECT(button), "focus_in_event",
+    gtk_tooltips_set_tip (tooltips, button,
+        "Check cryptographic signature", NULL);
+    g_signal_connect(G_OBJECT(button), "focus_in_event",
                          G_CALLBACK(balsa_message_limit_focus),
                            (gpointer) bm);
-        g_signal_connect(G_OBJECT(button), "focus_out_event",
+    g_signal_connect(G_OBJECT(button), "focus_out_event",
                          G_CALLBACK(balsa_message_unlimit_focus),
                            (gpointer) bm);
 	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);
@@ -465,10 +469,12 @@
 	gtk_box_pack_start(GTK_BOX(hbox2), vbox, FALSE, FALSE, 0);

 	button = gtk_button_new();
-        g_signal_connect(G_OBJECT(button), "focus_in_event",
+    gtk_tooltips_set_tip (tooltips, button,
+        "Select message part to display", NULL);
+    g_signal_connect(G_OBJECT(button), "focus_in_event",
                          G_CALLBACK(balsa_message_limit_focus),
                            (gpointer) bm);
-        g_signal_connect(G_OBJECT(button), "focus_out_event",
+    g_signal_connect(G_OBJECT(button), "focus_out_event",
                          G_CALLBACK(balsa_message_unlimit_focus),
                            (gpointer) bm);
 	gtk_button_set_relief(GTK_BUTTON(button), GTK_RELIEF_NONE);






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]