Use gtk_widget_set_visible()

In places where the pattern

  if (show)
    gtk_widget_show (widget);
  else
    gtk_widget_hide (widget);

is used, change to

  gtk_widget_set_visible (widget, show);

Also do some other minor cleanups.
This commit is contained in:
Martin Nordholts
2009-10-17 14:56:28 +02:00
parent 15f86a80ac
commit eb6bef33e4
18 changed files with 58 additions and 161 deletions

View File

@ -868,8 +868,6 @@ palette_import_make_palette (ImportDialog *dialog)
dialog->palette = palette;
}
if (dialog->palette && dialog->palette->n_colors > 0)
gtk_widget_hide (dialog->no_colors_label);
else
gtk_widget_show (dialog->no_colors_label);
gtk_widget_set_visible (dialog->no_colors_label,
dialog->palette && dialog->palette->n_colors > 0);
}