From e7ec0eee4852b4d60a5829f41f4b9392a97fcf43 Mon Sep 17 00:00:00 2001 From: Sankar P Date: Mon, 13 Aug 2007 05:46:00 +0000 Subject: ** Fix for bug #330968 2007-08-13 Sankar P ** Fix for bug #330968 * proxy.c: (proxy_page_changed_cb): Fixes a crash on account-editor. Proxy Preferences Crash Fix. svn path=/trunk/; revision=33993 --- plugins/groupwise-features/proxy.c | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) (limited to 'plugins/groupwise-features/proxy.c') diff --git a/plugins/groupwise-features/proxy.c b/plugins/groupwise-features/proxy.c index 03563e3ce7..399c1c3776 100644 --- a/plugins/groupwise-features/proxy.c +++ b/plugins/groupwise-features/proxy.c @@ -738,26 +738,30 @@ proxy_page_changed_cb (GtkNotebook *notebook, GtkNotebookPage *page, int num, EA gpointer val; gint pg_num; - prd = g_object_get_data ((GObject *) account, "prd"); + if (g_strrstr (e_account_get_string(account, E_ACCOUNT_SOURCE_URL), "groupwise://")) { - if (!prd || !prd->priv) - return TRUE; + prd = g_object_get_data ((GObject *) account, "prd"); + + if (!prd || !prd->priv) + return TRUE; - val = g_object_get_data ((GObject *) account, "proxy_tab_num"); + val = g_object_get_data ((GObject *) account, "proxy_tab_num"); - if (!val) - return FALSE; + if (!val) + return FALSE; - pg_num = GPOINTER_TO_INT (val); + pg_num = GPOINTER_TO_INT (val); - if ((pg_num == num) && account->enabled) { - if (!prd->cnc) - prd->cnc = proxy_get_cnc (account, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (notebook)))); - priv = prd->priv; + if ((pg_num == num) && account->enabled) { + if (!prd->cnc) + prd->cnc = proxy_get_cnc (account, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (notebook)))); + priv = prd->priv; - if (e_gw_connection_get_proxy_access_list(prd->cnc, &priv->proxy_list)!= E_GW_CONNECTION_STATUS_OK) + if (e_gw_connection_get_proxy_access_list(prd->cnc, &priv->proxy_list)!= E_GW_CONNECTION_STATUS_OK) return FALSE; - proxy_update_tree_view (account); + proxy_update_tree_view (account); + return TRUE; + } } return FALSE; -- cgit