evolution r36515 - branches/gnome-2-24/plugins/groupwise-features
- From: mcrha svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r36515 - branches/gnome-2-24/plugins/groupwise-features
- Date: Wed, 1 Oct 2008 07:38:03 +0000 (UTC)
Author: mcrha
Date: Wed Oct 1 07:38:02 2008
New Revision: 36515
URL: http://svn.gnome.org/viewvc/evolution?rev=36515&view=rev
Log:
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.
Modified:
branches/gnome-2-24/plugins/groupwise-features/ChangeLog
branches/gnome-2-24/plugins/groupwise-features/proxy-login.c
Modified: branches/gnome-2-24/plugins/groupwise-features/proxy-login.c
==============================================================================
--- branches/gnome-2-24/plugins/groupwise-features/proxy-login.c (original)
+++ branches/gnome-2-24/plugins/groupwise-features/proxy-login.c Wed Oct 1 07:38:02 2008
@@ -219,7 +219,7 @@
}
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 @@
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 @@
}
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 @@
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 @@
if (broken_image)
g_object_unref (broken_image);
- g_object_unref (cnc);
+ if (cnc)
+ g_object_unref (cnc);
}
void
@@ -477,8 +479,9 @@
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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]