[gtk+] GtkAboutDialog: keep toggle button state in sync



commit aa1fdb4123c753cd9e51f2a50995b8e86f1459ad
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 12 13:42:05 2011 -0500

    GtkAboutDialog: keep toggle button state in sync
    
    When hiding the dialog, we hide the credits/license parts, so
    we need to update the toggle buttons controlling them.
    https://bugzilla.gnome.org/show_bug.cgi?id=644355

 gtk/gtkaboutdialog.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gtk/gtkaboutdialog.c b/gtk/gtkaboutdialog.c
index 7e34c99..8ded837 100644
--- a/gtk/gtkaboutdialog.c
+++ b/gtk/gtkaboutdialog.c
@@ -731,8 +731,8 @@ gtk_about_dialog_init (GtkAboutDialog *about)
   gtk_widget_show (hbox);
 
   /* Add the close button */
-  close_button = gtk_dialog_add_button (GTK_DIALOG (about), GTK_STOCK_CLOSE,
-                                        GTK_RESPONSE_CANCEL);
+  close_button = gtk_dialog_add_button (GTK_DIALOG (about),
+                                        GTK_STOCK_CLOSE, GTK_RESPONSE_CANCEL);
   gtk_dialog_set_default_response (GTK_DIALOG (about), GTK_RESPONSE_CANCEL);
 
   /* Add the credits button */
@@ -2467,7 +2467,11 @@ gtk_about_dialog_new (void)
 static void
 close_cb (GtkAboutDialog *about)
 {
+  GtkAboutDialogPrivate *priv = about->priv;
+
   switch_page (about, 0);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->credits_button), FALSE);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (priv->license_button), FALSE);
   gtk_widget_hide (GTK_WIDGET (about));
 }
 



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