[evolution-patches] Exchange connector: Fix for modal error dialogs issue.
- From: Sushma Rai <rsushma novell com>
- To: Evolution patches List <evolution-patches gnome org>
- Subject: [evolution-patches] Exchange connector: Fix for modal error dialogs issue.
- Date: Tue, 24 Jan 2006 14:49:30 +0530
Please review the patch for #328385.
Thanks,
Sushma.
Index: plugins/exchange-operations/exchange-config-listener.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-config-listener.c,v
retrieving revision 1.21
diff -u -p -r1.21 exchange-config-listener.c
--- plugins/exchange-operations/exchange-config-listener.c 16 Jan 2006 08:04:29 -0000 1.21
+++ plugins/exchange-operations/exchange-config-listener.c 24 Jan 2006 08:56:46 -0000
@@ -716,30 +716,38 @@ exchange_config_listener_authenticate (E
else if (result == EXCHANGE_ACCOUNT_QUOTA_RECIEVE_ERROR ||
result == EXCHANGE_ACCOUNT_QUOTA_SEND_ERROR ||
result == EXCHANGE_ACCOUNT_QUOTA_WARN) {
- gchar *current_quota_usage;
+ gchar *current_quota_usage = NULL;
+ const char *error_code;
+ GtkWidget *widget;
switch (result) {
case EXCHANGE_ACCOUNT_QUOTA_RECIEVE_ERROR:
current_quota_usage = g_strdup_printf ("%.2f",
account->mbox_size);
- e_error_run (NULL, "org-gnome-exchange-operations:account-quota-error", current_quota_usage);
- g_free (current_quota_usage);
+ error_code = "org-gnome-exchange-operations:account-quota-error";
break;
case EXCHANGE_ACCOUNT_QUOTA_SEND_ERROR:
current_quota_usage = g_strdup_printf ("%.2f",
account->mbox_size);
- e_error_run (NULL, "org-gnome-exchange-operations:account-quota-send-error", current_quota_usage);
- g_free (current_quota_usage);
+ error_code = "org-gnome-exchange-operations:account-quota-send-error";
break;
case EXCHANGE_ACCOUNT_QUOTA_WARN:
current_quota_usage = g_strdup_printf ("%.2f",
account->mbox_size);
- e_error_run (NULL, "org-gnome-exchange-operations:account-quota-warn", current_quota_usage);
- g_free (current_quota_usage);
+ error_code = "org-gnome-exchange-operations:account-quota-warn";
break;
default:
break;
}
+
+ if (current_quota_usage) {
+ widget = e_error_new (NULL, error_code, current_quota_usage);
+ g_signal_connect ((GtkDialog *)widget, "response",
+ G_CALLBACK (gtk_widget_destroy), widget);
+ gtk_widget_show (widget);
+ g_free (current_quota_usage);
+ }
+
/* reset result, so that we check if the password
* expiry warning period
*/
Index: plugins/exchange-operations/exchange-operations.c
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/exchange-operations.c,v
retrieving revision 1.14
diff -u -p -r1.14 exchange-operations.c
--- plugins/exchange-operations/exchange-operations.c 23 Jan 2006 15:20:49 -0000 1.14
+++ plugins/exchange-operations/exchange-operations.c 24 Jan 2006 08:58:29 -0000
@@ -223,6 +223,7 @@ exchange_operations_report_error (Exchan
{
gchar *error_string;
gchar *quota_value;
+ GtkWidget *widget;
g_return_if_fail (account != NULL);
@@ -233,27 +234,29 @@ exchange_operations_report_error (Exchan
switch (result) {
case EXCHANGE_ACCOUNT_MAILBOX_NA:
- e_error_run (NULL, error_string, exchange_account_get_username (account), NULL);
+ widget = e_error_new (NULL, error_string, exchange_account_get_username (account), NULL);
break;
case EXCHANGE_ACCOUNT_NO_MAILBOX:
- e_error_run (NULL, error_string, exchange_account_get_username (account),
- account->exchange_server, NULL);
+ widget = e_error_new (NULL, error_string, exchange_account_get_username (account),
+ account->exchange_server, NULL);
break;
case EXCHANGE_ACCOUNT_RESOLVE_ERROR:
case EXCHANGE_ACCOUNT_CONNECT_ERROR:
case EXCHANGE_ACCOUNT_UNKNOWN_ERROR:
- e_error_run (NULL, error_string, account->exchange_server, NULL);
+ widget = e_error_new (NULL, error_string, account->exchange_server, NULL);
break;
case EXCHANGE_ACCOUNT_QUOTA_RECIEVE_ERROR:
case EXCHANGE_ACCOUNT_QUOTA_SEND_ERROR:
case EXCHANGE_ACCOUNT_QUOTA_WARN:
- quota_value = g_strdup_printf ("%d", exchange_account_get_quota_limit (account));
- e_error_run (NULL, error_string, quota_value, NULL);
+ quota_value = g_strdup_printf ("%.2f", account->mbox_size);
+ widget = e_error_new (NULL, error_string, quota_value, NULL);
g_free (quota_value);
break;
default:
- e_error_run (NULL, error_string, NULL);
+ widget = e_error_new (NULL, error_string, NULL);
}
+ g_signal_connect ((GtkDialog *)widget, "response", G_CALLBACK (gtk_widget_destroy), widget);
+ gtk_widget_show (widget);
g_free (error_string);
}
Index: plugins/exchange-operations/ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/plugins/exchange-operations/ChangeLog,v
retrieving revision 1.89
diff -u -p -r1.89 ChangeLog
--- plugins/exchange-operations/ChangeLog 23 Jan 2006 15:20:49 -0000 1.89
+++ plugins/exchange-operations/ChangeLog 24 Jan 2006 09:05:31 -0000
@@ -1,3 +1,11 @@
+2006-01-24 Sushma Rai <rsushma novell com>
+
+ * exchange-config-listener.c (exchange_config_listener_authenticate):
+ Not using e_error_run(), to avoid modal error dialogs. Fixes #328385.
+
+ * exchange-operations.c (exchange_operations_report_error): Similar.
+ Also displaying the current quota usage instead of the quota limit.
+
2006-01-23 Sushma Rai <rsushma novell com>
* exchange-operations.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]