aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSushma Rai <rsushma@src.gnome.org>2006-01-09 21:29:27 +0800
committerSushma Rai <rsushma@src.gnome.org>2006-01-09 21:29:27 +0800
commit300a4e978c80080195784454653a1a410af7ede9 (patch)
tree296213a127c58215bef6bfe31f4009620e0bde12
parent7305191377795dc544dc78ef3657065e9b384aa6 (diff)
downloadgsoc2013-evolution-300a4e978c80080195784454653a1a410af7ede9.tar
gsoc2013-evolution-300a4e978c80080195784454653a1a410af7ede9.tar.gz
gsoc2013-evolution-300a4e978c80080195784454653a1a410af7ede9.tar.bz2
gsoc2013-evolution-300a4e978c80080195784454653a1a410af7ede9.tar.lz
gsoc2013-evolution-300a4e978c80080195784454653a1a410af7ede9.tar.xz
gsoc2013-evolution-300a4e978c80080195784454653a1a410af7ede9.tar.zst
gsoc2013-evolution-300a4e978c80080195784454653a1a410af7ede9.zip
Fixed the issue of subscribe to other users folder being modal.
Fixes #314748 svn path=/trunk/; revision=31103
-rw-r--r--plugins/exchange-operations/ChangeLog7
-rw-r--r--plugins/exchange-operations/exchange-folder-subscription.c32
2 files changed, 22 insertions, 17 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index 314a0f4f12..ec80531a7b 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,3 +1,10 @@
+2006-01-09 Sushma Rai <rsushma@novell.com>
+
+ * exchange-folder-subscription.c (create_folder_subscription_dialog):
+ Instead of gtk_dialog_run(), calling gtk_widget_show().
+ (dialog_destroy): Added callback to do the cleanup on closing the
+ window. Fixes #314748.
+
2006-01-06 Simon Zheng <simon.zheng@sun.com>
* exchange-account-setup.c:
diff --git a/plugins/exchange-operations/exchange-folder-subscription.c b/plugins/exchange-operations/exchange-folder-subscription.c
index c9477e57a7..d48e828794 100644
--- a/plugins/exchange-operations/exchange-folder-subscription.c
+++ b/plugins/exchange-operations/exchange-folder-subscription.c
@@ -155,6 +155,18 @@ setup_server_option_menu (GladeXML *glade_xml, gchar *mail_account)
/* FIXME: Default to the current storage in the shell view. */
}
+static void
+dialog_destroy (GtkWidget *dialog, gint response, gpointer data) {
+ ENameSelector *name_selector = data;
+
+ if (response == GTK_RESPONSE_OK || response == GTK_RESPONSE_CANCEL) {
+ if (name_selector) {
+ g_object_unref (name_selector);
+ name_selector = NULL;
+ }
+ gtk_widget_destroy (dialog);
+ }
+}
gboolean
create_folder_subscription_dialog (gchar *mail_account, gchar *fname, gchar **user_email_address_ret, gchar **folder_name_ret)
@@ -165,7 +177,6 @@ create_folder_subscription_dialog (gchar *mail_account, gchar *fname, gchar **us
GtkWidget *name_selector_widget;
GtkWidget *folder_name_entry;
char *user_email_address = NULL;
- int response;
EDestinationStore *destination_store;
GList *destinations;
EDestination *destination;
@@ -193,19 +204,12 @@ create_folder_subscription_dialog (gchar *mail_account, gchar *fname, gchar **us
G_CALLBACK (folder_name_entry_changed_callback), dialog);
while (TRUE) {
- response = gtk_dialog_run (GTK_DIALOG (dialog));
- if (response == GTK_RESPONSE_CANCEL) {
- gtk_widget_destroy (dialog);
- g_object_unref (name_selector);
- return FALSE;
- }
+ g_signal_connect (dialog, "response", G_CALLBACK(dialog_destroy), name_selector);
+ gtk_widget_show (dialog);
destination_store = e_name_selector_entry_peek_destination_store (E_NAME_SELECTOR_ENTRY (GTK_ENTRY (name_selector_widget)));
destinations = e_destination_store_list_destinations (destination_store);
- if (!destinations) {
- gtk_widget_destroy (dialog);
- g_object_unref (name_selector);
+ if (!destinations)
return FALSE;
- }
destination = destinations->data;
user_email_address = g_strdup (e_destination_get_email (destination));
g_list_free (destinations);
@@ -216,18 +220,12 @@ create_folder_subscription_dialog (gchar *mail_account, gchar *fname, gchar **us
/* It would be nice to insensitivize the OK button appropriately instead of doing this, but unfortunately we can't do this for the
Bonobo control. */
e_error_run (GTK_WINDOW (dialog), ERROR_DOMAIN ":select-user", NULL);
-
-
}
- gtk_widget_show_all (dialog);
if (user_email_address)
*user_email_address_ret = user_email_address;
*folder_name_ret = g_strdup (gtk_entry_get_text (GTK_ENTRY (folder_name_entry)));
- gtk_widget_destroy (dialog);
- g_object_unref (name_selector);
return TRUE;
-
}