From e0b530599f894a4ef9d469c8a9b44e186aa0ae5f Mon Sep 17 00:00:00 2001 From: Sankar P Date: Wed, 10 Aug 2005 07:15:25 +0000 Subject: : Changed the way in which the EDIT and DELETED flags are handled so that 2005-08-10 Sankar P * proxy.c : (proxy_dialog_store_widgets_data) (proxy_commit) : Changed the way in which the EDIT and DELETED flags are handled so that any proxy can be deleted without closing account-editor. Fixes #312313 svn path=/trunk/; revision=30070 --- plugins/groupwise-features/ChangeLog | 8 ++++++++ plugins/groupwise-features/proxy.c | 13 ++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'plugins') diff --git a/plugins/groupwise-features/ChangeLog b/plugins/groupwise-features/ChangeLog index ca53b8e031..8c129b5d1b 100644 --- a/plugins/groupwise-features/ChangeLog +++ b/plugins/groupwise-features/ChangeLog @@ -1,3 +1,11 @@ +2005-08-10 Sankar P + + * proxy.c : + (proxy_dialog_store_widgets_data) + (proxy_commit) : Changed the way in which the EDIT and DELETED flags + are handled so that any proxy can be deleted without closing account-editor. + Fixes #312313 + 2005-08-10 Sankar P * proxy.c : diff --git a/plugins/groupwise-features/proxy.c b/plugins/groupwise-features/proxy.c index 0b0fcc4004..f338d904a3 100644 --- a/plugins/groupwise-features/proxy.c +++ b/plugins/groupwise-features/proxy.c @@ -108,8 +108,6 @@ struct _proxyDialogPrivate { GList *proxy_list; }; -//static void free_proxy_handler (proxyHandler *handler); - static void proxy_dialog_dispose (GObject *object) { @@ -364,6 +362,15 @@ proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog) for (;existing_list; existing_list = g_list_next(existing_list)) { new_proxy = (proxyHandler *) existing_list->data; if ( !g_ascii_strcasecmp (new_proxy->proxy_email, email) ) { + if (new_proxy->flags & E_GW_PROXY_DELETED) { + new_proxy->permissions = proxy_get_permissions_from_dialog (account); + if (new_proxy->flags & E_GW_PROXY_NEW) + new_proxy->flags = E_GW_PROXY_NEW; + else + new_proxy->flags = E_GW_PROXY_EDITED; + return 0; + } + e_error_run (NULL, "org.gnome.evolution.proxy:user-is-proxy",email ,NULL); return -1; @@ -546,7 +553,7 @@ proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data) if (aclInstance->flags & E_GW_PROXY_NEW ) e_gw_connection_add_proxy (prd->cnc, aclInstance); - if (aclInstance->flags & E_GW_PROXY_DELETED) + if ((aclInstance->flags & E_GW_PROXY_DELETED) && !(aclInstance->flags & E_GW_PROXY_NEW)) e_gw_connection_remove_proxy (prd->cnc, aclInstance); if (aclInstance->flags & E_GW_PROXY_EDITED) -- cgit v1.2.3