mirror of https://github.com/GNOME/gimp.git
Increase readability with widget = list->data.
* app/widgets/gimpdialogfactory.c (gimp_dialog_factories_show_foreach) (gimp_dialog_factories_hide_foreach): Increase readability with widget = list->data. svn path=/trunk/; revision=27068
This commit is contained in:
parent
b8e83c9449
commit
6e876e8f7c
|
@ -1,3 +1,10 @@
|
|||
2008-09-28 Martin Nordholts <martinn@svn.gnome.org>
|
||||
|
||||
* app/widgets/gimpdialogfactory.c
|
||||
(gimp_dialog_factories_show_foreach)
|
||||
(gimp_dialog_factories_hide_foreach): Increase readability with
|
||||
widget = list->data.
|
||||
|
||||
2008-09-27 Martin Nordholts <martinn@svn.gnome.org>
|
||||
|
||||
Bug 551864 – plugin Flame fails for some settings on 64bit
|
||||
|
|
|
@ -1407,22 +1407,24 @@ gimp_dialog_factories_hide_foreach (gconstpointer key,
|
|||
|
||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
||||
{
|
||||
if (GTK_IS_WIDGET (list->data) && GTK_WIDGET_TOPLEVEL (list->data))
|
||||
GtkWidget *widget = list->data;
|
||||
|
||||
if (GTK_IS_WIDGET (widget) && GTK_WIDGET_TOPLEVEL (widget))
|
||||
{
|
||||
GimpDialogVisibilityState visibility = GIMP_DIALOG_VISIBILITY_UNKNOWN;
|
||||
|
||||
if (GTK_WIDGET_VISIBLE (list->data))
|
||||
if (GTK_WIDGET_VISIBLE (widget))
|
||||
{
|
||||
visibility = GIMP_DIALOG_VISIBILITY_VISIBLE;
|
||||
|
||||
gtk_widget_hide (GTK_WIDGET (list->data));
|
||||
gtk_widget_hide (GTK_WIDGET (widget));
|
||||
}
|
||||
else
|
||||
{
|
||||
visibility = GIMP_DIALOG_VISIBILITY_INVISIBLE;
|
||||
}
|
||||
|
||||
g_object_set_data (G_OBJECT (list->data),
|
||||
g_object_set_data (G_OBJECT (widget),
|
||||
GIMP_DIALOG_VISIBILITY_KEY,
|
||||
GINT_TO_POINTER (visibility));
|
||||
}
|
||||
|
@ -1438,18 +1440,20 @@ gimp_dialog_factories_show_foreach (gconstpointer key,
|
|||
|
||||
for (list = factory->open_dialogs; list; list = g_list_next (list))
|
||||
{
|
||||
if (GTK_IS_WIDGET (list->data) && GTK_WIDGET_TOPLEVEL (list->data))
|
||||
GtkWidget *widget = list->data;
|
||||
|
||||
if (GTK_IS_WIDGET (widget) && GTK_WIDGET_TOPLEVEL (widget))
|
||||
{
|
||||
GimpDialogVisibilityState visibility;
|
||||
|
||||
visibility =
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (list->data),
|
||||
GPOINTER_TO_INT (g_object_get_data (G_OBJECT (widget),
|
||||
GIMP_DIALOG_VISIBILITY_KEY));
|
||||
|
||||
if (! GTK_WIDGET_VISIBLE (list->data) &&
|
||||
if (! GTK_WIDGET_VISIBLE (widget) &&
|
||||
visibility == GIMP_DIALOG_VISIBILITY_VISIBLE)
|
||||
{
|
||||
GtkWindow *window = GTK_WINDOW (list->data);
|
||||
GtkWindow *window = GTK_WINDOW (widget);
|
||||
|
||||
/* Don't use gtk_window_present() here, we don't want the
|
||||
* keyboard focus to move.
|
||||
|
|
Loading…
Reference in New Issue