From f6f8079013401eecaa11e5f8bdd2688e51fd6602 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Wed, 14 Nov 2012 16:43:06 +0100 Subject: [PATCH] app: remove check which hides conditions that should not happen Remove a GTK_IS_WINDOW() check where this would hide parent widgets being passed in that don't have a gtk toplevel. This should not happen and if it does we want to know about it. --- app/actions/file-commands.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c index fb7a86ee4f..94a23a0e62 100644 --- a/app/actions/file-commands.c +++ b/app/actions/file-commands.c @@ -522,11 +522,8 @@ file_open_dialog_show (Gimp *gimp, gimp_file_dialog_set_open_image (GIMP_FILE_DIALOG (dialog), image, open_as_layers); - parent = gtk_widget_get_toplevel (parent); - - if (GTK_IS_WINDOW (parent)) - gtk_window_set_transient_for (GTK_WINDOW (dialog), - GTK_WINDOW (parent)); + gtk_window_set_transient_for (GTK_WINDOW (dialog), + GTK_WINDOW (gtk_widget_get_toplevel (parent))); gtk_window_present (GTK_WINDOW (dialog)); }