summaryrefslogtreecommitdiff
path: root/gtk/gtkrecentchooserdefault.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/gtkrecentchooserdefault.c')
-rw-r--r--gtk/gtkrecentchooserdefault.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gtk/gtkrecentchooserdefault.c b/gtk/gtkrecentchooserdefault.c
index d068b6c775..9a04611d95 100644
--- a/gtk/gtkrecentchooserdefault.c
+++ b/gtk/gtkrecentchooserdefault.c
@@ -700,7 +700,6 @@ error_message_with_parent (GtkWindow *parent,
const gchar *detail)
{
GtkWidget *dialog;
- GtkWindowGroup *group;
dialog = gtk_message_dialog_new (parent,
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
@@ -711,9 +710,9 @@ error_message_with_parent (GtkWindow *parent,
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog),
"%s", detail);
- group = gtk_window_get_group (parent);
- if (group)
- gtk_window_group_add_window (group, GTK_WINDOW (dialog));
+ if (gtk_window_has_group (parent))
+ gtk_window_group_add_window (gtk_window_get_group (parent),
+ GTK_WINDOW (dialog));
gtk_dialog_run (GTK_DIALOG (dialog));
gtk_widget_destroy (dialog);