[evolution/gnome-2-28] Bug 601219 - Transient dialogs in composer window blocks main window
- From: Matthew Barnes <mbarnes src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [evolution/gnome-2-28] Bug 601219 - Transient dialogs in composer window blocks main window
- Date: Mon, 9 Nov 2009 17:40:07 +0000 (UTC)
commit d1ae298e5c26840a546658f6ea73353069f5c1db
Author: Matthew Barnes <mbarnes redhat com>
Date: Mon Nov 9 12:39:47 2009 -0500
Bug 601219 - Transient dialogs in composer window blocks main window
calendar/gui/dialogs/comp-editor.c | 16 ++++++++++++++++
composer/e-composer-private.c | 11 +++++++++++
composer/e-composer-private.h | 2 ++
3 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 5097c9f..901f387 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -79,6 +79,11 @@ static gboolean comp_lite = FALSE;
/* Private part of the CompEditor structure */
struct _CompEditorPrivate {
+
+ /* 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;
@@ -1275,6 +1280,11 @@ comp_editor_dispose (GObject *object)
priv = COMP_EDITOR_GET_PRIVATE (object);
+ 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;
@@ -1547,11 +1557,17 @@ comp_editor_init (CompEditor *editor)
GtkWidget *container;
GtkWidget *widget;
GtkWidget *scroll;
+ GtkWindow *window;
gint n_targets;
GError *error = NULL;
editor->priv = priv = COMP_EDITOR_GET_PRIVATE (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;
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index e2260c4..d1f4f80 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -91,6 +91,7 @@ e_composer_private_init (EMsgComposer *composer)
GtkWidget *widget;
GtkWidget *container;
GtkWidget *send_widget;
+ GtkWindow *window;
const gchar *path;
gchar *filename;
gint ii;
@@ -108,6 +109,11 @@ e_composer_private_init (EMsgComposer *composer)
}
+ /* Each composer window gets its own window group. */
+ window = GTK_WINDOW (composer);
+ priv->window_group = gtk_window_group_new ();
+ gtk_window_group_add_window (priv->window_group, window);
+
priv->charset_actions = gtk_action_group_new ("charset");
priv->composer_actions = gtk_action_group_new ("composer");
@@ -301,6 +307,11 @@ e_composer_private_dispose (EMsgComposer *composer)
composer->priv->header_table = NULL;
}
+ if (composer->priv->window_group != NULL) {
+ g_object_unref (composer->priv->window_group);
+ composer->priv->window_group = NULL;
+ }
+
if (composer->priv->charset_actions != NULL) {
g_object_unref (composer->priv->charset_actions);
composer->priv->charset_actions = NULL;
diff --git a/composer/e-composer-private.h b/composer/e-composer-private.h
index 8803cf9..b5ff0ba 100644
--- a/composer/e-composer-private.h
+++ b/composer/e-composer-private.h
@@ -90,6 +90,8 @@ struct _EMsgComposerPrivate {
GtkWidget *header_table;
GtkWidget *attachment_paned;
+ GtkWindowGroup *window_group;
+
GtkActionGroup *charset_actions;
GtkActionGroup *composer_actions;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]