[gimp] app: remove check which hides conditions that should not happen
- From: Nils Philippsen <nphilipp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: remove check which hides conditions that should not happen
- Date: Wed, 14 Nov 2012 15:46:20 +0000 (UTC)
commit f6f8079013401eecaa11e5f8bdd2688e51fd6602
Author: Nils Philippsen <nils redhat com>
Date: Wed Nov 14 16:43:06 2012 +0100
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 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/app/actions/file-commands.c b/app/actions/file-commands.c
index fb7a86e..94a23a0 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));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]