aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/groupwise-features
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2008-10-01 15:37:47 +0800
committerMilan Crha <mcrha@src.gnome.org>2008-10-01 15:37:47 +0800
commitaae003381abb042726c16b7013d869644df13e95 (patch)
tree88b3cef842faf76dc0094f129123c33109e79f6d /plugins/groupwise-features
parent26b546625e06ff80f94298a2be3bff264a3a5b34 (diff)
downloadgsoc2013-evolution-aae003381abb042726c16b7013d869644df13e95.tar
gsoc2013-evolution-aae003381abb042726c16b7013d869644df13e95.tar.gz
gsoc2013-evolution-aae003381abb042726c16b7013d869644df13e95.tar.bz2
gsoc2013-evolution-aae003381abb042726c16b7013d869644df13e95.tar.lz
gsoc2013-evolution-aae003381abb042726c16b7013d869644df13e95.tar.xz
gsoc2013-evolution-aae003381abb042726c16b7013d869644df13e95.tar.zst
gsoc2013-evolution-aae003381abb042726c16b7013d869644df13e95.zip
** Fix for bug #511947
2008-10-01 Milan Crha <mcrha@redhat.com> ** Fix for bug #511947 * proxy-login.c: (proxy_login_get_cnc): Pass in optional parent for password dialog. * proxy-login.c: (proxy_soap_login), (proxy_login_update_tree), (org_gnome_proxy_account_login): Adapt to the above change and check for NULL values to prevent runtime warnings. svn path=/trunk/; revision=36514
Diffstat (limited to 'plugins/groupwise-features')
-rw-r--r--plugins/groupwise-features/ChangeLog10
-rw-r--r--plugins/groupwise-features/proxy-login.c21
2 files changed, 22 insertions, 9 deletions
diff --git a/plugins/groupwise-features/ChangeLog b/plugins/groupwise-features/ChangeLog
index 214d115e40..01fe37d5ee 100644
--- a/plugins/groupwise-features/ChangeLog
+++ b/plugins/groupwise-features/ChangeLog
@@ -1,3 +1,13 @@
+2008-10-01 Milan Crha <mcrha@redhat.com>
+
+ ** Fix for bug #511947
+
+ * proxy-login.c: (proxy_login_get_cnc):
+ Pass in optional parent for password dialog.
+ * proxy-login.c: (proxy_soap_login), (proxy_login_update_tree),
+ (org_gnome_proxy_account_login): Adapt to the above change and check
+ for NULL values to prevent runtime warnings.
+
2008-09-25 Philip Withnall <philip@tecnocode.co.uk>
** Fix for bug #553148
diff --git a/plugins/groupwise-features/proxy-login.c b/plugins/groupwise-features/proxy-login.c
index 58a7cbc810..383e940fbe 100644
--- a/plugins/groupwise-features/proxy-login.c
+++ b/plugins/groupwise-features/proxy-login.c
@@ -219,7 +219,7 @@ proxy_get_password (EAccount *account, char **user_name, char **password)
}
static EGwConnection *
-proxy_login_get_cnc (EAccount *account)
+proxy_login_get_cnc (EAccount *account, GtkWindow *password_dlg_parrent)
{
EGwConnection *cnc;
CamelURL *url;
@@ -254,7 +254,7 @@ proxy_login_get_cnc (EAccount *account)
if (!password)
password = e_passwords_ask_password (prompt, "Groupwise", key, prompt,
- E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET, &remember, NULL);
+ E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET, &remember, password_dlg_parrent);
g_free (prompt);
cnc = e_gw_connection_new (uri, url->user, password);
@@ -333,7 +333,7 @@ proxy_soap_login (char *email)
}
srcAccount = pld->account;
- cnc = proxy_login_get_cnc(srcAccount);
+ cnc = proxy_login_get_cnc (srcAccount, NULL);
proxy_get_password (srcAccount, &user_name, &password);
proxy_cnc = e_gw_connection_get_proxy_connection (cnc, user_name, password, email, &permissions);
@@ -444,10 +444,11 @@ proxy_login_update_tree (void)
EGwConnection *cnc;
proxyLoginPrivate *priv = pld->priv;
gchar *file_name = e_icon_factory_get_icon_filename ("stock_person", 48);
- broken_image = gdk_pixbuf_new_from_file (file_name, NULL);
+ broken_image = file_name ? gdk_pixbuf_new_from_file (file_name, NULL) : NULL;
- cnc = proxy_login_get_cnc(pld->account);
- e_gw_connection_get_proxy_list (cnc, &proxy_list);
+ cnc = proxy_login_get_cnc (pld->account, priv->main ? (GTK_WINDOW (gtk_widget_get_toplevel (priv->main))) : NULL);
+ if (cnc)
+ e_gw_connection_get_proxy_list (cnc, &proxy_list);
gtk_tree_store_clear (priv->store);
if (proxy_list != NULL) {
@@ -465,7 +466,8 @@ proxy_login_update_tree (void)
if (broken_image)
g_object_unref (broken_image);
- g_object_unref (cnc);
+ if (cnc)
+ g_object_unref (cnc);
}
void
@@ -477,8 +479,9 @@ org_gnome_proxy_account_login (EPopup *ep, EPopupItem *p, void *data)
char *gladefile;
/* This pops-up the password dialog in case the User has forgot-passwords explicitly */
- cnc = proxy_login_get_cnc (mail_config_get_account_by_source_url (uri));
- g_object_unref (cnc);
+ cnc = proxy_login_get_cnc (mail_config_get_account_by_source_url (uri), NULL);
+ if (cnc)
+ g_object_unref (cnc);
pld = proxy_login_new();
priv = pld->priv;