gimp r27068 - in trunk: . app/widgets
- From: martinn svn gnome org
- To: svn-commits-list gnome org
- Subject: gimp r27068 - in trunk: . app/widgets
- Date: Sun, 28 Sep 2008 07:46:48 +0000 (UTC)
Author: martinn
Date: Sun Sep 28 07:46:48 2008
New Revision: 27068
URL: http://svn.gnome.org/viewvc/gimp?rev=27068&view=rev
Log:
* app/widgets/gimpdialogfactory.c
(gimp_dialog_factories_show_foreach)
(gimp_dialog_factories_hide_foreach): Increase readability with
widget = list->data.
Modified:
trunk/ChangeLog
trunk/app/widgets/gimpdialogfactory.c
Modified: trunk/app/widgets/gimpdialogfactory.c
==============================================================================
--- trunk/app/widgets/gimpdialogfactory.c (original)
+++ trunk/app/widgets/gimpdialogfactory.c Sun Sep 28 07:46:48 2008
@@ -1407,22 +1407,24 @@
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 @@
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.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]