From f6ba97d9647a768ef225fdc095c16e8aa635f8f9 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 9 Nov 2009 12:31:31 -0500 Subject: BugĀ 601219 - Transient dialogs in composer window blocks main window MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- calendar/gui/dialogs/comp-editor.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'calendar/gui/dialogs') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 7f96b4bf8b..4d3c0af523 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -81,6 +81,10 @@ struct _CompEditorPrivate { gpointer shell; /* weak pointer */ + /* Each CompEditor window gets its own GtkWindowGroup, so it + * doesn't block the main window or other CompEditor windows. */ + GtkWindowGroup *window_group; + /* Client to use */ ECal *client; @@ -1328,6 +1332,11 @@ comp_editor_dispose (GObject *object) priv->shell = NULL; } + if (priv->window_group != NULL) { + g_object_unref (priv->window_group); + priv->window_group = NULL; + } + if (priv->client) { g_object_unref (priv->client); priv->client = NULL; @@ -1608,6 +1617,7 @@ comp_editor_init (CompEditor *editor) GtkWidget *container; GtkWidget *widget; GtkWidget *scroll; + GtkWindow *window; EShell *shell; gint n_targets; GError *error = NULL; @@ -1620,6 +1630,11 @@ comp_editor_init (CompEditor *editor) active_editors = g_list_prepend (active_editors, editor); + /* Each editor window gets its own window group. */ + window = GTK_WINDOW (editor); + priv->window_group = gtk_window_group_new (); + gtk_window_group_add_window (priv->window_group, window); + priv->pages = NULL; priv->changed = FALSE; priv->needs_send = FALSE; -- cgit