summaryrefslogtreecommitdiff
path: root/gtk/gtkrecentchooserdefault.c
diff options
context:
space:
mode:
authorJavier Jardón <jjardon@gnome.org>2010-08-24 16:10:38 +0200
committerJavier Jardón <jjardon@gnome.org>2010-08-24 16:16:42 +0200
commitc05f344c0a5c7bd1096dd7bd10c99a0e585826d2 (patch)
treeeaded4d0360099f7c2882cd346d0d2f848136c84 /gtk/gtkrecentchooserdefault.c
parent891694d9ffae1c8e949cfb3fb39d726ad30ca4f4 (diff)
downloadgtk+-c05f344c0a5c7bd1096dd7bd10c99a0e585826d2.tar.gz
Use gtk_window_has_group() to know if the window has an explicit window group.
gtk_window_get_group() never returns NULL; if the window isn't in a group, a default window group is returned instead. Use gtk_window_has_group() instead. This fixes some previous commits to use accessors to access GtkWindow. Reported by Philip Withnall in bug https://bugzilla.gnome.org/show_bug.cgi?id=627828
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);