[gtk+/gtk-3-2] GtkPrintUnixDialog: Hide unused tabs



commit 4b423ca5ea43f048e2a038297ae75701e58b7333
Author: Marek Kasik <mkasik redhat com>
Date:   Thu Jan 5 13:19:50 2012 +0100

    GtkPrintUnixDialog: Hide unused tabs
    
    Don't show tabs which are empty. This is related to
    the recent GtkTable -> GtkGrid conversion. (#663479)
    Also backport a fix of a typo from master.

 gtk/gtkprintunixdialog.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/gtk/gtkprintunixdialog.c b/gtk/gtkprintunixdialog.c
index b4b930e..fbd43e8 100644
--- a/gtk/gtkprintunixdialog.c
+++ b/gtk/gtkprintunixdialog.c
@@ -1346,8 +1346,8 @@ setup_page_table (GtkPrinterOptionSet *options,
                                            add_option_to_table,
                                            table);
 
-  nrows = grid_rows (GTK_GRID (page));
-  if (nrows == 1)
+  nrows = grid_rows (GTK_GRID (table));
+  if (nrows == 0)
     gtk_widget_hide (page);
   else
     gtk_widget_show (page);
@@ -1521,7 +1521,7 @@ update_dialog_from_settings (GtkPrintUnixDialog *dialog)
                                                table);
 
       nrows = grid_rows (GTK_GRID (table));
-      if (nrows == 1)
+      if (nrows == 0)
         gtk_widget_destroy (table);
       else
         {



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