[empathy] Tooltip is more usefull when editing status. Fixup



commit 812ecb86b9e0378f4fb0c1a59d663d067e35d136
Author: Laurent <lcontzen gmail com>
Date:   Mon Apr 2 11:21:38 2012 +0200

    Tooltip is more usefull when editing status. Fixup
    
    https://bugzilla.gnome.org/show_bug.cgi?id=640846

 libempathy-gtk/empathy-presence-chooser.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/libempathy-gtk/empathy-presence-chooser.c b/libempathy-gtk/empathy-presence-chooser.c
index 948a0a7..2eba9a5 100644
--- a/libempathy-gtk/empathy-presence-chooser.c
+++ b/libempathy-gtk/empathy-presence-chooser.c
@@ -378,8 +378,16 @@ presence_chooser_set_status_editing (EmpathyPresenceChooser *self,
 
 	entry = gtk_bin_get_child (GTK_BIN (self));
 	if (editing) {
+		gchar *tooltip_text;
+		gchar *status;
+
 		priv->editing_status = TRUE;
 
+		get_state_and_status (self, &status);
+		tooltip_text = g_strdup_printf ("<b>Current message: %s</b>\n"
+		    "<small><i>Press Enter to set the new message or Esc to cancel.</i></small>",
+		    status);
+		gtk_widget_set_tooltip_markup (entry, tooltip_text);
 		gtk_entry_set_icon_from_stock (GTK_ENTRY (entry),
 					       GTK_ENTRY_ICON_SECONDARY,
 					       GTK_STOCK_OK);
@@ -389,6 +397,8 @@ presence_chooser_set_status_editing (EmpathyPresenceChooser *self,
 		gtk_entry_set_icon_sensitive (GTK_ENTRY (entry),
 					      GTK_ENTRY_ICON_PRIMARY,
 					      FALSE);
+		g_free (status);
+		g_free (tooltip_text);
 	} else {
 		GtkWidget *window;
 



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