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.
This commit is contained in:
Marek Kasik
2012-01-05 13:19:50 +01:00
parent 44e30c6db9
commit 4b423ca5ea

View File

@@ -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
{