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:
@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user