[accounts-dialog] Don't let tooltip get in the way



commit f38423f606838e174f526eb396c1d53117ed9ed8
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Mar 1 19:52:48 2010 -0500

    Don't let tooltip get in the way

 src/um-password-dialog.c |   11 +++++++++++
 1 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/src/um-password-dialog.c b/src/um-password-dialog.c
index e3a1d59..5cfb152 100644
--- a/src/um-password-dialog.c
+++ b/src/um-password-dialog.c
@@ -72,6 +72,8 @@ generate_clicked (GtkButton        *button,
                         NULL, NULL,
                         (GtkMenuPositionFunc) popup_menu_below_button, um->generate_button,
                         0, gtk_get_current_event_time ());
+
+        gtk_widget_set_has_tooltip (um->generate_button, FALSE);
 }
 
 static void
@@ -118,6 +120,13 @@ activate_generate_item (GtkMenuItem      *item,
 }
 
 static void
+on_generate_menu_unmap (GtkWidget        *menu,
+                        UmPasswordDialog *um)
+{
+        gtk_widget_set_has_tooltip (um->generate_button, TRUE);
+}
+
+static void
 generate_passwords (UmPasswordDialog *um)
 {
         gint min_len, max_len;
@@ -136,6 +145,8 @@ generate_passwords (UmPasswordDialog *um)
         }
 
         um->generate_menu = gtk_menu_new ();
+        g_signal_connect (um->generate_menu, "unmap",
+                          G_CALLBACK (on_generate_menu_unmap), um);
 
         cmdline = g_strdup_printf ("apg -n 6 -M SNC -m %d -x %d", min_len, max_len);
         error = NULL;



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