Commit a4ff76a5 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

remove some casts that were always useless and are even more useless now

2008-09-29  Michael Natterer  <mitch@gimp.org>

	* app/widgets/gimpdialogfactory.c
	(gimp_dialog_factories_show_foreach)
	(gimp_dialog_factories_hide_foreach): remove some casts that were
	always useless and are even more useless now after the recent
	readability improvement.


svn path=/trunk/; revision=27075
parent 75178116
2008-09-29 Michael Natterer <mitch@gimp.org>
* app/widgets/gimpdialogfactory.c
(gimp_dialog_factories_show_foreach)
(gimp_dialog_factories_hide_foreach): remove some casts that were
always useless and are even more useless now after the recent
readability improvement.
2008-09-29 Sven Neumann <sven@gimp.org> 2008-09-29 Sven Neumann <sven@gimp.org>
* app/display/gimpdisplayshell.c (gimp_display_shell_new): reduced * app/display/gimpdisplayshell.c (gimp_display_shell_new): reduced
......
...@@ -1408,7 +1408,7 @@ gimp_dialog_factories_hide_foreach (gconstpointer key, ...@@ -1408,7 +1408,7 @@ gimp_dialog_factories_hide_foreach (gconstpointer key,
for (list = factory->open_dialogs; list; list = g_list_next (list)) for (list = factory->open_dialogs; list; list = g_list_next (list))
{ {
GtkWidget *widget = list->data; GtkWidget *widget = list->data;
if (GTK_IS_WIDGET (widget) && GTK_WIDGET_TOPLEVEL (widget)) if (GTK_IS_WIDGET (widget) && GTK_WIDGET_TOPLEVEL (widget))
{ {
GimpDialogVisibilityState visibility = GIMP_DIALOG_VISIBILITY_UNKNOWN; GimpDialogVisibilityState visibility = GIMP_DIALOG_VISIBILITY_UNKNOWN;
...@@ -1417,7 +1417,7 @@ gimp_dialog_factories_hide_foreach (gconstpointer key, ...@@ -1417,7 +1417,7 @@ gimp_dialog_factories_hide_foreach (gconstpointer key,
{ {
visibility = GIMP_DIALOG_VISIBILITY_VISIBLE; visibility = GIMP_DIALOG_VISIBILITY_VISIBLE;
gtk_widget_hide (GTK_WIDGET (widget)); gtk_widget_hide (widget);
} }
else else
{ {
...@@ -1441,7 +1441,7 @@ gimp_dialog_factories_show_foreach (gconstpointer key, ...@@ -1441,7 +1441,7 @@ gimp_dialog_factories_show_foreach (gconstpointer key,
for (list = factory->open_dialogs; list; list = g_list_next (list)) for (list = factory->open_dialogs; list; list = g_list_next (list))
{ {
GtkWidget *widget = list->data; GtkWidget *widget = list->data;
if (GTK_IS_WIDGET (widget) && GTK_WIDGET_TOPLEVEL (widget)) if (GTK_IS_WIDGET (widget) && GTK_WIDGET_TOPLEVEL (widget))
{ {
GimpDialogVisibilityState visibility; GimpDialogVisibilityState visibility;
...@@ -1453,15 +1453,13 @@ gimp_dialog_factories_show_foreach (gconstpointer key, ...@@ -1453,15 +1453,13 @@ gimp_dialog_factories_show_foreach (gconstpointer key,
if (! GTK_WIDGET_VISIBLE (widget) && if (! GTK_WIDGET_VISIBLE (widget) &&
visibility == GIMP_DIALOG_VISIBILITY_VISIBLE) visibility == GIMP_DIALOG_VISIBILITY_VISIBLE)
{ {
GtkWindow *window = GTK_WINDOW (widget);
/* Don't use gtk_window_present() here, we don't want the /* Don't use gtk_window_present() here, we don't want the
* keyboard focus to move. * keyboard focus to move.
*/ */
gtk_widget_show (GTK_WIDGET (window)); gtk_widget_show (widget);
if (GTK_WIDGET_VISIBLE (window)) if (GTK_WIDGET_VISIBLE (widget))
gdk_window_raise (GTK_WIDGET (window)->window); gdk_window_raise (widget->window);
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment