From 3bfdb518bdfbab38ed63c70e8b3e68fe9da422f0 Mon Sep 17 00:00:00 2001 From: Sankar P Date: Wed, 20 Jul 2005 05:20:15 +0000 Subject: Removed the proxy and proxy-login plugins as they are merged into the 2005-07-19 Sankar P * Removed the proxy and proxy-login plugins as they are merged into the groupwise-features plugin. svn path=/trunk/; revision=29806 --- plugins/proxy-login/ChangeLog | 33 - plugins/proxy-login/Makefile.am | 40 - .../proxy-login/org-gnome-proxy-login-errors.xml | 10 - .../proxy-login/org-gnome-proxy-login.eplug.xml | 14 - plugins/proxy-login/proxy-login-dialog.glade | 207 ----- plugins/proxy-login/proxy-login.c | 510 ------------ plugins/proxy-login/proxy-login.h | 64 -- plugins/proxy/ChangeLog | 40 - plugins/proxy/Makefile.am | 37 - plugins/proxy/org-gnome-proxy-errors.xml | 24 - plugins/proxy/org-gnome-proxy.eplug.xml | 14 - plugins/proxy/proxy-add-dialog.glade | 779 ------------------ plugins/proxy/proxy-listing.glade | 202 ----- plugins/proxy/proxy.c | 912 --------------------- plugins/proxy/proxy.h | 66 -- 15 files changed, 2952 deletions(-) delete mode 100644 plugins/proxy-login/ChangeLog delete mode 100644 plugins/proxy-login/Makefile.am delete mode 100644 plugins/proxy-login/org-gnome-proxy-login-errors.xml delete mode 100644 plugins/proxy-login/org-gnome-proxy-login.eplug.xml delete mode 100644 plugins/proxy-login/proxy-login-dialog.glade delete mode 100644 plugins/proxy-login/proxy-login.c delete mode 100644 plugins/proxy-login/proxy-login.h delete mode 100644 plugins/proxy/ChangeLog delete mode 100644 plugins/proxy/Makefile.am delete mode 100644 plugins/proxy/org-gnome-proxy-errors.xml delete mode 100644 plugins/proxy/org-gnome-proxy.eplug.xml delete mode 100644 plugins/proxy/proxy-add-dialog.glade delete mode 100644 plugins/proxy/proxy-listing.glade delete mode 100644 plugins/proxy/proxy.c delete mode 100644 plugins/proxy/proxy.h (limited to 'plugins') diff --git a/plugins/proxy-login/ChangeLog b/plugins/proxy-login/ChangeLog deleted file mode 100644 index 72ea48aa80..0000000000 --- a/plugins/proxy-login/ChangeLog +++ /dev/null @@ -1,33 +0,0 @@ -2005-07-15 Sankar P - - * proxy-login.h: Removed the permissions from the structure, - since it is no longer needed. - -2005-07-15 Sankar P - - * proxy-login.c: Put permissions on the store instead of the - global structure as it gets unref before store_add. - -2005-07-14 Not Zed - - * proxy-login.c (proxy_login_add_new_store): fixed the store - permission names. - -2005-07-13 Tor Lillqvist - - * Makefile.am (LIBADD): Link with libeutil. Link with - libevolution-mail on Win32 only. (Have I understood correctly that - it isn't considered a good idea on Unix to link plugins at - link-time with libevolution-mail?) - - * org-gnome-proxy-login.eplug.xml: Use SOEXT. - -2005-07-12 Sankar P - - * Makefile.am : - Added CLEANFILES element and glade and error files to EXTRA_DIST. - -2005-07-12 Sankar P - - * Makefile.am : - Added missed header files to the SOURCES. diff --git a/plugins/proxy-login/Makefile.am b/plugins/proxy-login/Makefile.am deleted file mode 100644 index b63a2d6b7e..0000000000 --- a/plugins/proxy-login/Makefile.am +++ /dev/null @@ -1,40 +0,0 @@ -INCLUDES = \ - -I$(top_srcdir) \ - $(EVOLUTION_MAIL_CFLAGS) \ - $(EVOLUTION_MAIL_CFLAGS) \ - $(EVOLUTION_CALENDAR_CFLAGS) \ - $(EVOLUTION_ADDRESSBOOK_CFLAGS) \ - $(CAMEL_GROUPWISE_CFLAGS) \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" - -@EVO_PLUGIN_RULE@ - -plugin_DATA = org-gnome-proxy-login.eplug -plugin_LTLIBRARIES = libproxy-login.la - -libproxy_login_la_SOURCES = proxy-login.c proxy-login.h -libproxy_login_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED) - -if OS_WIN32 -NO_UNDEFINED_REQUIRED_LIBS = $(top_builddir)/mail/libevolution-mail.la -endif - -libproxy_login_la_LIBADD = \ - $(top_builddir)/e-util/libeutil.la \ - $(NO_UNDEFINED_REQUIRED_LIBS) \ - $(EVOLUTION_MAIL_LIBS) \ - $(CAMEL_GROUPWISE_LIBS) - - -glade_DATA = proxy-login-dialog.glade - -error_DATA = org-gnome-proxy-login-errors.xml -errordir = $(privdatadir)/errors - -EXTRA_DIST = \ - $(error_DATA) \ - $(glade_DATA) \ - org-gnome-proxy-login.eplug.xml \ - org-gnome-proxy-login-errors.xml - -CLEANFILES = $(BUILT_SOURCES) diff --git a/plugins/proxy-login/org-gnome-proxy-login-errors.xml b/plugins/proxy-login/org-gnome-proxy-login-errors.xml deleted file mode 100644 index 75162f4f21..0000000000 --- a/plugins/proxy-login/org-gnome-proxy-login-errors.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - -Invalid user - -Proxy login as "{0}" was unsuccessful. Please check Email Id and try again; - - - - diff --git a/plugins/proxy-login/org-gnome-proxy-login.eplug.xml b/plugins/proxy-login/org-gnome-proxy-login.eplug.xml deleted file mode 100644 index ba6e2adf02..0000000000 --- a/plugins/proxy-login/org-gnome-proxy-login.eplug.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - <_description>Allows disabling of accounts. - - - - - - - diff --git a/plugins/proxy-login/proxy-login-dialog.glade b/plugins/proxy-login/proxy-login-dialog.glade deleted file mode 100644 index ada43bc446..0000000000 --- a/plugins/proxy-login/proxy-login-dialog.glade +++ /dev/null @@ -1,207 +0,0 @@ - - - - - - - - True - Proxy Login - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-help - True - GTK_RELIEF_NORMAL - True - -11 - - - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - 4 - True - True - False - 0 - - - - True - False - 0 - - - - True - False - 0 - - - - 250 - True - True - True - True - 0 - - True - * - False - - - 0 - True - True - - - - - 0 - False - False - - - - - 5 - False - False - - - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - False - True - False - False - False - - - - - 0 - True - True - - - - - - - - True - <b>Account Name</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 5 - True - True - - - - - - - diff --git a/plugins/proxy-login/proxy-login.c b/plugins/proxy-login/proxy-login.c deleted file mode 100644 index 57970ea171..0000000000 --- a/plugins/proxy-login/proxy-login.c +++ /dev/null @@ -1,510 +0,0 @@ - -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ -/* - * Authors: - * Shreyas Srinivasan - * Sankar P - * - * Copyright 2004 Novell, Inc. (www.novell.com) - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#define GW(name) glade_xml_get_widget (priv->xml, name) - -#define ACCOUNT_PICTURE 0 -#define ACCOUNT_NAME 1 - -void org_gnome_proxy_account_login (EPopup *ep, EPopupItem *p, char *uri); - -proxyLogin *pld = NULL; -static GObjectClass *parent_class = NULL; - -struct _proxyLoginPrivate { - /* Glade XML data for the Add/Edit Proxy dialog*/ - GladeXML *xml; - /* Widgets */ - GtkWidget *main; - - /*Tree Store*/ - GtkTreeStore *store; - /*Tree View*/ - GtkTreeView *tree; - - char *help_section; -}; - -static void -proxy_login_finalize (GObject *object) -{ - proxyLogin *prd = (proxyLogin *) object; - proxyLoginPrivate *priv; - - g_return_if_fail (IS_PROXY_LOGIN (prd)); - priv = prd->priv; - g_list_foreach (prd->proxy_list, (GFunc)g_free, NULL); - g_list_free (prd->proxy_list); - prd->proxy_list = NULL; - g_object_unref (priv->xml); - g_free (priv->help_section); - - if (prd->priv) { - g_free (prd->priv); - prd->priv = NULL; - } - - if (parent_class->finalize) - (* parent_class->finalize) (object); -} - -static void -proxy_login_dispose (GObject *object) -{ - proxyLogin *prd = (proxyLogin *) object; - - g_return_if_fail (IS_PROXY_LOGIN (prd)); - - if (parent_class->dispose) - (* parent_class->dispose) (object); -} - -/* Class initialization function for the Send Options */ -static void -proxy_login_class_init (GObjectClass *object) -{ - proxyLoginClass *klass; - GObjectClass *object_class; - - klass = PROXY_LOGIN_CLASS (object); - parent_class = g_type_class_peek_parent (klass); - object_class = G_OBJECT_CLASS (klass); - - object_class->finalize = proxy_login_finalize; - object_class->dispose = proxy_login_dispose; -} - -static void -proxy_login_init (GObject *object) -{ - proxyLogin *prd; - proxyLoginPrivate *priv; - - prd = PROXY_LOGIN (object); - priv = g_new0 (proxyLoginPrivate, 1); - prd->priv = priv; - - prd->proxy_list = NULL; - priv->xml = NULL; - priv->main = NULL; - priv->store = NULL; - priv->tree = NULL; -} - -GType -proxy_login_get_type (void) -{ - static GType type = 0; - - if (type == 0) { - static const GTypeInfo info = { - sizeof (proxyLoginClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) proxy_login_class_init, /* class_init */ - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (proxyLogin), - 0, /* n_preallocs */ - (GInstanceInitFunc) proxy_login_init, - NULL /* instance_init */ - }; - type = g_type_register_static (G_TYPE_OBJECT, - "proxyLoginType", - &info, 0); - } - - return type; -} - -proxyLogin * -proxy_login_new (void) -{ - proxyLogin *prd; - - prd = g_object_new (TYPE_PROXY_LOGIN, NULL); - - return prd; -} - -static int -proxy_get_password (EAccount *account, char **user_name, char **password) -{ - char *uri, *failed_auth, *key, *prompt; - CamelURL *url; - const char *poa_address, *use_ssl, *soap_port; - - url = camel_url_new (account->source->url, NULL); - if (url == NULL) - return NULL; - *user_name = g_strdup (url->user); - poa_address = url->host; - if (!poa_address || strlen (poa_address) ==0) - return NULL; - - soap_port = camel_url_get_param (url, "soap_port"); - if (!soap_port || strlen (soap_port) == 0) - soap_port = "7191"; - use_ssl = camel_url_get_param (url, "use_ssl"); - - key = g_strdup_printf ("groupwise://%s@%s/", url->user, poa_address); - - if (!g_str_equal (use_ssl, "never")) - uri = g_strdup_printf ("https://%s:%s/soap", poa_address, soap_port); - else - uri = g_strdup_printf ("http://%s:%s/soap", poa_address, soap_port); - - failed_auth = ""; - - prompt = g_strdup_printf (_("%sEnter password for %s (user %s)"), - failed_auth, poa_address, url->user); - - *password = e_passwords_get_password ("Groupwise", key); - - g_free (key); - g_free (prompt); - g_free (uri); - camel_url_free (url); - - return 1; -} - -static EGwConnection * -proxy_login_get_cnc (EAccount *account) -{ - EGwConnection *cnc; - CamelURL *url; - url = camel_url_new (account->source->url, NULL); - char *uri = NULL, *failed_auth = NULL, *key = NULL, *prompt = NULL, *password = NULL; - const char *use_ssl, *soap_port; - - url = camel_url_new (account->source->url, NULL); - if (url == NULL) - return NULL; - if (!url->host || strlen (url->host) ==0) - return NULL; - - soap_port = camel_url_get_param (url, "soap_port"); - if (!soap_port || strlen (soap_port) == 0) - soap_port = "7191"; - use_ssl = camel_url_get_param (url, "use_ssl"); - - key = g_strdup_printf ("groupwise://%s@%s/", url->user, url->host); - if (!g_str_equal (use_ssl, "never")) - uri = g_strdup_printf ("https://%s:%s/soap", url->host, soap_port); - else - uri = g_strdup_printf ("http://%s:%s/soap", url->host, soap_port); - - failed_auth = ""; - cnc = NULL; - - prompt = g_strdup_printf (_("%sEnter password for %s (user %s)"), - failed_auth, url->host, url->user); - - password = e_passwords_get_password ("Groupwise", key); - - cnc = e_gw_connection_new (uri, url->user, password); - if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) { - char *http_uri = g_strconcat ("http://", uri + 8, NULL); - cnc = e_gw_connection_new (http_uri, url->user, password); - g_free (http_uri); - } - - g_free (prompt); - g_free (key); - g_free (password); - g_free (uri); - camel_url_free (url); - - return cnc; -} - - -static void -proxy_login_cb (GtkDialog *dialog, gint state) -{ - GtkWidget *account_name_tbox; - proxyLoginPrivate *priv; - char *proxy_name; - - priv = pld->priv; - account_name_tbox = glade_xml_get_widget (priv->xml, "account_name"); - proxy_name = g_strdup ((char *) gtk_entry_get_text ((GtkEntry *) account_name_tbox)); - - switch (state) { - case GTK_RESPONSE_OK: - gtk_widget_destroy (priv->main); - proxy_soap_login (proxy_name); - g_object_unref (pld); - break; - case GTK_RESPONSE_CANCEL: - gtk_widget_destroy (priv->main); - g_object_unref (pld); - break; - case GTK_RESPONSE_HELP: - break; - } - - g_free (proxy_name); -} - -static void -proxy_soap_login (char *email) -{ - EAccountList *accounts = mail_config_get_accounts(); - EAccount *srcAccount; - EAccount *dstAccount; - EGwConnection *proxy_cnc, *cnc; - CamelURL *uri = NULL, *parent = NULL ; - char *password = NULL, *user_name = NULL; - char *proxy_source_url = NULL, *parent_source_url = NULL ; - char *name; - int i; - int permissions = 0; - - for (i=0; email[i]!='\0' && email[i]!='@' ; i++); - if (email[i]=='@') - name = g_strndup(email, i); - else { - e_error_run (NULL, "org.gnome.evolution.proxy-login:invalid-user",email ,NULL); - return; - } - - srcAccount = pld->account; - cnc = proxy_login_get_cnc(srcAccount); - proxy_get_password (srcAccount, &user_name, &password); - proxy_cnc = e_gw_connection_get_proxy_connection (cnc, user_name, password, email, &permissions); - - if (proxy_cnc) { - parent = camel_url_new (e_account_get_string(srcAccount, E_ACCOUNT_SOURCE_URL), NULL); - parent_source_url = camel_url_to_string (parent, CAMEL_URL_HIDE_PASSWORD); - uri = camel_url_copy (parent); - camel_url_set_user (uri, name); - proxy_source_url = camel_url_to_string (uri, CAMEL_URL_HIDE_PASSWORD); - dstAccount = e_account_new(); - e_account_set_string(dstAccount, E_ACCOUNT_ID_ADDRESS, email); - dstAccount->enabled = TRUE; - e_account_set_string(dstAccount, E_ACCOUNT_SOURCE_URL, proxy_source_url); - e_account_set_string (dstAccount, E_ACCOUNT_TRANSPORT_URL, proxy_source_url); - e_account_set_string (dstAccount, E_ACCOUNT_NAME, email); - e_account_set_string (dstAccount, E_ACCOUNT_ID_NAME, name); - e_account_set_string (dstAccount, E_ACCOUNT_PROXY_PARENT_UID, srcAccount->uid); - e_account_list_add(accounts, dstAccount); - e_account_list_change (accounts, srcAccount); - e_account_list_save(accounts); - g_object_set_data ((GObject *)dstAccount, "permissions", permissions); - mail_get_store(e_account_get_string(dstAccount, E_ACCOUNT_SOURCE_URL), NULL, proxy_login_add_new_store, dstAccount); - - g_free (proxy_source_url); - g_free (parent_source_url); - camel_url_free (parent); - } else { - e_error_run (NULL, "org.gnome.evolution.proxy-login:invalid-user",email ,NULL); - return; - } - - g_free (name); - g_free (user_name); - g_free (password); -} - - -static void -proxy_login_add_new_store (char *uri, CamelStore *store, void *user_data) -{ - MailComponent *component = mail_component_peek (); - EAccount *account = user_data; - int permissions = g_object_get_data ((GObject *)account, "permissions"); - - if (store == NULL) - return; - - if (!(permissions & E_GW_PROXY_MAIL_WRITE)) - store->mode &= !CAMEL_STORE_WRITE; - - store->flags |= CAMEL_STORE_PROXY; - mail_component_add_store (component, store, account->name); -} - -static void -proxy_login_tree_view_changed_cb(GtkDialog *dialog) -{ - proxyLoginPrivate *priv = pld->priv; - GtkTreeSelection* account_select; - GtkTreeIter iter; - GtkWidget *account_name_tbox; - GtkTreeModel *model; - char *account_mailid; - - account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree)); - gtk_tree_selection_get_selected (account_select, &model, &iter); - gtk_tree_model_get (model, &iter, ACCOUNT_NAME, &account_mailid, -1); - account_mailid = g_strrstr (account_mailid, "\n") + 1; - account_name_tbox = glade_xml_get_widget (priv->xml, "account_name"); - gtk_entry_set_text((GtkEntry*) account_name_tbox,account_mailid); -} - -static void -proxy_login_setup_tree_view (void) -{ - proxyLoginPrivate *priv; - GtkTreeSelection *selection; - GtkCellRenderer *renderer; - GtkTreeViewColumn *column; - - priv = pld->priv; - renderer = g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF, - "xpad", 4, - "ypad", 4, - NULL); - column = gtk_tree_view_column_new_with_attributes ("Picture", renderer, "pixbuf", ACCOUNT_PICTURE, NULL); - gtk_tree_view_append_column (GTK_TREE_VIEW (priv->tree), column); - renderer = gtk_cell_renderer_text_new (); - column = gtk_tree_view_column_new_with_attributes ("Name", renderer, "text", ACCOUNT_NAME, NULL); - gtk_tree_view_append_column (GTK_TREE_VIEW (priv->tree), column); - gtk_tree_view_set_model (priv->tree, GTK_TREE_MODEL (priv->store)); - selection = gtk_tree_view_get_selection (priv->tree); - gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); - g_signal_connect (G_OBJECT (selection), "changed", proxy_login_tree_view_changed_cb, NULL); -} - -static void -proxy_login_update_tree (void) -{ - GtkTreeIter iter; - int i,n; - GdkPixbuf *broken_image = NULL; - GList *proxy_list = NULL; - char *proxy_name; - char *proxy_email; - 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); - - cnc = proxy_login_get_cnc(pld->account); - e_gw_connection_get_proxy_list (cnc, &proxy_list); - - gtk_tree_store_clear (priv->store); - if (proxy_list != NULL) { - n = g_list_length(proxy_list); - for (i=0;istore, &iter, NULL); - gtk_tree_store_set (priv->store, &iter, 0, broken_image, 1, g_strconcat(proxy_name, "\n", proxy_email, NULL), -1); - } - gtk_tree_view_set_model (GTK_TREE_VIEW(priv->tree),GTK_TREE_MODEL (priv->store)); - } -} - -void -org_gnome_proxy_account_login (EPopup *ep, EPopupItem *p, char *uri) -{ - proxyLoginPrivate *priv; - - pld = proxy_login_new(); - priv = pld->priv; - priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/proxy-login-dialog.glade", NULL, NULL); - priv->main = glade_xml_get_widget (priv->xml, "proxy_login_dialog"); - pld->account = mail_config_get_account_by_source_url (uri); - priv->tree = GTK_TREE_VIEW (glade_xml_get_widget (priv->xml, "proxy_login_treeview")); - priv->store = gtk_tree_store_new (2, - GDK_TYPE_PIXBUF, - G_TYPE_STRING - ); - proxy_login_setup_tree_view (); - proxy_login_update_tree (); - g_signal_connect (GTK_DIALOG (priv->main), "response", G_CALLBACK(proxy_login_cb), NULL); - gtk_widget_show (GTK_WIDGET (priv->main)); - } - -static EPopupItem popup_items[] = { -{ E_POPUP_ITEM, "20.emc.04", N_("_Proxy Login..."), org_gnome_proxy_account_login, NULL, NULL, 0, EM_POPUP_FOLDER_STORE } -}; - -static void -popup_free (EPopup *ep, GSList *items, void *data) -{ -g_slist_free (items); -} - -void -org_gnome_create_proxy_login_option (EPlugin *ep, EMPopupTargetFolder *t) -{ - EAccount *account; - GSList *menus = NULL; - int i; - - account = mail_config_get_account_by_source_url (t->uri); - if (g_strrstr (t->uri,"groupwise://") && !account->parent_uid) { - popup_items[0].label = _(popup_items[0].label); - for (i = 0; i < sizeof (popup_items) / sizeof (popup_items[0]); i++) - menus = g_slist_prepend (menus, &popup_items[i]); - e_popup_add_items (t->target.popup, menus, NULL, popup_free, t->uri); - } - return; - -} diff --git a/plugins/proxy-login/proxy-login.h b/plugins/proxy-login/proxy-login.h deleted file mode 100644 index 2213124082..0000000000 --- a/plugins/proxy-login/proxy-login.h +++ /dev/null @@ -1,64 +0,0 @@ - /* Evolution calendar - Timezone selector dialog - * - * Copyright (C) 2005 Novell, Inc. - * - * Authors: Shreyas Srinivasan - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include - -#define TYPE_PROXY_LOGIN (proxy_login_get_type ()) -#define PROXY_LOGIN(obj) (GTK_CHECK_CAST ((obj), TYPE_PROXY_LOGIN, proxyLogin)) -#define PROXY_LOGIN_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_PROXY_LOGIN, proxyLoginClass)) -#define IS_PROXY_LOGIN(obj) (GTK_CHECK_TYPE ((obj), TYPE_PROXY_LOGIN)) -#define IS_PROXY_LOGIN_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_PROXY_LOGIN)) - -typedef struct _proxyLogin proxyLogin; -typedef struct _proxyLoginClass proxyLoginClass; -typedef struct _proxyLoginPrivate proxyLoginPrivate; - -struct _proxyLogin{ - GObject object; - - /*Account*/ - EAccount *account; - - /*List of proxies*/ - GList *proxy_list; - - /* Private Dialog Information*/ - proxyLoginPrivate *priv; -}; - -struct _proxyLoginClass { - GObjectClass parent_class; -}; - -GType proxy_login_get_type (void); -proxyLogin * proxy_login_new (void); -static void proxy_login_cb (GtkDialog *dialog, gint state); -static void proxy_login_add_new_store (char *uri, CamelStore *store, void *user_data); -static void proxy_login_setup_tree_view (void); -void org_gnome_proxy_account_login (EPopup *ep, EPopupItem *p, char *uri); -proxyLogin* proxy_dialog_new (void); -static void proxy_soap_login (char *email); -char *parse_email_for_name (char *email); -static void proxy_login_update_tree (void); -static void proxy_login_tree_view_changed_cb(GtkDialog *dialog); -void org_gnome_create_proxy_login_option(EPlugin *ep, EMPopupTargetFolder *t); -static int proxy_get_password (EAccount *account, char **user_name, char **password); diff --git a/plugins/proxy/ChangeLog b/plugins/proxy/ChangeLog deleted file mode 100644 index bea51d3d30..0000000000 --- a/plugins/proxy/ChangeLog +++ /dev/null @@ -1,40 +0,0 @@ -2005-07-14 Vivek Jain - - * proxy.c: (proxy_commit),(proxy_abort): - NULL checks before we do anything else here (quite likely to be NULL) - **Fixes #310347 - -2005-07-13 Tor Lillqvist - - * Makefile.am (LIBADD): Link with libeutil. - -2005-07-12 Sankar P - - * Makefile.am : - Added org-gnome-proxy-errors.xml file to the EXTRA_DIST and - added CLEANFILES. - -2005-07-12 Sankar P - - * Makefile.am : - Added missed header files to the SOURCES. - -2005-07-11 Sankar P - - * proxy.c : (org_gnome_proxy) - Made changes so that the proxy list will be loaded only when the - account edited is enabled. So a new connection need not be created, - when an account is edited and a connection is not present. - Fixes #309999 - -2005-07-11 Sankar P - - * proxy.c : - (proxy_edit_account) : Added code to hide the contacts button - while editing proxy access rights for a proxy. - Fixes #309992 - -2005-07-11 Sankar P - - * proxy.c : - Included header to avoid the compiler warnings. diff --git a/plugins/proxy/Makefile.am b/plugins/proxy/Makefile.am deleted file mode 100644 index 11bc02b96d..0000000000 --- a/plugins/proxy/Makefile.am +++ /dev/null @@ -1,37 +0,0 @@ -INCLUDES = \ - -I$(top_srcdir) \ - -I$(top_srcdir)/camel \ - $(EVOLUTION_MAIL_CFLAGS) \ - $(EVOLUTION_CALENDAR_CFLAGS) \ - $(CAMEL_GROUPWISE_CFLAGS) \ - -DEVOLUTION_GLADEDIR=\""$(gladedir)"\" \ - -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\" - -@EVO_PLUGIN_RULE@ - -plugin_DATA = org-gnome-proxy.eplug -plugin_LTLIBRARIES = liborg-gnome-proxy.la - -liborg_gnome_proxy_la_SOURCES = proxy.c proxy.h -liborg_gnome_proxy_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED) -liborg_gnome_proxy_la_LIBADD = \ - $(top_builddir)/e-util/libeutil.la \ - $(EVOLUTION_MAIL_LIBS) \ - $(CAMEL_GROUPWISE_LIBS) - -glade_DATA = \ - proxy-add-dialog.glade \ - proxy-listing.glade - -error_DATA = org-gnome-proxy-errors.xml -errordir = $(privdatadir)/errors - -BUILT_SOURCES = $(error_i18n) - -EXTRA_DIST = \ - $(error_DATA) \ - $(glade_DATA) \ - org-gnome-proxy.eplug.xml \ - org-gnome-proxy-errors.xml - -CLEANFILES = $(BUILT_SOURCES) diff --git a/plugins/proxy/org-gnome-proxy-errors.xml b/plugins/proxy/org-gnome-proxy-errors.xml deleted file mode 100644 index 013db90209..0000000000 --- a/plugins/proxy/org-gnome-proxy-errors.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - -Invalid user - -Proxy access cannot be given to user "{0}" - - - - -Specify User - -You have to specify a valid user name to give proxy rights. - - - - -Specify User - -You have already given proxy permissions to this user. - - - - diff --git a/plugins/proxy/org-gnome-proxy.eplug.xml b/plugins/proxy/org-gnome-proxy.eplug.xml deleted file mode 100644 index 8ec15e7924..0000000000 --- a/plugins/proxy/org-gnome-proxy.eplug.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - <_description>Allows disabling of accounts. - - - - - - - - diff --git a/plugins/proxy/proxy-add-dialog.glade b/plugins/proxy/proxy-add-dialog.glade deleted file mode 100644 index 06c8c4823c..0000000000 --- a/plugins/proxy/proxy-add-dialog.glade +++ /dev/null @@ -1,779 +0,0 @@ - - - - - - - 8 - True - Add/Edit - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - True - False - True - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-help - True - GTK_RELIEF_NORMAL - True - -11 - - - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - True - False - 0 - - - - True - False - 0 - - - - True - 0 - 0.5 - GTK_SHADOW_NONE - - - - True - 0.5 - 0.5 - 1 - 1 - 0 - 0 - 12 - 0 - - - - 1 - True - 1 - 1 - False - 0 - 0 - - - - True - False - 27 - - - - True - True - True - True - 0 - - True - * - False - - - 0 - True - True - - - - - - True - False - 0 - - - - - - - 0 - True - True - - - - - - True - True - GTK_RELIEF_NORMAL - True - - - - - - True - 0.5 - 0.5 - 0 - 0 - 0 - 0 - 0 - 0 - - - - True - False - 2 - - - - True - gtk-jump-to - 4 - 0.5 - 0.5 - 0 - 0 - - - 0 - False - False - - - - - - True - Con_tacts - True - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - - - - 0 - False - False - - - - - 0 - 1 - 0 - 1 - - - - - - - - - - True - <b>Name</b> - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 0 - True - True - - - - - - True - 0 - 0.5 - GTK_SHADOW_OUT - - - - True - 0.5 - 0.5 - 1 - 1 - 2 - 7 - 12 - 0 - - - - True - False - 5 - - - - True - 4 - 3 - False - 8 - 43 - - - - True - Mail - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 0 - 1 - fill - - - - - - - True - Appointments - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 1 - 2 - fill - - - - - - - True - Reminder Notes - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 2 - 3 - fill - - - - - - - True - Tasks - False - False - GTK_JUSTIFY_LEFT - False - False - 0 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - 1 - 3 - 4 - fill - - - - - - - True - True - _Read - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 1 - 2 - 0 - 1 - fill - - - - - - - True - True - _Read - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 1 - 2 - 1 - 2 - fill - - - - - - - True - True - _Read - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 1 - 2 - 2 - 3 - fill - - - - - - - True - True - _Read - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 1 - 2 - 3 - 4 - fill - - - - - - - True - True - _Write - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 2 - 3 - 0 - 1 - fill - - - - - - - True - True - _Write - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 2 - 3 - 1 - 2 - fill - - - - - - - True - True - _Write - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 2 - 3 - 2 - 3 - fill - - - - - - - True - True - _Write - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 2 - 3 - 3 - 4 - fill - - - - - - 6 - True - True - - - - - - True - False - 7 - - - - True - True - Subscribe to my _alarms - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 0 - False - False - - - - - - True - True - Subscribe to my _notifications - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 0 - False - False - - - - - - True - True - Modify _folders/options/rules/ - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 0 - False - False - - - - - - True - True - Read items marked _private - True - GTK_RELIEF_NORMAL - True - False - False - True - - - - - 0 - False - False - - - - - 0 - True - True - - - - - - - - - - True - Access Rights - False - True - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - label_item - - - - - 9 - True - True - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - - diff --git a/plugins/proxy/proxy-listing.glade b/plugins/proxy/proxy-listing.glade deleted file mode 100644 index 989ef55613..0000000000 --- a/plugins/proxy/proxy-listing.glade +++ /dev/null @@ -1,202 +0,0 @@ - - - - - - - - True - dialog1 - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - True - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - 0 - False - True - GTK_PACK_END - - - - - - True - True - True - True - GTK_POS_TOP - True - False - - - - 12 - True - False - 6 - - - - True - False - 0 - - - - True - True - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_NONE - GTK_CORNER_TOP_LEFT - - - - True - True - False - False - False - True - False - False - False - - - - - 5 - True - True - - - - - - True - False - 6 - - - - True - True - gtk-add - True - GTK_RELIEF_NORMAL - True - - - 6 - False - False - - - - - - True - True - gtk-edit - True - GTK_RELIEF_NORMAL - True - - - 0 - False - False - - - - - - True - True - gtk-remove - True - GTK_RELIEF_NORMAL - True - - - 4 - False - False - - - - - 5 - False - True - - - - - 0 - True - True - - - - - False - True - - - - - - True - Proxy - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - tab - - - - - 0 - True - True - - - - - - - diff --git a/plugins/proxy/proxy.c b/plugins/proxy/proxy.c deleted file mode 100644 index 4f9d5f31ef..0000000000 --- a/plugins/proxy/proxy.c +++ /dev/null @@ -1,912 +0,0 @@ -/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- - * - * Authors: - * Shreyas Srinivasan (sshreyas@novell.com) - * Sankar P ( psankar@novell.com ) - * - * Copyright 2004 Novell, Inc. (www.novell.com) - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA. - * - */ - -#ifdef HAVE_CONFIG_H -#include -#endif - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#define GW(name) glade_xml_get_widget (priv->xml, name) - -#define ACCOUNT_PICTURE 0 -#define ACCOUNT_NAME 1 -#define PROXY_ADD_DIALOG 2 -#define PROXY_EDIT_DIALOG 3 - -static GObjectClass *parent_class = NULL; - -struct _proxyDialogPrivate { - /* Glade XML data for the Add/Edit Proxy dialog*/ - GladeXML *xml; - /*Glade XML data for Proxy Tab*/ - GladeXML *xml_tab; - - /* Widgets */ - GtkWidget *main; - - /*name selector dialog*/ - ENameSelector *proxy_name_selector; - - GtkTreeView *tree; - GtkTreeStore *store; - - /* Check Boxes for storing proxy priveleges*/ - GtkWidget *account_name; - GtkWidget *mail_read; - GtkWidget *mail_write; - GtkWidget *app_read; - GtkWidget *app_write; - GtkWidget *note_read; - GtkWidget *note_write; - GtkWidget *task_read; - GtkWidget *task_write; - GtkWidget *alarms; - GtkWidget *notifications; - GtkWidget *options; - GtkWidget *private; - char *help_section; -}; - -static void -proxy_dialog_dispose (GObject *object) -{ - proxyDialog *prd = (proxyDialog *) object; - - g_return_if_fail (IS_PROXY_DIALOG (prd)); - - if (parent_class->dispose) - (*parent_class->dispose) (object); -} - -static void -free_proxy_handler (proxyHandler *handler) -{ - if (handler->uniqueid) - g_free (handler->uniqueid); - - if (handler->proxy_name) - g_free (handler->proxy_name); - - if (handler->proxy_email) - g_free (handler->proxy_email); - - handler->uniqueid = NULL; - handler->proxy_name = NULL; - handler->proxy_email = NULL; -} - -static void -proxy_dialog_finalize (GObject *object) -{ - proxyDialog *prd = (proxyDialog *) object; - proxyDialogPrivate *priv; - - g_return_if_fail (IS_PROXY_DIALOG (prd)); - priv = prd->priv; - - if(priv->proxy_name_selector) - g_object_unref (priv->proxy_name_selector); - - g_free (priv->help_section); - g_object_unref (priv->xml_tab); - - if (prd->priv) { - g_free (prd->priv); - prd->priv = NULL; - } - - if (parent_class->finalize) - (* parent_class->finalize) (object); -} - -/* Class initialization function for the Proxy*/ -static void -proxy_dialog_class_init (GObjectClass *object) -{ - proxyDialogClass *klass; - GObjectClass *object_class; - - klass = PROXY_DIALOG_CLASS (object); - parent_class = g_type_class_peek_parent (klass); - object_class = G_OBJECT_CLASS (klass); - - object_class->finalize = proxy_dialog_finalize; - object_class->dispose = proxy_dialog_dispose; -} - -static void -proxy_dialog_init (GObject *object) -{ - proxyDialog *prd; - proxyDialogPrivate *priv; - - prd = PROXY_DIALOG (object); - priv = g_new0 (proxyDialogPrivate, 1); - - prd->priv = priv; - - priv->xml = NULL; - priv->xml_tab = NULL; - priv->main = NULL; - priv->tree = NULL; - priv->store = NULL; - priv->proxy_name_selector = NULL; - priv->account_name = NULL; - priv->mail_read = NULL; - priv->mail_write = NULL; - priv->app_read = NULL; - priv->app_write = NULL; - priv->note_read = NULL; - priv->note_write = NULL; - priv->task_read = NULL; - priv->task_write = NULL; - priv->alarms = NULL; - priv->notifications = NULL; - priv->options = NULL; - priv->private = NULL; - priv->help_section = NULL; -} - -GType -proxy_dialog_get_type (void) -{ - static GType type = 0; - - if (type == 0) { - static const GTypeInfo info = { - sizeof (proxyDialogClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) proxy_dialog_class_init, /* class_init */ - NULL, /* class_finalize */ - NULL, /* class_data */ - sizeof (proxyDialog), - 0, /* n_preallocs */ - (GInstanceInitFunc) proxy_dialog_init, - NULL /* instance_init */ - }; - - type = g_type_register_static (G_TYPE_OBJECT, - "proxyDialogType", - &info, 0); - } - - return type; -} - -proxyDialog * -proxy_dialog_new (void) -{ - proxyDialog *prd; - - prd = g_object_new (TYPE_PROXY_DIALOG, NULL); - - return prd; -} - -static int -proxy_get_permissions_from_dialog (EAccount *account) -{ - int permissions; - proxyDialogPrivate *priv; - proxyDialog *prd = NULL; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - permissions = 0; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->mail_read))) - permissions |= E_GW_PROXY_MAIL_READ; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->mail_write))) - permissions |= E_GW_PROXY_MAIL_WRITE; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->app_read))) - permissions |= E_GW_PROXY_APPOINTMENT_READ; - - if (gtk_toggle_button_get_active ( GTK_TOGGLE_BUTTON (priv->app_write))) - permissions |= E_GW_PROXY_APPOINTMENT_WRITE; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->task_read))) - permissions |= E_GW_PROXY_TASK_READ; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->task_write))) - permissions |= E_GW_PROXY_TASK_WRITE; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->note_read))) - permissions |= E_GW_PROXY_NOTES_READ; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->note_write))) - permissions |= E_GW_PROXY_NOTES_WRITE; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->alarms))) - permissions |= E_GW_PROXY_GET_ALARMS; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->notifications))) - permissions |= E_GW_PROXY_GET_NOTIFICATIONS; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->options))) - permissions |= E_GW_PROXY_MODIFY_FOLDERS; - - if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (priv->private))) - permissions |= E_GW_PROXY_READ_PRIVATE; - - return permissions; -} - -static int -proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog) -{ - GtkTreeIter iter; - GtkTreeSelection* account_select; - GtkTreeModel *model; - proxyHandler *new_proxy = NULL; - proxyDialogPrivate *priv; - char *account_mailid; - proxyDialog *prd = NULL; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - - switch (dialog) - { - case PROXY_ADD_DIALOG: - { - ENameSelectorEntry *name_selector_entry; - EDestinationStore *destination_store; - GList *destinations, *tmp; - char *name, *email; - GList *existing_list; - name_selector_entry = e_name_selector_peek_section_entry (priv->proxy_name_selector, "Add User"); - destination_store = e_name_selector_entry_peek_destination_store (E_NAME_SELECTOR_ENTRY ( - name_selector_entry)); - destinations = e_destination_store_list_destinations (destination_store); - tmp = destinations; - - if (!tmp) { - e_error_run (NULL, "org.gnome.evolution.proxy:no-user",NULL ,NULL); - return -1; - } - - for (; tmp != NULL; tmp = g_list_next (tmp)) { - email = NULL; - email = (char *)e_destination_get_email (tmp->data); - - if (g_strrstr (email, "@") == NULL ) { - e_error_run (NULL, "org.gnome.evolution.proxy:invalid-user",email ,NULL); - return -1; - } - - /*check whether already exists*/ - existing_list = g_object_get_data ( (GObject*)account, "proxy_list"); - - 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) ) { - - e_error_run (NULL, "org.gnome.evolution.proxy:user-is-proxy",email ,NULL); - return -1; - } - } - } - tmp = destinations; - - for (; tmp != NULL; tmp = g_list_next (tmp)) { - name = NULL; email = NULL; - email = (char *) e_destination_get_email (tmp->data); - name = (char *) e_destination_get_name (tmp->data); - new_proxy = (proxyHandler *) g_malloc (sizeof (proxyHandler)); - - if (name) - new_proxy->proxy_name = g_strdup (name); - else - new_proxy->proxy_name = g_strdup (email); - - new_proxy->proxy_email = g_strdup (email); - new_proxy->uniqueid = NULL; - new_proxy->flags = E_GW_PROXY_NEW; - new_proxy->permissions = proxy_get_permissions_from_dialog (account); - g_object_set_data((GObject *) account,"proxy_list",g_list_append (g_object_get_data ((GObject*) account,"proxy_list"), new_proxy)); - } - } - break; - case PROXY_EDIT_DIALOG: - account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree)); - gtk_tree_selection_get_selected (account_select, &model, &iter); - gtk_tree_model_get (model, &iter, ACCOUNT_NAME, &account_mailid, -1); - account_mailid = g_strrstr (account_mailid, "\n") + 1; - new_proxy = proxy_get_item_from_list (account, account_mailid); - - if (!new_proxy->flags & E_GW_PROXY_NEW) - new_proxy->flags = E_GW_PROXY_EDITED; - - new_proxy->permissions = proxy_get_permissions_from_dialog (account); - break; - default: - return -1; - } - - return 0; -} - - -static gboolean -proxy_dialog_initialize_widgets (EAccount *account) -{ - proxyDialogPrivate *priv; - proxyDialog *prd = NULL; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - priv->account_name = GW ("proxy_account_name"); - priv->mail_read = GW ("mailRead"); - priv->mail_write = GW ("mailWrite"); - priv->app_read = GW ("appRead"); - priv->app_write = GW ("appWrite"); - priv->note_read = GW ("noteRead"); - priv->note_write = GW ("noteWrite"); - priv->task_read = GW ("taskRead"); - priv->task_write = GW ("taskWrite"); - priv->alarms = GW ("alarms"); - priv->notifications = GW ("notifications"); - priv->options = GW ("modify_rules"); - priv->private = GW ("read_private"); - - return (priv->account_name - && priv->mail_read - && priv->mail_write - && priv->app_read - && priv->app_write - && priv->note_read - && priv->note_write - && priv->task_read - && priv->task_write - && priv->alarms - && priv->notifications - && priv->options - && priv->private); -} - -static EGwConnection * -proxy_get_cnc (EAccount *account) -{ - EGwConnection *cnc; - char *uri, *failed_auth, *key, *prompt, *password = NULL; - CamelURL *url; - const char *poa_address, *use_ssl, *soap_port; - gboolean remember; - - url = camel_url_new (account->source->url, NULL); - if (url == NULL) - return NULL; - poa_address = url->host; - if (!poa_address || strlen (poa_address) ==0) - return NULL; - - soap_port = camel_url_get_param (url, "soap_port"); - if (!soap_port || strlen (soap_port) == 0) - soap_port = "7191"; - use_ssl = camel_url_get_param (url, "use_ssl"); - - key = g_strdup_printf ("groupwise://%s@%s/", url->user, poa_address); - - if (!g_str_equal (use_ssl, "never")) - uri = g_strdup_printf ("https://%s:%s/soap", poa_address, soap_port); - else - uri = g_strdup_printf ("http://%s:%s/soap", poa_address, soap_port); - - failed_auth = ""; - cnc = NULL; - - prompt = g_strdup_printf (_("%sEnter password for %s (user %s)"), - failed_auth, poa_address, url->user); - - password = e_passwords_get_password ("Groupwise", key); - if (!password) - password = e_passwords_ask_password (prompt, "Groupwise", key, prompt, - E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET, &remember, NULL); - g_free (prompt); - - cnc = e_gw_connection_new (uri, url->user, password); - if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) { - char *http_uri = g_strconcat ("http://", uri + 8, NULL); - cnc = e_gw_connection_new (http_uri, url->user, password); - g_free (http_uri); - } - - camel_url_free (url); - return cnc; -} - -void -proxy_abort (GtkWidget *button, EConfigHookItemFactoryData *data) -{ - EMConfigTargetAccount *target_account; - EAccount *account; - proxyDialog *prd = NULL; - GList *proxy_list; - - target_account = (EMConfigTargetAccount *)data->config->target; - account = target_account->account; - prd = g_object_get_data ((GObject *)account, "prd"); - proxy_list = (GList *) g_object_get_data ((GObject *) account, "proxy_dialog"); - - if (prd == NULL || proxy_list == NULL) - return; - - g_list_foreach (proxy_list, (GFunc) free_proxy_handler, NULL); - g_list_free (proxy_list); - - g_object_unref (prd); -} -void -proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data) -{ - EAccount *account; - EMConfigTargetAccount *target_account; - proxyDialogPrivate *priv; - GList *l, *proxy_list; - proxyHandler *aclInstance; - proxyDialog *prd = NULL; - - target_account = (EMConfigTargetAccount *)data->config->target; - account = target_account->account; - prd = g_object_get_data ((GObject *)account, "prd"); - l = g_object_get_data ( (GObject *)account, "proxy_list") ; - - if (prd == NULL || l == NULL) - return; - - priv = prd->priv; - for (;l; l = g_list_next (l)) { - aclInstance = (proxyHandler *) l->data; - - /* Handle case where the structure is new and deleted*/ - if ( !((aclInstance->flags & E_GW_PROXY_NEW) && (aclInstance->flags & E_GW_PROXY_DELETED))) { - - if ( !E_IS_GW_CONNECTION(prd->cnc)) /* Add check in case the connection request fails*/ - prd->cnc = proxy_get_cnc (account); - - if (aclInstance->flags & E_GW_PROXY_NEW ) - e_gw_connection_add_proxy (prd->cnc, aclInstance); - - if (aclInstance->flags & E_GW_PROXY_DELETED) - e_gw_connection_remove_proxy (prd->cnc, aclInstance); - - if (aclInstance->flags & E_GW_PROXY_EDITED) - e_gw_connection_modify_proxy (prd->cnc, aclInstance); - } - } - - proxy_list = (GList *) g_object_get_data ((GObject *) account, "proxy_dialog"); - g_list_foreach (proxy_list, (GFunc) free_proxy_handler, NULL); - g_list_free (proxy_list); - - g_object_unref (prd); -} - -static void -proxy_setup_meta_tree_view (EAccount *account) -{ - proxyDialog *prd = NULL; - proxyDialogPrivate *priv; - GtkTreeSelection *selection; - GtkCellRenderer *renderer; - GtkTreeViewColumn *column; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - renderer = g_object_new (GTK_TYPE_CELL_RENDERER_PIXBUF, - "xpad", 4, - "ypad", 4, - NULL); - column = gtk_tree_view_column_new_with_attributes ("Picture", renderer, "pixbuf", ACCOUNT_PICTURE, NULL); - gtk_tree_view_append_column (GTK_TREE_VIEW (priv->tree), column); - renderer = gtk_cell_renderer_text_new (); - column = gtk_tree_view_column_new_with_attributes ("Name", renderer, "text", ACCOUNT_NAME, NULL); - gtk_tree_view_append_column (GTK_TREE_VIEW (priv->tree), column); - - gtk_tree_view_set_model (priv->tree, GTK_TREE_MODEL (priv->store)); - selection = gtk_tree_view_get_selection (priv->tree); - gtk_tree_selection_set_mode (selection, GTK_SELECTION_BROWSE); -} - -static void -proxy_update_tree_view (EAccount *account) -{ - proxyDialog *prd = NULL; - GtkTreeIter iter; - GdkPixbuf *broken_image = NULL; - GList *l; - proxyHandler *aclInstance; - gchar *file_name = e_icon_factory_get_icon_filename ("stock_person", E_ICON_SIZE_DIALOG); - proxyDialogPrivate *priv; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - broken_image = gdk_pixbuf_new_from_file (file_name, NULL); - - gtk_tree_store_clear (priv->store); - l = g_object_get_data ( (GObject *)account, "proxy_list") ; - - for (;l; l = g_list_next(l)) { - aclInstance = (proxyHandler *) l->data; - - if(! (aclInstance->flags & E_GW_PROXY_DELETED )) { - gtk_tree_store_append (priv->store, &iter, NULL); - gtk_tree_store_set (priv->store, &iter, 0, broken_image, 1, g_strconcat(aclInstance->proxy_name,"\n",aclInstance->proxy_email, NULL), -1); - } - } - - /*Fixme : Desensitize buttons if the list is Null*/ - gtk_tree_view_set_model (GTK_TREE_VIEW(priv->tree), GTK_TREE_MODEL (priv->store)); -} - -GtkWidget* -org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data) -{ - EMConfigTargetAccount *target_account; - EAccount *account; - GtkWidget *tab_dialog = NULL; - GList *proxy_list = NULL; - GtkButton *addProxy, *removeProxy, *editProxy; - proxyDialog *prd; - proxyDialogPrivate *priv; - - target_account = (EMConfigTargetAccount *)data->config->target; - account = target_account->account; - - if (account->enabled) { - prd = proxy_dialog_new (); - g_object_set_data ((GObject *) account, "prd", prd); - priv = prd->priv; - - if(!g_strrstr (e_account_get_string(account, E_ACCOUNT_SOURCE_URL), "groupwise://")) - return NULL; - - priv->xml_tab = glade_xml_new (EVOLUTION_GLADEDIR "/proxy-listing.glade", "proxy_vbox", NULL); - tab_dialog = GTK_WIDGET (glade_xml_get_widget (priv->xml_tab, "proxy_vbox")); - priv->tree = GTK_TREE_VIEW (glade_xml_get_widget (priv->xml_tab, "proxy_access_list")); - priv->store = gtk_tree_store_new (2, - GDK_TYPE_PIXBUF, - G_TYPE_STRING - ); - proxy_setup_meta_tree_view (account); - - addProxy = (GtkButton *) glade_xml_get_widget (priv->xml_tab, "add_proxy"); - removeProxy = (GtkButton *) glade_xml_get_widget (priv->xml_tab, "remove_proxy"); - editProxy = (GtkButton *) glade_xml_get_widget (priv->xml_tab, "edit_proxy"); - - g_signal_connect (addProxy, "clicked", G_CALLBACK(proxy_add_account), account); - g_signal_connect (removeProxy, "clicked", G_CALLBACK(proxy_remove_account), account); - g_signal_connect (editProxy, "clicked", G_CALLBACK(proxy_edit_account), account); - - prd->cnc = proxy_get_cnc(account); - - if (e_gw_connection_get_proxy_access_list(prd->cnc, &proxy_list)!= E_GW_CONNECTION_STATUS_OK) - return NULL; - - g_object_set_data ((GObject *) account, "proxy_list", proxy_list); - proxy_update_tree_view (account); - gtk_notebook_append_page ((GtkNotebook *)(data->parent), (GtkWidget *)tab_dialog, gtk_label_new("Proxy")); - gtk_widget_show_all (tab_dialog); - } else { - GtkWidget *err_tab; - GtkWidget *label; - - err_tab = gtk_vbox_new (TRUE, 10); - label = gtk_label_new (_("The Proxy tab will be available only when the account is enabled.")); - gtk_box_pack_start ((GtkBox *)err_tab, label, TRUE, TRUE, 10); - - gtk_notebook_append_page ((GtkNotebook *)(data->parent), (GtkWidget *)err_tab, gtk_label_new("Proxy")); - gtk_widget_show_all (err_tab); - - } - return NULL; -} - -static void -proxy_cancel(GtkWidget *button, EAccount *account) -{ - proxyDialog *prd = NULL; - proxyDialogPrivate *priv; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - gtk_widget_destroy (priv->main); - g_object_unref (priv->xml); -} - - -static void -proxy_add_ok (GtkWidget *button, EAccount *account) -{ - proxyDialog *prd = NULL; - proxyDialogPrivate *priv; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - - if ( proxy_dialog_store_widgets_data (account, PROXY_ADD_DIALOG) < 0) - return; - - proxy_update_tree_view (account); - gtk_widget_destroy (priv->main); - g_object_unref (priv->xml); -} - -static void -proxy_edit_ok (GtkWidget *button, EAccount *account) -{ - proxyDialog *prd = NULL; - proxyDialogPrivate *priv; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - - if ( proxy_dialog_store_widgets_data (account, PROXY_EDIT_DIALOG) < 0) - return; - - proxy_update_tree_view (account); - gtk_widget_destroy (priv->main); - g_object_unref (priv->xml); -} - -static proxyHandler * -proxy_get_item_from_list (EAccount *account, char *account_name) -{ - GList *l = g_object_get_data ((GObject *)account, "proxy_list"); - proxyHandler *iter; - - for (;l; l = g_list_next(l)) { - iter = (proxyHandler *) l->data; - - if ( g_str_equal (iter->proxy_email,account_name)) - return iter; - } - - return NULL; -} - -static void -proxy_remove_account (GtkWidget *button, EAccount *account) -{ - GtkTreeIter iter; - GtkTreeModel *model; - proxyDialogPrivate *priv; - proxyHandler *deleted; - GtkTreeSelection* account_select; - char *account_mailid; - proxyDialog *prd = NULL; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree)); - - if (gtk_tree_selection_get_selected (account_select, &model, &iter)) { - gtk_tree_model_get (model, &iter, ACCOUNT_NAME, &account_mailid, -1); - account_mailid = g_strrstr (account_mailid, "\n") + 1; - deleted = proxy_get_item_from_list (account, account_mailid); - - if (deleted != NULL) - deleted->flags |= E_GW_PROXY_DELETED; - - proxy_update_tree_view (account); - } -} - -static void -addressbook_dialog_response (ENameSelectorDialog *name_selector_dialog, gint response, gpointer user_data) -{ - gtk_widget_hide (GTK_WIDGET (name_selector_dialog)); -} - -static void -addressbook_entry_changed (GtkWidget *entry, gpointer user_data) -{ -} - -static void -address_button_clicked (GtkButton *button, EAccount *account) -{ - proxyDialog *prd; - proxyDialogPrivate *priv; - ENameSelectorDialog *name_selector_dialog; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - name_selector_dialog = e_name_selector_peek_dialog (priv->proxy_name_selector); - gtk_widget_show (GTK_WIDGET (name_selector_dialog)); -} - -static void -proxy_add_account (GtkWidget *button, EAccount *account) -{ - GtkButton *contacts, *cancel; - proxyDialogPrivate *priv; - GtkButton *okButton; - ENameSelectorDialog *name_selector_dialog; - ENameSelectorModel *name_selector_model; - ENameSelectorEntry *name_selector_entry; - GtkWidget *proxy_name, *name_box; - proxyDialog *prd = NULL; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/proxy-add-dialog.glade", NULL, NULL); - proxy_dialog_initialize_widgets (account); - priv->main = glade_xml_get_widget (priv->xml, "ProxyAccessRights"); - okButton = (GtkButton *) glade_xml_get_widget (priv->xml,"proxy_button_ok"); - contacts = (GtkButton *) glade_xml_get_widget (priv->xml,"contacts"); - cancel = (GtkButton *) glade_xml_get_widget (priv->xml,"proxy_cancel"); - - priv->proxy_name_selector = e_name_selector_new (); - name_selector_dialog = e_name_selector_peek_dialog (priv->proxy_name_selector); - - g_signal_connect ((GtkWidget *)okButton, "clicked", G_CALLBACK (proxy_add_ok), account); - g_signal_connect ((GtkWidget *)cancel, "clicked", G_CALLBACK (proxy_cancel), account); - g_signal_connect ((GtkWidget *)contacts, "clicked", G_CALLBACK (address_button_clicked), account); - g_signal_connect (name_selector_dialog, "response", G_CALLBACK (addressbook_dialog_response), account); - gtk_widget_show (GTK_WIDGET (priv->main)); - - name_selector_model = e_name_selector_peek_model (priv->proxy_name_selector); - e_name_selector_model_add_section (name_selector_model, "Add User", "Add User", NULL); - - name_selector_entry = e_name_selector_peek_section_entry (priv->proxy_name_selector, "Add User"); - g_signal_connect (name_selector_entry, "changed", - G_CALLBACK (addressbook_entry_changed), prd); - - proxy_name = glade_xml_get_widget (priv->xml, "proxy_account_name"); - name_box = glade_xml_get_widget (priv->xml, "proxy_name_box"); - gtk_widget_hide (proxy_name); - gtk_container_add ((GtkContainer *)name_box, (GtkWidget *)name_selector_entry); - gtk_widget_show ((GtkWidget *) name_selector_entry); - gtk_widget_grab_focus ((GtkWidget *) name_selector_entry); -} - -static void -proxy_load_edit_dialog (EAccount *account, proxyHandler *edited) -{ - proxyDialogPrivate *priv; - proxyDialog *prd = NULL; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - gtk_entry_set_text ((GtkEntry *) priv->account_name, edited->proxy_email); - gtk_widget_set_sensitive (priv->account_name, FALSE); - - if (edited->permissions & E_GW_PROXY_MAIL_READ) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->mail_read), TRUE); - - if (edited->permissions & E_GW_PROXY_MAIL_WRITE) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->mail_write), TRUE); - - if (edited->permissions & E_GW_PROXY_APPOINTMENT_READ) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->app_read), TRUE); - - if (edited->permissions & E_GW_PROXY_APPOINTMENT_WRITE) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->app_write), TRUE); - - if (edited->permissions & E_GW_PROXY_NOTES_READ) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->note_read), TRUE); - - if (edited->permissions & E_GW_PROXY_NOTES_WRITE) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->note_write), TRUE); - - if (edited->permissions & E_GW_PROXY_TASK_READ) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->task_read), TRUE); - - if (edited->permissions & E_GW_PROXY_TASK_WRITE) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->task_write), TRUE); - - if (edited->permissions & E_GW_PROXY_GET_ALARMS) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->alarms), TRUE); - - if (edited->permissions & E_GW_PROXY_GET_NOTIFICATIONS) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->notifications), TRUE); - - if (edited->permissions & E_GW_PROXY_MODIFY_FOLDERS) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->options), TRUE); - - if (edited->permissions & E_GW_PROXY_READ_PRIVATE) - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON (priv->private), TRUE); -} - -static void -proxy_edit_account (GtkWidget *button, EAccount *account) -{ - GtkTreeIter iter; - GtkTreeModel *model; - proxyDialogPrivate *priv; - GtkTreeSelection* account_select; - proxyHandler *edited; - GtkButton *okButton, *proxyCancel; - char *account_mailid; - GtkWidget *contacts; - proxyDialog *prd = NULL; - - prd = g_object_get_data ((GObject *)account, "prd"); - priv = prd->priv; - - /*FIXME: If multiple properties dialogs are launched then the widgets lose data*/ - - account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree)); - - if (gtk_tree_selection_get_selected (account_select, &model, &iter)) { - gtk_tree_model_get (model, &iter, ACCOUNT_NAME, &account_mailid, -1); - account_mailid = g_strrstr (account_mailid, "\n") + 1; - edited = proxy_get_item_from_list (account, account_mailid); - if (edited) { - priv->xml = glade_xml_new (EVOLUTION_GLADEDIR "/proxy-add-dialog.glade", NULL, NULL); - priv->main = glade_xml_get_widget (priv->xml, "ProxyAccessRights"); - proxy_dialog_initialize_widgets (account); - okButton = (GtkButton *) glade_xml_get_widget (priv->xml,"proxy_button_ok"); - proxyCancel = (GtkButton *) glade_xml_get_widget (priv->xml,"proxy_cancel"); - contacts = glade_xml_get_widget (priv->xml, "contacts"); - - g_signal_connect ((GtkWidget *)okButton, "clicked", G_CALLBACK (proxy_edit_ok), account); - g_signal_connect ((GtkWidget *)proxyCancel, "clicked", G_CALLBACK (proxy_cancel), account); - proxy_load_edit_dialog (account, edited); - gtk_widget_hide (contacts); - gtk_widget_show (GTK_WIDGET (priv->main)); - } - } -} diff --git a/plugins/proxy/proxy.h b/plugins/proxy/proxy.h deleted file mode 100644 index 38e2f744b8..0000000000 --- a/plugins/proxy/proxy.h +++ /dev/null @@ -1,66 +0,0 @@ - /* Evolution calendar - Timezone selector dialog - * - * Copyright (C) 2005 Novell, Inc. - * - * Authors: - * Shreyas Srinivasan - * Sankar P - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the GNU General Public - * License as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public - * License along with this program; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include -#include -#include - -#define TYPE_PROXY_DIALOG (proxy_dialog_get_type ()) -#define PROXY_DIALOG(obj) (GTK_CHECK_CAST ((obj), TYPE_PROXY_DIALOG, proxyDialog)) -#define PROXY_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_CAST ((klass), TYPE_PROXY_DIALOG, proxyDialogClass)) -#define IS_PROXY_DIALOG(obj) (GTK_CHECK_TYPE ((obj), TYPE_PROXY_DIALOG)) -#define IS_PROXY_DIALOG_CLASS(klass) (GTK_CHECK_CLASS_TYPE ((klass), TYPE_PROXY_DIALOG)) - -typedef struct _proxyDialog proxyDialog; -typedef struct _proxyDialogClass proxyDialogClass; -typedef struct _proxyDialogPrivate proxyDialogPrivate; - -struct _proxyDialog{ - GObject object; - - /*Connection */ - EGwConnection *cnc; - - /* Private Dialog Information*/ - proxyDialogPrivate *priv; -}; - -struct _proxyDialogClass { - GObjectClass parent_class; -}; - - -GType proxy_dialog_get_type (void); -proxyDialog *proxy_dialog_new (void); -void proxy_commit(GtkWidget *button, EConfigHookItemFactoryData *data); -GtkWidget * org_gnome_proxy (EPlugin *epl, EConfigHookItemFactoryData *data); -static void proxy_add_account (GtkWidget *button, EAccount *account); -static void proxy_remove_account (GtkWidget *button, EAccount *account); -static void proxy_update_tree_view (EAccount *account); -static void proxy_cancel(GtkWidget *button, EAccount *account); -static void proxy_edit_account (GtkWidget *button, EAccount *account); -void proxy_abort (GtkWidget *button, EConfigHookItemFactoryData *data); -void proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data); -static void proxy_setup_meta_tree_view (EAccount *account); -static proxyHandler *proxy_get_item_from_list (EAccount *account, char *account_name); -static void proxy_load_edit_dialog (EAccount *account, proxyHandler *edited); -- cgit v1.2.3