aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVibha Yadav <yvibha@novell.com>2011-05-04 20:04:48 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:06 +0800
commit49cd4f549b73059b273ce9a0a2b95bc7770a4f1c (patch)
tree891dba8c990ea517546db004bf06d93290a36839
parent90fdf79e206091ad2d164362a6c4e5a7b3eecb81 (diff)
downloadgsoc2013-evolution-49cd4f549b73059b273ce9a0a2b95bc7770a4f1c.tar.gz
gsoc2013-evolution-49cd4f549b73059b273ce9a0a2b95bc7770a4f1c.tar.zst
gsoc2013-evolution-49cd4f549b73059b273ce9a0a2b95bc7770a4f1c.zip
Bug 649365 - Creation of new repository evolution-groupwise
Removing groupwise plugin code from evolution.
-rw-r--r--configure.ac6
-rw-r--r--plugins/groupwise-features/Makefile.am97
-rw-r--r--plugins/groupwise-features/addressbook-groupwise.c69
-rw-r--r--plugins/groupwise-features/camel-gw-listener.c1043
-rw-r--r--plugins/groupwise-features/camel-gw-listener.h58
-rw-r--r--plugins/groupwise-features/groupwise-account-setup.c138
-rw-r--r--plugins/groupwise-features/gw-ui.c459
-rw-r--r--plugins/groupwise-features/gw-ui.h38
-rw-r--r--plugins/groupwise-features/install-shared.c274
-rw-r--r--plugins/groupwise-features/junk-mail-settings.c119
-rw-r--r--plugins/groupwise-features/junk-settings.c428
-rw-r--r--plugins/groupwise-features/junk-settings.h82
-rw-r--r--plugins/groupwise-features/junk-settings.ui458
-rw-r--r--plugins/groupwise-features/mail-retract.c119
-rw-r--r--plugins/groupwise-features/mail-send-options.c246
-rw-r--r--plugins/groupwise-features/mail-send-options.h43
-rw-r--r--plugins/groupwise-features/notification.ui216
-rw-r--r--plugins/groupwise-features/org-gnome-compose-send-options.xml17
-rw-r--r--plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml108
-rw-r--r--plugins/groupwise-features/org-gnome-mail-retract.error.xml8
-rw-r--r--plugins/groupwise-features/org-gnome-process-meeting.error.xml44
-rw-r--r--plugins/groupwise-features/org-gnome-proxy-login.error.xml16
-rw-r--r--plugins/groupwise-features/org-gnome-proxy.error.xml27
-rw-r--r--plugins/groupwise-features/org-gnome-shared-folder.error.xml19
-rw-r--r--plugins/groupwise-features/process-meeting.c442
-rw-r--r--plugins/groupwise-features/properties.ui756
-rw-r--r--plugins/groupwise-features/proxy-add-dialog.ui730
-rw-r--r--plugins/groupwise-features/proxy-listing.ui153
-rw-r--r--plugins/groupwise-features/proxy-login-dialog.ui191
-rw-r--r--plugins/groupwise-features/proxy-login.c563
-rw-r--r--plugins/groupwise-features/proxy-login.h62
-rw-r--r--plugins/groupwise-features/proxy.c1034
-rw-r--r--plugins/groupwise-features/proxy.h65
-rw-r--r--plugins/groupwise-features/send-options.c567
-rw-r--r--plugins/groupwise-features/share-folder-common.c519
-rw-r--r--plugins/groupwise-features/share-folder.c767
-rw-r--r--plugins/groupwise-features/share-folder.h100
-rw-r--r--plugins/groupwise-features/status-track.c271
38 files changed, 2 insertions, 10350 deletions
diff --git a/configure.ac b/configure.ac
index f7f1270ecf..777d2166d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -250,7 +250,6 @@ PKG_CHECK_MODULES([EVOLUTION_DATA_SERVER],
libecal-1.2 >= eds_minimum_version
libedataserver-1.2 >= eds_minimum_version
libedataserverui-3.0 >= eds_minimum_version
- libegroupwise-1.2 >= eds_minimum_version
libebackend-1.2 >= eds_minimum_version])
dnl ******************************
@@ -1175,7 +1174,7 @@ EVO_SET_COMPILE_FLAGS(CAMEL, camel-provider-1.2, $MANUAL_NSS_CFLAGS, $MOXILLA_NS
AC_SUBST(CAMEL_CFLAGS)
AC_SUBST(CAMEL_LIBS)
-EVO_SET_COMPILE_FLAGS(CAMEL_GROUPWISE, camel-provider-1.2 libedataserver-1.2 libegroupwise-1.2)
+EVO_SET_COMPILE_FLAGS(CAMEL_GROUPWISE, camel-provider-1.2 libedataserver-1.2)
AC_SUBST(CAMEL_GROUPWISE_CFLAGS)
AC_SUBST(CAMEL_GROUPWISE_LIBS)
@@ -1402,7 +1401,7 @@ AC_ARG_ENABLE([plugins],
[enable_plugins="$enableval"],[enable_plugins=all])
dnl Add any new plugins here
-plugins_base_always="calendar-file calendar-http itip-formatter default-source addressbook-file mark-all-read groupwise-features publish-calendar caldav imap-features google-account-setup webdav-account-setup"
+plugins_base_always="calendar-file calendar-http itip-formatter default-source addressbook-file mark-all-read publish-calendar caldav imap-features google-account-setup webdav-account-setup"
plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN"
dist_plugins_base="$plugins_base_always calendar-weather sa-junk-plugin bogo-junk-plugin"
@@ -1752,7 +1751,6 @@ plugins/email-custom-header/Makefile
plugins/external-editor/Makefile
plugins/face/Makefile
plugins/google-account-setup/Makefile
-plugins/groupwise-features/Makefile
plugins/image-inline/Makefile
plugins/imap-features/Makefile
plugins/itip-formatter/Makefile
diff --git a/plugins/groupwise-features/Makefile.am b/plugins/groupwise-features/Makefile.am
deleted file mode 100644
index 848f5bfc09..0000000000
--- a/plugins/groupwise-features/Makefile.am
+++ /dev/null
@@ -1,97 +0,0 @@
-if OS_WIN32
-NO_UNDEFINED_REQUIRED_LIBS = $(top_builddir)/mail/libevolution-mail.la
-endif
-
-@EVO_PLUGIN_RULE@
-
-plugin_DATA = org-gnome-groupwise-features.eplug org-gnome-compose-send-options.xml
-
-plugin_LTLIBRARIES = liborg-gnome-groupwise-features.la
-
-liborg_gnome_groupwise_features_la_CPPFLAGS = \
- $(AM_CPPFLAGS) \
- -I$(top_srcdir) \
- -I$(top_srcdir)/widgets \
- -I$(top_srcdir)/widgets/misc \
- -I$(top_builddir)/composer \
- -I$(top_builddir)/mail \
- $(EVOLUTION_MAIL_CFLAGS) \
- $(EVOLUTION_CALENDAR_CFLAGS) \
- $(EVOLUTION_ADDRESSBOOK_CFLAGS) \
- $(CAMEL_GROUPWISE_CFLAGS) \
- $(GNOME_PLATFORM_CFLAGS) \
- -DEVOLUTION_UIDIR=\""$(uidir)"\" \
- -DEVOLUTION_IMAGESDIR=\""$(imagesdir)"\"
-
-liborg_gnome_groupwise_features_la_SOURCES = \
- gw-ui.h \
- gw-ui.c \
- share-folder-common.c \
- share-folder.c \
- share-folder.h \
- install-shared.c \
- send-options.c \
- mail-send-options.c \
- mail-send-options.h \
- status-track.c \
- addressbook-groupwise.c \
- junk-mail-settings.c \
- junk-settings.c \
- junk-settings.h \
- proxy.h \
- proxy.c \
- proxy-login.h \
- proxy-login.c \
- process-meeting.c \
- mail-retract.c \
- camel-gw-listener.c \
- camel-gw-listener.h \
- groupwise-account-setup.c
-
-liborg_gnome_groupwise_features_la_LIBADD= \
- $(top_builddir)/e-util/libeutil.la \
- $(top_builddir)/composer/libcomposer.la \
- $(top_builddir)/shell/libeshell.la \
- $(top_builddir)/calendar/gui/libevolution-calendar.la \
- $(top_builddir)/widgets/misc/libemiscwidgets.la \
- $(top_builddir)/filter/libfilter.la \
- $(top_builddir)/mail/libevolution-mail.la \
- $(EVOLUTION_CALENDAR_LIBS) \
- $(EVOLUTION_MAIL_LIBS) \
- $(CAMEL_GROUPWISE_LIBS) \
- $(GNOME_PLATFORM_LIBS)
-
-liborg_gnome_groupwise_features_la_LDFLAGS = -module -avoid-version $(NO_UNDEFINED)
-
-ui_DATA = \
- properties.ui \
- notification.ui \
- junk-settings.ui \
- proxy-add-dialog.ui \
- proxy-listing.ui \
- proxy-login-dialog.ui
-
-error_DATA = \
- org-gnome-shared-folder.error \
- org-gnome-proxy.error \
- org-gnome-proxy-login.error \
- org-gnome-process-meeting.error \
- org-gnome-mail-retract.error
-
-errordir = $(privdatadir)/errors
-
-BUILT_SOURCES = org-gnome-groupwise-features.eplug $(error_DATA)
-
-EXTRA_DIST = \
- $(ui_DATA) \
- org-gnome-compose-send-options.xml \
- org-gnome-groupwise-features.eplug.xml \
- org-gnome-shared-folder.error.xml \
- org-gnome-process-meeting.error.xml \
- org-gnome-proxy.error.xml \
- org-gnome-proxy-login.error.xml \
- org-gnome-mail-retract.error.xml
-
-CLEANFILES = $(BUILT_SOURCES)
-
--include $(top_srcdir)/git.mk
diff --git a/plugins/groupwise-features/addressbook-groupwise.c b/plugins/groupwise-features/addressbook-groupwise.c
deleted file mode 100644
index 8dda4dca40..0000000000
--- a/plugins/groupwise-features/addressbook-groupwise.c
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#include <gtk/gtk.h>
-#include <e-util/e-config.h>
-#include <addressbook/gui/widgets/eab-config.h>
-#include <libedataserver/e-source.h>
-#include <libedataserver/e-source-group.h>
-#include <glib/gi18n.h>
-#include <string.h>
-
-void commit_groupwise_addressbook (EPlugin *epl, EConfigTarget *target);
-GtkWidget *e_book_groupwise_dummy (EPlugin *epl, EConfigHookItemFactoryData *data);
-
-void
-commit_groupwise_addressbook (EPlugin *epl, EConfigTarget *target)
-{
- EABConfigTargetSource *t = (EABConfigTargetSource *) target;
- ESource *source = t->source;
- gchar *uri_text;
- ESourceGroup *source_group;
- gchar *relative_uri;
- GSList *l;
-
- uri_text = e_source_get_uri (source);
- if (strncmp (uri_text, "groupwise", 9)) {
- g_free (uri_text);
-
- return;
- }
- e_source_set_property (source, "auth-domain", "Groupwise");
- relative_uri = g_strconcat (";", e_source_peek_name (source), NULL);
- e_source_set_relative_uri (source, relative_uri);
- g_free (relative_uri);
-
- source_group = e_source_peek_group (source);
- l = e_source_group_peek_sources (source_group);
- if (l && l->data ) {
- e_source_set_property(source, "auth", e_source_get_property(l->data, "auth"));
- e_source_set_property(source, "user", e_source_get_property(l->data, "user"));
- e_source_set_property(source, "use_ssl", e_source_get_property(l->data, "use_ssl"));
- e_source_set_property(source, "port", e_source_get_property(l->data, "port"));
- }
-}
-
-GtkWidget *
-e_book_groupwise_dummy (EPlugin *epl, EConfigHookItemFactoryData *data)
-{
-
- return NULL;
-}
diff --git a/plugins/groupwise-features/camel-gw-listener.c b/plugins/groupwise-features/camel-gw-listener.c
deleted file mode 100644
index ed73953098..0000000000
--- a/plugins/groupwise-features/camel-gw-listener.c
+++ /dev/null
@@ -1,1043 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Sivaiah Nallagatla <snallagatla@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include "camel-gw-listener.h"
-#include <string.h>
-#include <glib/gi18n.h>
-#include <camel/camel.h>
-#include <e-gw-connection.h>
-#include <libedataserverui/e-passwords.h>
-#include "e-util/e-alert-dialog.h"
-#include <libecal/e-cal.h>
-#include <shell/e-shell.h>
-#include <e-util/e-account-utils.h>
-
-/*stores some info about all currently existing groupwise accounts
- list of GwAccountInfo structures */
-
-static GList *groupwise_accounts = NULL;
-
-struct _CamelGwListenerPrivate {
- GConfClient *gconf_client;
- /* we get notification about mail account changes form this object */
- EAccountList *account_list;
-};
-
-struct _GwAccountInfo {
- gchar *uid;
- gchar *name;
- gchar *source_url;
- gboolean auto_check;
- guint auto_check_time;
-};
-
-typedef struct _GwAccountInfo GwAccountInfo;
-
-#define GROUPWISE_URI_PREFIX "groupwise://"
-#define GROUPWISE_PREFIX_LENGTH 12
-
-#define PARENT_TYPE G_TYPE_OBJECT
-
-static GObjectClass *parent_class = NULL;
-
-static void dispose (GObject *object);
-static void finalize (GObject *object);
-
-static void
-camel_gw_listener_class_init (CamelGwListenerClass *class)
-{
- GObjectClass *object_class;
-
- parent_class = g_type_class_ref (PARENT_TYPE);
- object_class = G_OBJECT_CLASS (class);
-
- /* virtual method override */
- object_class->dispose = dispose;
- object_class->finalize = finalize;
-}
-
-static void
-camel_gw_listener_init (CamelGwListener *config_listener, CamelGwListenerClass *class)
-{
- config_listener->priv = g_new0 (CamelGwListenerPrivate, 1);
-}
-
-static void
-dispose (GObject *object)
-{
- CamelGwListener *config_listener = CAMEL_GW_LISTENER (object);
-
- g_object_unref (config_listener->priv->gconf_client);
- g_object_unref (config_listener->priv->account_list);
-
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-finalize (GObject *object)
-{
- CamelGwListener *config_listener = CAMEL_GW_LISTENER (object);
- GList *list;
- GwAccountInfo *info;
-
- if (config_listener->priv) {
- g_free (config_listener->priv);
- }
-
- for (list = g_list_first (groupwise_accounts); list; list = g_list_next (list)) {
-
- info = (GwAccountInfo *) (list->data);
-
- if (info) {
-
- g_free (info->uid);
- g_free (info->name);
- g_free (info->source_url);
- g_free (info);
- }
- }
-
- g_list_free (groupwise_accounts);
-
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-/*determines whehter the passed in account is groupwise or not by looking at source url */
-
-static gboolean
-is_groupwise_account (EAccount *account)
-{
- if (account->source->url != NULL) {
- return (strncmp (account->source->url, GROUPWISE_URI_PREFIX, GROUPWISE_PREFIX_LENGTH ) == 0);
- } else {
- return FALSE;
- }
-}
-
-/* looks up for an existing groupwise account info in the groupwise_accounts list based on uid */
-
-static GwAccountInfo*
-lookup_account_info (const gchar *key)
-{
- GList *list;
- GwAccountInfo *info;
- gint found = 0;
-
- if (!key)
- return NULL;
-
- info = NULL;
-
- for (list = g_list_first (groupwise_accounts); list; list = g_list_next (list)) {
- info = (GwAccountInfo *) (list->data);
- found = (strcmp (info->uid, key) == 0);
- if (found)
- break;
- }
- if (found)
- return info;
- return NULL;
-}
-
-#define CALENDAR_SOURCES "/apps/evolution/calendar/sources"
-#define TASKS_SOURCES "/apps/evolution/tasks/sources"
-#define NOTES_SOURCES "/apps/evolution/memos/sources"
-#define SELECTED_CALENDARS "/apps/evolution/calendar/display/selected_calendars"
-#define SELECTED_TASKS "/apps/evolution/calendar/tasks/selected_tasks"
-#define SELECTED_NOTES "/apps/evolution/calendar/memos/selected_memos"
-
-static void
-add_esource (const gchar *conf_key, GwAccountInfo *info, const gchar *source_name, CamelURL *url, const gchar * parent_id_name, gboolean can_create)
-{
- ESourceList *source_list;
- ESourceGroup *group;
- ESource *source;
- GConfClient* client;
- GSList *ids, *temp;
- const gchar *source_selection_key;
- gchar *relative_uri;
- const gchar *soap_port;
- const gchar * use_ssl;
- const gchar *poa_address;
- const gchar *offline_sync;
- const gchar *group_name;
-
- poa_address = url->host;
- if (!poa_address || strlen (poa_address) ==0)
- return;
-
- group_name = info->name;
-
- 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");
-
- offline_sync = camel_url_get_param (url, "offline_sync");
-
- client = gconf_client_get_default ();
- source_list = e_source_list_new_for_gconf (client, conf_key);
- group = e_source_group_new (group_name, GROUPWISE_URI_PREFIX);
-
- if (!e_source_list_add_group (source_list, group, -1))
- return;
-
- if (!can_create)
- e_source_group_set_property (group, "create_source", "no");
-
- relative_uri = g_strdup_printf ("%s@%s/", url->user, poa_address);
- source = e_source_new (source_name, relative_uri);
- e_source_set_property (source, "auth", "1");
- e_source_set_property (source, "username", url->user);
- e_source_set_property (source, "port", soap_port);
- e_source_set_property (source, "auth-domain", "Groupwise");
- e_source_set_property (source, "use_ssl", use_ssl);
-
- if (info->auto_check) {
- gchar *str = g_strdup_printf ("%d", info->auto_check_time);
-
- e_source_set_property (source, "refresh", str);
- g_free (str);
- } else
- e_source_set_property (source, "refresh", NULL);
-
- e_source_set_property (source, "offline_sync", offline_sync ? "1" : "0" );
- e_source_set_property (source, "delete", "no");
- if (parent_id_name) {
- e_source_set_property (source, "parent_id_name", parent_id_name);
- e_source_set_color_spec (source, camel_url_get_param (url, "color"));
- } else
- e_source_set_color_spec (source, "#EEBC60");
- e_source_group_add_source (group, source, -1);
- e_source_list_sync (source_list, NULL);
-
- if (!strcmp (conf_key, CALENDAR_SOURCES))
- source_selection_key = SELECTED_CALENDARS;
- else if (!strcmp (conf_key, TASKS_SOURCES))
- source_selection_key = SELECTED_TASKS;
- else if (!strcmp (conf_key, NOTES_SOURCES))
- source_selection_key = SELECTED_NOTES;
- else
- source_selection_key = NULL;
-
- if (source_selection_key) {
- ids = gconf_client_get_list (client, source_selection_key , GCONF_VALUE_STRING, NULL);
- ids = g_slist_append (ids, g_strdup (e_source_peek_uid (source)));
- gconf_client_set_list (client, source_selection_key, GCONF_VALUE_STRING, ids, NULL);
- temp = ids;
-
- for (; temp != NULL; temp = g_slist_next (temp))
- g_free (temp->data);
-
- g_slist_free (ids);
- }
-
- g_object_unref (source);
- g_object_unref (group);
- g_object_unref (source_list);
- g_object_unref (client);
- g_free (relative_uri);
-}
-
-static void
-remove_esource (const gchar *conf_key, const gchar *group_name, gchar * source_name, const gchar * relative_uri)
-{
- ESourceList *list;
- GSList *groups;
- gboolean found_group;
- GConfClient* client;
- GSList *ids;
- GSList *node_tobe_deleted;
- const gchar *source_selection_key;
-
- client = gconf_client_get_default ();
- list = e_source_list_new_for_gconf (client, conf_key);
- groups = e_source_list_peek_groups (list);
-
- found_group = FALSE;
-
- for (; groups != NULL && !found_group; groups = g_slist_next (groups)) {
- ESourceGroup *group = E_SOURCE_GROUP (groups->data);
-
- if (strcmp (e_source_group_peek_name (group), group_name) == 0 &&
- strcmp (e_source_group_peek_base_uri (group), GROUPWISE_URI_PREFIX ) == 0) {
- GSList *sources = e_source_group_peek_sources (group);
-
- for (; sources != NULL; sources = g_slist_next (sources)) {
- ESource *source = E_SOURCE (sources->data);
- const gchar *source_relative_uri;
-
- source_relative_uri = e_source_peek_relative_uri (source);
- if (source_relative_uri == NULL)
- continue;
- if (strcmp (source_relative_uri, relative_uri) == 0) {
-
- if (!strcmp (conf_key, CALENDAR_SOURCES))
- source_selection_key = SELECTED_CALENDARS;
- else if (!strcmp (conf_key, TASKS_SOURCES))
- source_selection_key = SELECTED_TASKS;
- else if (!strcmp (conf_key, NOTES_SOURCES))
- source_selection_key = SELECTED_NOTES;
- else source_selection_key = NULL;
- if (source_selection_key) {
- ids = gconf_client_get_list (client, source_selection_key ,
- GCONF_VALUE_STRING, NULL);
- node_tobe_deleted = g_slist_find_custom (ids, e_source_peek_uid (source), (GCompareFunc) strcmp);
- if (node_tobe_deleted) {
- g_free (node_tobe_deleted->data);
- ids = g_slist_delete_link (ids, node_tobe_deleted);
- }
- gconf_client_set_list (client, source_selection_key,
- GCONF_VALUE_STRING, ids, NULL);
-
- }
- e_source_list_remove_group (list, group);
- e_source_list_sync (list, NULL);
- found_group = TRUE;
- break;
-
- }
- }
-
- if (found_group)
- break;
-
- }
-
- }
-
- g_object_unref (list);
- g_object_unref (client);
-
-}
-
-/* looks up for e-source with having same info as old_account_info and changes its values passed in new values */
-
-static void
-modify_esource (const gchar * conf_key, GwAccountInfo *old_account_info, EAccount *a, CamelURL *new_url)
-{
- ESourceList *list;
- GSList *groups;
- gchar *old_relative_uri;
- CamelURL *url;
- gboolean found_group;
- GConfClient* client;
- const gchar *poa_address;
- const gchar *new_poa_address;
- const gchar * new_group_name = a->name;
-
- url = camel_url_new (old_account_info->source_url, NULL);
- poa_address = url->host;
- if (!poa_address || strlen (poa_address) ==0)
- return;
- new_poa_address = new_url->host;
-
- old_relative_uri = g_strdup_printf ("%s@%s/", url->user, poa_address);
- client = gconf_client_get_default ();
- list = e_source_list_new_for_gconf (client, conf_key);
- groups = e_source_list_peek_groups (list);
-
- found_group = FALSE;
-
- for (; groups != NULL && !found_group; groups = g_slist_next (groups)) {
- ESourceGroup *group = E_SOURCE_GROUP (groups->data);
-
- if (strcmp (e_source_group_peek_name (group), old_account_info->name) == 0 &&
- strcmp (e_source_group_peek_base_uri (group), GROUPWISE_URI_PREFIX) == 0) {
- GSList *sources = e_source_group_peek_sources (group);
-
- for (; sources != NULL; sources = g_slist_next (sources)) {
- ESource *source = E_SOURCE (sources->data);
- const gchar *source_relative_uri;
-
- source_relative_uri = e_source_peek_relative_uri (source);
- if (source_relative_uri == NULL)
- continue;
- if (strcmp (source_relative_uri, old_relative_uri) == 0) {
- gchar *new_relative_uri;
-
- new_relative_uri = g_strdup_printf ("%s@%s/", new_url->user, new_poa_address);
- e_source_group_set_name (group, new_group_name);
- e_source_set_relative_uri (source, new_relative_uri);
- e_source_set_property (source, "username", new_url->user);
- e_source_set_property (source, "port", camel_url_get_param (new_url,"soap_port"));
- e_source_set_property (source, "use_ssl", camel_url_get_param (url, "use_ssl"));
- e_source_set_property (source, "offline_sync", camel_url_get_param (url, "offline_sync") ? "1" : "0");
-
- if (a->source->auto_check) {
- gchar *str = g_strdup_printf ("%d", a->source->auto_check_time);
-
- e_source_set_property (source, "refresh", str);
- g_free (str);
- } else
- e_source_set_property (source, "refresh", NULL);
-
- e_source_list_sync (list, NULL);
- found_group = TRUE;
- g_free (new_relative_uri);
- break;
- }
- }
-
- if (found_group)
- break;
- }
- }
-
- g_object_unref (list);
- g_object_unref (client);
- camel_url_free (url);
- g_free (old_relative_uri);
-
-}
-/* add sources for calendar and tasks if the account added is groupwise account
- adds the new account info to groupwise_accounts list */
-
-static void
-add_calendar_tasks_sources (GwAccountInfo *info)
-{
- CamelURL *url;
-
- url = camel_url_new (info->source_url, NULL);
- add_esource ("/apps/evolution/calendar/sources", info, _("Calendar"), url, NULL, FALSE);
- add_esource ("/apps/evolution/tasks/sources", info, _("Tasks"), url, NULL, FALSE);
- add_esource ("/apps/evolution/memos/sources", info, _("Notes"), url, NULL, TRUE);
-
- camel_url_free (url);
-
-}
-
-/* removes calendar and tasks sources if the account removed is groupwise account
- removes the the account info from groupwise_account list */
-
-static void
-remove_calendar_tasks_sources (GwAccountInfo *info)
-{
- CamelURL *url;
- gchar *relative_uri;
- const gchar *poa_address;
-
- url = camel_url_new (info->source_url, NULL);
-
- poa_address = url->host;
- if (!poa_address || strlen (poa_address) ==0)
- return;
-
- relative_uri = g_strdup_printf ("%s@%s/", url->user, poa_address);
- remove_esource ("/apps/evolution/calendar/sources", info->name, _("Calendar"), relative_uri);
- remove_esource ("/apps/evolution/tasks/sources", info->name, _("Checklist"), relative_uri);
- remove_esource ("/apps/evolution/memos/sources", info->name, _("Notes"), relative_uri);
-
- camel_url_free (url);
- g_free (relative_uri);
-
-}
-
-static GList*
-get_addressbook_names_from_server (gchar *source_url)
-{
- gchar *key;
- EGwConnection *cnc;
- gchar *password;
- GList *book_list = NULL;
- gint status, count = 0;
- const gchar *soap_port;
- CamelURL *url;
- gboolean remember;
- gchar *failed_auth = NULL;
- gchar *prompt;
- gchar *password_prompt;
- gchar *uri;
- const gchar *use_ssl;
- const gchar *poa_address;
- guint32 flags = E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET;
-
- url = camel_url_new (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 (use_ssl && g_str_equal (use_ssl, "always"))
- 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);
-
- cnc = NULL;
-
- do {
- count++;
- /*we have to uncache the password before prompting again*/
- if (failed_auth) {
- e_passwords_forget_password ("Groupwise", key);
- password = NULL;
- }
-
- password = e_passwords_get_password ("Groupwise", key);
- if (!password) {
- /* Translators: First %s is the server name, second %s is user name */
- password_prompt = g_strdup_printf (_("Enter password for %s (user %s)"),
- poa_address, url->user);
- prompt = g_strconcat (failed_auth ? failed_auth : "", password_prompt, NULL);
- g_free (password_prompt);
- password = e_passwords_ask_password (prompt, "Groupwise", key, prompt,
- flags, &remember,
- NULL);
- g_free (prompt);
-
- if (!password)
- break;
- }
-
- cnc = e_gw_connection_new (uri, url->user, password);
- g_free (password);
- if (!E_IS_GW_CONNECTION (cnc)) {
- if (count == 3)
- break;
- }
-
- failed_auth = _("Failed to authenticate.\n");
- flags |= E_PASSWORDS_REPROMPT;
- } while (cnc == NULL);
-
- g_free (key);
-
- if (E_IS_GW_CONNECTION (cnc)) {
- book_list = NULL;
- status = e_gw_connection_get_address_book_list (cnc, &book_list);
- if (status == E_GW_CONNECTION_STATUS_OK)
- return book_list;
- }
-
- /*FIXME: This error message should be relocated to addressbook and should reflect
- * that it actually failed to get the addressbooks*/
- e_alert_run_dialog_for_args (e_shell_get_active_window (NULL),
- "mail:gw-accountsetup-error", poa_address,
- NULL);
- return NULL;
-}
-
-static void
-add_proxy_sources (GwAccountInfo *info, const gchar *parent_name)
-{
- CamelURL *url;
- gchar *color;
-
- url = camel_url_new (info->source_url, NULL);
-
- color = g_strdup_printf ("#%06X", g_random_int_range (0x100000, 0xffffaa));
- /* The above range is chosen so that the colors are neither too light nor too dark
- and appealing in all the themes */
-
- camel_url_set_param (url, "color", color);
-
- add_esource ("/apps/evolution/calendar/sources", info, _("Calendar"), url, parent_name, FALSE);
- add_esource ("/apps/evolution/tasks/sources", info, _("Tasks"), url, parent_name, FALSE);
- add_esource ("/apps/evolution/memos/sources", info, _("Notes"), url, parent_name, TRUE);
-
- g_free (color);
- camel_url_free (url);
-}
-
-static gboolean
-add_addressbook_sources (EAccount *account)
-{
- CamelURL *url;
- ESourceList *list;
- ESourceGroup *group;
- ESource *source;
- gchar *base_uri;
- const gchar *soap_port;
- GList *books_list, *temp_list;
- GConfClient* client;
- const gchar * use_ssl;
- const gchar *poa_address;
- gboolean is_frequent_contacts = FALSE, is_writable = FALSE;
-
- url = camel_url_new (account->source->url, NULL);
- if (url == NULL) {
- return FALSE;
- }
-
- poa_address = url->host;
- if (!poa_address || strlen (poa_address) ==0)
- return FALSE;
-
- 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");
- base_uri = g_strdup_printf ("groupwise://%s@%s", url->user, poa_address);
- client = gconf_client_get_default ();
- list = e_source_list_new_for_gconf (client, "/apps/evolution/addressbook/sources" );
- group = e_source_group_new (account->name, base_uri);
- books_list = get_addressbook_names_from_server (account->source->url);
- temp_list = books_list;
- if (!temp_list)
- return FALSE;
- for (; temp_list != NULL; temp_list = g_list_next (temp_list)) {
- const gchar *book_name = e_gw_container_get_name (E_GW_CONTAINER (temp_list->data));
- /* is_writable is set to TRUE if the book has isPersonal property,
- * by e_gw_connection_get_address_book_list()
- */
- is_writable = e_gw_container_get_is_writable (E_GW_CONTAINER (temp_list->data));
- if (is_writable &&
- !g_ascii_strncasecmp (book_name, "Novell GroupWise Address Book", strlen (book_name))) {
- /* This is a hack to not to show multiple groupwise system address books
- * if they are the personal address books with the name of system address book
- * See http://bugzilla.gnome.org/show_bug.cgi?id=320119
- * and http://bugzilla.gnome.org/show_bug.cgi?id=309511
- */
- continue;
- }
-
- if (!is_frequent_contacts)
- is_frequent_contacts = e_gw_container_get_is_frequent_contacts (E_GW_CONTAINER (temp_list->data));
- source = e_source_new (book_name, g_strconcat (";",book_name, NULL));
- e_source_set_property (source, "auth", "plain/password");
- e_source_set_property (source, "auth-domain", "Groupwise");
- e_source_set_property (source, "port", soap_port);
- e_source_set_property(source, "user", url->user);
- /* mark system address book for offline usage */
- /* FIXME: add isPersonal flag to container and use that isFrequentContact
- * properties, instead of using writable to distinguish between the
- * system address book and other address books.
- */
- if (!is_writable)
- e_source_set_property (source, "offline_sync", "1");
- else
- e_source_set_property (source, "offline_sync",
- camel_url_get_param (url, "offline_sync") ? "1" : "0");
- if (!is_writable)
- e_source_set_property (source, "completion", "true");
- if (is_frequent_contacts)
- e_source_set_property (source, "completion", "true");
- e_source_set_property (source, "use_ssl", use_ssl);
- e_source_group_add_source (group, source, -1);
- g_object_unref (source);
- }
- e_source_list_add_group (list, group, -1);
- e_source_list_sync (list, NULL);
- g_object_unref (group);
- g_object_unref (list);
- g_object_unref (client);
- g_free (base_uri);
-
- if (!is_frequent_contacts) {
- /* display warning message */
- e_alert_run_dialog_for_args (e_shell_get_active_window (NULL),
- "addressbook:gw-book-list-init", NULL);
- }
- return TRUE;
-}
-
-static void
-modify_addressbook_sources ( EAccount *account, GwAccountInfo *existing_account_info )
-{
- CamelURL *url;
- ESourceList *list;
- ESourceGroup *group;
- GSList *groups;
- gboolean found_group;
- gboolean delete_group;
- gchar *old_base_uri;
- gchar *new_base_uri;
- const gchar *soap_port;
- const gchar *use_ssl;
- GSList *sources;
- ESource *source;
- GConfClient *client;
- const gchar *poa_address;
-
- url = camel_url_new (existing_account_info->source_url, NULL);
- if (url == NULL) {
- return;
- }
-
- poa_address = url->host;
- if (!poa_address || strlen (poa_address) ==0)
- return;
-
- old_base_uri = g_strdup_printf ("groupwise://%s@%s", url->user, poa_address);
- camel_url_free (url);
-
- url = camel_url_new (account->source->url, NULL);
- if (url == NULL)
- return;
- poa_address = url->host;
- if (!poa_address || strlen (poa_address) ==0)
- return;
- new_base_uri = g_strdup_printf ("groupwise://%s@%s", url->user, poa_address);
- 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");
-
- client = gconf_client_get_default ();
- list = e_source_list_new_for_gconf (client, "/apps/evolution/addressbook/sources" );
- groups = e_source_list_peek_groups (list);
- delete_group = FALSE;
- if (strcmp (old_base_uri, new_base_uri) != 0)
- delete_group = TRUE;
- group = NULL;
- found_group = FALSE;
- for (; groups != NULL && !found_group; groups = g_slist_next (groups)) {
-
- group = E_SOURCE_GROUP (groups->data);
- if ( strcmp ( e_source_group_peek_base_uri (group), old_base_uri) == 0 && strcmp (e_source_group_peek_name (group), existing_account_info->name) == 0) {
- found_group = TRUE;
- if (!delete_group) {
- e_source_group_set_name (group, account->name);
- sources = e_source_group_peek_sources (group);
- for (; sources != NULL; sources = g_slist_next (sources)) {
- source = E_SOURCE (sources->data);
- e_source_set_property (source, "port", soap_port);
- e_source_set_property (source, "use_ssl", use_ssl);
- }
-
- e_source_list_sync (list, NULL);
- }
-
- }
- }
- if (found_group && delete_group) {
- e_source_list_remove_group (list, group);
- e_source_list_sync (list, NULL);
- g_object_unref (list);
- list = NULL;
- add_addressbook_sources (account);
- }
- g_free (old_base_uri);
- if (list)
- g_object_unref (list);
- camel_url_free (url);
- g_object_unref (client);
-
-}
-
-static void
-remove_addressbook_sources (GwAccountInfo *existing_account_info)
-{
- ESourceList *list;
- ESourceGroup *group;
- GSList *groups;
- CamelURL *url;
- gchar *base_uri;
- GConfClient *client;
- const gchar *poa_address;
-
- url = camel_url_new (existing_account_info->source_url, NULL);
- if (url == NULL) {
- return;
- }
-
- poa_address = url->host;
- if (!poa_address || strlen (poa_address) ==0)
- return;
-
- base_uri = g_strdup_printf ("groupwise://%s@%s", url->user, poa_address);
- client = gconf_client_get_default ();
- list = e_source_list_new_for_gconf (client, "/apps/evolution/addressbook/sources" );
- groups = e_source_list_peek_groups (list);
-
- for (; groups != NULL; groups = g_slist_next (groups)) {
-
- group = E_SOURCE_GROUP (groups->data);
- if ( strcmp ( e_source_group_peek_base_uri (group), base_uri) == 0 && strcmp (e_source_group_peek_name (group), existing_account_info->name) == 0) {
-
- e_source_list_remove_group (list, group);
- e_source_list_sync (list, NULL);
- break;
- }
- }
- g_object_unref (list);
- g_object_unref (client);
- g_free (base_uri);
- camel_url_free (url);
-
-}
-
-static void
-account_added (EAccountList *account_listener, EAccount *account)
-{
-
- GwAccountInfo *info;
- EAccount *parent;
- gboolean status;
- CamelURL *parent_url;
-
- if (!is_groupwise_account (account))
- return;
-
- info = g_new0 (GwAccountInfo, 1);
- info->uid = g_strdup (account->uid);
- info->name = g_strdup (account->name);
- info->source_url = g_strdup (account->source->url);
- info->auto_check = account->source->auto_check;
- info->auto_check_time = account->source->auto_check_time;
- if (account->parent_uid) {
- parent = (EAccount *)e_account_list_find (account_listener, E_ACCOUNT_FIND_UID, account->parent_uid);
-
- if (!parent)
- return;
-
- parent_url = camel_url_new (e_account_get_string (parent, E_ACCOUNT_SOURCE_URL), NULL);
- add_proxy_sources (info, parent_url->user);
- } else {
- status = add_addressbook_sources (account);
-
- if (status)
- add_calendar_tasks_sources (info);
- }
- groupwise_accounts = g_list_append (groupwise_accounts, info);
-}
-
-static void
-account_removed (EAccountList *account_listener, EAccount *account)
-{
- GwAccountInfo *info;
-
- if (!is_groupwise_account (account))
- return;
-
- info = lookup_account_info (account->uid);
- if (info == NULL)
- return;
-
- remove_calendar_tasks_sources (info);
- remove_addressbook_sources (info);
- groupwise_accounts = g_list_remove (groupwise_accounts, info);
- g_free (info->uid);
- g_free (info->name);
- g_free (info->source_url);
- g_free (info);
-}
-
-static void
-account_changed (EAccountList *account_listener, EAccount *account)
-{
- gboolean is_gw_account;
- CamelURL *old_url, *new_url;
- const gchar *old_soap_port, *new_soap_port;
- GwAccountInfo *existing_account_info;
- const gchar *old_use_ssl, *new_use_ssl;
- const gchar *old_poa_address, *new_poa_address;
-
- is_gw_account = is_groupwise_account (account);
-
- existing_account_info = lookup_account_info (account->uid);
-
- if (existing_account_info == NULL && is_gw_account) {
-
- if (!account->enabled)
- return;
-
- /* some account of other type is changed to Groupwise */
- account_added (account_listener, account);
-
- } else if ( existing_account_info != NULL && !is_gw_account) {
-
- /*Groupwise account is changed to some other type */
- remove_calendar_tasks_sources (existing_account_info);
- remove_addressbook_sources (existing_account_info);
- groupwise_accounts = g_list_remove (groupwise_accounts, existing_account_info);
- g_free (existing_account_info->uid);
- g_free (existing_account_info->name);
- g_free (existing_account_info->source_url);
- g_free (existing_account_info);
-
- } else if (existing_account_info != NULL && is_gw_account) {
-
- if (!account->enabled) {
- account_removed (account_listener, account);
- return;
- }
-
- /* some info of groupwise account is changed . update the sources with new info if required */
- old_url = camel_url_new (existing_account_info->source_url, NULL);
- old_poa_address = old_url->host;
- old_soap_port = camel_url_get_param (old_url, "soap_port");
- old_use_ssl = camel_url_get_param (old_url, "use_ssl");
- new_url = camel_url_new (account->source->url, NULL);
- new_poa_address = new_url->host;
-
- if (!new_poa_address || strlen (new_poa_address) ==0)
- return;
-
- new_soap_port = camel_url_get_param (new_url, "soap_port");
-
- if (!new_soap_port || strlen (new_soap_port) == 0)
- new_soap_port = "7191";
-
- new_use_ssl = camel_url_get_param (new_url, "use_ssl");
-
- if ((old_poa_address && strcmp (old_poa_address, new_poa_address))
- || (old_soap_port && strcmp (old_soap_port, new_soap_port))
- || strcmp (old_url->user, new_url->user)
- || (!old_use_ssl)
- || strcmp (old_use_ssl, new_use_ssl)) {
-
- account_removed (account_listener, account);
- account_added (account_listener, account);
- } else if (strcmp (existing_account_info->name, account->name)) {
-
- modify_esource ("/apps/evolution/calendar/sources", existing_account_info, account, new_url);
- modify_esource ("/apps/evolution/tasks/sources", existing_account_info, account, new_url);
- modify_esource ("/apps/evolution/memos/sources", existing_account_info, account, new_url);
- modify_addressbook_sources (account, existing_account_info);
-
- }
-
- g_free (existing_account_info->name);
- g_free (existing_account_info->source_url);
- existing_account_info->name = g_strdup (account->name);
- existing_account_info->source_url = g_strdup (account->source->url);
- camel_url_free (old_url);
- camel_url_free (new_url);
- }
-}
-
-static void
-prune_proxies (void) {
-
- EAccountList *account_list;
- ESourceList *sources;
- ESourceGroup *group;
- GSList *groups, *e_sources, *l, *p;
- ESource *source;
- GError *err = NULL;
- const gchar *parent_id_name = NULL;
- gint i;
- ECalSourceType types[] = { E_CAL_SOURCE_TYPE_EVENT,
- E_CAL_SOURCE_TYPE_TODO,
- E_CAL_SOURCE_TYPE_JOURNAL
- };
-
- account_list = e_get_account_list ();
- e_account_list_prune_proxies (account_list);
-
- for (i=0; i<3; i++) {
- if (e_cal_get_sources (&sources, types[i], &err)) {
- /* peek groupwise id and prune for proxies. */
- groups = e_source_list_peek_groups (sources);
- for (l = groups; l != NULL;) {
- group = (ESourceGroup *) l->data;
- l = l->next;
- if (!strcmp (e_source_group_peek_base_uri (group), "groupwise://")) {
- e_sources = e_source_group_peek_sources (group);
- for (p = e_sources; p != NULL; p = p->next) {
- source = (ESource *)p->data;
- parent_id_name = e_source_get_property (source, "parent_id_name");
- if (parent_id_name) {
- e_source_group_remove_source (group, source);
- e_source_list_remove_group (sources, group);
- break;
- }
- }
- }
- }
- e_source_list_sync (sources, NULL);
- }
- }
-
-}
-static void
-camel_gw_listener_construct (CamelGwListener *config_listener)
-{
- EIterator *iter;
- EAccount *account;
- GwAccountInfo *info;
-
- prune_proxies ();
-
- config_listener->priv->account_list = e_account_list_new (config_listener->priv->gconf_client);
-
- for (iter = e_list_get_iterator (E_LIST ( config_listener->priv->account_list) ); e_iterator_is_valid (iter); e_iterator_next (iter)) {
-
- account = E_ACCOUNT (e_iterator_get (iter));
-
- if ( is_groupwise_account (account) && account->enabled) {
-
- info = g_new0 (GwAccountInfo, 1);
- info->uid = g_strdup (account->uid);
- info->name = g_strdup (account->name);
- info->source_url = g_strdup (account->source->url);
- groupwise_accounts = g_list_append (groupwise_accounts, info);
-
- }
-
- }
-
- g_signal_connect (config_listener->priv->account_list, "account_added", G_CALLBACK (account_added), NULL);
- g_signal_connect (config_listener->priv->account_list, "account_changed", G_CALLBACK (account_changed), NULL);
- g_signal_connect (config_listener->priv->account_list, "account_removed", G_CALLBACK (account_removed), NULL);
-}
-
-GType
-camel_gw_listener_get_type (void)
-{
- static GType camel_gw_listener_type = 0;
-
- if (!camel_gw_listener_type) {
- static GTypeInfo info = {
- sizeof (CamelGwListenerClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) camel_gw_listener_class_init,
- NULL, NULL,
- sizeof (CamelGwListener),
- 0,
- (GInstanceInitFunc) camel_gw_listener_init
- };
- camel_gw_listener_type = g_type_register_static (PARENT_TYPE, "CamelGwListener", &info, 0);
- }
-
- return camel_gw_listener_type;
-}
-
-CamelGwListener*
-camel_gw_listener_new (void)
-{
- CamelGwListener *config_listener;
-
- config_listener = g_object_new (CAMEL_TYPE_GW_LISTENER, NULL);
- config_listener->priv->gconf_client = gconf_client_get_default ();
-
- camel_gw_listener_construct (config_listener);
-
- return config_listener;
-}
diff --git a/plugins/groupwise-features/camel-gw-listener.h b/plugins/groupwise-features/camel-gw-listener.h
deleted file mode 100644
index cc545def61..0000000000
--- a/plugins/groupwise-features/camel-gw-listener.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Sivaiah Nallagatla <snallagatla@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifndef CAMEL_GW_LISTENER_H
-#define CAMEL_GW_LISTENER_H
-
-#include <libedataserver/e-account-list.h>
-#include<libedataserver/e-source.h>
-#include<libedataserver/e-source-list.h>
-
-G_BEGIN_DECLS
-
-#define CAMEL_TYPE_GW_LISTENER (camel_gw_listener_get_type ())
-#define CAMEL_GW_LISTENER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CAMEL_TYPE_GW_LISTENER, CamelGwListener))
-#define CAMEL_GW_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_GW_LISTENER, CamelGWListenerClass))
-#define CAMEL_IS_GWLISTENER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CAMEL_TYPE_GW_LISTENER))
-#define CAMEL_IS_GW_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), CAMEL_TYPE_GW_LISTENER))
-
-typedef struct _CamelGwListener CamelGwListener;
-typedef struct _CamelGwListenerClass CamelGwListenerClass;
-typedef struct _CamelGwListenerPrivate CamelGwListenerPrivate;
-
-struct _CamelGwListener {
- GObject parent;
-
- CamelGwListenerPrivate *priv;
-};
-
-struct _CamelGwListenerClass {
- GObjectClass parent_class;
-};
-
-GType camel_gw_listener_get_type (void);
-CamelGwListener *camel_gw_listener_new (void);
-
-G_END_DECLS
-
-#endif
diff --git a/plugins/groupwise-features/groupwise-account-setup.c b/plugins/groupwise-features/groupwise-account-setup.c
deleted file mode 100644
index f232bab055..0000000000
--- a/plugins/groupwise-features/groupwise-account-setup.c
+++ /dev/null
@@ -1,138 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Sivaiah Nallagatla <snallagatla@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#include "camel-gw-listener.h"
-#include <gtk/gtk.h>
-#include "mail/em-config.h"
-#include <gconf/gconf-client.h>
-#include "shell/es-event.h"
-#include <string.h>
-#include <e-util/e-account-utils.h>
-
-#define GROUPWISE_BASE_URI "groupwise://"
-
-static CamelGwListener *config_listener = NULL;
-
-gint e_plugin_lib_enable (EPlugin *ep, gint enable);
-GtkWidget* org_gnome_gw_account_setup (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
-void ensure_mandatory_esource_properties (EPlugin *ep, ESEventTargetUpgrade *target);
-
-static gboolean
-is_groupwise_account (EAccount *account)
-{
- if (account->source->url != NULL) {
- return g_str_has_prefix (account->source->url, GROUPWISE_BASE_URI);
- } else {
- return FALSE;
- }
-}
-
-static void
-set_esource_props (const gchar *path, EAccount *a, GConfClient *client, const gchar *name)
-{
- ESourceList *list;
- GSList *groups;
-
- list = e_source_list_new_for_gconf (client, path);
- groups = e_source_list_peek_groups (list);
-
- for (; groups != NULL; groups = g_slist_next (groups)) {
- ESourceGroup *group = E_SOURCE_GROUP (groups->data);
-
- if (strcmp (e_source_group_peek_name (group), name) == 0 &&
- strcmp (e_source_group_peek_base_uri (group), GROUPWISE_BASE_URI) == 0) {
- GSList *sources = e_source_group_peek_sources (group);
-
- for (; sources != NULL; sources = g_slist_next (sources)) {
- ESource *source = E_SOURCE (sources->data);
-
- if (a->source->auto_check) {
- gchar *str = g_strdup_printf ("%d",a->source->auto_check_time);
-
- e_source_set_property (source, "refresh", str);
- g_free (str);
- } else
- e_source_set_property (source, "refresh", NULL);
- break;
- }
- }
- }
- e_source_list_sync (list, NULL);
-
- g_object_unref (list);
-}
-
-void
-ensure_mandatory_esource_properties (EPlugin *ep, ESEventTargetUpgrade *target)
-{
- GConfClient* client;
- EAccountList *al;
- EIterator *it;
-
- al = e_get_account_list ();
- client = gconf_client_get_default ();
-
- for (it = e_list_get_iterator ((EList *)al);
- e_iterator_is_valid (it);
- e_iterator_next (it)) {
- EAccount *a;
-
- a = (EAccount *) e_iterator_get (it);
- if (!a->enabled || !is_groupwise_account (a))
- continue;
- set_esource_props ("/apps/evolution/calendar/sources", a, client, a->name);
- set_esource_props ("/apps/evolution/tasks/sources", a, client, a->name);
- set_esource_props ("/apps/evolution/memos/sources", a, client, a->name);
- }
- g_object_unref (client);
-}
-
-static void
-free_groupwise_listener ( void )
-{
- g_object_unref (config_listener);
-}
-
-gint
-e_plugin_lib_enable (EPlugin *ep, gint enable)
-{
- if (!config_listener) {
- config_listener = camel_gw_listener_new ();
- g_atexit ( free_groupwise_listener );
- }
-
- return 0;
-}
-
-GtkWidget * org_gnome_groupwise_account_setup (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data);
-
-GtkWidget *
-org_gnome_groupwise_account_setup (struct _EPlugin *epl, struct _EConfigHookItemFactoryData *data)
-{
- if (data->old)
- return data->old;
- /* FIXME, with new soap camel provider we don't need extra settings in receiving options page, Remove them
- from camel-groupwise-provider.c once soap provider is ready and add any groupwise sepcific settings like "add contacts automatically to Frequent contacts folder" here*/
-
- return NULL;
-}
diff --git a/plugins/groupwise-features/gw-ui.c b/plugins/groupwise-features/gw-ui.c
deleted file mode 100644
index 08b9382838..0000000000
--- a/plugins/groupwise-features/gw-ui.c
+++ /dev/null
@@ -1,459 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-
-#include <e-util/e-account-utils.h>
-
-#include <shell/e-shell-view.h>
-#include <shell/e-shell-window.h>
-
-#include <mail/e-mail-reader.h>
-#include <mail/em-folder-tree.h>
-#include <mail/em-folder-tree-model.h>
-#include <mail/em-utils.h>
-#include <mail/message-list.h>
-
-#include <calendar/gui/e-calendar-view.h>
-#include <calendar/gui/gnome-cal.h>
-
-#include "gw-ui.h"
-
-gboolean gw_ui_mail_folder_popup (GtkUIManager *ui_manager, EShellView *shell_view);
-gboolean gw_ui_mail_message_popup (GtkUIManager *ui_manager, EShellView *shell_view);
-gboolean gw_ui_calendar_event_popup (GtkUIManager *ui_manager, EShellView *shell_view);
-
-static gboolean
-is_in_gw_account (EShellView *shell_view, gboolean *is_on_store, gchar **folder_full_name)
-{
- EShellSidebar *shell_sidebar;
- EMFolderTree *folder_tree = NULL;
- GtkTreeSelection *selection;
- GtkTreeModel *model = NULL;
- GtkTreeIter iter;
- gboolean is_store = FALSE, res;
- gchar *uri = NULL;
- gchar *full_name = NULL;
-
- if (folder_full_name)
- *folder_full_name = NULL;
-
- shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
- g_object_get (shell_sidebar, "folder-tree", &folder_tree, NULL);
- g_return_val_if_fail (folder_tree != NULL, FALSE);
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (folder_tree));
- g_return_val_if_fail (selection != NULL, FALSE);
-
- if (!gtk_tree_selection_get_selected (selection, &model, &iter))
- return FALSE;
-
- gtk_tree_model_get (model, &iter,
- COL_STRING_FULL_NAME, &full_name,
- COL_STRING_URI, &uri,
- COL_BOOL_IS_STORE, &is_store,
- -1);
-
- res = uri && g_ascii_strncasecmp (uri, "groupwise://", 12) == 0;
-
- if (is_on_store)
- *is_on_store = is_store;
-
- if (!is_store) {
- if (folder_full_name)
- *folder_full_name = full_name;
- else
- g_free (full_name);
-
- } else {
- g_free (full_name);
- }
-
- g_free (uri);
-
- return res;
-}
-
-static void
-visible_actions (GtkActionGroup *action_group, gboolean visible, const GtkActionEntry *entries, guint n_entries)
-{
- gint i;
-
- g_return_if_fail (action_group != NULL);
- g_return_if_fail (entries != NULL);
-
- for (i = 0; i < n_entries; i++) {
- GtkAction *action = gtk_action_group_get_action (action_group, entries[i].name);
-
- g_return_if_fail (action != NULL);
-
- gtk_action_set_visible (action, visible);
- }
-}
-
-static GtkActionEntry mfp_entries[] = {
- { "gw-new-shared-folder",
- "folder-new",
- N_("New _Shared Folder..."),
- NULL,
- NULL,
- G_CALLBACK (gw_new_shared_folder_cb) },
-
- { "gw-proxy-login",
- NULL,
- N_("_Proxy Login..."),
- NULL,
- NULL,
- G_CALLBACK (gw_proxy_login_cb) }
-};
-
-static void
-update_mfp_entries_cb (EShellView *shell_view, gpointer user_data)
-{
- GtkActionGroup *action_group;
- EShellWindow *shell_window;
- gboolean is_on_store = FALSE, visible;
-
- g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
-
- shell_window = e_shell_view_get_shell_window (shell_view);
- action_group = e_shell_window_get_action_group (shell_window, "mail");
-
- visible = is_in_gw_account (shell_view, &is_on_store, NULL);
- visible_actions (action_group, visible, mfp_entries, G_N_ELEMENTS (mfp_entries));
-
- if (visible && !is_on_store) {
- GtkAction *action = gtk_action_group_get_action (action_group, "gw-proxy-login");
-
- g_return_if_fail (action != NULL);
-
- gtk_action_set_visible (action, FALSE);
- }
-}
-
-gboolean
-gw_ui_mail_folder_popup (GtkUIManager *ui_manager, EShellView *shell_view)
-{
- EShellWindow *shell_window;
- GtkActionGroup *action_group;
-
- shell_window = e_shell_view_get_shell_window (shell_view);
- action_group = e_shell_window_get_action_group (shell_window, "mail");
-
- gtk_action_group_add_actions (
- action_group, mfp_entries,
- G_N_ELEMENTS (mfp_entries), shell_view);
-
- g_signal_connect (shell_view, "update-actions", G_CALLBACK (update_mfp_entries_cb), NULL);
-
- return TRUE;
-}
-
-static GtkActionEntry mmp_entries[] = {
- { "gw-junk-mail-settings",
- NULL,
- N_("Junk Mail Settings..."),
- NULL,
- NULL,
- G_CALLBACK (gw_junk_mail_settings_cb) },
-
- { "gw-track-message-status",
- NULL,
- N_("Track Message Status..."),
- NULL,
- NULL,
- G_CALLBACK (gw_track_message_status_cb) },
- { "gw-retract-mail",
- NULL,
- N_("Retract Mail"),
- NULL,
- NULL,
- G_CALLBACK (gw_retract_mail_cb) }
-};
-
-static void
-update_mmp_entries_cb (EShellView *shell_view, gpointer user_data)
-{
- EShellWindow *shell_window;
- GtkActionGroup *action_group;
- gboolean visible;
- gchar *full_name = NULL, *uri = NULL;
- guint n_selected = 0;
-
- g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
-
- shell_window = e_shell_view_get_shell_window (shell_view);
- action_group = e_shell_window_get_action_group (shell_window, "mail");
-
- visible = is_in_gw_account (shell_view, NULL, &full_name);
- if (visible) {
- EShellContent *shell_content;
- EMailReader *reader;
- GPtrArray *uids;
-
- shell_content = e_shell_view_get_shell_content (shell_view);
-
- reader = E_MAIL_READER (shell_content);
- uids = e_mail_reader_get_selected_uids (reader);
-
- if (uids)
- n_selected = uids->len;
-
- em_utils_uids_free (uids);
-
- visible = n_selected > 0;
- }
-
- visible_actions (action_group, visible, mmp_entries, G_N_ELEMENTS (mmp_entries));
-
- if (visible) {
- GtkAction *action;
- gboolean is_sent_items_folder = full_name && g_ascii_strncasecmp (full_name, "Sent Items", 10) == 0;
-
- action = gtk_action_group_get_action (action_group, "gw-track-message-status");
- g_return_if_fail (action != NULL);
- gtk_action_set_visible (action, is_sent_items_folder && n_selected == 1);
-
- action = gtk_action_group_get_action (action_group, "gw-retract-mail");
- g_return_if_fail (action != NULL);
- gtk_action_set_visible (action, is_sent_items_folder && n_selected == 1);
- }
-
- g_free (full_name);
- g_free (uri);
-}
-
-gboolean
-gw_ui_mail_message_popup (GtkUIManager *ui_manager, EShellView *shell_view)
-{
- EShellWindow *shell_window;
- GtkActionGroup *action_group;
-
- shell_window = e_shell_view_get_shell_window (shell_view);
- action_group = e_shell_window_get_action_group (shell_window, "mail");
-
- gtk_action_group_add_actions (
- action_group, mmp_entries,
- G_N_ELEMENTS (mmp_entries), shell_view);
-
- g_signal_connect (shell_view, "update-actions", G_CALLBACK (update_mmp_entries_cb), NULL);
-
- return TRUE;
-}
-
-static icalproperty *
-get_attendee_prop (icalcomponent *icalcomp, const gchar *address)
-{
- icalproperty *prop;
-
- if (!(address && *address))
- return NULL;
-
- for (prop = icalcomponent_get_first_property (icalcomp, ICAL_ATTENDEE_PROPERTY);
- prop;
- prop = icalcomponent_get_next_property (icalcomp, ICAL_ATTENDEE_PROPERTY)) {
- const gchar *attendee = icalproperty_get_attendee (prop);
-
- if (g_str_equal (itip_strip_mailto (attendee), address)) {
- return prop;
- }
- }
-
- return NULL;
-}
-
-static gboolean
-needs_to_accept (icalcomponent *icalcomp, const gchar *user_email)
-{
- icalproperty *prop;
- icalparameter *param;
- icalparameter_partstat status = ICAL_PARTSTAT_NONE;
-
- prop = get_attendee_prop (icalcomp, user_email);
-
- /* It might be a mailing list */
- if (!prop)
- return TRUE;
- param = icalproperty_get_first_parameter (prop, ICAL_PARTSTAT_PARAMETER);
- if (param)
- status = icalparameter_get_partstat (param);
-
- if (status == ICAL_PARTSTAT_ACCEPTED || status == ICAL_PARTSTAT_TENTATIVE)
- return FALSE;
-
- return TRUE;
-}
-
-static gboolean
-is_meeting_owner (ECalComponent *comp, ECal *client)
-{
- ECalComponentOrganizer org;
- gchar *email = NULL;
- const gchar *strip = NULL;
- gboolean ret_val = FALSE;
-
- if (!(e_cal_component_has_attendees (comp) &&
- e_cal_get_save_schedules (client)))
- return ret_val;
-
- e_cal_component_get_organizer (comp, &org);
- strip = itip_strip_mailto (org.value);
-
- if (e_cal_get_cal_address (client, &email, NULL) && !g_ascii_strcasecmp (email, strip)) {
- ret_val = TRUE;
- }
-
- if (!ret_val)
- ret_val = itip_address_is_user (strip);
-
- g_free (email);
- return ret_val;
-}
-
-static GtkActionEntry cal_entries[] = {
- { "gw-meeting-accept",
- GTK_STOCK_APPLY,
- N_("Accept"),
- NULL,
- NULL,
- G_CALLBACK (gw_meeting_accept_cb) },
-
- { "gw-meeting-accept-tentative",
- GTK_STOCK_DIALOG_QUESTION,
- N_("Accept Tentatively"),
- NULL,
- NULL,
- G_CALLBACK (gw_meeting_accept_tentative_cb) },
-
- { "gw-meeting-decline",
- GTK_STOCK_CANCEL,
- N_("Decline"),
- NULL,
- NULL,
- G_CALLBACK (gw_meeting_decline_cb) },
-
- { "gw-resend-meeting",
- GTK_STOCK_EDIT,
- N_("Rese_nd Meeting..."),
- NULL,
- NULL,
- G_CALLBACK (gw_resend_meeting_cb) }
-};
-
-static void
-update_cal_entries_cb (EShellView *shell_view, gpointer user_data)
-{
- EShellWindow *shell_window;
- GtkActionGroup *action_group;
- gboolean visible = FALSE, is_unaccepted = FALSE, is_mtg_owner = FALSE;
- EShellContent *shell_content;
- GnomeCalendar *gcal = NULL;
- GnomeCalendarViewType view_type;
- ECalendarView *view;
-
- g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
-
- shell_window = e_shell_view_get_shell_window (shell_view);
- shell_content = e_shell_view_get_shell_content (shell_view);
-
- g_object_get (shell_content, "calendar", &gcal, NULL);
-
- view_type = gnome_calendar_get_view (gcal);
- view = gnome_calendar_get_calendar_view (gcal, view_type);
-
- if (view) {
- GList *selected;
-
- selected = e_calendar_view_get_selected_events (view);
- if (selected && selected->data) {
- ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
- const gchar *uri;
-
- uri = is_comp_data_valid (event) ? e_cal_get_uri (event->comp_data->client) : NULL;
-
- if (uri && g_ascii_strncasecmp (uri, "groupwise://", 12) == 0) {
- visible = e_cal_util_component_has_attendee (event->comp_data->icalcomp);
- if (visible) {
- ECalComponent *comp;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
-
- if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING)) {
- gchar *user_email;
-
- user_email = itip_get_comp_attendee (comp, event->comp_data->client);
-
- is_unaccepted = needs_to_accept (event->comp_data->icalcomp, user_email);
-
- g_free (user_email);
- }
-
- is_mtg_owner = is_meeting_owner (comp, event->comp_data->client);
-
- g_object_unref (comp);
- }
- }
- }
-
- g_list_free (selected);
- }
-
- action_group = e_shell_window_get_action_group (shell_window, "calendar");
- visible_actions (action_group, visible, cal_entries, G_N_ELEMENTS (cal_entries));
-
- if (visible && !is_unaccepted) {
- GtkAction *action;
-
- action = gtk_action_group_get_action (action_group, "gw-meeting-accept");
- g_return_if_fail (action != NULL);
- gtk_action_set_visible (action, FALSE);
-
- action = gtk_action_group_get_action (action_group, "gw-meeting-accept-tentative");
- g_return_if_fail (action != NULL);
- gtk_action_set_visible (action, FALSE);
- }
-
- if (visible && !is_mtg_owner) {
- GtkAction *action;
-
- action = gtk_action_group_get_action (action_group, "gw-resend-meeting");
- g_return_if_fail (action != NULL);
- gtk_action_set_visible (action, FALSE);
- }
-}
-
-gboolean
-gw_ui_calendar_event_popup (GtkUIManager *ui_manager, EShellView *shell_view)
-{
- EShellWindow *shell_window;
- GtkActionGroup *action_group;
-
- shell_window = e_shell_view_get_shell_window (shell_view);
- action_group = e_shell_window_get_action_group (shell_window, "calendar");
-
- gtk_action_group_add_actions (
- action_group, cal_entries,
- G_N_ELEMENTS (cal_entries), shell_view);
-
- g_signal_connect (shell_view, "update-actions", G_CALLBACK (update_cal_entries_cb), NULL);
-
- return TRUE;
-}
diff --git a/plugins/groupwise-features/gw-ui.h b/plugins/groupwise-features/gw-ui.h
deleted file mode 100644
index d8ed509e99..0000000000
--- a/plugins/groupwise-features/gw-ui.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifndef GW_UI_HEADER
-#define GW_UI_HEADER
-
-#include <gtk/gtk.h>
-#include <shell/e-shell-view.h>
-
-void gw_new_shared_folder_cb (GtkAction *action, EShellView *shell_view);
-void gw_proxy_login_cb (GtkAction *action, EShellView *shell_view);
-
-void gw_junk_mail_settings_cb (GtkAction *action, EShellView *shell_view);
-void gw_track_message_status_cb (GtkAction *action, EShellView *shell_view);
-void gw_retract_mail_cb (GtkAction *action, EShellView *shell_view);
-
-void gw_meeting_accept_cb (GtkAction *action, EShellView *shell_view);
-void gw_meeting_accept_tentative_cb (GtkAction *action, EShellView *shell_view);
-void gw_meeting_decline_cb (GtkAction *action, EShellView *shell_view);
-void gw_resend_meeting_cb (GtkAction *action, EShellView *shell_view);
-
-#endif
diff --git a/plugins/groupwise-features/install-shared.c b/plugins/groupwise-features/install-shared.c
deleted file mode 100644
index 6d290d0993..0000000000
--- a/plugins/groupwise-features/install-shared.c
+++ /dev/null
@@ -1,274 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Vivek Jain <jvivek@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <gconf/gconf-client.h>
-#include <e-util/e-config.h>
-#include <e-util/e-account-utils.h>
-#include <shell/e-shell.h>
-#include <mail/e-mail-backend.h>
-#include <mail/em-config.h>
-#include <mail/em-event.h>
-#include <mail/em-folder-tree.h>
-#include <mail/em-folder-selector.h>
-#include <e-gw-connection.h>
-#include <share-folder.h>
-
-struct AcceptData {
- CamelMimeMessage *msg;
- EMFolderTreeModel *model;
-};
-
-void org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target);
-
-static void
-install_folder_response (EMFolderSelector *emfs, gint response, gpointer *data)
-{
- struct AcceptData *accept_data = (struct AcceptData *)data;
- EMFolderTreeModel *model;
- const gchar *uri, *path;
- gint parts = 0;
- gchar **names;
- gchar *folder_name;
- gchar *parent_name;
- gchar *container_id;
- const gchar *item_id;
- CamelService *service = NULL;
- CamelFolder *folder;
- EAccount *account;
- CamelProvider *provider;
- EGwConnection *cnc;
-
- if (response == GTK_RESPONSE_CANCEL) {
- gtk_widget_destroy (GTK_WIDGET (emfs));
- } else {
- CamelSession *session;
- CamelURL *url;
- EShell *shell;
-
- shell = e_shell_get_default ();
- session = e_shell_settings_get_pointer (e_shell_get_shell_settings (shell), "mail-session");
-
- model = accept_data->model;
- item_id = camel_mime_message_get_message_id (accept_data->msg);
- uri = em_folder_selector_get_selected_uri (emfs);
- path = em_folder_selector_get_selected_path (emfs);
- names = g_strsplit (path, "/", -1);
- if (names == NULL) {
- folder_name = (gchar *)path;
- parent_name = NULL;
- } else {
- while (names[parts])
- parts++;
- folder_name = names[parts -1];
- if (parts >= 2)
- parent_name = names[parts -2];
- else
- parent_name = NULL;
- }
-
- url = camel_url_new (uri, NULL);
- if (url != NULL) {
- service = camel_session_get_service_by_url (
- session, url, CAMEL_PROVIDER_STORE);
- camel_url_free (url);
- }
-
- if (!CAMEL_IS_STORE (service)) {
- g_strfreev (names);
- return;
- }
-
- cnc = get_cnc (CAMEL_STORE (service));
- if (E_IS_GW_CONNECTION (cnc)) {
- container_id = get_container_id (cnc, parent_name);
-
- if (e_gw_connection_accept_shared_folder (cnc, folder_name, container_id, (gchar *)item_id, NULL) == E_GW_CONNECTION_STATUS_OK) {
- const gchar *uid;
-
- /* FIXME Not passing a GCancellable or GError here. */
- folder = camel_store_get_folder_sync (
- CAMEL_STORE (service),
- "Mailbox", 0, NULL, NULL);
- /*changes = camel_folder_change_info_new ();
- camel_folder_change_info_remove_uid (changes, (gchar *) item_id);
- camel_folder_summary_remove_uid (folder->summary, item_id);*/
- /* camel_folder_delete_message (folder, item_id); */
- camel_folder_set_message_flags (
- folder, item_id,
- CAMEL_MESSAGE_DELETED,
- CAMEL_MESSAGE_DELETED);
- camel_folder_summary_touch (folder->summary);
- /* camel_object_trigger_event (CAMEL_OBJECT (folder), "folder_changed", changes); */
- uid = camel_service_get_uid (service);
- account = e_get_account_by_uid (uid);
- uri = account->source->url;
- em_folder_tree_model_remove_store (
- model, CAMEL_STORE (service));
- provider = camel_provider_get (uri, NULL);
- if (provider == NULL) {
- g_strfreev (names);
- return;
- }
-
- /* make sure the new store belongs in the tree */
- if (!(provider->flags & CAMEL_PROVIDER_IS_STORAGE)) {
- g_strfreev (names);
- return;
- }
-
- em_folder_tree_model_add_store (
- model, CAMEL_STORE (service),
- account->name);
- }
- }
-
- g_strfreev (names);
- gtk_widget_destroy ((GtkWidget *)emfs);
- }
-
-}
-
-static void
-accept_free (gpointer data)
-{
- struct AcceptData *accept_data = data;
-
- g_object_unref (accept_data->msg);
- g_free (accept_data);
-}
-
-static void
-apply_clicked (GtkAssistant *assistant, CamelMimeMessage *msg)
-{
- EShell *shell;
- EShellBackend *shell_backend;
- EMailSession *session;
- EMFolderTree *folder_tree;
- GtkWidget *dialog;
- struct AcceptData *accept_data;
- gchar *uri;
- gpointer parent;
-
- shell = e_shell_get_default ();
- shell_backend = e_shell_get_backend_by_name (shell, "mail");
- session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
-
- parent = gtk_widget_get_toplevel (GTK_WIDGET (assistant));
- parent = gtk_widget_is_toplevel (parent) ? parent : NULL;
-
- accept_data = g_new0 (struct AcceptData, 1);
- folder_tree = (EMFolderTree *) em_folder_tree_new (session);
-
- dialog = em_folder_selector_create_new (parent, folder_tree, 0, _("Create folder"), _("Specify where to create the folder:"));
- uri = em_folder_tree_get_selected_uri (folder_tree);
- em_folder_selector_set_selected ((EMFolderSelector *) dialog, uri);
- g_free (uri);
- accept_data->msg = msg;
- g_object_ref (msg);
- accept_data->model = EM_FOLDER_TREE_MODEL (gtk_tree_view_get_model (GTK_TREE_VIEW (folder_tree)));
- g_object_set_data_full((GObject *)dialog, "accept-data", accept_data, accept_free);
- g_signal_connect (dialog, "response", G_CALLBACK (install_folder_response), accept_data);
- g_object_set_data_full((GObject *)dialog, "assistant", assistant, (GDestroyNotify)gtk_widget_destroy);
- gtk_window_set_title (GTK_WINDOW (dialog), "Install Shared Folder");
- gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_widget_show (dialog);
-}
-
-void
-org_gnome_popup_wizard (EPlugin *ep, EMEventTargetMessage *target)
-{
- CamelInternetAddress *from_addr = NULL;
- const gchar *name;
- const gchar *email;
- CamelMimeMessage *msg = (CamelMimeMessage *) target->message;
- CamelStream *stream;
- CamelDataWrapper *dw;
- GByteArray *byte_array;
- gchar *start_message;
-
- if (!msg)
- return;
-
- if (((gchar *)camel_medium_get_header (CAMEL_MEDIUM(msg),"X-notification")) == NULL
- || (from_addr = camel_mime_message_get_from ((CamelMimeMessage *)target->message)) == NULL
- || !camel_internet_address_get (from_addr, 0, &name, &email)
- || (dw = camel_medium_get_content (CAMEL_MEDIUM (msg))) == NULL) {
- return;
- } else {
- if (CAMEL_IS_MULTIPART (dw)) {
- dw = camel_medium_get_content ((CamelMedium *)camel_multipart_get_part ((CamelMultipart *)dw, 0));
- if (dw == NULL)
- return;
- }
-
- byte_array = g_byte_array_new ();
- stream = camel_stream_mem_new_with_byte_array (byte_array);
- camel_data_wrapper_write_to_stream_sync (dw, stream, NULL, NULL);
- camel_stream_write (stream, "", 1, NULL, NULL);
-
- from_addr = camel_mime_message_get_from ((CamelMimeMessage *)target->message);
- if (from_addr && camel_internet_address_get (from_addr, 0, &name, &email)) {
- GtkWidget *page;
- GtkAssistant *assistant = GTK_ASSISTANT (gtk_assistant_new ());
-
- start_message = g_strdup_printf (_("The user '%s' has shared a folder with you\n\n"
- "Message from '%s'\n\n\n"
- "%s\n\n\n"
- "Click 'Apply' to install the shared folder\n\n"),
- name, name, byte_array->data);
-
- page = gtk_label_new (start_message);
- gtk_label_set_line_wrap (GTK_LABEL (page), TRUE);
- gtk_misc_set_alignment (GTK_MISC (page), 0.0, 0.0);
- gtk_misc_set_padding (GTK_MISC (page), 10, 10);
-
- gtk_assistant_append_page (assistant, page);
- gtk_assistant_set_page_title (assistant, page, _("Install the shared folder"));
- gtk_assistant_set_page_type (assistant, page, GTK_ASSISTANT_PAGE_CONFIRM);
- gtk_assistant_set_page_complete (assistant, page, TRUE);
-
- gtk_window_set_title (GTK_WINDOW (assistant), _("Shared Folder Installation"));
- gtk_window_set_position (GTK_WINDOW (assistant) , GTK_WIN_POS_CENTER_ALWAYS);
-
- g_object_ref (msg);
- g_object_set_data_full((GObject *)page, "msg", msg, g_object_unref);
-
- g_signal_connect (assistant, "apply", G_CALLBACK (apply_clicked), msg);
-
- gtk_widget_show_all (GTK_WIDGET (assistant));
-
- g_free (start_message);
- } else
- g_warning ("Could not get the sender name");
-
- g_object_unref (stream);
- }
-}
-
diff --git a/plugins/groupwise-features/junk-mail-settings.c b/plugins/groupwise-features/junk-mail-settings.c
deleted file mode 100644
index a633f0bcc3..0000000000
--- a/plugins/groupwise-features/junk-mail-settings.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Vivek Jain <jvivek@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <glib/gi18n-lib.h>
-#include <string.h>
-#include <stdio.h>
-#include <gtk/gtk.h>
-
-#include <mail/e-mail-reader.h>
-#include <mail/message-list.h>
-
-#include <e-gw-connection.h>
-
-#include "gw-ui.h"
-#include "share-folder.h"
-#include "junk-settings.h"
-
-static void
-abort_changes (JunkSettings *js)
-{
- g_object_run_dispose ((GObject *)js);
-}
-
-static void
-junk_dialog_response (GtkWidget *dialog, gint response, JunkSettings *js)
-{
- if (response == GTK_RESPONSE_ACCEPT) {
- commit_changes (js);
- abort_changes (js);
- }
- else
- abort_changes (js);
-
- gtk_widget_destroy (dialog);
-
-}
-
-void
-gw_junk_mail_settings_cb (GtkAction *action, EShellView *shell_view)
-{
- GtkWidget *dialog ,*w, *notebook, *box;
- GtkWidget *content_area;
- JunkSettings *junk_tab;
- gint page_count =0;
- EGwConnection *cnc;
- gchar *msg;
- EShellContent *shell_content;
- EMailReader *reader;
- CamelFolder *folder;
-
- shell_content = e_shell_view_get_shell_content (shell_view);
-
- reader = E_MAIL_READER (shell_content);
- folder = e_mail_reader_get_folder (reader);
- g_return_if_fail (folder != NULL);
-
- cnc = get_cnc (camel_folder_get_parent_store (folder));
-
- dialog = gtk_dialog_new_with_buttons (_("Junk Settings"),
- NULL,
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_CANCEL,
- GTK_RESPONSE_REJECT,
- GTK_STOCK_OK,
- GTK_RESPONSE_ACCEPT,
- NULL);
- content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
- gtk_window_set_default_size ((GtkWindow *) dialog, 292, 260);
- gtk_widget_ensure_style (dialog);
- gtk_container_set_border_width (GTK_CONTAINER (content_area), 12);
- box = gtk_vbox_new (FALSE, 6);
- w = gtk_label_new ("");
- msg = g_strdup_printf("<b>%s</b>", _("Junk Mail Settings"));
- gtk_label_set_markup (GTK_LABEL (w), msg);
- gtk_box_pack_start ((GtkBox *) box, w, FALSE, FALSE, 6);
- g_free (msg);
-
- junk_tab = junk_settings_new (cnc);
- w = (GtkWidget *)junk_tab->vbox;
- gtk_box_pack_start ((GtkBox *) box, w, FALSE, FALSE, 6);
-
- /* We might have to add more options for settings i.e. more pages */
- while (page_count > 0 ) {
- notebook = gtk_notebook_new ();
- gtk_notebook_append_page ((GtkNotebook *)notebook, box, NULL);
- gtk_box_pack_start (
- GTK_BOX (content_area), notebook, TRUE, TRUE, 0);
- }
-
- if (page_count == 0)
- gtk_box_pack_start (
- GTK_BOX (content_area), box, TRUE, TRUE, 0);
-
- g_signal_connect (dialog, "response", G_CALLBACK (junk_dialog_response), junk_tab);
- gtk_widget_show_all (dialog);
-}
diff --git a/plugins/groupwise-features/junk-settings.c b/plugins/groupwise-features/junk-settings.c
deleted file mode 100644
index 6b0233d2bc..0000000000
--- a/plugins/groupwise-features/junk-settings.c
+++ /dev/null
@@ -1,428 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Vivek Jain <jvivek@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-#include "junk-settings.h"
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <e-util/e-util.h>
-#include <e-util/e-util-private.h>
-#include <e-gw-connection.h>
-#define ROOTNODE "vboxSettings"
-#define d(x)
-
-struct _JunkEntry {
- EGwJunkEntry *entry;
- gint flag;
-};
-
-typedef struct _JunkEntry JunkEntry;
-
-static void junk_settings_class_init (JunkSettingsClass *class);
-static void junk_settings_init (JunkSettings *js);
-static void junk_settings_dispose (GObject *obj);
-static void junk_settings_finalise (GObject *obj);
-static void free_all (JunkSettings *js);
-static void get_junk_list (JunkSettings *js);
-static void disable_clicked (GtkRadioButton *button, JunkSettings *js);
-static void enable_clicked (GtkRadioButton *button, JunkSettings *js);
-
-static GtkVBoxClass *parent_class = NULL;
-
-GType
-junk_settings_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (JunkSettingsClass),
- NULL, NULL,
- (GClassInitFunc) junk_settings_class_init,
- NULL, NULL,
- sizeof (JunkSettings),
- 0,
- (GInstanceInitFunc) junk_settings_init
- };
-
- type = g_type_register_static (gtk_vbox_get_type (), "JunkSettings", &info, 0);
- }
-
- return type;
-}
-
-static void
-junk_settings_class_init (JunkSettingsClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (gtk_vbox_get_type ());
- object_class->dispose = junk_settings_dispose;
- object_class->finalize = junk_settings_finalise;
-}
-
-static void
-junk_settings_finalise (GObject *obj)
-{
- JunkSettings *js = (JunkSettings *) obj;
- g_object_unref (js->builder);
- free_all (js);
-
- G_OBJECT_CLASS (parent_class)->finalize (obj);
-}
-
-static void
-junk_settings_dispose (GObject *object)
-{
- JunkSettings *js = (JunkSettings *) object;
- free_all (js);
-
- /* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-junk_settings_init (JunkSettings *js)
-{
- js->users = 0;
- js->flag_for_ok = 0;
- js->enabled = FALSE;
- js->junk_list = NULL;
- js->entry_list = NULL;
-}
-
-static void
-free_entry_node (EGwJunkEntry *entry)
-{
- if (entry) {
- g_free (entry->match);
- entry->match = NULL;
- }
-
- return;
-}
-
-static void
-free_node (JunkEntry *nentry)
-{
- EGwJunkEntry *junk_entry = nentry->entry;
-
- if (junk_entry) {
- g_free (junk_entry->match);
- junk_entry->match = NULL;
- }
-
- return;
-}
-
-static JunkEntry *
-find_node (GList *list, gchar *match)
-{
- JunkEntry *one_entry = NULL;
- EGwJunkEntry *ent = NULL;
- GList *tmp;
- gint i;
-
- if (list) {
- tmp = g_list_first (list);
- for (i=0; tmp; i++)
- {
- one_entry = tmp->data;
- ent = one_entry->entry;
- if (!g_ascii_strcasecmp (ent->match, match)) {
- return one_entry;
- /*if found, it returns that user*/
- }
- tmp= g_list_next (tmp);
- }
- }
-
- return NULL;
-}
-
-static void
-free_all (JunkSettings *js)
-{
- if (js->junk_list) {
- g_list_foreach (js->junk_list,(GFunc) free_node, NULL);
- g_list_free (js->junk_list);
- js->junk_list = NULL;
- }
-}
-
-static void
-get_junk_list (JunkSettings *js)
-{
- GList *list = NULL;
- gchar *entry;
- gchar *msg;
- gint use_junk, use_block, use_pab, persistence;
-
- if (E_IS_GW_CONNECTION (js->cnc)) {
- if (e_gw_connection_get_junk_settings (js->cnc, &use_junk, &use_block, &use_pab, &persistence) == E_GW_CONNECTION_STATUS_OK) {
- if (use_junk) {
- js->enabled = TRUE;
- gtk_toggle_button_set_active ((GtkToggleButton *) js->enable, TRUE);
- enable_clicked (js->enable , js);
- gtk_widget_set_sensitive (GTK_WIDGET (js->table), TRUE);
- } else {
- gtk_toggle_button_set_active ((GtkToggleButton *) js->disable, TRUE);
- disable_clicked (js->disable , js);
- }
- }
- /* get list of containers */
- if (e_gw_connection_get_junk_entries (js->cnc, &(list)) == E_GW_CONNECTION_STATUS_OK) {
- js->users = g_list_length (list);
- if (js->users) {
-/* I populate the list and set flags to 0 for the existing users*/
- while (list) {
- JunkEntry *junk_entry = g_new0 (JunkEntry , 1);
- junk_entry->entry = list->data;
- junk_entry->flag = 0;
- entry = g_strdup ((junk_entry->entry)->match);
- msg = g_strdup_printf ("%s", entry);
- gtk_list_store_append (GTK_LIST_STORE (js->model), &(js->iter));
- gtk_list_store_set (GTK_LIST_STORE (js->model), &(js->iter), 0, msg, -1);
- js->junk_list = g_list_append (js->junk_list, junk_entry);
-
- g_free (msg);
- g_free (entry);
- msg = NULL;
- entry = NULL;
- list = list->next;
- }
- }
- }
- else
- g_warning("Could not get the JUNK List");
- }
-}
-
-void
-commit_changes (JunkSettings *js)
-{
- GList *new_list = NULL;
- GList *remove_list = NULL;
- GList *node = NULL;
- JunkEntry *junk_entry = NULL;
- EGwJunkEntry *entry;
- gint use_junk, use_pab, use_block, persistence;
-
- for (node = js->junk_list; node; node = node->next)
- {
- junk_entry = node->data;
- if (junk_entry->flag & 0x1)
- new_list = g_list_append (new_list, junk_entry->entry);
- else if (junk_entry->flag & 0x4) {
- remove_list = g_list_append (remove_list, junk_entry->entry);
- }
- }
-
- if (E_IS_GW_CONNECTION (js->cnc)) {
- if (js->flag_for_ok == 2 && js->enabled){ /* just turn off the bits*/
- use_junk = use_pab = use_block = persistence = 0;
- if (e_gw_connection_modify_junk_settings (js->cnc, use_junk, use_pab, use_block, persistence) == E_GW_CONNECTION_STATUS_OK) {
- ;
- }
-
- }
- if (js->flag_for_ok == 0 && !js->enabled) {
- use_block = use_pab =0;
- use_junk = 1;
- persistence = 14; /* We are setting the default persistence*/
- if (e_gw_connection_modify_junk_settings (js->cnc, use_junk, use_pab, use_block, persistence) == E_GW_CONNECTION_STATUS_OK) {
- ;
- }
- }
-
- while (new_list) {
- entry = new_list->data;
- if (e_gw_connection_create_junk_entry (js->cnc, entry->match, "email", "junk") == E_GW_CONNECTION_STATUS_OK) {
- ;
- }
- new_list = new_list->next;
- }
- while (remove_list) {
- entry = remove_list->data;
- if (e_gw_connection_remove_junk_entry (js->cnc, entry->id) == E_GW_CONNECTION_STATUS_OK) {
- ;
- }
- remove_list = remove_list->next;
- }
-
- }
- if (new_list) {
- g_list_foreach (new_list, (GFunc) free_entry_node, NULL);
- g_list_free (new_list);
- }
- new_list = NULL;
- if (remove_list) {
- g_list_foreach (remove_list,(GFunc) free_entry_node, NULL);
- g_list_free (remove_list);
- }
- remove_list = NULL;
-}
-
-static void
-enable_clicked (GtkRadioButton *button, JunkSettings *js)
-{
- js->flag_for_ok = 0;
- gtk_widget_set_sensitive (GTK_WIDGET (js->table) ,TRUE);
-}
-
-static void
-disable_clicked (GtkRadioButton *button, JunkSettings *js)
-{
- js->flag_for_ok = 2;
- gtk_widget_set_sensitive (GTK_WIDGET (js->table), FALSE);
-}
-
-static void
-add_clicked (GtkButton *button, JunkSettings *js)
-{
- const gchar *email = NULL;
- const gchar *self_email = NULL;
- JunkEntry *new_entry = NULL;
- EGwJunkEntry *junk_entry = NULL;
- gchar *msg = NULL;
-
- self_email = g_strdup (e_gw_connection_get_user_email (js->cnc));
- email = gtk_entry_get_text (js->entry);
- /* You can't mark junk sender yourself*/
- if (g_strrstr (email, "@") == NULL || (!g_ascii_strcasecmp (email , self_email)) || !g_ascii_strcasecmp (email, "" ))
- return;
- else {
- /*check whether already exists*/
- if (js->junk_list && email) {
- new_entry = find_node (js->junk_list, (gchar *)email);
- if (new_entry)
- return;
-
- }
- junk_entry = g_new0 (EGwJunkEntry, 1);
- new_entry = g_new0 (JunkEntry, 1);
- junk_entry->match = g_strdup (email);
-/*XXX:populate more fields*/
- new_entry->entry = junk_entry;
- new_entry->flag = 1;
- msg = g_strdup (email);
- gtk_list_store_append (GTK_LIST_STORE (js->model), &(js->iter));
- gtk_list_store_set (GTK_LIST_STORE (js->model), &(js->iter), 0, msg, -1);
- g_free (msg);
- js->junk_list = g_list_append (js->junk_list, new_entry);
- js->flag_for_ok = 0;
- }
- gtk_entry_set_text (GTK_ENTRY(js->entry), "");
-}
-
-static void
-remove_clicked (GtkButton *button, JunkSettings *js)
-{
- JunkEntry *entry = NULL;
- gchar *email;
-
- gtk_tree_model_get ((GtkTreeModel *) js->model, &(js->iter), 0, &email, -1);
- entry = find_node (js->junk_list, email);
- if (entry->flag & 0x1) {
- js->junk_list = g_list_remove (js->junk_list, entry);
- free_node (entry);
- } else {
- entry->flag = 0;
- entry->flag |= 0x4;
- }
- g_free (email);
- gtk_list_store_remove (GTK_LIST_STORE (js->model), &(js->iter));
-}
-
-static void
-user_selected (GtkTreeSelection *selection, JunkSettings *js)
-{
- GtkTreeModel *model;
-
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- if (gtk_tree_selection_get_selected (selection, &model, &(js->iter))) {
- gtk_widget_set_sensitive (GTK_WIDGET (js->remove), TRUE);
-
- }
-}
-
-static void
-junk_settings_construct (JunkSettings *js)
-{
- js->builder = gtk_builder_new ();
- e_load_ui_builder_definition (js->builder, "junk-settings.ui");
-
- js->vbox = GTK_VBOX (e_builder_get_widget(js->builder, "vboxSettings"));
- js->table = GTK_VBOX (e_builder_get_widget (js->builder, "vbox194"));
- gtk_widget_set_sensitive (GTK_WIDGET (js->table), FALSE);
-
- js->enable = GTK_RADIO_BUTTON (e_builder_get_widget (js->builder, "radEnable"));
- g_signal_connect ((gpointer) js->enable, "clicked", G_CALLBACK (enable_clicked), js);
-
- js->disable = GTK_RADIO_BUTTON (e_builder_get_widget (js->builder, "radDisable"));
- g_signal_connect ((gpointer) js->disable, "clicked", G_CALLBACK (disable_clicked), js);
-
- js->add_button = GTK_BUTTON (e_builder_get_widget(js->builder, "Add"));
- g_signal_connect((GtkWidget *) js->add_button, "clicked", G_CALLBACK (add_clicked), js);
-
- js->remove = GTK_BUTTON(e_builder_get_widget(js->builder, "Remove"));
- g_signal_connect ((GtkWidget *) js->remove, "clicked", G_CALLBACK (remove_clicked), js);
- gtk_widget_set_sensitive (GTK_WIDGET (js->remove), FALSE);
-
- js->entry = GTK_ENTRY (e_builder_get_widget (js->builder, "entry4"));
- /*TODO:connect entry and label*/
- gtk_widget_show ((GtkWidget *) js->entry);
-
- js->scrolled_window = GTK_WIDGET (e_builder_get_widget (js->builder,"scrolledwindow4"));
-
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (js->scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
- js->model = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
- js->entry_list = (GtkTreeView *)gtk_tree_view_new ();
- /*gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (js->scrolled_window), (GtkWidget *)js->entry_list);*/
- gtk_container_add (GTK_CONTAINER (js->scrolled_window), (GtkWidget *)js->entry_list);
- gtk_tree_view_set_model (GTK_TREE_VIEW (js->entry_list), GTK_TREE_MODEL (js->model));
- gtk_widget_show (GTK_WIDGET (js->entry_list));
-
- js->cell = gtk_cell_renderer_text_new ();
- js->column = gtk_tree_view_column_new_with_attributes (_("Email"), js->cell, "text", 0, NULL);
- gtk_tree_view_append_column (GTK_TREE_VIEW (js->entry_list),
- GTK_TREE_VIEW_COLUMN (js->column));
-
- g_signal_connect(gtk_tree_view_get_selection(GTK_TREE_VIEW (js->entry_list)), "changed", G_CALLBACK (user_selected), js);
-}
-
-JunkSettings *
-junk_settings_new (EGwConnection *ccnc)
-{
- JunkSettings *new;
- new = (JunkSettings *) g_object_new (junk_settings_get_type (), NULL);
- junk_settings_construct (new);
- new->cnc = ccnc;
- if (new->cnc)
- get_junk_list (new);
-
- return (JunkSettings *) new;
-}
-
diff --git a/plugins/groupwise-features/junk-settings.h b/plugins/groupwise-features/junk-settings.h
deleted file mode 100644
index 2e67b8cc8c..0000000000
--- a/plugins/groupwise-features/junk-settings.h
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Vivek Jain <jvivek@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifndef __JUNK_SETTINGS_H__
-#define __JUNK_SETTINGS_H__
-
-#include <gtk/gtk.h>
-#include <e-gw-connection.h>
-
-#define _JUNK_SETTINGS_TYPE (junk_settings_get_type ())
-#define JUNK_SETTINGS(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), JUNK_SETTINGS, JunkSettings))
-#define JUNK_SETTINGS_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), JUNK_SETTINGS_TYPE, JunkSettings))
-#define IS_JUNK_SETTINGS(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), JUNK_SETTINGS_TYPE))
-#define IS_JUNK_SETTINGS_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), JUNK_SETTINGS_TYPE))
-
-G_BEGIN_DECLS
-
-typedef struct _JunkSettings JunkSettings;
-typedef struct _JunkSettingsClass JunkSettingsClass;
-
-struct _JunkSettings {
- GtkVBox parent_object;
-
- GtkBuilder *builder;
-
- /* General tab */
-
- /* Default Behavior */
- GtkTreeView *entry_list;
- GtkButton *add_button;
- GtkButton *remove;
- GtkEntry *entry;
- GtkRadioButton *enable;
- GtkRadioButton *disable;
- GtkWidget *scrolled_window;
- GtkListStore *model;
- GtkCellRenderer *cell;
- GtkTreeViewColumn *column;
- GtkVBox *vbox;
- GtkVBox *table;
- GtkWidget *window;
-
- GList *junk_list;
- gint users;
- gint flag_for_ok;
- gboolean enabled;
- EGwConnection *cnc;
- GtkTreeIter iter;
-};
-
-struct _JunkSettingsClass {
- GtkVBoxClass parent_class;
-
-};
-
-GType junk_settings_get_type (void);
-JunkSettings * junk_settings_new (EGwConnection *ccnc);
-void commit_changes (JunkSettings *js);
-
-G_END_DECLS
-
-#endif /* __JUNK_SETTINGS_H__ */
diff --git a/plugins/groupwise-features/junk-settings.ui b/plugins/groupwise-features/junk-settings.ui
deleted file mode 100644
index b998c90920..0000000000
--- a/plugins/groupwise-features/junk-settings.ui
+++ /dev/null
@@ -1,458 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkWindow" id="main_page">
- <property name="title" translatable="yes">Junk Mail Settings</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <child>
- <object class="GtkNotebook" id="sharing_props">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">False</property>
- <property name="enable_popup">False</property>
- <child>
- <object class="GtkVBox" id="vboxSettings">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vboxSharingOptions">
- <property name="width_request">0</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox186">
- <property name="width_request">0</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="label539">
- <property name="visible">True</property>
- <property name="label" translatable="yes"/>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox190">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkRadioButton" id="radDisable">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Disable</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radEnable">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Enable</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radDisable</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox194">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkHBox" id="hbox226">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkVBox" id="vbox195">
- <property name="width_request">234</property>
- <property name="height_request">209</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkHBox" id="hbox227">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkLabel" id="label557">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Email:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entry4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"/>
- <property name="has_frame">True</property>
- <property name="activates_default">False</property>
- </object>
- <packing>
- <property name="padding">2</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="users">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Junk List:</property>
- <property name="use_underline">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="padding">6</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow4">
- <property name="width_request">282</property>
- <property name="height_request">150</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="padding">6</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox196">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkButton" id="Add">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
- <child>
- <object class="GtkHBox" id="hbox229">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-add</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label561">
- <property name="width_request">29</property>
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Add</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="Remove">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <child>
- <object class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
- <child>
- <object class="GtkHBox" id="hbox230">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image4">
- <property name="visible">True</property>
- <property name="stock">gtk-remove</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label562">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Remove</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="lblJunkList">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Junk List</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- </child>
- </object>
- </child>
- </object>
-</interface>
diff --git a/plugins/groupwise-features/mail-retract.c b/plugins/groupwise-features/mail-retract.c
deleted file mode 100644
index 1213311e36..0000000000
--- a/plugins/groupwise-features/mail-retract.c
+++ /dev/null
@@ -1,119 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Sankar P <psankar@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <glib/gi18n-lib.h>
-#include <e-gw-connection.h>
-
-#include <e-util/e-alert-dialog.h>
-
-#include <mail/e-mail-reader.h>
-#include <mail/em-utils.h>
-#include <mail/message-list.h>
-
-#include "gw-ui.h"
-#include "share-folder.h"
-
-static gboolean
-get_selected_info (EShellView *shell_view, CamelFolder **folder, gchar **selected_uid)
-{
- EShellContent *shell_content;
- EMailReader *reader;
- GPtrArray *uids;
-
- shell_content = e_shell_view_get_shell_content (shell_view);
-
- reader = E_MAIL_READER (shell_content);
- uids = e_mail_reader_get_selected_uids (reader);
-
- if (uids && uids->len == 1) {
- *folder = e_mail_reader_get_folder (reader);
- *selected_uid = g_strdup (g_ptr_array_index (uids, 0));
- }
-
- em_utils_uids_free (uids);
-
- return *selected_uid != NULL;
-}
-
-void
-gw_retract_mail_cb (GtkAction *action, EShellView *shell_view)
-{
- EGwConnection *cnc;
- CamelFolder *folder;
- CamelStore *parent_store;
- gchar *id = NULL;
- GtkWidget *confirm_dialog, *confirm_warning;
- GtkWidget *content_area;
- gint n;
-
- g_return_if_fail (get_selected_info (shell_view, &folder, &id));
- g_return_if_fail (folder != NULL);
-
- parent_store = camel_folder_get_parent_store (folder);
-
- cnc = get_cnc (parent_store);
-
- if (cnc && E_IS_GW_CONNECTION (cnc)) {
- confirm_dialog = gtk_dialog_new_with_buttons (
- _("Message Retract"),
- GTK_WINDOW (e_shell_view_get_shell_window (shell_view)),
- GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
- GTK_STOCK_YES, GTK_RESPONSE_YES,
- GTK_STOCK_NO, GTK_RESPONSE_NO, NULL);
-
- content_area = gtk_dialog_get_content_area (
- GTK_DIALOG (confirm_dialog));
-
- confirm_warning = gtk_label_new (_("Retracting a message may remove it from the recipient's mailbox. Are you sure you want to do this?"));
- gtk_label_set_line_wrap (GTK_LABEL (confirm_warning), TRUE);
- gtk_label_set_selectable (GTK_LABEL (confirm_warning), TRUE);
-
- gtk_container_add (GTK_CONTAINER (content_area), confirm_warning);
- gtk_widget_set_size_request (confirm_dialog, 400, 100);
- gtk_widget_show_all (confirm_dialog);
-
- n =gtk_dialog_run (GTK_DIALOG (confirm_dialog));
-
- gtk_widget_destroy (confirm_warning);
- gtk_widget_destroy (confirm_dialog);
-
- if (n == GTK_RESPONSE_YES) {
-
- if (e_gw_connection_retract_request (cnc, id, NULL, FALSE, FALSE) != E_GW_CONNECTION_STATUS_OK )
- e_alert_run_dialog_for_args (GTK_WINDOW (e_shell_view_get_shell_window (shell_view)),
- "org.gnome.evolution.message.retract:retract-failure",
- NULL);
- else {
- GtkWidget *dialog;
- dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_INFO, GTK_BUTTONS_CLOSE, _("Message retracted successfully"));
- gtk_dialog_run (GTK_DIALOG (dialog));
- gtk_widget_destroy (dialog);
- }
- }
- }
-
- g_free (id);
-}
diff --git a/plugins/groupwise-features/mail-send-options.c b/plugins/groupwise-features/mail-send-options.c
deleted file mode 100644
index 7c31b6e585..0000000000
--- a/plugins/groupwise-features/mail-send-options.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Parthasarathi Susarla <sparthasarathi@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdio.h>
-
-#include <glib.h>
-#include <glib/gi18n.h>
-
-#include "mail-send-options.h"
-
-#include "mail/em-utils.h"
-#include "mail/em-event.h"
-
-#include "composer/e-msg-composer.h"
-#include "composer/e-composer-from-header.h"
-#include "libedataserver/e-account.h"
-
-#include "misc/e-send-options.h"
-
-static ESendOptionsDialog * dialog = NULL;
-
-gboolean gw_ui_composer_actions (GtkUIManager *manager, EMsgComposer *composer);
-void org_gnome_composer_message_reply (EPlugin *ep, EMEventTargetMessage *t);
-
-static time_t
-add_day_to_time (time_t time, gint days)
-{
- struct tm *tm;
-
- tm = localtime (&time);
- tm->tm_mday += days;
- tm->tm_isdst = -1;
-
- return mktime (tm);
-}
-
-static void
-feed_input_data (ESendOptionsDialog * dialog, gint state, gpointer data)
-{
- EMsgComposer *comp;
- gchar value[100];
- gchar *temp = NULL;
-
- comp = (EMsgComposer *) data;
- /* we are bothered only for ok response: other cases are handled generally*/
- if (state == GTK_RESPONSE_OK) {
- if (dialog->data->gopts->reply_enabled) {
- if (dialog->data->gopts->reply_convenient)
- e_msg_composer_add_header (comp, X_REPLY_CONVENIENT ,"1" );
- else {
- time_t t;
- t = add_day_to_time (time (NULL), dialog->data->gopts->reply_within);
- strftime (value, 17, "%Y%m%dT%H%M%SZ", gmtime (&t));
- e_msg_composer_add_header (comp, X_REPLY_WITHIN , value);
- }
- }
-
- if (dialog->data->gopts->expiration_enabled) {
- if (dialog->data->gopts->expire_after != 0) {
- time_t t;
- t = add_day_to_time (time (NULL), dialog->data->gopts->expire_after);
- strftime (value, 17, "%Y%m%dT%H%M%SZ", gmtime (&t));
- e_msg_composer_add_header (comp, X_EXPIRE_AFTER, value);
- }
- }
- if (dialog->data->gopts->delay_enabled) {
- strftime (value, 17, "%Y%m%dT%H%M%SZ", gmtime (&dialog->data->gopts->delay_until));
- e_msg_composer_add_header (comp, X_DELAY_UNTIL, value);
- }
-
- /*Status Tracking Options*/
- if (dialog->data->sopts->tracking_enabled) {
- temp = g_strdup_printf ("%d",dialog->data->sopts->track_when);
- e_msg_composer_add_header (comp, X_TRACK_WHEN, temp);
- g_free (temp);
- }
-
- if (dialog->data->sopts->autodelete) {
- e_msg_composer_add_header (comp, X_AUTODELETE, "1");
- }
- if (dialog->data->sopts->opened) {
- temp = g_strdup_printf ("%d",dialog->data->sopts->opened);
- e_msg_composer_add_header (comp, X_RETURN_NOTIFY_OPEN, temp);
- g_free (temp);
- }
- if (dialog->data->sopts->declined) {
- temp = g_strdup_printf ("%d",dialog->data->sopts->declined);
- e_msg_composer_add_header (comp, X_RETURN_NOTIFY_DELETE, temp);
- g_free (temp);
- }
-
- if (dialog->data->gopts->priority) {
- temp = g_strdup_printf ("%d",dialog->data->gopts->priority);
- e_msg_composer_add_header (comp, X_SEND_OPT_PRIORITY, temp);
- g_free (temp);
- }
-
- if (dialog->data->gopts->security) {
- temp = g_strdup_printf ("%d",dialog->data->gopts->security);
- e_msg_composer_add_header (comp, X_SEND_OPT_SECURITY, temp);
- g_free (temp);
- }
- }
-}
-
-static void
-send_options_commit (EMsgComposer *comp, gpointer user_data)
-{
- if (!user_data && !E_IS_SENDOPTIONS_DIALOG (user_data))
- return;
-
- if (dialog) {
- g_object_unref (dialog);
- dialog = NULL;
- }
-}
-
-static gboolean
-account_is_groupwise (EAccount *account)
-{
- const gchar *url;
-
- if (!account)
- return FALSE;
-
- url = e_account_get_string (account, E_ACCOUNT_TRANSPORT_URL);
- return url && g_str_has_prefix (url, "groupwise://");
-}
-
-static void
-from_changed_cb (EComposerFromHeader *header, EMsgComposer *composer)
-{
- GtkActionGroup *group;
- GtkAction *action;
- EAccount *account;
-
- g_return_if_fail (header != NULL);
- g_return_if_fail (composer != NULL);
-
- group = gtkhtml_editor_get_action_group (GTKHTML_EDITOR (composer), "composer");
- g_return_if_fail (group != NULL);
-
- action = gtk_action_group_get_action (group, "gw-send-options");
- g_return_if_fail (action != NULL);
-
- account = e_composer_from_header_get_active (header);
- gtk_action_set_visible (action, account_is_groupwise (account));
-}
-
-static void
-action_send_options_cb (GtkAction *action, EMsgComposer *composer)
-{
- g_return_if_fail (action != NULL);
- g_return_if_fail (composer != NULL);
-
- /* display the send options dialog */
- if (!dialog) {
- dialog = e_send_options_dialog_new ();
- }
-
- e_send_options_dialog_run (dialog, GTK_WIDGET (composer), E_ITEM_MAIL);
-
- g_signal_connect (dialog, "sod_response",
- G_CALLBACK (feed_input_data), composer);
-
- g_signal_connect (GTK_WIDGET (composer), "destroy",
- G_CALLBACK (send_options_commit), dialog);
-}
-
-gboolean
-gw_ui_composer_actions (GtkUIManager *manager, EMsgComposer *composer)
-{
- static GtkActionEntry entries[] = {
- { "gw-send-options",
- NULL,
- N_("_Send Options"),
- NULL,
- N_("Insert Send options"),
- G_CALLBACK (action_send_options_cb) }
- };
-
- GtkhtmlEditor *editor;
- EComposerHeaderTable *headers;
- EComposerHeader *header;
-
- editor = GTKHTML_EDITOR (composer);
-
- /* Add actions to the "composer" action group. */
- gtk_action_group_add_actions (
- gtkhtml_editor_get_action_group (editor, "composer"),
- entries, G_N_ELEMENTS (entries), composer);
-
- headers = e_msg_composer_get_header_table (composer);
- header = e_composer_header_table_get_header (headers, E_COMPOSER_HEADER_FROM);
-
- from_changed_cb (E_COMPOSER_FROM_HEADER (header), composer);
- g_signal_connect (
- header, "changed",
- G_CALLBACK (from_changed_cb), composer);
-
- return TRUE;
-}
-
-void
-org_gnome_composer_message_reply (EPlugin *ep, EMEventTargetMessage *t)
-{
- EMsgComposer *comp = (struct _EMsgComposer *)t->composer;
- EComposerHeaderTable *table;
- EAccount *account = NULL;
- gchar *temp = NULL;
-
- table = e_msg_composer_get_header_table (comp);
- account = e_composer_header_table_get_account (table);
- if (!account)
- return;
-
- temp = strstr (account->transport->url, "groupwise");
- if (!temp) {
- return;
- }
- e_msg_composer_add_header (comp, "X-GW-ORIG-ITEM-ID", t->uid);
-}
diff --git a/plugins/groupwise-features/mail-send-options.h b/plugins/groupwise-features/mail-send-options.h
deleted file mode 100644
index 71cacbff01..0000000000
--- a/plugins/groupwise-features/mail-send-options.h
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Parthasarathi Susarla <sparthasarathi@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifndef __GW_SEND_OPTIONS__
-#define __GW_SEND_OPTIONS__
-
-/*Headers for send options*/
-#define X_SEND_OPTIONS "X-gw-send-options"
-/*General Options*/
-#define X_SEND_OPT_PRIORITY "X-gw-send-opt-priority"
-#define X_SEND_OPT_SECURITY "X-gw-send-opt-security"
-#define X_REPLY_CONVENIENT "X-reply-convenient"
-#define X_REPLY_WITHIN "X-reply-within"
-#define X_EXPIRE_AFTER "X-expire-after"
-#define X_DELAY_UNTIL "X-delay-until"
-
-/*Status Tracking Options*/
-#define X_TRACK_WHEN "X-track-when"
-#define X_AUTODELETE "X-auto-delete"
-#define X_RETURN_NOTIFY_OPEN "X-return-notify-open"
-#define X_RETURN_NOTIFY_DELETE "X-return-notify-delete"
-
-#endif /*__GW_SEND_OPTIONS__*/
diff --git a/plugins/groupwise-features/notification.ui b/plugins/groupwise-features/notification.ui
deleted file mode 100644
index a3fc64b568..0000000000
--- a/plugins/groupwise-features/notification.ui
+++ /dev/null
@@ -1,216 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkVBox" id="vbox191">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="label551">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The participants will receive the following notification.
-</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.66</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">1</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox223">
- <property name="height_request">309</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vbox193">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkLabel" id="label553">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Subject</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entry3">
- <property name="width_request">158</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"/>
- <property name="has_frame">True</property>
- <property name="activates_default">False</property>
- </object>
- <packing>
- <property name="padding">6</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label554">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Message</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow3">
- <property name="border_width">0</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
- <child>
- <object class="GtkTextView" id="textview1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="overwrite">False</property>
- <property name="accepts_tab">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_NONE</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox224">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkLabel" id="label555">
- <property name="visible">True</property>
- <property name="label" translatable="yes"/>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.52</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkHButtonBox" id="hbuttonbox2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkButton" id="nCancel">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal handler="on_nCancel_clicked" last_modification_time="Tue, 23 Nov 2004 10:56:42 GMT" name="clicked"/>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="nOK">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal handler="on_nOK_clicked" last_modification_time="Tue, 23 Nov 2004 10:57:50 GMT" name="clicked"/>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
-</interface>
diff --git a/plugins/groupwise-features/org-gnome-compose-send-options.xml b/plugins/groupwise-features/org-gnome-compose-send-options.xml
deleted file mode 100644
index 25ff89803e..0000000000
--- a/plugins/groupwise-features/org-gnome-compose-send-options.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-<Root>
- <commands>
- <cmd name="EPSOSendOptions" _label="Send Options"
- _tip="Add Send Options to GroupWise messages"/>
- </commands>
-
- <menu>
- <submenu name="Insert">
- <placeholder name="Component">
- <separator f="" name="sendoptions1"/>
- <menuitem name="EPSOSendOptions" verb=""/>
- <separator f="" name="sendoptions2"/>
- </placeholder>
- </submenu>
-
- </menu>
-</Root>
diff --git a/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml b/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml
deleted file mode 100644
index 08001f97d8..0000000000
--- a/plugins/groupwise-features/org-gnome-groupwise-features.eplug.xml
+++ /dev/null
@@ -1,108 +0,0 @@
-<?xml version="1.0"?>
-<e-plugin-list>
- <e-plugin id="org.gnome.evolution.groupwise_features" type="shlib" _name="GroupWise Features"
- location="@PLUGINDIR@/liborg-gnome-groupwise-features@SOEXT@" load-on-startup="true" system_plugin="true">
-
- <author name="Sivaiah Nallagatla" email="snallagatla@novell.com" />
- <author name="Vivek Jain" email="jvivek@novell.com" />
- <author name="Chenthill Palanisamy" email="pchenthill@novell.com"/>
- <author name="Parthasarathi Susarla" email="sparthasarathi@novell.com"/>
- <author name="Sankar P" email="psankar@novell.com"/>
- <author name="Shreyas Srinivasan" email="sshreyas@novell.com"/>
- <author name="Raghavendran R" email="raghavguru7@gmail.com"/>
-
- <_description>Fine-tune your GroupWise accounts.</_description>
-
- <hook class="org.gnome.evolution.mail.config:1.0">
- <group id="org.gnome.evolution.mail.folderConfig" target="folder" check= "shared_folder_check" commit="shared_folder_commit" abort ="shared_folder_abort">
- <item type="page" path="10.shared" label="Shared" factory="org_gnome_shared_folder_factory"/>
- </group>
- <group id="org.gnome.evolution.mail.config.accountEditor" target="account" check = "send_options_changed" commit = "send_options_commit" abort = "send_options_abort">
- <item type="section" path="40.defaults/50.send_options" label="Send Options" factory="org_gnome_send_options" />
- </group>
- <group id="org.gnome.evolution.mail.config.accountEditor" target="account" commit = "proxy_commit" abort="proxy_abort">
- <item type="page" path="60.proxy" factory="org_gnome_proxy"/>
- </group>
-
- <group target="account" id="org.gnome.evolution.mail.config.accountAssistant">
- <item type="item_table" path="20.receive_options/30.soapport/50.dummy" factory="org_gnome_groupwise_account_setup"/>
- </group>
- <group target="account" id="org.gnome.evolution.mail.config.accountEditor">
- <item type="item_table" path="20.receive_options/30.soapport/50.dummy" factory="org_gnome_groupwise_account_setup"/>
- </group>
- <group target="account" id="org.gnome.evolution.mail.config.accountWizard">
- <item type="item_table" path="20.receive_options/30.soapport/50.dummy" factory="org_gnome_groupwise_account_setup"/>
- </group>
- </hook>
-
- <!-- cannot have one hook with two same ui-manager id-s, thus splitting here -->
- <hook class="org.gnome.evolution.ui:1.0">
- <ui-manager id="org.gnome.evolution.mail" callback="gw_ui_mail_folder_popup">
- <popup name="mail-folder-popup">
- <placeholder name="mail-folder-popup-actions">
- <menuitem action="gw-new-shared-folder"/>
- <menuitem action="gw-proxy-login"/>
- </placeholder>
- </popup>
- </ui-manager>
- </hook>
-
- <hook class="org.gnome.evolution.ui:1.0">
- <ui-manager id="org.gnome.evolution.mail" callback="gw_ui_mail_message_popup">
- <popup name="mail-message-popup">
- <placeholder name="mail-message-popup-actions">
- <separator />
- <menuitem action="gw-junk-mail-settings"/>
- <menuitem action="gw-track-message-status"/>
- <separator />
- <menuitem action="gw-retract-mail"/>
- </placeholder>
- </popup>
- </ui-manager>
-
- <ui-manager id="org.gnome.evolution.calendars" callback="gw_ui_calendar_event_popup">
- <popup name="calendar-event-popup">
- <placeholder name="event-popup-actions">
- <menuitem action="gw-meeting-accept"/>
- <menuitem action="gw-meeting-accept-tentative"/>
- <menuitem action="gw-meeting-decline"/>
- <menuitem action="gw-resend-meeting"/>
- </placeholder>
- </popup>
- </ui-manager>
- </hook>
-
- <hook class="org.gnome.evolution.ui:1.0">
- <ui-manager id="org.gnome.evolution.composer" callback="gw_ui_composer_actions">
- <menubar name="main-menu">
- <menu action="insert-menu">
- <placeholder name="insert-menu-top">
- <placeholder name="send-options">
- <menuitem action="gw-send-options"/>
- </placeholder>
- </placeholder>
- </menu>
- </menubar>
- </ui-manager>
- </hook>
-
- <hook class="org.gnome.evolution.mail.events:1.0">
- <event target="message" id="message.reading" type="pass" handle="org_gnome_popup_wizard"/>
- <event id="message.replying" handle="org_gnome_composer_message_reply" target="message" enable="reply"/>
- </hook>
-
- <hook class="org.gnome.evolution.addressbook.config:1.0">
- <group id="com.novell.evolution.addressbook.config.accountEditor" target="source" commit="commit_groupwise_addressbook">
- <item type="item" path="00.general/10.display/00.gw_dummy" factory="e_book_groupwise_dummy"/>
- </group>
- <group id="com.novell.evolution.addressbook.config.accountEditor" target="source" commit="commit_groupwise_addressbook">
- <item type="item" path="00.general/10.display/00.gw_dummy" factory="e_book_groupwise_dummy"/>
- </group>
- </hook>
-
- <hook class="org.gnome.evolution.shell.events:1.0">
- <event id="upgrade.done" handle="ensure_mandatory_esource_properties" target="upgrade"/>
- </hook>
- </e-plugin>
-
-</e-plugin-list>
diff --git a/plugins/groupwise-features/org-gnome-mail-retract.error.xml b/plugins/groupwise-features/org-gnome-mail-retract.error.xml
deleted file mode 100644
index 64e2ce2f1e..0000000000
--- a/plugins/groupwise-features/org-gnome-mail-retract.error.xml
+++ /dev/null
@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<error-list domain="org.gnome.evolution.message.retract">
- <error id="retract-failure" type="error">
- <_primary>Message retract failed</_primary>
- <_secondary>The server did not allow the selected message to be retracted.</_secondary>
- </error>
-</error-list>
diff --git a/plugins/groupwise-features/org-gnome-process-meeting.error.xml b/plugins/groupwise-features/org-gnome-process-meeting.error.xml
deleted file mode 100644
index 45fbc98103..0000000000
--- a/plugins/groupwise-features/org-gnome-process-meeting.error.xml
+++ /dev/null
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<error-list domain="org.gnome.evolution.process_meeting">
-
-<error id="recurrence-accept" type="question" default="GTK_RESPONSE_YES">
-<_primary>This is a recurring meeting</_primary>
-<!--Translators: "it" is a "recurring meeting" (string refers to "This is a recurring meeting") -->
-<_secondary>Would you like to accept it?</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button label="This instance" response="GTK_RESPONSE_NO"/>
- <button label="All instances" response="GTK_RESPONSE_YES"/>
-</error>
-
-<error id="recurrence-decline" type="question" default="GTK_RESPONSE_YES">
-<_primary>This is a recurring meeting</_primary>
-<!--Translators: "it" is a "recurring meeting" (string refers to "This is a recurring meeting") -->
-<_secondary>Would you like to decline it?</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button label="This instance" response="GTK_RESPONSE_NO"/>
- <button label="All instances" response="GTK_RESPONSE_YES"/>
-</error>
-
-<error id="resend" type="question" default="GTK_RESPONSE_YES">
-<_primary>Do you want to resend the meeting?</_primary>
-<_secondary>This will create a new meeting using the existing meeting details.</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button stock="gtk-ok" response="GTK_RESPONSE_OK"/>
-</error>
-
-<error id="resend-recurrence" type="question" default="GTK_RESPONSE_YES">
-<_primary>Do you want to resend the recurring meeting?</_primary>
-<_secondary>This will create a new meeting with the existing meeting details. The recurrence rule needs to be re-entered.</_secondary>
- <button stock="gtk-cancel" response="GTK_RESPONSE_CANCEL"/>
- <button label="This instance" response="GTK_RESPONSE_NO"/>
- <button label="All instances" response="GTK_RESPONSE_YES"/>
-</error>
-
-<error id="resend-retract" type="question" default="GTK_RESPONSE_YES">
-<_primary>Do you want to retract the original item?</_primary>
-<_secondary>The original will be removed from the recipient's mailbox.</_secondary>
- <button stock="gtk-no" response="GTK_RESPONSE_NO"/>
- <button stock="gtk-yes" response="GTK_RESPONSE_YES"/>
-</error>
-
-</error-list>
diff --git a/plugins/groupwise-features/org-gnome-proxy-login.error.xml b/plugins/groupwise-features/org-gnome-proxy-login.error.xml
deleted file mode 100644
index fccddfd6c6..0000000000
--- a/plugins/groupwise-features/org-gnome-proxy-login.error.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<error-list domain="org.gnome.evolution.proxy-login">
-<error id="invalid-user" type="error">
-<_primary>Invalid user</_primary>
-<_secondary>
-<!--To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a GroupWise feature by which one person can send/read mails/appointments using another person's identity without knowing his password, for example if that other person is on vacation-->
-Proxy login as &quot;{0}&quot; was unsuccessful. Please check your email address and try again.
-</_secondary>
-</error>
-
-<error id="already-loggedin" type="error">
- <_primary>Account Already Exists</_primary>
- <_secondary>Account &quot;{0}&quot; already exists. Please check your folder tree.</_secondary>
-</error>
-
-</error-list>
diff --git a/plugins/groupwise-features/org-gnome-proxy.error.xml b/plugins/groupwise-features/org-gnome-proxy.error.xml
deleted file mode 100644
index dad6fbe8f1..0000000000
--- a/plugins/groupwise-features/org-gnome-proxy.error.xml
+++ /dev/null
@@ -1,27 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<error-list domain="org.gnome.evolution.proxy">
-<error id="invalid-user" type="error">
-<_primary>Invalid user</_primary>
-<!--To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a GroupWise feature by which one person can send/read mails/appointments using another person's identity without knowing his password, for example if that other person is on vacation -->
-<_secondary>
-Proxy access cannot be given to user &quot;{0}&quot;
-</_secondary>
-</error>
-
-<error id="no-user" type="error">
-<_primary>Specify User</_primary>
-<!--To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a GroupWise feature by which one person can send/read mails/appointments using another person's identity without knowing his password, for example if that other person is on vacation -->
-<_secondary>
-You have to specify a valid user name to give proxy rights.
-</_secondary>
-</error>
-
-<error id="user-is-proxy" type="error">
-<_primary>Specify User</_primary>
-<!--To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a GroupWise feature by which one person can send/read mails/appointments using another person's identity without knowing his password, for example if that other person is on vacation -->
-<_secondary>
-You have already given proxy permissions to this user.
-</_secondary>
-</error>
-
-</error-list>
diff --git a/plugins/groupwise-features/org-gnome-shared-folder.error.xml b/plugins/groupwise-features/org-gnome-shared-folder.error.xml
deleted file mode 100644
index 8ef056728b..0000000000
--- a/plugins/groupwise-features/org-gnome-shared-folder.error.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<error-list domain="org.gnome.evolution.mail_shared_folder">
-
-<error id="invalid-user" type="error">
-<_primary>Invalid user</_primary>
-<_secondary>
-You cannot share this folder with the specified user &quot;{0}&quot;
-</_secondary>
-</error>
-
-<error id="no-user" type="error">
-<_primary>Specify User</_primary>
-<_secondary>
- You have to specify a user name which you want to add to the list
-</_secondary>
-</error>
-
-</error-list>
-
diff --git a/plugins/groupwise-features/process-meeting.c b/plugins/groupwise-features/process-meeting.c
deleted file mode 100644
index 3eb8d59424..0000000000
--- a/plugins/groupwise-features/process-meeting.c
+++ /dev/null
@@ -1,442 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Chenthill Palanisamy (pchenthill@novell.com)
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include <libecal/e-cal.h>
-
-#include <e-util/e-alert-dialog.h>
-#include <shell/e-shell-view.h>
-
-#include <calendar/gui/e-calendar-view.h>
-#include <calendar/gui/itip-utils.h>
-#include <calendar/gui/gnome-cal.h>
-
-#include "gw-ui.h"
-
-typedef struct {
- ECal *ecal;
- icalcomponent *icalcomp;
-} ReceiveData;
-
-static void
-finalize_receive_data (ReceiveData *r_data)
-{
- if (r_data->ecal) {
- g_object_unref (r_data->ecal);
- r_data->ecal = NULL;
- }
-
- if (r_data->ecal) {
- icalcomponent_free (r_data->icalcomp);
- r_data->icalcomp = NULL;
- }
-
- g_free (r_data);
-}
-
-static gboolean
-receive_objects (gpointer data)
-{
- GError *error = NULL;
- ReceiveData *r_data = data;
-
- icalcomponent_set_method (r_data->icalcomp, ICAL_METHOD_REQUEST);
-
- if (!e_cal_receive_objects (r_data->ecal, r_data->icalcomp, &error)) {
- /* FIXME show an error dialog */
- g_error_free (error);
- }
-
- finalize_receive_data (r_data);
- return TRUE;
-}
-
-static icalproperty *
-find_attendee (icalcomponent *ical_comp, const gchar *address)
-{
- icalproperty *prop;
-
- if (address == NULL)
- return NULL;
-
- for (prop = icalcomponent_get_first_property (ical_comp, ICAL_ATTENDEE_PROPERTY);
- prop != NULL;
- prop = icalcomponent_get_next_property (ical_comp, ICAL_ATTENDEE_PROPERTY)) {
- icalvalue *value;
- const gchar *attendee;
- gchar *text;
-
- value = icalproperty_get_value (prop);
- if (!value)
- continue;
-
- attendee = icalvalue_get_string (value);
-
- text = g_strdup (itip_strip_mailto (attendee));
- text = g_strstrip (text);
- if (!g_ascii_strcasecmp (address, text)) {
- g_free (text);
- break;
- }
- g_free (text);
- }
-
- return prop;
-}
-static void
-change_status (icalcomponent *ical_comp, const gchar *address, icalparameter_partstat status)
-{
- icalproperty *prop;
-
- prop = find_attendee (ical_comp, address);
- if (prop) {
- icalparameter *param;
-
- icalproperty_remove_parameter (prop, ICAL_PARTSTAT_PARAMETER);
- param = icalparameter_new_partstat (status);
- icalproperty_add_parameter (prop, param);
- } else {
- icalparameter *param;
-
- prop = icalproperty_new_attendee (address);
- icalcomponent_add_property (ical_comp, prop);
-
- param = icalparameter_new_role (ICAL_ROLE_OPTPARTICIPANT);
- icalproperty_add_parameter (prop, param);
-
- param = icalparameter_new_partstat (status);
- icalproperty_add_parameter (prop, param);
- }
-}
-
-static void
-process_meeting (ECalendarView *cal_view, icalparameter_partstat status)
-{
- GList *selected;
- icalcomponent *clone;
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (selected) {
- ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
- ECalComponent *comp;
- ReceiveData *r_data;
- gboolean recurring = FALSE;
- GThread *thread = NULL;
- GError *error = NULL;
- gchar *address = NULL;
-
- if (!is_comp_data_valid (event))
- return;
-
- comp = e_cal_component_new ();
- r_data = g_new0 (ReceiveData, 1);
-
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- address = itip_get_comp_attendee (comp, event->comp_data->client);
-
- if (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp))
- recurring = TRUE;
-
- /* Free comp */
- g_object_unref (comp);
- comp = NULL;
-
- clone = icalcomponent_new_clone (event->comp_data->icalcomp);
- change_status (clone, address, status);
-
- r_data->ecal = g_object_ref (event->comp_data->client);
- r_data->icalcomp = clone;
-
- if (recurring) {
- gint response;
- const gchar *msg;
-
- if (status == ICAL_PARTSTAT_ACCEPTED || status == ICAL_PARTSTAT_TENTATIVE)
- msg = "org.gnome.evolution.process_meeting:recurrence-accept";
- else
- msg = "org.gnome.evolution.process_meeting:recurrence-decline";
-
- response = e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel ((GtkWidget *)cal_view)),
- msg, NULL);
- if (response == GTK_RESPONSE_YES) {
- icalproperty *prop;
- const gchar *uid = icalcomponent_get_uid (r_data->icalcomp);
-
- prop = icalproperty_new_x ("All");
- icalproperty_set_x_name (prop, "X-GW-RECUR-INSTANCES-MOD-TYPE");
- icalcomponent_add_property (r_data->icalcomp, prop);
-
- prop = icalproperty_new_x (uid);
- icalproperty_set_x_name (prop, "X-GW-RECURRENCE-KEY");
- icalcomponent_add_property (r_data->icalcomp, prop);
-
- } else if (response == GTK_RESPONSE_CANCEL) {
- finalize_receive_data (r_data);
- return;
- }
- }
-
- thread = g_thread_create ((GThreadFunc) receive_objects, r_data , FALSE, &error);
- if (!thread) {
- g_warning (G_STRLOC ": %s", error->message);
- g_error_free (error);
- }
- }
-}
-
-static ECalendarView *
-get_calendar_view (EShellView *shell_view)
-{
- EShellContent *shell_content;
- GnomeCalendar *gcal = NULL;
- GnomeCalendarViewType view_type;
-
- g_return_val_if_fail (shell_view != NULL, NULL);
-
- shell_content = e_shell_view_get_shell_content (shell_view);
-
- g_object_get (shell_content, "calendar", &gcal, NULL);
-
- view_type = gnome_calendar_get_view (gcal);
-
- return gnome_calendar_get_calendar_view (gcal, view_type);
-}
-
-void
-gw_meeting_accept_cb (GtkAction *action, EShellView *shell_view)
-{
- ECalendarView *cal_view = get_calendar_view (shell_view);
- g_return_if_fail (cal_view != NULL);
-
- process_meeting (cal_view, ICAL_PARTSTAT_ACCEPTED);
-}
-
-void
-gw_meeting_accept_tentative_cb (GtkAction *action, EShellView *shell_view)
-{
- ECalendarView *cal_view = get_calendar_view (shell_view);
- g_return_if_fail (cal_view != NULL);
-
- process_meeting (cal_view, ICAL_PARTSTAT_TENTATIVE);
-}
-
-void
-gw_meeting_decline_cb (GtkAction *action, EShellView *shell_view)
-{
- ECalendarView *cal_view = get_calendar_view (shell_view);
- g_return_if_fail (cal_view != NULL);
-
- process_meeting (cal_view, ICAL_PARTSTAT_DECLINED);
-}
-
-typedef struct {
- ECal *client;
- ECalComponent *comp;
- CalObjModType mod;
-} ThreadData;
-
-static void
-add_retract_data (ECalComponent *comp, const gchar *retract_comment, CalObjModType mod)
-{
- icalcomponent *icalcomp = NULL;
- icalproperty *icalprop = NULL;
-
- icalcomp = e_cal_component_get_icalcomponent (comp);
- if (retract_comment && *retract_comment)
- icalprop = icalproperty_new_x (retract_comment);
- else
- icalprop = icalproperty_new_x ("0");
- icalproperty_set_x_name (icalprop, "X-EVOLUTION-RETRACT-COMMENT");
- icalcomponent_add_property (icalcomp, icalprop);
-
- if (mod == CALOBJ_MOD_ALL)
- icalprop = icalproperty_new_x ("All");
- else
- icalprop = icalproperty_new_x ("This");
- icalproperty_set_x_name (icalprop, "X-EVOLUTION-RECUR-MOD");
- icalcomponent_add_property (icalcomp, icalprop);
-}
-
-static void
-free_thread_data (ThreadData *data)
-{
- if (data == NULL)
- return;
-
- if (data->client)
- g_object_unref (data->client);
-
- if (data->comp)
- g_object_unref (data->comp);
-
- g_free (data);
-}
-
-static gpointer
-retract_object (gpointer val)
-{
- ThreadData *data = val;
- icalcomponent *icalcomp = NULL, *mod_comp = NULL;
- GList *users = NULL;
- gchar *rid = NULL;
- const gchar *uid;
- GError *error = NULL;
-
- add_retract_data (data->comp, NULL, data->mod);
-
- icalcomp = e_cal_component_get_icalcomponent (data->comp);
- icalcomponent_set_method (icalcomp, ICAL_METHOD_CANCEL);
-
- if (!e_cal_send_objects (data->client, icalcomp, &users,
- &mod_comp, &error)) {
- /* FIXME report error */
- g_warning ("Unable to retract the meeting \n");
- g_clear_error (&error);
- return GINT_TO_POINTER (1);
- }
-
- if (mod_comp)
- icalcomponent_free (mod_comp);
-
- if (users) {
- g_list_foreach (users, (GFunc) g_free, NULL);
- g_list_free (users);
- }
-
- rid = e_cal_component_get_recurid_as_string (data->comp);
- e_cal_component_get_uid (data->comp, &uid);
-
- if (!e_cal_remove_object_with_mod (data->client, uid,
- rid, data->mod, &error)) {
- g_warning ("Unable to remove the item \n");
- g_clear_error (&error);
- return GINT_TO_POINTER (1);
- }
- g_free (rid);
-
- free_thread_data (data);
- return GINT_TO_POINTER (0);
-}
-
-static void
-object_created_cb (CompEditor *ce, gpointer data)
-{
- GThread *thread = NULL;
- gint response;
- GError *error = NULL;
-
- gtk_widget_hide (GTK_WIDGET (ce));
-
- response = e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel ((GtkWidget *)ce)),
- "org.gnome.evolution.process_meeting:resend-retract",
- NULL);
- if (response == GTK_RESPONSE_NO) {
- free_thread_data (data);
- return;
- }
-
- thread = g_thread_create ((GThreadFunc) retract_object, data , FALSE, &error);
- if (!thread) {
- g_warning (G_STRLOC ": %s", error->message);
- g_error_free (error);
- }
-}
-
-void
-gw_resend_meeting_cb (GtkAction *action, EShellView *shell_view)
-{
- GList *selected;
- ECalendarView *cal_view = get_calendar_view (shell_view);
-
- g_return_if_fail (cal_view != NULL);
-
- selected = e_calendar_view_get_selected_events (cal_view);
- if (selected) {
- ECalendarViewEvent *event = (ECalendarViewEvent *) selected->data;
- ECalComponent *comp;
- ECalComponent *new_comp = NULL;
- gboolean recurring = FALSE;
- CalObjModType mod = CALOBJ_MOD_THIS;
- ThreadData *data = NULL;
- gint response;
- const gchar *msg;
- /* inserting the boolean to share the code between resend and retract */
- gboolean resend = TRUE;
-
- if (!is_comp_data_valid (event))
- return;
-
- comp = e_cal_component_new ();
- e_cal_component_set_icalcomponent (comp, icalcomponent_new_clone (event->comp_data->icalcomp));
- if (e_cal_component_has_recurrences (comp) || e_cal_component_is_instance (comp))
- recurring = TRUE;
-
- if (recurring == TRUE)
- msg = "org.gnome.evolution.process_meeting:resend-recurrence";
- else
- msg = "org.gnome.evolution.process_meeting:resend";
-
- response = e_alert_run_dialog_for_args (GTK_WINDOW (e_shell_view_get_shell_window (shell_view)),
- msg, NULL);
- if (response == GTK_RESPONSE_YES) {
- mod = CALOBJ_MOD_ALL;
- } else if (response == GTK_RESPONSE_CANCEL) {
- g_object_unref (comp);
- return;
- }
-
- data = g_new0 (ThreadData, 1);
- data->client = g_object_ref (event->comp_data->client);
- data->comp = comp;
- data->mod = mod;
-
- if (resend)
- {
- guint flags = 0;
- gchar *new_uid = NULL;
- CompEditor *ce;
- icalcomponent *icalcomp;
-
- flags |= COMP_EDITOR_NEW_ITEM;
- flags |= COMP_EDITOR_MEETING;
- flags |= COMP_EDITOR_USER_ORG;
-
- new_comp = e_cal_component_clone (comp);
- new_uid = e_cal_component_gen_uid ();
- e_cal_component_set_recurid (new_comp, NULL);
- e_cal_component_set_uid (new_comp, new_uid);
- icalcomp = icalcomponent_new_clone (e_cal_component_get_icalcomponent (new_comp));
- ce = e_calendar_view_open_event_with_flags (cal_view, data->client, icalcomp, flags);
-
- g_signal_connect (ce, "object_created", G_CALLBACK (object_created_cb), data);
- g_object_unref (new_comp);
- g_free (new_uid);
- }
- }
-}
diff --git a/plugins/groupwise-features/properties.ui b/plugins/groupwise-features/properties.ui
deleted file mode 100644
index 71cd3909ef..0000000000
--- a/plugins/groupwise-features/properties.ui
+++ /dev/null
@@ -1,756 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkVBox" id="vboxSharing">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vboxSharingOptions">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox186">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="label539">
- <property name="visible">True</property>
- <property name="label" translatable="yes"/>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox190">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkRadioButton" id="radNotShared">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Not Shared</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkRadioButton" id="radShared">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Shared With...</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <property name="group">radNotShared</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox194">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkHBox" id="hbox226">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkVBox" id="vbox195">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkHBox" id="hbox227">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkLabel" id="label557">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Name:</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entry4">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"/>
- <property name="has_frame">True</property>
- <property name="activates_default">False</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="users">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Users:</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="padding">6</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow4">
- <property name="width_request">282</property>
- <property name="height_request">150</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="padding">6</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox196">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkButton" id="Address">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <child>
- <object class="GtkAlignment" id="alignment6">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
- <child>
- <object class="GtkHBox" id="hbox232">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image5">
- <property name="visible">True</property>
- <property name="stock">gtk-jump-to</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label563">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Con_tacts...</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="Add">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
- <child>
- <object class="GtkHBox" id="hbox229">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image3">
- <property name="visible">True</property>
- <property name="stock">gtk-add</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label561">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Add</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="Remove">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <child>
- <object class="GtkAlignment" id="alignment5">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
- <child>
- <object class="GtkHBox" id="hbox230">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image4">
- <property name="visible">True</property>
- <property name="stock">gtk-remove</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label562">
- <property name="visible">True</property>
- <property name="label" translatable="yes">_Remove</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <object class="GtkButton" id="Notification">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <child>
- <object class="GtkAlignment" id="alignment7">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
- <child>
- <object class="GtkHBox" id="hbox233">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image6">
- <property name="visible">True</property>
- <property name="stock">gnome-stock-mail-new</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label564">
- <property name="visible">True</property>
- <property name="label" translatable="yes">C_ustomize notification message</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">11</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <!--<packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>-->
- </object>
-</interface>
-<!--<interface>
- <object class="GtkWindow" id="window1">
- <property name="visible">True</property>
- <property name="title" translatable="yes">Shared Folder Notification</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_CENTER</property>
- <property name="modal">False</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <child>
- <object class="GtkVBox" id="vbox191">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkLabel" id="label551">
- <property name="visible">True</property>
- <property name="label" translatable="yes">The participants will receive the following notification.
-</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.66</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">1</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox223">
- <property name="height_request">309</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">12</property>
- <child>
- <object class="GtkVBox" id="vbox193">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkLabel" id="label553">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Subject</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkEntry" id="entry3">
- <property name="width_request">158</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"/>
- <property name="has_frame">True</property>
- <property name="activates_default">False</property>
- </object>
- <packing>
- <property name="padding">6</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label554">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Message</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_CENTER</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow3">
- <property name="border_width">0</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_IN</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
- <child>
- <object class="GtkTextView" id="textview1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="overwrite">False</property>
- <property name="accepts_tab">True</property>
- <property name="justification">GTK_JUSTIFY_LEFT</property>
- <property name="wrap_mode">GTK_WRAP_NONE</property>
- <property name="cursor_visible">True</property>
- <property name="pixels_above_lines">0</property>
- <property name="pixels_below_lines">0</property>
- <property name="pixels_inside_wrap">0</property>
- <property name="left_margin">0</property>
- <property name="right_margin">0</property>
- <property name="indent">0</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="hbox224">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkLabel" id="label555">
- <property name="visible">True</property>
- <property name="label" translatable="yes"/>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.52</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkHButtonBox" id="hbuttonbox2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkButton" id="nCancel">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal handler="on_nCancel_clicked" last_modification_time="Tue, 23 Nov 2004 10:56:42 GMT" name="clicked"/>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="nOK">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <signal handler="on_nOK_clicked" last_modification_time="Tue, 23 Nov 2004 10:57:50 GMT" name="clicked"/>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
-</interface>-->
diff --git a/plugins/groupwise-features/proxy-add-dialog.ui b/plugins/groupwise-features/proxy-add-dialog.ui
deleted file mode 100644
index 3aafc15ead..0000000000
--- a/plugins/groupwise-features/proxy-add-dialog.ui
+++ /dev/null
@@ -1,730 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkDialog" id="ProxyAccessRights">
- <property name="border_width">8</property>
- <property name="visible">True</property>
- <property name="title" translatable="yes">Add/Edit</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">False</property>
- <property name="destroy_with_parent">True</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="hbuttonbox1">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <object class="GtkButton" id="proxy_help">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-help</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="proxy_cancel">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="proxy_button_ok">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkVBox" id="vbox6">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkFrame" id="frame3">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <object class="GtkAlignment" id="alignment2">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
- <child>
- <object class="GtkTable" id="table4">
- <property name="border_width">1</property>
- <property name="visible">True</property>
- <property name="n_rows">1</property>
- <property name="n_columns">1</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">0</property>
- <property name="column_spacing">0</property>
- <child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">27</property>
- <child>
- <object class="GtkEntry" id="proxy_account_name">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"/>
- <property name="has_frame">True</property>
- <property name="activates_default">False</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkHBox" id="proxy_name_box">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <placeholder/>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="contacts">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <accelerator key="t" modifiers="GDK_MOD1_MASK" signal="clicked"/>
- <accelerator key="T" modifiers="GDK_MOD1_MASK" signal="clicked"/>
- <child>
- <object class="GtkAlignment" id="alignment4">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">0</property>
- <property name="yscale">0</property>
- <property name="top_padding">0</property>
- <property name="bottom_padding">0</property>
- <property name="left_padding">0</property>
- <property name="right_padding">0</property>
- <child>
- <object class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">2</property>
- <child>
- <object class="GtkImage" id="image1">
- <property name="visible">True</property>
- <property name="stock">gtk-jump-to</property>
- <property name="icon_size">4</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Con_tacts</property>
- <property name="use_underline">True</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label13">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Name</property>
- <property name="use_underline">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame4">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_OUT</property>
- <child>
- <object class="GtkAlignment" id="alignment3">
- <property name="visible">True</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xscale">1</property>
- <property name="yscale">1</property>
- <property name="top_padding">2</property>
- <property name="bottom_padding">7</property>
- <property name="left_padding">12</property>
- <property name="right_padding">0</property>
- <child>
- <object class="GtkVBox" id="vbox7">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">5</property>
- <child>
- <object class="GtkTable" id="table5">
- <property name="visible">True</property>
- <property name="n_rows">4</property>
- <property name="n_columns">3</property>
- <property name="homogeneous">False</property>
- <property name="row_spacing">8</property>
- <property name="column_spacing">43</property>
- <child>
- <object class="GtkLabel" id="label15">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Mail</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label16">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Appointments</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label17">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Reminder Notes</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkLabel" id="label18">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Tasks</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="right_attach">1</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="mailRead">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property comments="To Translators: strip the part in front of the | and the | itself" context="yes" name="label" translatable="yes">permission to read|_Read</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="r" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="appRead">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property comments="To Translators: strip the part in front of the | and the | itself" context="yes" name="label" translatable="yes">permission to read|_Read</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="r" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="noteRead">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property comments="To Translators: strip the part in front of the | and the | itself" context="yes" name="label" translatable="yes">permission to read|_Read</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="r" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="taskRead">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property comments="To Translators: strip the part in front of the | and the | itself" context="yes" name="label" translatable="yes">permission to read|_Read</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="r" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="right_attach">2</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="mailWrite">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Write</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="w" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="W" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">0</property>
- <property name="bottom_attach">1</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="appWrite">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Write</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="w" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="W" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">1</property>
- <property name="bottom_attach">2</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="noteWrite">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Write</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="w" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="W" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">2</property>
- <property name="bottom_attach">3</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="taskWrite">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">_Write</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="w" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="W" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="right_attach">3</property>
- <property name="top_attach">3</property>
- <property name="bottom_attach">4</property>
- <property name="x_options">fill</property>
- <property name="y_options"/>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">6</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox8">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">7</property>
- <child>
- <object class="GtkCheckButton" id="alarms">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Subscribe to my _alarms</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="a" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="A" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="notifications">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Subscribe to my _notifications</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="n" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="N" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="modify_rules">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Modify _folders/options/rules/</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="r" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="R" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkCheckButton" id="read_private">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label" translatable="yes">Read items marked _private</property>
- <property name="use_underline">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- <property name="active">False</property>
- <property name="inconsistent">False</property>
- <property name="draw_indicator">True</property>
- <accelerator key="p" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- <accelerator key="P" modifiers="GDK_MOD1_MASK" signal="grab_focus"/>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label14">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Access Rights</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">9</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-11">proxy_help</action-widget>
- <action-widget response="-6">proxy_cancel</action-widget>
- <action-widget response="-5">proxy_button_ok</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/plugins/groupwise-features/proxy-listing.ui b/plugins/groupwise-features/proxy-listing.ui
deleted file mode 100644
index e0615cc658..0000000000
--- a/plugins/groupwise-features/proxy-listing.ui
+++ /dev/null
@@ -1,153 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkVBox" id="proxy_vbox">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkNotebook" id="notebook1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="show_tabs">True</property>
- <property name="show_border">True</property>
- <property name="tab_pos">GTK_POS_TOP</property>
- <property name="scrollable">True</property>
- <property name="enable_popup">False</property>
- <child>
- <object class="GtkVBox" id="proxy_vbox2">
- <property name="border_width">12</property>
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkHBox" id="hbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
- <child>
- <object class="GtkTreeView" id="proxy_access_list">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">5</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- <child>
- <object class="GtkVBox" id="vbox5">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">6</property>
- <child>
- <object class="GtkButton" id="add_proxy">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-add</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- <packing>
- <property name="padding">6</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="edit_proxy">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-edit</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="remove_proxy">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-remove</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- <packing>
- <property name="padding">4</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">5</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="tab_expand">False</property>
- <property name="tab_fill">True</property>
- </packing>
- </child>
- <child type="tab">
- <object class="GtkLabel" id="label1">
- <property name="visible">True</property>
- <property comments="To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a GroupWise feature by which one person can send/read mails/appointments using another person's identity without knowing his password, for example if that other person is on vacation" name="label" translatable="yes">Proxy</property>
- <property name="use_underline">False</property>
- <property name="use_markup">False</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
-</interface>
diff --git a/plugins/groupwise-features/proxy-login-dialog.ui b/plugins/groupwise-features/proxy-login-dialog.ui
deleted file mode 100644
index 341c63f832..0000000000
--- a/plugins/groupwise-features/proxy-login-dialog.ui
+++ /dev/null
@@ -1,191 +0,0 @@
-<?xml version="1.0"?>
-<!--*- mode: xml -*-->
-<interface>
- <object class="GtkDialog" id="proxy_login_dialog">
- <property name="visible">True</property>
- <property name="height_request">325</property>
- <property comments="To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a GroupWise feature by which one person can send/read mails/appointments using another person's identity without knowing his password, for example if that other person is on vacation" name="title" translatable="yes">Proxy Login</property>
- <property name="type">GTK_WINDOW_TOPLEVEL</property>
- <property name="window_position">GTK_WIN_POS_NONE</property>
- <property name="modal">True</property>
- <property name="resizable">True</property>
- <property name="destroy_with_parent">False</property>
- <property name="decorated">True</property>
- <property name="skip_taskbar_hint">False</property>
- <property name="skip_pager_hint">False</property>
- <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
- <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
- <property name="focus_on_map">True</property>
- <child internal-child="vbox">
- <object class="GtkVBox" id="dialog-vbox2">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child internal-child="action_area">
- <object class="GtkHButtonBox" id="dialog-action_area2">
- <property name="visible">True</property>
- <property name="layout_style">GTK_BUTTONBOX_END</property>
- <child>
- <object class="GtkButton" id="proxy_help">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-help</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="proxy_cancel">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-cancel</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- </child>
- <child>
- <object class="GtkButton" id="proxy_login">
- <property name="visible">True</property>
- <property name="can_default">True</property>
- <property name="can_focus">True</property>
- <property name="label">gtk-ok</property>
- <property name="use_stock">True</property>
- <property name="relief">GTK_RELIEF_NORMAL</property>
- <property name="focus_on_click">True</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">True</property>
- <property name="pack_type">GTK_PACK_END</property>
- </packing>
- </child>
- <child>
- <object class="GtkFrame" id="frame3">
- <property name="visible">True</property>
- <property name="label_xalign">0</property>
- <property name="label_yalign">0.5</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <child>
- <object class="GtkVBox" id="vd1">
- <property name="border_width">4</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkHBox" id="hbox1">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkHBox" id="auto_complete">
- <property name="visible">True</property>
- <property name="homogeneous">False</property>
- <property name="spacing">0</property>
- <child>
- <object class="GtkEntry" id="account_name">
- <property name="width_request">250</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="editable">True</property>
- <property name="visibility">True</property>
- <property name="max_length">0</property>
- <property name="text" translatable="yes"/>
- <property name="has_frame">True</property>
- <property name="activates_default">False</property>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- </object>
- <packing>
- <property name="padding">5</property>
- <property name="expand">False</property>
- <property name="fill">False</property>
- </packing>
- </child>
- <child>
- <object class="GtkScrolledWindow" id="scrolledwindow1">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="hscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="vscrollbar_policy">GTK_POLICY_AUTOMATIC</property>
- <property name="shadow_type">GTK_SHADOW_NONE</property>
- <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
- <child>
- <object class="GtkTreeView" id="proxy_login_treeview">
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="headers_visible">False</property>
- <property name="rules_hint">False</property>
- <property name="reorderable">False</property>
- <property name="enable_search">True</property>
- <property name="fixed_height_mode">False</property>
- <property name="hover_selection">False</property>
- <property name="hover_expand">False</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">0</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- <child type="label">
- <object class="GtkLabel" id="label2">
- <property name="visible">True</property>
- <property name="label" translatable="yes">Account Name</property>
- <property name="use_underline">False</property>
- <property name="use_markup">True</property>
- <property name="justify">GTK_JUSTIFY_LEFT</property>
- <property name="wrap">False</property>
- <property name="selectable">False</property>
- <property name="xalign">0.5</property>
- <property name="yalign">0.5</property>
- <property name="xpad">0</property>
- <property name="ypad">0</property>
- <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
- <property name="width_chars">-1</property>
- <property name="single_line_mode">False</property>
- <property name="angle">0</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- </child>
- </object>
- <packing>
- <property name="padding">5</property>
- <property name="expand">True</property>
- <property name="fill">True</property>
- </packing>
- </child>
- </object>
- </child>
- <action-widgets>
- <action-widget response="-11">proxy_help</action-widget>
- <action-widget response="-6">proxy_cancel</action-widget>
- <action-widget response="-5">proxy_login</action-widget>
- </action-widgets>
- </object>
-</interface>
diff --git a/plugins/groupwise-features/proxy-login.c b/plugins/groupwise-features/proxy-login.c
deleted file mode 100644
index 55d4ecff36..0000000000
--- a/plugins/groupwise-features/proxy-login.c
+++ /dev/null
@@ -1,563 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Shreyas Srinivasan <sshreyas@novell.com>
- * Sankar P <psankar@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <glib/gi18n.h>
-
-#include <libedataserverui/e-passwords.h>
-#include <mail/em-folder-tree.h>
-#include <mail/e-mail-backend.h>
-#include <mail/e-mail-store.h>
-#include <mail/em-folder-selector.h>
-#include <mail/em-account-editor.h>
-#include <mail/mail-ops.h>
-#include <libedataserver/e-account.h>
-#include <e-util/e-util.h>
-#include <e-util/e-alert-dialog.h>
-#include <e-util/e-icon-factory.h>
-#include <e-util/e-util-private.h>
-#include <e-util/e-account-utils.h>
-#include <shell/e-shell-view.h>
-#include <calendar/gui/itip-utils.h>
-
-#include <e-gw-container.h>
-#include <e-gw-connection.h>
-#include <e-gw-message.h>
-#include <libedataserverui/e-name-selector.h>
-
-#include "gw-ui.h"
-#include "proxy-login.h"
-
-#define GW(name) e_builder_get_widget (priv->builder, name)
-
-#define ACCOUNT_PICTURE 0
-#define ACCOUNT_NAME 1
-
-proxyLogin *pld = NULL;
-static GObjectClass *parent_class = NULL;
-
-struct _proxyLoginPrivate {
- /* UI data for the Add/Edit Proxy dialog*/
- GtkBuilder *builder;
- /* Widgets */
- GtkWidget *main;
-
- /*Tree Store*/
- GtkTreeStore *store;
- /*Tree View*/
- GtkTreeView *tree;
-
- gchar *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->builder);
- 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->builder = 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 gint
-proxy_get_password (EAccount *account, gchar **user_name, gchar **password)
-{
- const gchar *failed_auth;
- gchar *uri, *key, *prompt;
- CamelURL *url;
- const gchar *poa_address, *use_ssl = NULL, *soap_port;
-
- url = camel_url_new (account->source->url, NULL);
- if (url == NULL)
- return 0;
- *user_name = g_strdup (url->user);
- poa_address = url->host;
- if (!poa_address || strlen (poa_address) ==0)
- return 0;
-
- 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 (use_ssl && !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, GtkWindow *password_dlg_parrent)
-{
- EGwConnection *cnc;
- CamelURL *url;
- const gchar *failed_auth;
- gchar *uri = NULL, *key = NULL, *prompt = NULL, *password = NULL;
- const gchar *use_ssl = NULL, *soap_port;
- gboolean remember;
-
- 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 (use_ssl && !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);
-
- if (!password)
- password = e_passwords_ask_password (prompt, "Groupwise", key, prompt,
- E_PASSWORDS_REMEMBER_FOREVER|E_PASSWORDS_SECRET, &remember, password_dlg_parrent);
-
- 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")) {
- gchar *http_uri = g_strconcat ("http://", uri + 8, NULL);
- cnc = e_gw_connection_new (http_uri, url->user, password);
- g_free (http_uri);
- }
-
- g_free (key);
- g_free (password);
- g_free (uri);
- camel_url_free (url);
-
- return cnc;
-}
-
-static void
-proxy_login_cb (GtkDialog *dialog, gint state, GtkWindow *parent)
-{
- GtkWidget *account_name_tbox;
- proxyLoginPrivate *priv;
- gchar *proxy_name;
-
- priv = pld->priv;
- account_name_tbox = e_builder_get_widget (priv->builder, "account_name");
- proxy_name = g_strdup ((gchar *) gtk_entry_get_text ((GtkEntry *) account_name_tbox));
-
- switch (state) {
- case GTK_RESPONSE_OK:
- gtk_widget_destroy (priv->main);
- proxy_soap_login (proxy_name, parent);
- 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 (gchar *email, GtkWindow *error_parent)
-{
- EAccountList *accounts = e_get_account_list ();
- EAccount *srcAccount;
- EAccount *dstAccount;
- EShell *shell;
- EShellBackend *shell_backend;
- EMailSession *session;
- EGwConnection *proxy_cnc, *cnc;
- CamelURL *uri = NULL, *parent = NULL;
- gchar *password = NULL, *user_name = NULL;
- gchar *proxy_source_url = NULL, *parent_source_url = NULL;
- gchar *name;
- gint i;
- gint permissions = 0;
-
- shell = e_shell_get_default ();
- shell_backend = e_shell_get_backend_by_name (shell, "mail");
- session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
-
- for (i=0; email[i]!='\0' && email[i]!='@' ; i++);
- if (email[i]=='@')
- name = g_strndup (email, i);
- else {
- e_alert_run_dialog_for_args (error_parent,
- "org.gnome.evolution.proxy-login:invalid-user",
- email, NULL);
- return;
- }
-
- /* README: There should not be the weird scenario of the proxy itself configured as an account.
- If so, it is violating the (li)unix philosophy of User creation. So dont care about that scenario*/
-
- if (itip_address_is_user (email)) {
- e_alert_run_dialog_for_args (error_parent,
- "org.gnome.evolution.proxy-login:already-loggedin",
- email, NULL);
- g_free (name);
- return;
- }
-
- srcAccount = pld->account;
- 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);
-
- if (proxy_cnc) {
- CamelService *service;
-
- 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", GINT_TO_POINTER(permissions));
-
- service = camel_session_get_service (
- CAMEL_SESSION (session), dstAccount->uid);
- if (CAMEL_IS_STORE (service))
- proxy_login_add_new_store (
- CAMEL_STORE (service), dstAccount);
-
- g_free (proxy_source_url);
- g_free (parent_source_url);
- camel_url_free (parent);
- } else {
- e_alert_run_dialog_for_args (error_parent,
- "org.gnome.evolution.proxy-login:invalid-user",
- email, NULL);
- return;
- }
-
- g_object_unref (cnc);
- g_free (name);
- g_free (user_name);
- g_free (password);
-}
-
-static void
-proxy_login_add_new_store (CamelStore *store,
- EAccount *account)
-{
- EShell *shell;
- EShellBackend *shell_backend;
- EMailSession *session;
- gint permissions = GPOINTER_TO_INT(g_object_get_data ((GObject *)account, "permissions"));
-
- shell = e_shell_get_default ();
- shell_backend = e_shell_get_backend_by_name (shell, "mail");
- session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
-
- if (store == NULL)
- return;
-
- if (!(permissions & E_GW_PROXY_MAIL_WRITE))
- store->mode &= !CAMEL_STORE_WRITE;
-
- store->flags |= CAMEL_STORE_PROXY;
- e_mail_store_add (session, 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;
- gchar *account_mailid;
-
- account_select = gtk_tree_view_get_selection (GTK_TREE_VIEW (priv->tree));
- gtk_tree_selection_get_selected (account_select, &model, &iter);
- /* FIXME Find a different way to check whatever this is checking. */
- /*if ((priv->store)->stamp != (&iter)->stamp)
- return;*/
- gtk_tree_model_get (model, &iter, ACCOUNT_NAME, &account_mailid, -1);
- account_mailid = g_strrstr (account_mailid, "\n") + 1;
- account_name_tbox = e_builder_get_widget (priv->builder, "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", G_CALLBACK(proxy_login_tree_view_changed_cb), NULL);
-}
-
-static void
-proxy_login_update_tree (void)
-{
- GtkTreeIter iter;
- gint i,n;
- GdkPixbuf *broken_image = NULL;
- GList *proxy_list = NULL;
- gchar *proxy_name;
- gchar *proxy_email;
- EGwConnection *cnc;
- proxyLoginPrivate *priv = pld->priv;
- gchar *file_name = e_icon_factory_get_icon_filename ("avatar-default", GTK_ICON_SIZE_DIALOG);
- broken_image = file_name ? gdk_pixbuf_new_from_file (file_name, NULL) : NULL;
-
- 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) {
- n = g_list_length (proxy_list);
- for (i=0;i<n;i=i+2) {
- proxy_name = g_list_nth_data (proxy_list,i);
- proxy_email = g_list_nth_data (proxy_list,i+1);
- gtk_tree_store_append (priv->store, &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));
- }
-
- g_free (file_name);
- if (broken_image)
- g_object_unref (broken_image);
-
- if (cnc)
- g_object_unref (cnc);
-}
-
-void
-gw_proxy_login_cb (GtkAction *action, EShellView *shell_view)
-{
- EShellSidebar *shell_sidebar;
- EMFolderTree *folder_tree = NULL;
- GtkTreeSelection *selection;
- GtkTreeModel *model = NULL;
- GtkTreeIter iter;
- GtkWidget *tbox_account_name;
- CamelStore *store;
- EAccount *account;
- gboolean is_store = FALSE;
- proxyLoginPrivate *priv;
- EGwConnection *cnc;
- const gchar *uid;
-
- shell_sidebar = e_shell_view_get_shell_sidebar (shell_view);
- g_object_get (shell_sidebar, "folder-tree", &folder_tree, NULL);
- g_return_if_fail (folder_tree != NULL);
-
- selection = gtk_tree_view_get_selection (GTK_TREE_VIEW (folder_tree));
- g_return_if_fail (selection != NULL);
-
- if (!gtk_tree_selection_get_selected (selection, &model, &iter))
- return;
-
- gtk_tree_model_get (
- model, &iter,
- COL_POINTER_CAMEL_STORE, &store,
- COL_BOOL_IS_STORE, &is_store, -1);
-
- if (!is_store)
- return;
-
- uid = camel_service_get_uid (CAMEL_SERVICE (store));
- account = e_get_account_by_uid (uid);
-
- /* This pops-up the password dialog in case the User has forgot-passwords explicitly */
- cnc = proxy_login_get_cnc (account, NULL);
- if (cnc)
- g_object_unref (cnc);
-
- pld = proxy_login_new ();
- priv = pld->priv;
-
- priv->builder = gtk_builder_new ();
- e_load_ui_builder_definition (priv->builder, "proxy-login-dialog.ui");
-
- priv->main = e_builder_get_widget (priv->builder, "proxy_login_dialog");
- pld->account = account;
- priv->tree = GTK_TREE_VIEW (e_builder_get_widget (priv->builder, "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 ();
- tbox_account_name = e_builder_get_widget (priv->builder, "account_name");
- gtk_widget_grab_focus (tbox_account_name);
- g_signal_connect (GTK_DIALOG (priv->main), "response", G_CALLBACK(proxy_login_cb), e_shell_view_get_shell_window (shell_view));
- gtk_widget_show (GTK_WIDGET (priv->main));
-}
diff --git a/plugins/groupwise-features/proxy-login.h b/plugins/groupwise-features/proxy-login.h
deleted file mode 100644
index 496e0cb1c1..0000000000
--- a/plugins/groupwise-features/proxy-login.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Shreyas Srinivasan <sshreyas@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#include <gtk/gtk.h>
-
-#define TYPE_PROXY_LOGIN (proxy_login_get_type ())
-#define PROXY_LOGIN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROXY_LOGIN, proxyLogin))
-#define PROXY_LOGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROXY_LOGIN, proxyLoginClass))
-#define IS_PROXY_LOGIN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROXY_LOGIN))
-#define IS_PROXY_LOGIN_CLASS(klass) (G_TYPE_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_add_new_store (CamelStore *store, EAccount *account);
-static void proxy_login_setup_tree_view (void);
-proxyLogin* proxy_dialog_new (void);
-static void proxy_soap_login (gchar *email, GtkWindow *error_parent);
-gchar *parse_email_for_name (gchar *email);
-static void proxy_login_update_tree (void);
-static void proxy_login_tree_view_changed_cb (GtkDialog *dialog);
-static gint proxy_get_password (EAccount *account, gchar **user_name, gchar **password);
diff --git a/plugins/groupwise-features/proxy.c b/plugins/groupwise-features/proxy.c
deleted file mode 100644
index 1db29531e6..0000000000
--- a/plugins/groupwise-features/proxy.c
+++ /dev/null
@@ -1,1034 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Shreyas Srinivasan <sshreyas@novell.com>
- * Sankar P <psankar@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <stdlib.h>
-#include <glib/gi18n.h>
-
-#include <libedataserverui/e-contact-store.h>
-
-#include <e-util/e-util.h>
-#include <e-util/e-alert-dialog.h>
-#include <e-util/e-util-private.h>
-#include <e-gw-container.h>
-#include <e-gw-connection.h>
-#include <e-gw-message.h>
-
-#include <mail/em-account-editor.h>
-#include <mail/em-config.h>
-#include <mail/mail-ops.h>
-#include <mail/e-mail-backend.h>
-#include <shell/e-shell.h>
-#include <libedataserver/e-account.h>
-#include <libedataserver/e-account-list.h>
-#include <e-util/e-icon-factory.h>
-
-#include <libedataserverui/e-passwords.h>
-#include <libedataserverui/e-name-selector.h>
-#include <proxy.h>
-#include <string.h>
-
-#define GW(name) e_builder_get_widget (priv->builder, name)
-
-#define ACCOUNT_PICTURE 0
-#define ACCOUNT_NAME 1
-#define PROXY_ADD_DIALOG 2
-#define PROXY_EDIT_DIALOG 3
-
-static GObjectClass *parent_class = NULL;
-
-static gboolean proxy_page_changed_cb (GtkNotebook *notebook, GtkWidget *page, gint num, EAccount *account);
-
-struct _proxyDialogPrivate {
- /* UI data for the Add/Edit Proxy dialog*/
- GtkBuilder *builder;
- /* UI data for Proxy Tab*/
- GtkBuilder *builder_tab;
-
- /* Widgets */
- GtkWidget *main;
-
- /*name selector dialog*/
- ENameSelector *proxy_name_selector;
-
- GtkTreeView *tree;
- GtkTreeStore *store;
-
- /* Check Boxes for storing proxy priveleges*/
- GtkWidget *tab_dialog;
- 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;
- gchar *help_section;
-
- GList *proxy_list;
-};
-
-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;
-}
-
-void
-free_proxy_list (GList *proxy_list)
-{
- if (proxy_list) {
- g_list_foreach (proxy_list, (GFunc) free_proxy_handler, NULL);
- g_list_free (proxy_list);
- proxy_list = 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);
-
- if (priv) {
- free_proxy_list (priv->proxy_list);
- g_free (priv->help_section);
- g_object_unref (priv->builder_tab);
- g_free (prd->priv);
- prd->priv = NULL;
- }
-
- prd = 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;
-
- prd->cnc = NULL;
- priv->tab_dialog = NULL;
- priv->builder = NULL;
- priv->builder_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;
-
- priv->proxy_list = 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 gint
-proxy_get_permissions_from_dialog (EAccount *account)
-{
- gint 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 gint
-proxy_dialog_store_widgets_data (EAccount *account, gint32 dialog, GtkWindow *parent)
-{
- GtkTreeIter iter;
- GtkTreeSelection* account_select;
- GtkTreeModel *model;
- proxyHandler *new_proxy = NULL;
- proxyDialogPrivate *priv;
- gchar *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;
- gchar *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_alert_run_dialog_for_args (parent,
- "org.gnome.evolution.proxy:no-user",
- NULL, NULL);
- return -1;
- }
-
- for (; tmp != NULL; tmp = g_list_next (tmp)) {
- email = NULL;
- email = (gchar *)e_destination_get_email (tmp->data);
-
- if (g_str_equal(email, ""))
- continue;
-
- if (g_strrstr (email, "@") == NULL) {
- e_alert_run_dialog_for_args (parent,
- "org.gnome.evolution.proxy:invalid-user",
- email, NULL);
- return -1;
- }
- if (!g_ascii_strcasecmp (e_gw_connection_get_user_email (prd->cnc), email)) {
- e_alert_run_dialog_for_args (parent,
- "org.gnome.evolution.proxy:invalid-user",
- email, NULL);
- return -1;
- }
-
- /*check whether already exists*/
- existing_list = priv->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)) {
- 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_alert_run_dialog_for_args (parent,
- "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 = (gchar *) e_destination_get_email (tmp->data);
-
- if (g_str_equal(email, ""))
- continue;
-
- name = (gchar *) e_destination_get_name (tmp->data);
- new_proxy = (proxyHandler *) g_malloc0 (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);
-
- priv->proxy_list = g_list_append (priv->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, GtkWindow *parent_window)
-{
- EGwConnection *cnc;
- const gchar *failed_auth;
- gchar *uri, *key, *prompt, *password = NULL;
- CamelURL *url;
- const gchar *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 (use_ssl && !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, parent_window);
- 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")) {
- gchar *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;
-
- target_account = (EMConfigTargetAccount *)data->config->target;
- account = target_account->modified_account;
- prd = g_object_get_data ((GObject *)account, "prd");
-
- if (!prd || !prd->priv || !prd->priv->proxy_list)
- return;
-
- g_object_unref (prd);
- prd = NULL;
-}
-
-void
-proxy_commit (GtkWidget *button, EConfigHookItemFactoryData *data)
-{
- EAccount *account;
- EMConfigTargetAccount *target_account;
- proxyDialogPrivate *priv;
- GList *list_iter;
- proxyHandler *aclInstance;
- proxyDialog *prd = NULL;
-
- target_account = (EMConfigTargetAccount *)data->config->target;
- account = target_account->modified_account;
- prd = g_object_get_data ((GObject *)account, "prd");
-
- /* In case of non-GroupWise preferences edit, "prd" will be NULL. */
- if (!prd || !prd->priv || !prd->priv->proxy_list)
- return;
-
- priv = prd->priv;
- list_iter = priv->proxy_list;
- for (;list_iter; list_iter = g_list_next (list_iter)) {
- aclInstance = (proxyHandler *) list_iter->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, GTK_WINDOW (gtk_widget_get_toplevel (button)));
-
- if (aclInstance->flags & E_GW_PROXY_NEW )
- e_gw_connection_add_proxy (prd->cnc, aclInstance);
-
- 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)
- e_gw_connection_modify_proxy (prd->cnc, aclInstance);
- }
- }
-
- g_object_unref (prd);
- prd = NULL;
-}
-
-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 *list_iter;
- proxyHandler *aclInstance;
- gchar *file_name = e_icon_factory_get_icon_filename ("avatar-default", GTK_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);
- list_iter = priv->proxy_list;
-
- for (;list_iter; list_iter = g_list_next (list_iter)) {
- aclInstance = (proxyHandler *) list_iter->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);
- }
- }
-
- g_free (file_name);
- if (broken_image)
- g_object_unref (broken_image);
-
- /*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;
- EShell *shell;
- EShellBackend *shell_backend;
- EMailSession *session;
- EAccount *account;
- GtkButton *addProxy, *removeProxy, *editProxy;
- proxyDialog *prd;
- proxyDialogPrivate *priv;
- CamelOfflineStore *store;
- gint pag_num;
-
- shell = e_shell_get_default ();
- shell_backend = e_shell_get_backend_by_name (shell, "mail");
- session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
-
- target_account = (EMConfigTargetAccount *)data->config->target;
- account = target_account->modified_account;
- /* We are using some g_object_set on this. We shuold also avoid double-free later. So reffing */
- g_object_ref (account);
-
- store = (CamelOfflineStore *) camel_session_get_service (
- CAMEL_SESSION (session), account->uid);
- if (store == NULL)
- return NULL;
-
- if (g_strrstr (e_account_get_string(account, E_ACCOUNT_SOURCE_URL), "groupwise://"))
- {
- prd = proxy_dialog_new ();
- g_object_set_data_full ((GObject *) account, "prd", prd, (GDestroyNotify) g_object_unref);
- priv = prd->priv;
-
- priv->builder_tab = gtk_builder_new ();
- e_load_ui_builder_definition (priv->builder_tab, "proxy-listing.ui");
-
- if (account->enabled && camel_offline_store_get_online (store)) {
- priv->tab_dialog = GTK_WIDGET (e_builder_get_widget (priv->builder_tab, "proxy_vbox"));
- priv->tree = GTK_TREE_VIEW (e_builder_get_widget (priv->builder_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 *) e_builder_get_widget (priv->builder_tab, "add_proxy");
- removeProxy = (GtkButton *) e_builder_get_widget (priv->builder_tab, "remove_proxy");
- editProxy = (GtkButton *) e_builder_get_widget (priv->builder_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);
-
- priv->proxy_list = NULL;
- } else if (account->enabled) {
- GtkWidget *label;
- priv->tab_dialog = gtk_vbox_new (TRUE, 10);
- /*To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a GroupWise feature by which one person can send/read mails/appointments using another person's identity without knowing his password, for example if that other person is on vacation*/
- label = gtk_label_new (_("The Proxy tab will be available only when the account is online."));
- gtk_box_pack_start ((GtkBox *)priv->tab_dialog, label, TRUE, TRUE, 10);
- } else {
- GtkWidget *label;
- priv->tab_dialog = gtk_vbox_new (TRUE, 10);
- /*To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a GroupWise feature by which one person can send/read mails/appointments using another person's identity without knowing his password, for example if that other person is on vacation*/
- label = gtk_label_new (_("The Proxy tab will be available only when the account is enabled."));
- gtk_box_pack_start ((GtkBox *)priv->tab_dialog, label, TRUE, TRUE, 10);
- }
-
- /*To Translators: In this case, Proxy does not mean something like 'HTTP Proxy', but a GroupWise feature by which one person can send/read mails/appointments using another person's identity without knowing his password, for example if that other person is on vacation*/
- gtk_notebook_append_page ((GtkNotebook *)(data->parent), (GtkWidget *)priv->tab_dialog, gtk_label_new (C_("GW", "Proxy")));
- g_signal_connect ((GtkNotebook *)(data->parent), "switch-page", G_CALLBACK (proxy_page_changed_cb), account);
- pag_num = gtk_notebook_page_num ((GtkNotebook *)(data->parent), (GtkWidget *)priv->tab_dialog);
- g_object_set_data ((GObject *) account, "proxy_tab_num", GINT_TO_POINTER (pag_num));
- gtk_widget_show_all (priv->tab_dialog);
- } else if (!g_strrstr (e_account_get_string(account, E_ACCOUNT_SOURCE_URL), "groupwise://")) {
- prd = g_object_get_data ((GObject *) account, "prd");
-
- if (prd) {
- priv = prd->priv;
-
- if (priv) {
- pag_num = gtk_notebook_page_num ( (GtkNotebook *)(data->parent), (GtkWidget *) priv->tab_dialog);
- gtk_notebook_remove_page ( (GtkNotebook *)(data->parent), pag_num);
- }
- }
- }
-
- return NULL;
-}
-
-static gboolean
-proxy_page_changed_cb (GtkNotebook *notebook, GtkWidget *page, gint num, EAccount *account)
-{
- proxyDialog *prd;
- proxyDialogPrivate *priv;
- gpointer val;
- gint pg_num;
- GList *list_iter;
- proxyHandler *aclInstance;
-
- if (g_strrstr (e_account_get_string(account, E_ACCOUNT_SOURCE_URL), "groupwise://")) {
-
- prd = g_object_get_data ((GObject *) account, "prd");
-
- if (!prd || !prd->priv)
- return TRUE;
-
- val = g_object_get_data ((GObject *) account, "proxy_tab_num");
-
- if (!val)
- return FALSE;
-
- 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 (e_gw_connection_get_proxy_access_list (prd->cnc, &priv->proxy_list)!= E_GW_CONNECTION_STATUS_OK)
- return FALSE;
-
- list_iter = priv->proxy_list;
-
- for (;list_iter; list_iter = g_list_next (list_iter)) {
- aclInstance = (proxyHandler *) list_iter->data;
-
- /* NOTE: All User Access is not supported */
- if (!g_ascii_strcasecmp (aclInstance->proxy_name, "<All User Access>")) {
- priv->proxy_list = g_list_delete_link (priv->proxy_list, list_iter);
- break;
- }
- }
-
- proxy_update_tree_view (account);
- return TRUE;
- }
- }
-
- return FALSE;
-}
-
-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->builder);
-}
-
-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, GTK_WINDOW (gtk_widget_get_toplevel (button))) < 0)
- return;
-
- proxy_update_tree_view (account);
- gtk_widget_destroy (priv->main);
- g_object_unref (priv->builder);
-}
-
-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, GTK_WINDOW (gtk_widget_get_toplevel (button))) < 0)
- return;
-
- proxy_update_tree_view (account);
- gtk_widget_destroy (priv->main);
- g_object_unref (priv->builder);
-}
-
-static proxyHandler *
-proxy_get_item_from_list (EAccount *account, gchar *account_name)
-{
- proxyDialogPrivate *priv;
- proxyDialog *prd = NULL;
- GList *list_iter;
- proxyHandler *iter;
-
- prd = g_object_get_data ((GObject *)account, "prd");
- priv = prd->priv;
- list_iter = priv->proxy_list;
-
- for (;list_iter; list_iter = g_list_next (list_iter)) {
- iter = (proxyHandler *) list_iter->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;
- gchar *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;
-
- prd = g_object_get_data ((GObject *)account, "prd");
- priv = prd->priv;
- e_name_selector_show_dialog (priv->proxy_name_selector, priv->main);
-}
-
-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->builder = gtk_builder_new ();
- e_load_ui_builder_definition (priv->builder, "proxy-add-dialog.ui");
-
- proxy_dialog_initialize_widgets (account);
- priv->main = e_builder_get_widget (priv->builder, "ProxyAccessRights");
- okButton = (GtkButton *) e_builder_get_widget (priv->builder,"proxy_button_ok");
- contacts = (GtkButton *) e_builder_get_widget (priv->builder,"contacts");
- cancel = (GtkButton *) e_builder_get_widget (priv->builder,"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 = e_builder_get_widget (priv->builder, "proxy_account_name");
- name_box = e_builder_get_widget (priv->builder, "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;
- gchar *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->builder = gtk_builder_new ();
- e_load_ui_builder_definition (priv->builder, "proxy-add-dialog.ui");
-
- priv->main = e_builder_get_widget (priv->builder, "ProxyAccessRights");
- proxy_dialog_initialize_widgets (account);
- okButton = (GtkButton *) e_builder_get_widget (priv->builder,"proxy_button_ok");
- proxyCancel = (GtkButton *) e_builder_get_widget (priv->builder,"proxy_cancel");
- contacts = e_builder_get_widget (priv->builder, "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/groupwise-features/proxy.h b/plugins/groupwise-features/proxy.h
deleted file mode 100644
index 5dc1bb47e6..0000000000
--- a/plugins/groupwise-features/proxy.h
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Shreyas Srinivasan <sshreyas@novell.com>
- * Sankar P <psankar@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#include <libedataserver/e-account.h>
-#include <gtk/gtk.h>
-
-#define TYPE_PROXY_DIALOG (proxy_dialog_get_type ())
-#define PROXY_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), TYPE_PROXY_DIALOG, proxyDialog))
-#define PROXY_DIALOG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_PROXY_DIALOG, proxyDialogClass))
-#define IS_PROXY_DIALOG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TYPE_PROXY_DIALOG))
-#define IS_PROXY_DIALOG_CLASS(klass) (G_TYPE_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);
-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, gchar *account_name);
-static void proxy_load_edit_dialog (EAccount *account, proxyHandler *edited);
-void free_proxy_list (GList *proxy_list);
diff --git a/plugins/groupwise-features/send-options.c b/plugins/groupwise-features/send-options.c
deleted file mode 100644
index 1e6ef396c3..0000000000
--- a/plugins/groupwise-features/send-options.c
+++ /dev/null
@@ -1,567 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Chenthill Palanisamy <pchenthill@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
-#include <string.h>
-#include <glib/gi18n.h>
-#include <gtk/gtk.h>
-#include "mail/em-account-editor.h"
-#include "mail/em-config.h"
-#include "libedataserver/e-account.h"
-#include <misc/e-send-options.h>
-#include <mail/em-config.h>
-#include <e-gw-connection.h>
-#include <libecal/e-cal-time-util.h>
-#include <libedataserver/e-source-list.h>
-#include <libedataserverui/e-passwords.h>
-
-ESendOptionsDialog *sod = NULL;
-GtkWidget *parent;
-EGwConnection *n_cnc;
-EGwSendOptions *opts = NULL;
-gboolean changed = FALSE;
-EAccount *account;
-
-GtkWidget* org_gnome_send_options (EPlugin *epl, EConfigHookItemFactoryData *data);
-void send_options_commit (EPlugin *epl, EConfigHookItemFactoryData *data);
-void send_options_changed (EPlugin *epl, EConfigHookItemFactoryData *data);
-void send_options_abort (EPlugin *epl, EConfigHookItemFactoryData *data);
-
-static EGwConnection *
-get_cnc (GtkWindow *parent_window)
-{
- EGwConnection *cnc;
- const gchar *failed_auth;
- gchar *uri, *key, *prompt, *password = NULL;
- CamelURL *url;
- const gchar *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 (use_ssl && !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, parent_window);
- 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")) {
- gchar *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;
-}
-
-static void
-e_send_options_load_general_opts (ESendOptionsGeneral *gopts,
- EGwSendOptionsGeneral *ggopts)
-{
- time_t temp;
-
- temp = time (NULL);
-
- gopts->priority = ggopts->priority;
-
- gopts->reply_enabled = ggopts->reply_enabled;
- gopts->reply_convenient = ggopts->reply_convenient;
- gopts->reply_within = ggopts->reply_within;
-
- gopts->expiration_enabled = ggopts->expiration_enabled;
- gopts->expire_after = ggopts->expire_after;
-
- gopts->delay_enabled = ggopts->delay_enabled;
-
- /* TODO convert gint to timet comparing the current day */
- if (ggopts->delay_until) {
- gopts->delay_until = time_add_day_with_zone (temp, ggopts->delay_until, NULL);
- } else
- gopts->delay_until = 0;
-}
-
-static void
-e_send_options_load_status_options (ESendOptionsStatusTracking *sopts,
- EGwSendOptionsStatusTracking *gsopts)
-{
- sopts->tracking_enabled = gsopts->tracking_enabled;
- sopts->track_when = gsopts->track_when;
-
- sopts->autodelete = gsopts->autodelete;
-
- sopts->opened = gsopts->opened;
- sopts->accepted = gsopts->accepted;
- sopts->declined = gsopts->declined;
- sopts->completed = gsopts->completed;
-}
-
-static void
-e_send_options_load_default_data (EGwSendOptions *opts, ESendOptionsDialog *sod)
-{
- EGwSendOptionsGeneral *ggopts;
- EGwSendOptionsStatusTracking *gmopts;
- EGwSendOptionsStatusTracking *gcopts;
- EGwSendOptionsStatusTracking *gtopts;
-
- ggopts = e_gw_sendoptions_get_general_options (opts);
- gmopts = e_gw_sendoptions_get_status_tracking_options (opts, "mail");
- gcopts = e_gw_sendoptions_get_status_tracking_options (opts, "calendar");
- gtopts = e_gw_sendoptions_get_status_tracking_options (opts, "task");
-
- e_send_options_load_general_opts (sod->data->gopts, ggopts);
- e_send_options_load_status_options (sod->data->mopts, gmopts);
- e_send_options_load_status_options (sod->data->copts, gcopts);
- e_send_options_load_status_options (sod->data->topts, gtopts);
-}
-
-static void
-e_send_options_clicked_cb (GtkWidget *button, gpointer data)
-{
- EGwConnectionStatus status;
- account = (EAccount *) data;
- if (!sod) {
- sod = e_send_options_dialog_new ();
- e_send_options_set_global (sod, TRUE);
- if (!n_cnc)
- n_cnc = get_cnc (GTK_WINDOW (gtk_widget_get_toplevel (button)));
-
- if (!n_cnc) {
- g_warning ("Send Options: Could not get the connection to the server \n");
- return;
- }
-
- status = e_gw_connection_get_settings (n_cnc, &opts);
- if (status == E_GW_CONNECTION_STATUS_INVALID_CONNECTION)
- status = e_gw_connection_get_settings (n_cnc, &opts);
- if (status != E_GW_CONNECTION_STATUS_OK) {
- g_warning ("Send Options: Could not get the settings from the server");
- return;
- }
- e_send_options_load_default_data (opts, sod);
- }
-
- if (n_cnc)
- e_send_options_dialog_run (sod, parent ? parent : NULL, E_ITEM_NONE);
- else
- return;
-}
-
-GtkWidget *
-org_gnome_send_options (EPlugin *epl, EConfigHookItemFactoryData *data)
-{
- EMConfigTargetAccount *target_account;
- GtkWidget *frame, *button, *label, *vbox;
- gchar *markup;
-
- target_account = (EMConfigTargetAccount *)data->config->target;
- account = target_account->modified_account;
-
- if (!g_strrstr (account->source->url, "groupwise://"))
- return NULL;
-
- vbox = gtk_vbox_new (FALSE, 0);
- frame = gtk_frame_new ("");
- label = gtk_frame_get_label_widget (GTK_FRAME (frame));
- markup = g_strdup_printf("<b>%s</b>", _("Send Options"));
- gtk_label_set_markup (GTK_LABEL (label), markup);
- button = gtk_button_new_with_label (_("Advanced send options"));
- gtk_widget_show (button);
- g_free (markup);
-
- g_signal_connect(button, "clicked",
- G_CALLBACK (e_send_options_clicked_cb), account);
-
- parent = gtk_widget_get_toplevel (GTK_WIDGET (data->parent));
- if (!gtk_widget_is_toplevel (parent))
- parent = NULL;
-
- gtk_widget_set_size_request (button, 10, -1);
- gtk_box_pack_start (GTK_BOX (vbox), frame, 0, 0, 0);
- gtk_container_add (GTK_CONTAINER (frame), button);
- gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_NONE);
- gtk_widget_show (frame);
- gtk_box_set_spacing (GTK_BOX (data->parent), 12);
- gtk_box_pack_start (GTK_BOX (data->parent), vbox, FALSE, FALSE, 0);
-
- return vbox;
-}
-
-static void
-send_options_finalize (void)
-{
- if (n_cnc) {
- g_object_unref (n_cnc);
- n_cnc = NULL;
- }
-
- if (sod) {
- g_object_unref (sod);
- sod = NULL;
- }
-
- if (opts) {
- g_object_unref (opts);
- opts = NULL;
- }
-}
-
-static void
-e_send_options_copy_general_opts (ESendOptionsGeneral *gopts,
- EGwSendOptionsGeneral *ggopts)
-{
- ggopts->priority = gopts->priority;
-
- ggopts->reply_enabled = gopts->reply_enabled;
- ggopts->reply_convenient = gopts->reply_convenient;
- ggopts->reply_within = gopts->reply_within;
-
- ggopts->expire_after = gopts->expire_after;
-
- if (gopts->expire_after == 0) {
- ggopts->expiration_enabled = FALSE;
- gopts->expiration_enabled = FALSE;
- } else
- ggopts->expiration_enabled = gopts->expiration_enabled;
-
- ggopts->delay_enabled = gopts->delay_enabled;
-
- if (gopts->delay_until) {
- gint diff;
- icaltimetype temp, current;
-
- temp = icaltime_from_timet (gopts->delay_until, 0);
- current = icaltime_today ();
- diff = temp.day - current.day;
- ggopts->delay_until = diff;
- } else
- ggopts->delay_until = 0;
-}
-
-static void
-e_send_options_copy_status_options (ESendOptionsStatusTracking *sopts,
- EGwSendOptionsStatusTracking *gsopts)
-{
- gsopts->tracking_enabled = sopts->tracking_enabled;
- gsopts->track_when = sopts->track_when;
-
- gsopts->autodelete = sopts->autodelete;
-
- gsopts->opened = sopts->opened;
- gsopts->accepted = sopts->accepted;
- gsopts->declined = sopts->declined;
- gsopts->completed = sopts->completed;
-}
-
-static gboolean
-check_status_options_changed (EGwSendOptionsStatusTracking *n_sopts,
- EGwSendOptionsStatusTracking *o_sopts)
-{
- return (!(n_sopts->tracking_enabled == o_sopts->tracking_enabled
- && n_sopts->track_when == o_sopts->track_when
- && n_sopts->autodelete == o_sopts->autodelete
- && n_sopts->opened == o_sopts->opened
- && n_sopts->declined == o_sopts->declined
- && n_sopts->accepted == o_sopts->accepted
- && n_sopts->completed == o_sopts->completed));
-
-}
-
-static gboolean
-check_general_changed (EGwSendOptionsGeneral *n_gopts,
- EGwSendOptionsGeneral *o_gopts)
-{
- return (!(n_gopts->priority == o_gopts->priority
- && n_gopts->delay_enabled == o_gopts->delay_enabled
- && n_gopts->delay_until == o_gopts->delay_until
- && n_gopts->reply_enabled == o_gopts->reply_enabled
- && n_gopts->reply_convenient == o_gopts->reply_convenient
- && n_gopts->reply_within == o_gopts->reply_within
- && n_gopts->expiration_enabled == o_gopts->expiration_enabled
- && n_gopts->expire_after == o_gopts->expire_after));
-}
-
-static void
-send_options_copy_check_changed (EGwSendOptions *n_opts)
-{
- EGwSendOptionsGeneral *ggopts, *o_gopts;
- EGwSendOptionsStatusTracking *gmopts, *o_gmopts;
- EGwSendOptionsStatusTracking *gcopts, *o_gcopts;
- EGwSendOptionsStatusTracking *gtopts, *o_gtopts;
-
- ggopts = e_gw_sendoptions_get_general_options (n_opts);
- gmopts = e_gw_sendoptions_get_status_tracking_options (n_opts, "mail");
- gcopts = e_gw_sendoptions_get_status_tracking_options (n_opts, "calendar");
- gtopts = e_gw_sendoptions_get_status_tracking_options (n_opts, "task");
-
- o_gopts = e_gw_sendoptions_get_general_options (opts);
- o_gmopts = e_gw_sendoptions_get_status_tracking_options (opts, "mail");
- o_gcopts = e_gw_sendoptions_get_status_tracking_options (opts, "calendar");
- o_gtopts = e_gw_sendoptions_get_status_tracking_options (opts, "task");
-
- e_send_options_copy_general_opts (sod->data->gopts, ggopts);
- e_send_options_copy_status_options (sod->data->mopts, gmopts);
- e_send_options_copy_status_options (sod->data->copts, gcopts);
- e_send_options_copy_status_options (sod->data->topts, gtopts);
-
- if (check_general_changed (ggopts, o_gopts))
- changed = TRUE;
- if (check_status_options_changed (gmopts, o_gmopts))
- changed = TRUE;
- if (check_status_options_changed (gcopts, o_gcopts))
- changed = TRUE;
- if (check_status_options_changed (gtopts, o_gtopts))
- changed = TRUE;
-}
-
-static ESource *
-get_source (ESourceList *list)
-{
- GSList *p, *l;
- gchar **temp = g_strsplit (account->source->url, ";", -1);
- gchar *uri = temp[0];
-
- l = e_source_list_peek_groups (list);
-
- for (p = l; p != NULL; p = p->next) {
- gchar *so_uri;
- GSList *r, *s;
- ESourceGroup *group = E_SOURCE_GROUP (p->data);
-
- s = e_source_group_peek_sources (group);
- for (r = s; r != NULL; r = r->next) {
- ESource *so = E_SOURCE (r->data);
- so_uri = e_source_get_uri (so);
-
- if (so_uri) {
- if (!strcmp (so_uri, uri)) {
- g_free (so_uri), so_uri = NULL;
- g_strfreev (temp);
- return E_SOURCE (r->data);
- }
- g_free (so_uri), so_uri = NULL;
- }
- }
- }
-
- g_strfreev (temp);
-
- return NULL;
-}
-
-static void
-add_return_value (EGwSendOptionsReturnNotify track,
- ESource *source,
- const gchar *notify)
-{
- gchar *value;
-
- switch (track) {
- case E_GW_RETURN_NOTIFY_MAIL:
- value = g_strdup ("mail");
- break;
- default:
- value = g_strdup ("none");
- }
-
- e_source_set_property (source, notify, value);
- g_free (value), value = NULL;
-}
-
-static void
-put_options_in_source (ESource *source,
- EGwSendOptionsGeneral *gopts,
- EGwSendOptionsStatusTracking *sopts)
-{
- gchar *value;
- const gchar *val;
- icaltimetype tt;
- CamelURL *url;
-
- url = camel_url_new (account->source->url, NULL);
-
- if (gopts) {
- /* priority */
- switch (gopts->priority) {
- case E_GW_PRIORITY_HIGH:
- value = g_strdup ("high");
- break;
- case E_GW_PRIORITY_STANDARD:
- value = g_strdup ("standard");
- break;
- case E_GW_PRIORITY_LOW:
- value = g_strdup ("low");
- break;
- default:
- value = g_strdup ("undefined");
- }
- e_source_set_property (source, "priority", value);
- camel_url_set_param (url, "priority", value);
- g_free (value), value = NULL;
-
- /* Reply Requested */
- /*TODO Fill the value if it is not "convinient" */
- if (gopts->reply_enabled) {
- if (gopts->reply_convenient)
- value = g_strdup ("convinient");
- else
- value = g_strdup_printf ("%d",gopts->reply_within);
- } else
- value = g_strdup ("none");
- e_source_set_property (source, "reply-requested", value);
- g_free (value), value = NULL;
-
- /* Delay delivery */
- if (gopts->delay_enabled) {
- tt = icaltime_today ();
- icaltime_adjust (&tt, gopts->delay_until, 0, 0, 0);
- val = icaltime_as_ical_string_r (tt);
- } else
- val = "none";
- e_source_set_property (source, "delay-delivery", val);
-
- /* Expiration date */
- if (gopts->expiration_enabled)
- value = g_strdup_printf ("%d", gopts->expire_after);
- else
- value = g_strdup ("none");
- e_source_set_property (source, "expiration", value);
- g_free (value), value = NULL;
- }
-
- if (sopts) {
- /* status tracking */
- if (sopts->tracking_enabled) {
- switch (sopts->track_when) {
- case E_GW_DELIVERED :
- value = g_strdup ("delivered");
- break;
- case E_GW_DELIVERED_OPENED:
- value = g_strdup ("delivered-opened");
- break;
- default:
- value = g_strdup ("all");
- }
- } else
- value = g_strdup ("none");
- e_source_set_property (source, "status-tracking", value);
- g_free (value), value = NULL;
-
- add_return_value (sopts->opened, source, "return-open");
- add_return_value (sopts->accepted, source, "return-accept");
- add_return_value (sopts->declined, source, "return-decline");
- add_return_value (sopts->completed, source, "return-complete");
- }
-}
-
-static void
-add_send_options_to_source (EGwSendOptions *n_opts)
-{
- GConfClient *gconf = gconf_client_get_default ();
- ESource *csource, *tsource;
- ESourceList *list;
- EGwSendOptionsGeneral *gopts;
- EGwSendOptionsStatusTracking *topts, *copts;
-
- list = e_source_list_new_for_gconf (gconf, "/apps/evolution/calendar/sources");
- csource = get_source (list);
-
- list = e_source_list_new_for_gconf (gconf, "/apps/evolution/tasks/sources");
- tsource = get_source (list);
-
- gopts = e_gw_sendoptions_get_general_options (n_opts);
- copts = e_gw_sendoptions_get_status_tracking_options (n_opts, "calendar");
- topts = e_gw_sendoptions_get_status_tracking_options (n_opts, "task");
-
- if (csource)
- put_options_in_source (csource, gopts, copts);
-
- if (tsource)
- put_options_in_source (tsource, gopts, topts);
-
- g_object_unref (gconf);
-}
-
-void
-send_options_commit (EPlugin *epl, EConfigHookItemFactoryData *data)
-{
- EGwSendOptions *n_opts;
- EGwConnectionStatus status = E_GW_CONNECTION_STATUS_OK;
-
- if (sod) {
- n_opts = e_gw_sendoptions_new ();
- send_options_copy_check_changed (n_opts);
-
- if (changed)
- status = e_gw_connection_modify_settings (n_cnc, n_opts);
-
- if (!changed || status != E_GW_CONNECTION_STATUS_OK) {
- g_warning (
- G_STRLOC "Cannot modify Send Options: %s",
- e_gw_connection_get_error_message (status));
- g_object_unref (n_opts);
- n_opts = NULL;
- } else
- add_send_options_to_source (n_opts);
- }
-
- send_options_finalize ();
-}
-
-void
-send_options_changed (EPlugin *epl, EConfigHookItemFactoryData *data)
-{
-}
-
-void
-send_options_abort (EPlugin *epl, EConfigHookItemFactoryData *data)
-{
- send_options_finalize ();
-}
-
diff --git a/plugins/groupwise-features/share-folder-common.c b/plugins/groupwise-features/share-folder-common.c
deleted file mode 100644
index 20720e916c..0000000000
--- a/plugins/groupwise-features/share-folder-common.c
+++ /dev/null
@@ -1,519 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Vivek Jain <jvivek@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-#include <string.h>
-#include <glib.h>
-#include <gtk/gtk.h>
-#include <glib/gi18n.h>
-#include <e-util/e-config.h>
-#include <e-util/e-account-utils.h>
-#include <mail/e-mail-backend.h>
-#include <mail/em-config.h>
-#include <mail/em-folder-properties.h>
-#include <mail/em-folder-tree.h>
-#include <mail/em-folder-selector.h>
-#include <mail/mail-mt.h>
-#include <mail/mail-vfolder.h>
-#include <mail/em-utils.h>
-#include <mail/em-vfolder-rule.h>
-#include <filter/e-filter-rule.h>
-#include <e-gw-container.h>
-#include <e-gw-connection.h>
-#include <shell/e-shell-sidebar.h>
-#include "share-folder.h"
-#include "gw-ui.h"
-
-#define d(x)
-
-ShareFolder *common = NULL;
-CamelSession *session;
-struct ShareInfo {
- GtkWidget *d;
- ShareFolder *sf;
- EMFolderTreeModel *model;
- EMFolderSelector *emfs;
-};
-
-GtkWidget * org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data);
-void shared_folder_commit (EPlugin *ep, EConfigTarget *tget);
-void shared_folder_abort (EPlugin *ep, EConfigTarget *target);
-
-static void refresh_folder_tree (EMFolderTreeModel *model, CamelStore *store);
-
-static void
-refresh_folder_tree (EMFolderTreeModel *model, CamelStore *store)
-{
- EAccount *account;
- CamelProvider *provider;
- const gchar *uid;
- gchar *uri;
-
- uid = camel_service_get_uid (CAMEL_SERVICE (store));
- account = e_get_account_by_uid (uid);
-
- if (account == NULL)
- return;
-
- uri = account->source->url;
- em_folder_tree_model_remove_store (model, store);
-
- provider = camel_provider_get (uri, NULL);
- if (provider == NULL)
- return;
-
- if (!(provider->flags & CAMEL_PROVIDER_IS_STORAGE))
- return;
- em_folder_tree_model_add_store (model, store, account->name);
-}
-
-void
-shared_folder_commit (EPlugin *ep, EConfigTarget *tget)
-{
- EMConfigTargetFolder *target = (EMConfigTargetFolder *)tget->config->target;
- CamelStore *parent_store;
- EMFolderTreeModel *model = em_folder_tree_model_new (); /*mail_component_peek_tree_model (mail_component_peek ());*/
-
- parent_store = camel_folder_get_parent_store (target->folder);
-
- if (common) {
- share_folder (common);
- refresh_folder_tree (model, parent_store);
- g_object_run_dispose ((GObject *)common);
- common = NULL;
- }
-}
-
-void
-shared_folder_abort (EPlugin *ep, EConfigTarget *target)
-{
- if (common) {
- g_object_run_dispose ((GObject *)common);
- common = NULL;
- }
-}
-
-struct _EMCreateFolder {
- MailMsg base;
-
- /* input data */
- CamelStore *store;
- gchar *full_name;
- gchar *parent;
- gchar *name;
-
- /* output data */
- CamelFolderInfo *fi;
-
- /* callback data */
- void (* done) (struct _EMCreateFolder *m, gpointer user_data);
- gpointer user_data;
-};
-
-static gchar *
-create_folder_desc (struct _EMCreateFolder *m)
-{
- return g_strdup_printf (_("Creating folder '%s'"), m->full_name);
-}
-
-static void
-create_folder_exec (struct _EMCreateFolder *m,
- GCancellable *cancellable,
- GError **error)
-{
- d(printf ("creating folder parent='%s' name='%s' full_name='%s'\n", m->parent, m->name, m->full_name));
-
- if ((m->fi = camel_store_create_folder_sync (
- m->store, m->parent, m->name, cancellable, error))) {
-
- if (camel_store_supports_subscriptions (m->store))
- camel_store_subscribe_folder_sync (
- m->store, m->full_name,
- cancellable, error);
- }
-}
-
-static void
-create_folder_done (struct _EMCreateFolder *m)
-{
- struct ShareInfo *ssi = (struct ShareInfo *) m->user_data;
- CamelStore *store = CAMEL_STORE (m->store);
- EGwConnection *ccnc;
-
- if (m->done) {
- ccnc = get_cnc (store);
- if (E_IS_GW_CONNECTION (ccnc)) {
- (ssi->sf)->cnc = ccnc;
-
- (ssi->sf)->container_id = g_strdup (get_container_id ((ssi->sf)->cnc, m->full_name));
- share_folder (ssi->sf);
- }
-
- m->done (m, m->user_data);
- }
-}
-
-static void
-create_folder_free (struct _EMCreateFolder *m)
-{
- camel_store_free_folder_info (m->store, m->fi);
- g_object_unref (m->store);
- g_free (m->full_name);
- g_free (m->parent);
- g_free (m->name);
-}
-
-static MailMsgInfo create_folder_info = {
- sizeof (struct _EMCreateFolder),
- (MailMsgDescFunc) create_folder_desc,
- (MailMsgExecFunc) create_folder_exec,
- (MailMsgDoneFunc) create_folder_done,
- (MailMsgFreeFunc) create_folder_free
-};
-
-static void
-new_folder_created_cb (struct _EMCreateFolder *m, gpointer user_data)
-{
- struct ShareInfo *ssi = (struct ShareInfo *) user_data;
- EMFolderSelector *emfs = ssi->emfs;
- if (m->fi) {
- refresh_folder_tree (ssi->model, m->store);
- gtk_widget_destroy ((GtkWidget *) emfs);
- gtk_widget_destroy ((GtkWidget *) ssi->d);
- }
-
- g_object_unref (emfs);
-}
-
-static gint
-create_folder (CamelStore *store, const gchar *full_name, void (* done) (struct _EMCreateFolder *m, gpointer user_data), gpointer user_data)
-{
- gchar *name, *namebuf = NULL;
- struct _EMCreateFolder *m;
- const gchar *parent;
- gint id;
-
- namebuf = g_strdup (full_name);
- if (!(name = strrchr (namebuf, '/'))) {
- name = namebuf;
- parent = "";
- } else {
- *name++ = '\0';
- parent = namebuf;
- }
-
- m = mail_msg_new (&create_folder_info);
- g_object_ref (store);
- m->store = store;
- m->full_name = g_strdup (full_name);
- m->parent = g_strdup (parent);
- m->name = g_strdup (name);
- m->user_data = (struct ShareInfo *) user_data;
- m->done = done;
- g_free (namebuf);
- id = m->base.seq;
- mail_msg_unordered_push (m);
-
- return id;
-}
-
-static void
-users_dialog_response (GtkWidget *dialog, gint response, struct ShareInfo *ssi)
-{
- struct _EMFolderTreeModelStoreInfo *si;
- EMFolderSelector *emfs = ssi->emfs;
- const gchar *uri, *path;
- EMailSession *session;
- CamelService *service = NULL;
- CamelURL *url;
-
- if (response != GTK_RESPONSE_OK) {
- gtk_widget_destroy ((GtkWidget *) emfs);
- gtk_widget_destroy (dialog);
- return;
- }
-
- uri = em_folder_selector_get_selected_uri (emfs);
- path = em_folder_selector_get_selected_path (emfs);
- session = em_folder_tree_get_session (emfs->emft);
-
- d(printf ("Creating new folder: %s (%s)\n", path, uri));
-
- url = camel_url_new (uri, NULL);
- if (url != NULL) {
- service = camel_session_get_service_by_url (
- CAMEL_SESSION (session), url, CAMEL_PROVIDER_STORE);
- camel_url_free (url);
- }
-
- if (!CAMEL_IS_STORE (service))
- return;
-
- si = em_folder_tree_model_lookup_store_info (
- ssi->model, CAMEL_STORE (service));
- if (si == NULL) {
- g_assert_not_reached ();
- return;
- }
-
- if (CAMEL_IS_VEE_STORE (service)) {
- EFilterRule *rule;
-
- rule = em_vfolder_rule_new (session);
- e_filter_rule_set_name (rule, path);
- vfolder_gui_add_rule (EM_VFOLDER_RULE (rule));
- gtk_widget_destroy ((GtkWidget *)emfs);
- } else {
- g_object_ref (emfs);
- ssi->d = dialog;
- create_folder (si->store, path, new_folder_created_cb, ssi);
-
- }
-}
-
-static void
-new_folder_response (EMFolderSelector *emfs, gint response, EMFolderTreeModel *model)
-{
- GtkWidget *users_dialog;
- GtkWidget *content_area;
- GtkWidget *w;
- struct ShareInfo *ssi;
- const gchar *uri;
- EGwConnection *cnc;
- CamelService *service = NULL;
- CamelURL *url;
-
- ssi = g_new0 (struct ShareInfo, 1);
- if (response != GTK_RESPONSE_OK) {
- gtk_widget_destroy ((GtkWidget *) emfs);
- return;
- }
-
- /* i want store at this point to get cnc not sure proper or not*/
- uri = em_folder_selector_get_selected_uri (emfs);
-
- url = camel_url_new (uri, NULL);
- if (url != NULL) {
- service = camel_session_get_service_by_url (
- session, url, CAMEL_PROVIDER_STORE);
- camel_url_free (url);
- }
-
- if (!CAMEL_IS_STORE (service))
- return;
-
- cnc = get_cnc (CAMEL_STORE (service));
- users_dialog = gtk_dialog_new_with_buttons (
- _("Users"), NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
- w = gtk_label_new_with_mnemonic (_("Enter the users and set permissions"));
- gtk_widget_show (w);
- content_area = gtk_dialog_get_content_area (GTK_DIALOG (users_dialog));
- gtk_box_pack_start (GTK_BOX (content_area), (GtkWidget *) w, TRUE, TRUE, 6);
- ssi->sf = share_folder_new (cnc, NULL);
- gtk_widget_set_sensitive (GTK_WIDGET ((ssi->sf)->table), TRUE);
- ssi->model = model;
- ssi->emfs = emfs;
- gtk_widget_reparent (GTK_WIDGET ((ssi->sf)->table), content_area);
- gtk_widget_hide ((GtkWidget*) emfs);
- gtk_window_resize (GTK_WINDOW (users_dialog), 350, 300);
- gtk_widget_show (users_dialog);
- g_signal_connect (users_dialog, "response", G_CALLBACK (users_dialog_response), ssi);
-}
-
-void
-gw_new_shared_folder_cb (GtkAction *action, EShellView *shell_view)
-{
- EMFolderTree *folder_tree;
- EShellBackend *shell_backend;
- EMailSession *session;
- GtkWidget *dialog;
- gchar *uri;
- gpointer parent;
-
- parent = e_shell_view_get_shell_window (shell_view);
- shell_backend = e_shell_view_get_shell_backend (shell_view);
- session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend));
-
- folder_tree = (EMFolderTree *) em_folder_tree_new (session);
- emu_restore_folder_tree_state (folder_tree);
-
- dialog = em_folder_selector_create_new (parent, folder_tree, 0, _("Create folder"), _("Specify where to create the folder:"));
- uri = em_folder_tree_get_selected_uri (folder_tree);
- if (uri != NULL)
- em_folder_selector_set_selected ((EMFolderSelector *) dialog, uri);
- g_free (uri);
-
- g_signal_connect (dialog, "response", G_CALLBACK (new_folder_response), gtk_tree_view_get_model (GTK_TREE_VIEW (folder_tree)));
- gtk_window_set_title (GTK_WINDOW (dialog), "New Shared Folder" );
- gtk_widget_show (dialog);
-}
-
-GtkWidget *
-org_gnome_shared_folder_factory (EPlugin *ep, EConfigHookItemFactoryData *hook_data)
-{
-
- gchar *folderuri = NULL;
- gchar *account = NULL;
- gchar *id = NULL;
- gchar *folder_name = NULL;
- EGwConnection *cnc;
- ShareFolder *sharing_tab;
- EMConfigTargetFolder *target= (EMConfigTargetFolder *)hook_data->config->target;
- CamelFolder *folder = target->folder;
-
- folder_name = g_strdup (camel_folder_get_full_name (folder));
- folderuri = g_strdup (target->uri);
- if (folderuri && folder_name)
- account = g_strrstr(folderuri, "groupwise");
- else
- return NULL;
-
- /* This is kind of bad..but we don't have types for all these folders.*/
-
- if ( !( strcmp (folder_name, "Mailbox")
- && strcmp (folder_name, "Calendar")
- && strcmp (folder_name, "Contacts")
- && strcmp (folder_name, "Documents")
- && strcmp (folder_name, "Authored")
- && strcmp (folder_name, "Default Library")
- && strcmp (folder_name, "Work In Progress")
- && strcmp (folder_name, "Cabinet")
- && strcmp (folder_name, "Sent Items")
- && strcmp (folder_name, "Trash")
- && strcmp (folder_name, "Checklist"))) {
-
- g_free (folderuri);
- return NULL;
- }
-
- if (account) {
- CamelStore *parent_store;
-
- parent_store = camel_folder_get_parent_store (folder);
- cnc = get_cnc (parent_store);
-
- if (E_IS_GW_CONNECTION (cnc))
- id = get_container_id (cnc, folder_name);
- else
- g_warning("Could not Connnect\n");
-
- if (cnc && id)
- sharing_tab = share_folder_new (cnc, id);
- else
- return NULL;
-
- gtk_notebook_append_page((GtkNotebook *) hook_data->parent, (GtkWidget *) sharing_tab->vbox, gtk_label_new_with_mnemonic N_("Sharing"));
- common = sharing_tab;
- g_free (folderuri);
- return GTK_WIDGET (sharing_tab);
- } else
- return NULL;
-}
-
-EGwConnection *
-get_cnc (CamelStore *store)
-{
- EGwConnection *cnc;
- const gchar *uri, *property_value, *server_name, *user, *port;
- gchar *use_ssl;
- CamelService *service;
- CamelURL *url;
-
- if (!store)
- return NULL;
-
- service = CAMEL_SERVICE (store);
- url = camel_service_get_camel_url (service);
- server_name = g_strdup (url->host);
- user = g_strdup (url->user);
- property_value = camel_url_get_param (url, "soap_port");
- use_ssl = g_strdup (camel_url_get_param (url, "use_ssl"));
- if (property_value == NULL)
- port = g_strdup ("7191");
- else if (strlen (property_value) == 0)
- port = g_strdup ("7191");
- else
- port = g_strdup (property_value);
-
- if (use_ssl && !g_str_equal (use_ssl, "never"))
- uri = g_strconcat ("https://", server_name, ":", port, "/soap", NULL);
- else
- uri = g_strconcat ("http://", server_name, ":", port, "/soap", NULL);
-
- cnc = e_gw_connection_new (uri, user, url->passwd);
- if (!E_IS_GW_CONNECTION(cnc) && use_ssl && g_str_equal (use_ssl, "when-possible")) {
- gchar *http_uri = g_strconcat ("http://", uri + 8, NULL);
- cnc = e_gw_connection_new (http_uri, user, url->passwd);
- g_free (http_uri);
- }
- g_free (use_ssl);
- use_ssl = NULL;
-
- return cnc;
-
-}
-
-gchar *
-get_container_id (EGwConnection *cnc, const gchar *fname)
-{
- GList *container_list = NULL;
- gchar *id = NULL;
- gchar *name;
- gchar **names;
- gint i = 0, parts = 0;
-
- names = g_strsplit (fname, "/", -1);
- if (names) {
- while (names[parts])
- parts++;
- fname = names[i];
- }
-
- /* get list of containers */
- if (e_gw_connection_get_container_list (cnc, "folders", &(container_list)) == E_GW_CONNECTION_STATUS_OK) {
- GList *container = NULL;
-
- for (container = container_list; container != NULL; container = container->next) {
- name = g_strdup (e_gw_container_get_name (container->data));
- /* if Null is passed as name then we return top lavel id*/
- if (fname == NULL) {
- id = g_strdup (e_gw_container_get_id (container->data));
- break;
- } else if (!strcmp (name, fname)) {
- if (i == parts - 1) {
- id = g_strdup (e_gw_container_get_id (container->data));
- break;
- } else
- fname = names[++i];
- }
- g_free (name);
- }
- e_gw_connection_free_container_list (container_list);
- }
-
- if (names)
- g_strfreev (names);
- return id;
-}
diff --git a/plugins/groupwise-features/share-folder.c b/plugins/groupwise-features/share-folder.c
deleted file mode 100644
index ea42265b4f..0000000000
--- a/plugins/groupwise-features/share-folder.c
+++ /dev/null
@@ -1,767 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Vivek Jain <jvivek@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-#include "share-folder.h"
-#include <glib/gi18n-lib.h>
-#include <libedataserverui/e-contact-store.h>
-#include <e-util/e-util.h>
-#include <e-util/e-alert-dialog.h>
-#include <e-util/e-util-private.h>
-#include <e-gw-container.h>
-#include <e-gw-connection.h>
-#define ROOTNODE "vboxSharing"
-#define NROOTNODE "vbox191"
-#define d(x)
-
-struct _SharedUser {
- EShUsers *user_node;
- gint flag;
-};
-typedef struct _SharedUser SharedUser;
-
-static void share_folder_class_init (ShareFolderClass *class);
-static void share_folder_init (ShareFolder *sf);
-static void share_folder_dispose (GObject *obj);
-static void share_folder_finalise (GObject *obj);
-static void free_user_node (EShUsers *user);
-static void free_node (SharedUser *user);
-static void free_all (ShareFolder *sf);
-static SharedUser * find_node (GList *list, gchar *email);
-static void get_container_list (ShareFolder *sf);
-static void user_selected (GtkTreeSelection *selection, ShareFolder *sf);
-static void not_shared_clicked (GtkRadioButton *button, ShareFolder *sf);
-static void shared_clicked (GtkRadioButton *button, ShareFolder *sf);
-static void add_clicked (GtkButton *button, ShareFolder *sf);
-static void remove_clicked (GtkButton *button, ShareFolder *sf);
-static void not_ok_clicked (GtkButton *button, ShareFolder *sf);
-static void not_cancel_clicked (GtkButton *button, GtkWidget *window);
-static void share_folder_construct (ShareFolder *sf);
-GType share_folder_get_type (void);
-
-static GtkVBoxClass *parent_class = NULL;
-
-GType
-share_folder_get_type (void)
-{
- static GType type = 0;
-
- if (!type) {
- static const GTypeInfo info = {
- sizeof (ShareFolderClass),
- NULL, NULL,
- (GClassInitFunc) share_folder_class_init,
- NULL, NULL,
- sizeof (ShareFolder),
- 0,
- (GInstanceInitFunc) share_folder_init
- };
-
- type = g_type_register_static (gtk_vbox_get_type (), "ShareFolder", &info, 0);
- }
-
- return type;
-}
-
-static void
-share_folder_class_init (ShareFolderClass *klass)
-{
- GObjectClass *object_class = G_OBJECT_CLASS (klass);
-
- parent_class = g_type_class_ref (gtk_vbox_get_type ());
- object_class->dispose = share_folder_dispose;
- object_class->finalize = share_folder_finalise;
-}
-
-static void
-share_folder_finalise (GObject *object)
-{
- ShareFolder *sf = (ShareFolder *) object;
- g_object_unref (sf->builder);
- free_all (sf);
-
- /* Chain up to parent's finalize() method. */
- G_OBJECT_CLASS (parent_class)->finalize (object);
-}
-
-static void
-share_folder_dispose (GObject *object)
-{
-
- ShareFolder *sf = (ShareFolder *) object;
- free_all (sf);
-
- /* Chain up to parent's dispose() method. */
- G_OBJECT_CLASS (parent_class)->dispose (object);
-}
-
-static void
-share_folder_init (ShareFolder *sf)
-{
- sf->gcontainer = NULL;
- sf->users = 0;
- sf->flag_for_ok = 0;
- sf->shared = FALSE;
- sf->container_list = NULL;
- sf->users_list = NULL;
- sf->sub = "Shared Folder notification";
- sf->message = NULL;
-}
-
-static void
-free_user_node (EShUsers *user)
-{
- if (user) {
- g_free (user->email);
- user->email = NULL;
- }
- return;
-}
-
-static void
-free_node (SharedUser *usr)
-{
- EShUsers *user = usr->user_node;
- if (user) {
- g_free (user->email);
- user->email = NULL;
- }
- return;
-}
-
-static SharedUser *
-find_node (GList *list, gchar *email)
-{
- SharedUser *user = NULL;
- EShUsers *usr = NULL;
- GList *tmp;
- gint i;
-
- if (list) {
- tmp = g_list_first (list);
- for (i=0; tmp; i++)
- {
- user = tmp->data;
- usr = user->user_node;
- if (!g_ascii_strcasecmp (usr->email, email)) {
- return user; /*if found, it returns that user*/
- }
- tmp= g_list_next (tmp);
- }
- }
- return NULL;
-}
-
-static void
-free_all (ShareFolder *sf)
-{
- if (sf->users_list) {
- g_list_foreach (sf->users_list,(GFunc) free_node, NULL);
- g_list_free (sf->users_list);
- sf->users_list = NULL;
- }
-
- /* e_gw_connection_free_container_list (sf->container_list); */
-}
-
-static void
-display_container (EGwContainer *container , ShareFolder *sf)
-{
- gboolean byme = FALSE;
- gboolean tome = FALSE;
- gchar *email = NULL;
- gchar *msg;
- GList *user_list = NULL;
- EShUsers *user = NULL;
-
- sf->gcontainer = container;
- if (!(byme = e_gw_container_get_is_shared_by_me (container)))
- tome = e_gw_container_get_is_shared_to_me (container);
- if (byme || tome) {
- e_gw_container_get_user_list (sf->gcontainer, &user_list);
- sf->users = g_list_length (user_list);
- if (sf->users != 0) {
- sf->is_shared = TRUE;
- gtk_toggle_button_set_active ((GtkToggleButton *) sf->shared, TRUE);
- shared_clicked (sf->shared , sf);
- if (tome) {
- g_print ("Entered: inside too\n");
-
- gtk_widget_set_sensitive (GTK_WIDGET (sf->not_shared), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (sf->add_button), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (sf->remove), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (sf->add_book), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (sf->notification), FALSE);
- gtk_widget_set_sensitive (GTK_WIDGET (sf->user_list), FALSE);
- email = g_strdup (e_gw_container_get_owner (sf->gcontainer));
- msg = g_strconcat (email, " (Owner)", NULL);
- gtk_list_store_append (GTK_LIST_STORE (sf->model), &(sf->iter));
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 0, msg, -1);
- g_free (msg);
- g_free (email);
-
- } else
- gtk_widget_set_sensitive (GTK_WIDGET (sf->table), TRUE);
- /* I populate the list and set flags to 0 for the existing users*/
- while (user_list) {
- SharedUser *shared_user = g_new0 (SharedUser , 1);
- gboolean add, edit, delete;
- add = edit = delete = FALSE;
- user = user_list->data;
- shared_user->user_node = user;
- shared_user->flag = 0;
- email = g_strdup (user->email);
- if (user->rights & 0x1)
- add = TRUE;
- if (user->rights & 0x2)
- edit = TRUE;
- if (user->rights & 0x4)
- delete = TRUE;
-
- msg = g_strdup_printf ("%s", email);
- gtk_list_store_append (GTK_LIST_STORE (sf->model), &(sf->iter));
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 0, msg, 1, add, 2, edit, 3, delete, -1);
- sf->users_list = g_list_append (sf->users_list, shared_user);
- g_free (msg);
- g_free (email);
- msg = NULL;
- email = NULL;
- user_list = user_list->next;
- }
- /* i also need to display status*/
- } else {
-
- gtk_toggle_button_set_active ((GtkToggleButton *) sf->not_shared, TRUE);
- not_shared_clicked (sf->not_shared , sf);
- }
- }
-
-}
-
-static void
-get_container_list (ShareFolder *sf)
-{
- sf->container_list = NULL;
- if (E_IS_GW_CONNECTION (sf->cnc)) {
- /* get list of containers */
- if (e_gw_connection_get_container_list (sf->cnc, "folders", &(sf->container_list)) == E_GW_CONNECTION_STATUS_OK) {
- GList *container = NULL;
-
- for (container = sf->container_list; container != NULL; container = container->next) {
- gchar **tail;
- gchar *id_shared = NULL;
- gchar *id_unshared = NULL;
-
- id_shared = g_strdup (e_gw_container_get_id (container->data));
-
- /* this has to be done since id changes after the folder is shared*/
- if ( g_str_has_suffix (id_shared, "35")) {
- tail = g_strsplit(id_shared, "@", 2);
- id_unshared = g_strconcat(tail[0], "@", "13", NULL);
- g_strfreev (tail);
- }
-
- if ((id_shared && !g_ascii_strcasecmp (id_shared, sf->container_id)) ||(id_unshared && !g_ascii_strcasecmp (id_unshared, sf->container_id))) {
-
- display_container (E_GW_CONTAINER (container->data), sf);
- g_free (id_shared);
- g_free (id_unshared);
- break;
- }
-
- g_free (id_shared);
- g_free (id_unshared);
- }
-
- } else
- g_warning("Could not get the Container List");
- }
-}
-
-static void
-shared_clicked (GtkRadioButton *button, ShareFolder *sf)
-{
-
- gtk_widget_set_sensitive (GTK_WIDGET (sf->table) ,TRUE);
- sf->flag_for_ok = 0;
-}
-
-static void
-not_shared_clicked (GtkRadioButton *button, ShareFolder *sf)
-{
- if (!sf->is_shared) {
- sf->flag_for_ok = 0;
- } else {
- sf->flag_for_ok = 2;
- }
- gtk_widget_set_sensitive (GTK_WIDGET (sf->table), FALSE);
-
-}
-
-static void
-add_clicked (GtkButton *button, ShareFolder *sf)
-{
- const gchar *email = NULL;
- const gchar *self_email = NULL;
- SharedUser *new_user = NULL;
- EShUsers *usr = NULL;
- gint rights = 0;
- gchar *msg = NULL;
- EDestinationStore *destination_store;
- GList *destinations, *tmp;
- ENameSelectorEntry *name_selector_entry;
-
- name_selector_entry = e_name_selector_peek_section_entry (sf->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;
- self_email = g_strdup (e_gw_connection_get_user_email (sf->cnc));
- for (; tmp != NULL; tmp = g_list_next (tmp)) {
- email = e_destination_get_email (tmp->data);
- /* You can't share a folder with yourself*/
- if (g_strrstr (email, "@") == NULL || (!g_ascii_strcasecmp (email , self_email)))
- e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))),
- "org.gnome.evolution.mail_shared_folder:invalid-user",
- email, NULL);
- else {
- if (!g_ascii_strcasecmp (email, "" )) {
- e_alert_run_dialog_for_args (GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (button))),
- "org.gnome.evolution.mail_shared_folder:no-user", NULL);
-
- return;
- }
-
- /*check whether already exists*/
- if (sf->users_list && email) {
- new_user = find_node (sf->users_list, (gchar *)email);
- if (new_user)
- return;
-
- }
- usr = g_new0 (EShUsers, 1);
- new_user = g_new0 (SharedUser, 1);
- usr->email = g_strdup (email);
- usr->rights = rights;
- new_user->user_node = usr;
- new_user->flag = 1;
- msg = g_strdup (email);
- gtk_list_store_append (GTK_LIST_STORE (sf->model), &(sf->iter));
-
- /* have to add code for rights*/
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 0, msg, -1);
- g_free (msg);
- sf->users_list = g_list_append (sf->users_list, new_user);
- sf->flag_for_ok = 0;
- }
- }
- gtk_entry_set_text (GTK_ENTRY(name_selector_entry), "");
-
-}
-
-static void
-remove_clicked (GtkButton *button, ShareFolder *sf)
-{
-
- SharedUser *usr = NULL;
- gchar *email;
-
- gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, -1);
- usr = find_node (sf->users_list, email);
- if (usr->flag & 0x1) {
- sf->users_list = g_list_remove (sf->users_list, usr);
- free_node (usr);
- } else {
- usr->flag = 0;
- usr->flag |= 0x4;
- }
- g_free (email);
- if (!gtk_list_store_remove (GTK_LIST_STORE (sf->model), &(sf->iter)))
- gtk_widget_set_sensitive (GTK_WIDGET (sf->remove), FALSE);
- sf->flag_for_ok = 1;
-}
-
-void
-share_folder (ShareFolder *sf)
-{
-
- GList *new_list = NULL;
- GList *update_list = NULL;
- GList *remove_list = NULL;
- GList *node = NULL;
- SharedUser *user = NULL;
-
- for (node = sf->users_list; node; node = node->next)
- {
- user = node->data;
- if (user->flag & 0x1)
- new_list = g_list_append (new_list, user->user_node);
- else if (user->flag & 0x2)
- update_list = g_list_append (update_list, user->user_node);
- else if (user->flag & 0x4) {
- remove_list = g_list_append (remove_list, user->user_node);
- }
- }
-
- if (E_IS_GW_CONNECTION (sf->cnc)) {
- if (sf->flag_for_ok == 2){ /* you have to remove all the users*/
- GList *list = NULL;
-
- if (new_list) {
- g_list_foreach (new_list, (GFunc) free_user_node, NULL);
- g_list_free (new_list);
- }
- if (update_list) {
- g_list_foreach (update_list, (GFunc) free_user_node, NULL);
- g_list_free (update_list);
- }
-
- new_list = NULL;
- if (remove_list) {
- g_list_foreach (remove_list,(GFunc) free_user_node, NULL);
- g_list_free (remove_list);
- }
- remove_list = NULL;
- if (sf->gcontainer) {
- e_gw_container_get_user_list (sf->gcontainer, &list);
- remove_list = g_list_copy (list);
-
- } else {
- g_warning("Container is Null");
- }
-
- } else {
- if (new_list) {
- if (e_gw_connection_share_folder (sf->cnc, sf->container_id, new_list, sf->sub, sf->mesg, 0) == E_GW_CONNECTION_STATUS_OK) {
- ;
- }
- }
-
- if (update_list) {
- sf->sub = "Shared Folder rights updated";
-
- if (e_gw_connection_share_folder (sf->cnc, sf->container_id, update_list, sf->sub, sf->mesg, 2) == E_GW_CONNECTION_STATUS_OK) {
- ;
- }
- }
- }
- if (remove_list) {
- sf->sub = "Shared Folder removed";
- if (e_gw_connection_share_folder (sf->cnc, sf->container_id, remove_list, sf->sub, sf->mesg, 1) == E_GW_CONNECTION_STATUS_OK) {
- ;
- }
- }
-
- }
-}
-
-static void
-not_ok_clicked (GtkButton *button, ShareFolder *sf)
-{
-
- gchar *subj = NULL;
- gchar *msg = NULL;
- GtkTextIter *start, *end;
- GtkTextBuffer *buffer;
-
- start = g_new0 (GtkTextIter, 1);
- end = g_new0 (GtkTextIter, 1);
- subj = g_strdup (gtk_entry_get_text (sf->subject));
- if (subj)
- sf->sub = subj;
- buffer = gtk_text_view_get_buffer (sf->message);
- gtk_text_buffer_get_start_iter (buffer, start);
- gtk_text_buffer_get_end_iter (buffer, end);
- msg = gtk_text_buffer_get_text (buffer, start, end, FALSE);
- if (msg)
- sf->mesg = msg;
- gtk_widget_destroy (GTK_WIDGET (sf->window));
-
-}
-
-static void
-not_cancel_clicked (GtkButton *button, GtkWidget *window)
-{
- gtk_widget_destroy (window);
-}
-
-static void
-notification_clicked (GtkButton *button, ShareFolder *sf)
-{
- static GtkBuilder *builder;
- GtkButton *not_ok;
- GtkButton *not_cancel;
- GtkWidget *vbox;
-
- sf->window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_window_set_type_hint (GTK_WINDOW (sf->window), GDK_WINDOW_TYPE_HINT_DIALOG);
-
- builder = gtk_builder_new ();
- e_load_ui_builder_definition (builder, "notification.ui");
-
- vbox = GTK_WIDGET (e_builder_get_widget (builder, "vbox191"));
- gtk_container_add (GTK_CONTAINER (sf->window), vbox);
- sf->subject = GTK_ENTRY (e_builder_get_widget (builder, "entry3"));
- gtk_entry_set_text (GTK_ENTRY (sf->subject) , sf->sub);
- sf->message = GTK_TEXT_VIEW (e_builder_get_widget (builder, "textview1"));
- not_ok = GTK_BUTTON (e_builder_get_widget (builder, "nOK"));
- g_signal_connect ((gpointer) not_ok, "clicked", G_CALLBACK (not_ok_clicked), sf);
- not_cancel = GTK_BUTTON (e_builder_get_widget (builder, "nCancel"));
- g_signal_connect ((gpointer) not_cancel, "clicked", G_CALLBACK (not_cancel_clicked), sf->window);
- gtk_window_set_title (GTK_WINDOW (sf->window), _("Custom Notification"));
- gtk_window_set_position (GTK_WINDOW (sf->window) , GTK_WIN_POS_CENTER_ALWAYS);
- gtk_window_set_default_size (GTK_WINDOW (sf->window), 100, 200);
- gtk_window_set_transient_for ((GtkWindow *)sf->window, GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (sf->table))));
- gtk_window_set_modal ((GtkWindow *)sf->window, TRUE);
- gtk_widget_show_all (sf->window);
- gtk_window_present ((GtkWindow *)sf->window);
-}
-
-static void
-addressbook_entry_changed (GtkWidget *entry, gpointer user_data)
-{
-
-}
-
-static void
-address_button_clicked_cb (GtkButton *button, ShareFolder *sf)
-{
- e_name_selector_show_dialog (sf->name_selector, sf->window);
-}
-
-static void
-user_selected (GtkTreeSelection *selection, ShareFolder *sf)
-{
- GtkTreeModel *model;
-
- gtk_tree_selection_set_mode (selection, GTK_SELECTION_SINGLE);
- if (gtk_tree_selection_get_selected (selection, &model, &sf->iter))
- gtk_widget_set_sensitive (GTK_WIDGET (sf->remove), TRUE);
-}
-
-static void
-add_right_clicked (GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
-{
- gboolean right = FALSE;
- SharedUser *usr = NULL;
- EShUsers *user = NULL;
- gchar *email = NULL;
- GtkTreePath *path = NULL;
-
- path = gtk_tree_path_new_from_string (arg1);
- if (!gtk_tree_model_get_iter ((GtkTreeModel *) sf->model, &(sf->iter), path)) {
- gtk_tree_path_free (path);
- return;
- }
- gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, 1, &right , -1);
- usr = find_node (sf->users_list, email);
- if (!usr) {
- gtk_tree_path_free (path);
- return;
- }
- if (!usr->flag) /* if user was already existing one change the flag to update*/
- usr->flag = usr->flag | 0x2;
- user = usr->user_node;
- if (!right) {
- user->rights |= 0x1;
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 1, TRUE, -1);
- } else {
- user->rights &= 0x6;
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 1, FALSE, -1);
- }
- gtk_tree_path_free (path);
-}
-
-static void
-edit_right_clicked (GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
-{
- gboolean right = FALSE;
- SharedUser *usr = NULL;
- EShUsers *user = NULL;
- gchar *email = NULL;
- GtkTreePath *path = NULL;
-
- path = gtk_tree_path_new_from_string (arg1);
- if (!gtk_tree_model_get_iter ((GtkTreeModel *) sf->model, &(sf->iter), path)) {
- gtk_tree_path_free (path);
- return;
- }
- gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, 2, &right , -1);
- usr = find_node (sf->users_list, email);
- if (!usr) {
- gtk_tree_path_free (path);
- return;
- }
- if (!usr->flag) /* if user was already existing one change the flag to update*/
- usr->flag = usr->flag | 0x2;
- user = usr->user_node;
-
- if (!right) {
- user->rights |= 0x2;
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 2, TRUE, -1);
- } else {
- user->rights &= 0x5;
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 2, FALSE, -1);
- }
- gtk_tree_path_free (path);
-}
-
-static void
-delete_right_clicked (GtkCellRenderer *renderer, gchar *arg1, ShareFolder *sf )
-{
- gboolean right = FALSE;
- SharedUser *usr = NULL;
- EShUsers *user = NULL;
- gchar *email = NULL;
- GtkTreePath *path = NULL;
-
- path = gtk_tree_path_new_from_string (arg1);
- if (!gtk_tree_model_get_iter ((GtkTreeModel *) sf->model, &(sf->iter), path)) {
- gtk_tree_path_free (path);
- return;
- }
- gtk_tree_model_get ((GtkTreeModel *) sf->model, &(sf->iter), 0, &email, 3, &right , -1);
- usr = find_node (sf->users_list, email);
- if (!usr) {
- gtk_tree_path_free (path);
- return;
- }
- if (!usr->flag) /* if user was already existing one change the flag to update*/
- usr->flag = usr->flag | 0x2;
- user = usr->user_node;
- if (!right) {
- user->rights |= 0x4;
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 3, TRUE, -1);
- } else {
- user->rights &= 0x3;
- gtk_list_store_set (GTK_LIST_STORE (sf->model), &(sf->iter), 3, FALSE, -1);
- }
- gtk_tree_path_free (path);
-}
-
-static void
-share_folder_construct (ShareFolder *sf)
-{
- ENameSelectorDialog *name_selector_dialog;
- ENameSelectorModel *name_selector_model;
- ENameSelectorEntry *name_selector_entry;
- GtkWidget *box;
-
- sf->builder = gtk_builder_new ();
- e_load_ui_builder_definition (sf->builder, "properties.ui");
-
- sf->vbox = GTK_VBOX (e_builder_get_widget(sf->builder, "vboxSharing"));
- sf->table = GTK_VBOX (e_builder_get_widget (sf->builder, "vbox194"));
- gtk_widget_set_sensitive (GTK_WIDGET (sf->table), FALSE);
-
- sf->shared = GTK_RADIO_BUTTON (e_builder_get_widget (sf->builder, "radShared"));
- g_signal_connect ((gpointer) sf->shared, "clicked", G_CALLBACK (shared_clicked), sf);
-
- sf->not_shared = GTK_RADIO_BUTTON (e_builder_get_widget (sf->builder, "radNotShared"));
- g_signal_connect ((gpointer) sf->not_shared, "clicked", G_CALLBACK (not_shared_clicked), sf);
-
- sf->add_book = GTK_BUTTON (e_builder_get_widget (sf->builder, "Address"));
- gtk_widget_set_sensitive (GTK_WIDGET (sf->add_book), TRUE);
- g_signal_connect((GtkWidget *) sf->add_book, "clicked", G_CALLBACK (address_button_clicked_cb), sf);
-
- sf->name_selector = e_name_selector_new ();
- name_selector_dialog = e_name_selector_peek_dialog (sf->name_selector);
- g_signal_connect (name_selector_dialog, "response",
- G_CALLBACK (gtk_widget_hide), sf);
-
- name_selector_model = e_name_selector_peek_model (sf->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 (sf->name_selector, "Add User");
- g_signal_connect (name_selector_entry, "changed",
- G_CALLBACK (addressbook_entry_changed), sf);
- gtk_label_set_mnemonic_widget (GTK_LABEL (e_builder_get_widget (sf->builder, "label557")), GTK_WIDGET (name_selector_entry));
-
- sf->add_button = GTK_BUTTON (e_builder_get_widget(sf->builder, "Add"));
- g_signal_connect((GtkWidget *) sf->add_button, "clicked", G_CALLBACK (add_clicked), sf);
-
- sf->remove = GTK_BUTTON(e_builder_get_widget(sf->builder, "Remove"));
- g_signal_connect ((GtkWidget *) sf->remove, "clicked", G_CALLBACK (remove_clicked), sf);
- gtk_widget_set_sensitive (GTK_WIDGET (sf->remove), FALSE);
-
- sf->notification = GTK_BUTTON (e_builder_get_widget (sf->builder, "Notification"));
- g_signal_connect((GtkWidget *) sf->notification, "clicked", G_CALLBACK (notification_clicked), sf);
-
- sf->name = GTK_ENTRY (e_builder_get_widget (sf->builder, "entry4"));
- /*TODO:connect name and label*/
- gtk_widget_hide (GTK_WIDGET (sf->name));
- box = GTK_WIDGET (e_builder_get_widget (sf->builder, "hbox227"));
- gtk_box_pack_start (GTK_BOX (box), (GtkWidget *) name_selector_entry, TRUE, TRUE, 0);
- gtk_widget_show ((GtkWidget *) name_selector_entry);
-
- sf->scrolled_window = GTK_WIDGET (e_builder_get_widget (sf->builder,"scrolledwindow4"));
-
- gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (sf->scrolled_window), GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
- sf->model = gtk_list_store_new (4, G_TYPE_STRING, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN, G_TYPE_BOOLEAN);
- sf->user_list = (GtkTreeView *)gtk_tree_view_new ();
- gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (sf->scrolled_window), (GtkWidget *)sf->user_list);
- gtk_tree_view_set_model (GTK_TREE_VIEW (sf->user_list), GTK_TREE_MODEL (sf->model));
- gtk_widget_show (GTK_WIDGET (sf->user_list));
-
- sf->cell = gtk_cell_renderer_text_new ();
- sf->column = gtk_tree_view_column_new_with_attributes (_("Users"), sf->cell, "text", 0, NULL);
- gtk_tree_view_append_column (GTK_TREE_VIEW (sf->user_list),
- GTK_TREE_VIEW_COLUMN (sf->column));
-
- sf->cell = gtk_cell_renderer_toggle_new ();
- sf->column = gtk_tree_view_column_new_with_attributes (_("Add "), sf->cell, "active" , 1, NULL);
- gtk_tree_view_append_column (GTK_TREE_VIEW (sf->user_list),
- GTK_TREE_VIEW_COLUMN (sf->column));
- g_signal_connect (sf->cell, "toggled", G_CALLBACK (add_right_clicked), sf);
-
- sf->cell = gtk_cell_renderer_toggle_new ();
- sf->column = gtk_tree_view_column_new_with_attributes (_("Modify"), sf->cell, "active", 2, NULL);
- gtk_tree_view_append_column (GTK_TREE_VIEW (sf->user_list),
- GTK_TREE_VIEW_COLUMN (sf->column));
- g_signal_connect (sf->cell, "toggled", G_CALLBACK (edit_right_clicked), sf);
-
- sf->cell = gtk_cell_renderer_toggle_new ();
- sf->column = gtk_tree_view_column_new_with_attributes (_("Delete"), sf->cell, "active", 3, NULL);
- gtk_tree_view_append_column (GTK_TREE_VIEW (sf->user_list),
- GTK_TREE_VIEW_COLUMN (sf->column));
- g_signal_connect (sf->cell, "toggled", G_CALLBACK (delete_right_clicked), sf);
-
- g_signal_connect(gtk_tree_view_get_selection(GTK_TREE_VIEW (sf->user_list)), "changed", G_CALLBACK (user_selected), sf);
-}
-
-ShareFolder *
-share_folder_new (EGwConnection *ccnc, gchar *id)
-{
- ShareFolder *new;
- new = (ShareFolder *) g_object_new (share_folder_get_type (), NULL);
- share_folder_construct (new);
- new->cnc = ccnc;
- new->container_id = id;
- if (ccnc && id)
- get_container_list (new);
-
- return (ShareFolder *) new;
-}
-
diff --git a/plugins/groupwise-features/share-folder.h b/plugins/groupwise-features/share-folder.h
deleted file mode 100644
index 2f4bf0c9f1..0000000000
--- a/plugins/groupwise-features/share-folder.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Vivek Jain <jvivek@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifndef __SHARE_FOLDER_H__
-#define __SHARE_FOLDER_H__
-
-#include <gtk/gtk.h>
-#include <camel/camel.h>
-#include <e-gw-connection.h>
-#include <libedataserverui/e-name-selector.h>
-
-#define _SHARE_FOLDER_TYPE (share_folder_get_type ())
-#define SHARE_FOLDER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), SHARE_FOLDER, ShareFolder))
-#define SHARE_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), SHARE_FOLDER_TYPE, ShareFolder))
-#define IS_SHARE_FOLDER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), SHARE_FOLDER_TYPE))
-#define IS_SHARE_FOLDER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), SHARE_FOLDER_TYPE))
-
-G_BEGIN_DECLS
-
-typedef struct _ShareFolder ShareFolder;
-typedef struct _ShareFolderClass ShareFolderClass;
-
-struct _ShareFolder {
- GtkVBox parent_object;
-
- GtkBuilder *builder;
-
- /* General tab */
-
- /* Default Behavior */
- GtkTreeView *user_list;
- GtkTextView *message;
- GtkButton *add_button;
- GtkButton *remove;
- GtkButton *add_book;
- GtkButton *notification;
- GtkEntry *name;
- GtkEntry *subject;
- GtkRadioButton *shared;
- GtkRadioButton *not_shared;
- GtkWidget *scrolled_window;
- GtkListStore *model;
- GtkCellRenderer *cell;
- GtkTreeViewColumn *column;
- GtkVBox *vbox;
- GtkVBox *table;
- GtkWidget *window;
-
- GList *users_list;
- EGwContainer *gcontainer;
- gint users;
- gboolean byme;
- gboolean tome;
- gint flag_for_ok;
- gchar *email;
- gboolean is_shared;
- EGwConnection *cnc;
- gchar *container_id;
- const gchar *sub;
- gchar *mesg;
- GList *container_list;
- GtkTreeIter iter;
- ENameSelector *name_selector;
-
-};
-
-struct _ShareFolderClass {
- GtkVBoxClass parent_class;
-
-};
-
-GType share_folderget_type (void);
-struct _ShareFolder * share_folder_new (EGwConnection *ccnc, gchar *id);
-void share_folder (struct _ShareFolder *sf);
-gchar * get_container_id (EGwConnection *cnc, const gchar *fname);
-EGwConnection * get_cnc (CamelStore *store);
-
-G_END_DECLS
-
-#endif /* __SHARE_FOLDER_H__ */
diff --git a/plugins/groupwise-features/status-track.c b/plugins/groupwise-features/status-track.c
deleted file mode 100644
index 26bcb90337..0000000000
--- a/plugins/groupwise-features/status-track.c
+++ /dev/null
@@ -1,271 +0,0 @@
-/*
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) version 3.
- *
- * 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with the program; if not, see <http://www.gnu.org/licenses/>
- *
- *
- * Authors:
- * Chenthill Palanisamy <pchenthill@novell.com>
- * Parthasarathi Susarla <sparthasarathi@novell.com>
- * Sankar P <psankar@novell.com>
- *
- * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
- *
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <glib/gi18n-lib.h>
-#include <string.h>
-#include <stdio.h>
-#include <time.h>
-#include <gtk/gtk.h>
-
-#include <mail/e-mail-reader.h>
-#include <mail/em-utils.h>
-#include <mail/message-list.h>
-
-#include <e-gw-connection.h>
-
-#include "gw-ui.h"
-#include "share-folder.h"
-
-static gchar *
-format_date (const gchar * value)
-{
- time_t time;
- gchar *str;
-
- time = e_gw_connection_get_date_from_string (value);
- str = ctime (&time);
-
- str[strlen (str)-1] = '\0';
- return str;
-}
-
-static CamelMimeMessage *
-get_selected_message (EShellView *shell_view,
- CamelFolder **folder,
- gchar **selected_uid)
-{
- CamelMimeMessage *msg = NULL;
- EShellContent *shell_content;
- EMailReader *reader;
- GPtrArray *uids;
-
- shell_content = e_shell_view_get_shell_content (shell_view);
-
- reader = E_MAIL_READER (shell_content);
- uids = e_mail_reader_get_selected_uids (reader);
-
- if (uids && uids->len == 1) {
- *folder = e_mail_reader_get_folder (reader);
- *selected_uid = g_strdup (g_ptr_array_index (uids, 0));
-
- /* FIXME Not passing a GCancellable or GError here. */
- msg = camel_folder_get_message_sync (
- *folder, *selected_uid, NULL, NULL);
- }
-
- em_utils_uids_free (uids);
-
- return msg;
-}
-
-void
-gw_track_message_status_cb (GtkAction *action,
- EShellView *shell_view)
-{
- CamelMimeMessage *msg = NULL;
- CamelFolder *folder = NULL;
- gchar *selected_uid = NULL;
- CamelInternetAddress *from;
- const gchar *namep, *addp;
-
- GtkDialog *d;
- GtkTable *table;
- GtkWidget *widget;
- GtkWidget *content_area;
- GtkScrolledWindow *win;
- GtkVBox *vbox;
-
- time_t time;
- gchar *time_str;
-
- gchar *boldmsg;
-
- gint row = 0;
-
- EGwConnection *cnc;
- EGwItem *gwitem;
-
- /* Get message */
- msg = get_selected_message (shell_view, &folder, &selected_uid);
- if (!msg) {
- g_print ("Error!! No message\n");
- g_free (selected_uid);
- return;
- }
-
- /* Create the dialog */
- d = (GtkDialog *) gtk_dialog_new ();
- content_area = gtk_dialog_get_content_area (d);
- gtk_dialog_add_button (d, GTK_STOCK_OK, GTK_RESPONSE_OK);
- gtk_window_set_title (GTK_WINDOW (d), _("Message Status"));
-
- table = (GtkTable *) gtk_table_new (1, 2, FALSE);
- win = (GtkScrolledWindow *) gtk_scrolled_window_new (NULL, NULL);
- gtk_container_add (GTK_CONTAINER (content_area), GTK_WIDGET (win));
- vbox = (GtkVBox *) gtk_vbox_new (FALSE, 12);
- gtk_scrolled_window_add_with_viewport (win, GTK_WIDGET (vbox));
- gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (table), FALSE, TRUE, 0);
- gtk_scrolled_window_set_policy (win, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
- gtk_table_set_col_spacings (table ,12);
- gtk_table_set_row_spacings (table, 6);
-
- /* Subject */
- boldmsg = g_strdup_printf ("<b>%s</b>", _("Subject:"));
- widget = gtk_label_new (boldmsg);
- g_free (boldmsg);
- gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
- gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
- gtk_table_attach (table, widget , 0, 1, row, row + 1, GTK_FILL, 0, 0, 0);
- widget = gtk_label_new (camel_mime_message_get_subject (msg));
- gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
- gtk_table_attach (table, widget , 1, 2, row, row + 1, GTK_FILL, 0, 0, 0);
- row++;
-
- /* From */
- from = camel_mime_message_get_from (msg);
- camel_internet_address_get (from, 0, &namep, &addp);
- boldmsg = g_strdup_printf ("<b>%s</b>", _("From:"));
- widget = gtk_label_new (boldmsg);
- g_free (boldmsg);
- gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
- gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
- gtk_table_attach (table, widget , 0, 1, row, row + 1, GTK_FILL, 0, 0, 0);
- widget = gtk_label_new (namep);
- gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
- gtk_table_attach (table, widget , 1, 2, row, row + 1, GTK_FILL, 0, 0, 0);
- row++;
-
- /* creation date */
- time = camel_mime_message_get_date (msg, NULL);
- time_str = ctime (&time);
- time_str[strlen (time_str)-1] = '\0' ;
- boldmsg = g_strdup_printf ("<b>%s</b>", _("Creation date:"));
- widget = gtk_label_new (boldmsg);
- g_free (boldmsg);
- gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
- gtk_label_set_use_markup (GTK_LABEL (widget), TRUE);
- gtk_table_attach (table, widget , 0, 1, row, row + 1, GTK_FILL, 0, 0, 0);
- widget = gtk_label_new (time_str);
- gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.5);
- gtk_table_attach (table, widget , 1, 2, row, row + 1, GTK_FILL, 0, 0, 0);
- row++;
-
- /* spacing */
- widget = gtk_label_new ("");
- gtk_table_attach (table, widget, 0, 1, row, row + 1, GTK_FILL, 0, 0, 0);
-
- /* Table headers */
- row = 0;
- table = (GtkTable *) gtk_table_new (1, 3, FALSE);
- gtk_table_set_col_spacings (table ,12);
- gtk_table_set_row_spacings (table, 6);
- gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (table), FALSE, TRUE, 0);
- cnc = get_cnc (camel_folder_get_parent_store (folder));
-
- if (E_IS_GW_CONNECTION (cnc)) {
- GSList *recipient_list;
- e_gw_connection_get_item (
- cnc, get_container_id (cnc, "Sent Items"),
- selected_uid, "distribution recipientStatus", &gwitem);
- recipient_list = e_gw_item_get_recipient_list (gwitem);
- for (;recipient_list != NULL; recipient_list = recipient_list->next)
- {
- EGwItemRecipient *recipient;
- GString *label = NULL;
- GtkLabel *detail;
-
- label = g_string_new("");
- recipient = recipient_list->data;
-
- if (recipient->display_name) {
- label = g_string_append (label, "<b>");
- label = g_string_append (label, _("Recipient: "));
- label = g_string_append (label, recipient->display_name);
- label = g_string_append (label, "</b>");
- label = g_string_append_c (label, '\n');
- }
-
- if (recipient->delivered_date) {
- label = g_string_append (label, _("Delivered: "));
- label = g_string_append (label, format_date (recipient->delivered_date));
- label = g_string_append_c (label, '\n');
- }
-
- if (recipient->opened_date) {
- label = g_string_append (label, _("Opened: "));
- label = g_string_append (label, format_date (recipient->opened_date));
- label = g_string_append_c (label, '\n');
- }
- if (recipient->accepted_date) {
- label = g_string_append (label, _("Accepted: "));
- label = g_string_append (label, format_date (recipient->accepted_date));
- label = g_string_append_c (label, '\n');
- }
- if (recipient->deleted_date) {
- label = g_string_append (label, _("Deleted: "));
- label = g_string_append (label, format_date (recipient->deleted_date));
- label = g_string_append_c (label, '\n');
- }
- if (recipient->declined_date) {
- label = g_string_append (label, _("Declined: "));
- label = g_string_append (label, format_date (recipient->declined_date));
- label = g_string_append_c (label, '\n');
- }
- if (recipient->completed_date) {
- label = g_string_append (label, _("Completed: "));
- label = g_string_append (label, format_date (recipient->completed_date));
- label = g_string_append_c (label, '\n');
- }
- if (recipient->undelivered_date) {
- label = g_string_append (label, _("Undelivered: "));
- label = g_string_append (label, format_date (recipient->undelivered_date));
- label = g_string_append_c (label, '\n');
- }
-
- detail = GTK_LABEL (gtk_label_new (label->str));
- g_string_free (label, TRUE);
- gtk_label_set_selectable (detail, TRUE);
- gtk_label_set_use_markup (detail, TRUE);
- gtk_table_attach (
- table, GTK_WIDGET (detail),
- 1, 2, row, row + 1, GTK_FILL, 0, 0, 0);
- row++;
- }
- }
-
- /* set size and display the dialog */
- gtk_widget_set_size_request (GTK_WIDGET (win), 400, 300);
- gtk_widget_show_all (GTK_WIDGET (d));
- if (gtk_dialog_run (d) == GTK_RESPONSE_OK)
- gtk_widget_destroy (GTK_WIDGET (d));
- else
- gtk_widget_destroy (GTK_WIDGET (d));
-
- g_free (selected_uid);
-}