aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-28 03:06:45 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-28 03:06:45 +0800
commit142f09f477519a408aa398a043ec8d8fb1269423 (patch)
tree38050d3f87ac1a20bc2d3119592c0f309096eb76
parentd0d713e84617d07ece224c5eee5abd3769ccfec3 (diff)
downloadgsoc2013-evolution-142f09f477519a408aa398a043ec8d8fb1269423.tar
gsoc2013-evolution-142f09f477519a408aa398a043ec8d8fb1269423.tar.gz
gsoc2013-evolution-142f09f477519a408aa398a043ec8d8fb1269423.tar.bz2
gsoc2013-evolution-142f09f477519a408aa398a043ec8d8fb1269423.tar.lz
gsoc2013-evolution-142f09f477519a408aa398a043ec8d8fb1269423.tar.xz
gsoc2013-evolution-142f09f477519a408aa398a043ec8d8fb1269423.tar.zst
gsoc2013-evolution-142f09f477519a408aa398a043ec8d8fb1269423.zip
EMailPartItip: Remove redundant client cache.
EClientCache already serves this purpose.
-rw-r--r--modules/itip-formatter/e-mail-parser-itip.c8
-rw-r--r--modules/itip-formatter/e-mail-part-itip.h1
-rw-r--r--modules/itip-formatter/itip-view.c37
3 files changed, 0 insertions, 46 deletions
diff --git a/modules/itip-formatter/e-mail-parser-itip.c b/modules/itip-formatter/e-mail-parser-itip.c
index 715bb30fe1..088f79d8ae 100644
--- a/modules/itip-formatter/e-mail-parser-itip.c
+++ b/modules/itip-formatter/e-mail-parser-itip.c
@@ -66,19 +66,11 @@ static void
mail_part_itip_free (EMailPart *mail_part)
{
EMailPartItip *pitip = (EMailPartItip *) mail_part;
- gint i;
g_cancellable_cancel (pitip->cancellable);
g_clear_object (&pitip->cancellable);
g_clear_object (&pitip->client_cache);
- for (i = 0; i < E_CAL_CLIENT_SOURCE_TYPE_LAST; i++) {
- if (pitip->clients[i]) {
- g_hash_table_destroy (pitip->clients[i]);
- pitip->clients[i] = NULL;
- }
- }
-
g_free (pitip->vcalendar);
pitip->vcalendar = NULL;
diff --git a/modules/itip-formatter/e-mail-part-itip.h b/modules/itip-formatter/e-mail-part-itip.h
index 150e113f08..ac56234f23 100644
--- a/modules/itip-formatter/e-mail-part-itip.h
+++ b/modules/itip-formatter/e-mail-part-itip.h
@@ -44,7 +44,6 @@ struct _EMailPartItip {
gchar *uid;
EClientCache *client_cache;
- GHashTable *clients[E_CAL_CLIENT_SOURCE_TYPE_LAST];
ECalClient *current_client;
ECalClientSourceType type;
diff --git a/modules/itip-formatter/itip-view.c b/modules/itip-formatter/itip-view.c
index 77a3349efe..1b8ec7b040 100644
--- a/modules/itip-formatter/itip-view.c
+++ b/modules/itip-formatter/itip-view.c
@@ -3538,11 +3538,8 @@ cal_opened_cb (GObject *source_object,
{
ItipView *view = user_data;
EMailPartItip *pitip = itip_view_get_mail_part (view);
- ECalClientSourceType source_type;
EClient *client;
- ESource *source;
ECalClient *cal_client;
- const gchar *uid;
GError *error = NULL;
client = e_client_cache_get_client_finish (
@@ -3568,12 +3565,6 @@ cal_opened_cb (GObject *source_object,
cal_client = E_CAL_CLIENT (client);
g_return_if_fail (cal_client != NULL);
- source = e_client_get_source (client);
- uid = e_source_get_uid (source);
- source_type = e_cal_client_get_source_type (cal_client);
- g_hash_table_insert (
- pitip->clients[source_type], g_strdup (uid), cal_client);
-
if (e_cal_client_check_recurrences_no_master (cal_client)) {
icalcomponent *icalcomp;
gboolean show_recur_check;
@@ -3607,24 +3598,11 @@ start_calendar_server (EMailPartItip *pitip,
GAsyncReadyCallback func,
gpointer data)
{
- ECalClient *client;
EClientCache *client_cache;
const gchar *extension_name = NULL;
g_return_if_fail (source != NULL);
- client = g_hash_table_lookup (pitip->clients[type], e_source_get_uid (source));
- if (client) {
- pitip->current_client = client;
-
- itip_view_remove_lower_info_item (view, pitip->progress_info_id);
- pitip->progress_info_id = 0;
-
- set_buttons_sensitive (pitip, view);
-
- return;
- }
-
switch (type) {
case E_CAL_CLIENT_SOURCE_TYPE_EVENTS:
extension_name = E_SOURCE_EXTENSION_CALENDAR;
@@ -4034,13 +4012,11 @@ find_cal_opened_cb (GObject *source_object,
FormatItipFindData *fd = user_data;
EMailPartItip *pitip = fd->puri;
ItipView *view = fd->view;
- ECalClientSourceType source_type;
EClient *client;
ESource *source;
ECalClient *cal_client;
gboolean search_for_conflicts = FALSE;
const gchar *extension_name;
- const gchar *uid;
GError *error = NULL;
client = e_client_cache_get_client_finish (
@@ -4083,12 +4059,8 @@ find_cal_opened_cb (GObject *source_object,
}
cal_client = E_CAL_CLIENT (client);
- source_type = e_cal_client_get_source_type (cal_client);
source = e_client_get_source (client);
- uid = e_source_get_uid (source);
- g_hash_table_insert (
- pitip->clients[source_type], g_strdup (uid), cal_client);
extension_name = E_SOURCE_EXTENSION_CONFLICT_SEARCH;
if (e_source_has_extension (source, extension_name)) {
@@ -5856,7 +5828,6 @@ itip_view_init_view (ItipView *view)
GSList *list, *l;
icalcomponent *icalcomp;
const gchar *string, *org;
- gint i;
gboolean response_enabled;
gboolean have_alarms = FALSE;
EMailPartItip *info;
@@ -5873,14 +5844,6 @@ itip_view_init_view (ItipView *view)
/* Reset current client before initializing view */
info->current_client = NULL;
- /* Initialize the ecal hashes */
- for (i = 0; i < E_CAL_CLIENT_SOURCE_TYPE_LAST; i++)
- info->clients[i] = g_hash_table_new_full (
- (GHashFunc) g_str_hash,
- (GEqualFunc) g_str_equal,
- (GDestroyNotify) g_free,
- (GDestroyNotify) g_object_unref);
-
/* FIXME Handle multiple VEVENTS with the same UID, ie detached instances */
if (!extract_itip_data (info, view, &have_alarms))
return;