diff options
author | Chenthill Palanisamy <pchen@src.gnome.org> | 2007-09-10 03:35:00 +0800 |
---|---|---|
committer | Chenthill Palanisamy <pchen@src.gnome.org> | 2007-09-10 03:35:00 +0800 |
commit | 97bc97c1b865ee34f1f794fe3445475a7cb4f70f (patch) | |
tree | 74010a1ff66a52284757e8cd4603c1816bf39937 /calendar/gui | |
parent | cf93151a6bc1c3dd4552b17993c59d57b4ad2bb6 (diff) | |
download | gsoc2013-evolution-97bc97c1b865ee34f1f794fe3445475a7cb4f70f.tar.gz gsoc2013-evolution-97bc97c1b865ee34f1f794fe3445475a7cb4f70f.tar.zst gsoc2013-evolution-97bc97c1b865ee34f1f794fe3445475a7cb4f70f.zip |
Fixes #270605
Fixes #270605
svn path=/trunk/; revision=34203
Diffstat (limited to 'calendar/gui')
-rw-r--r-- | calendar/gui/dialogs/event-page.c | 29 | ||||
-rw-r--r-- | calendar/gui/dialogs/task-page.c | 25 |
2 files changed, 33 insertions, 21 deletions
diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index 44ea244dce..9562675f6a 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -1084,7 +1084,7 @@ event_page_fill_widgets (CompEditorPage *page, ECalComponent *comp) } if (e_cal_get_static_capability (COMP_EDITOR_PAGE (epage)->client, CAL_STATIC_CAPABILITY_NO_ORGANIZER) && (COMP_EDITOR_PAGE (epage)->flags & COMP_EDITOR_PAGE_DELEGATE)) - string = g_strdup (priv->user_add); + string = g_strdup (backend_addr); else if ( organizer.cn != NULL) string = g_strdup_printf ("%s <%s>", organizer.cn, strip); else @@ -2739,7 +2739,7 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) e_cal_get_cal_address(client, &backend_addr, NULL); - if (backend_addr && priv->is_meeting) + if (priv->is_meeting) event_page_select_organizer (epage, backend_addr); set_subscriber_info_string (epage, backend_addr); @@ -3147,13 +3147,13 @@ event_page_select_organizer (EventPage *epage, const char *backend_address) EventPagePrivate *priv; GList *l; EAccount *def_account; - const char *def_address; + const char *def_address = NULL; gboolean subscribed_cal = FALSE; ESource *source = NULL; const char *user_addr = NULL; def_account = itip_addresses_get_default(); - if (def_account) + if (def_account && def_account->enabled) def_address = g_strdup_printf("%s <%s>", def_account->id->name, def_account->id->address); priv = epage->priv; @@ -3165,16 +3165,17 @@ event_page_select_organizer (EventPage *epage, const char *backend_address) if (user_addr) subscribed_cal = TRUE; else - user_addr = backend_address; + user_addr = (backend_address && *backend_address) ? backend_address : NULL; priv->default_address = NULL; - for (l = priv->address_strings; l != NULL; l = l->next) - if (g_strrstr ((gchar *) l->data, user_addr) != NULL) { - priv->default_address = (gchar *) l->data; - break; - } + if (user_addr) + for (l = priv->address_strings; l != NULL && user_addr; l = l->next) + if (g_strrstr ((gchar *) l->data, user_addr) != NULL) { + priv->default_address = (gchar *) l->data; + break; + } - if (!priv->default_address && def_account) + if (!priv->default_address && def_address) priv->default_address = def_address; if (priv->default_address) { @@ -3234,6 +3235,12 @@ event_page_construct (EventPage *epage, EMeetingStore *model, ECal *client) gchar *full = NULL; a = (EAccount *)e_iterator_get(it); + + + /* skip disabled accounts */ + if (!a->enabled) + continue; + full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); priv->address_strings = g_list_append(priv->address_strings, full); diff --git a/calendar/gui/dialogs/task-page.c b/calendar/gui/dialogs/task-page.c index ef63889a93..33a32bbd54 100644 --- a/calendar/gui/dialogs/task-page.c +++ b/calendar/gui/dialogs/task-page.c @@ -1737,7 +1737,7 @@ source_changed_cb (GtkWidget *widget, ESource *source, gpointer data) e_cal_get_cal_address(client, &backend_addr, NULL); - if (backend_addr && priv->is_assignment) + if (priv->is_assignment) task_page_select_organizer (tpage, backend_addr); set_subscriber_info_string (tpage, backend_addr); @@ -1913,13 +1913,13 @@ task_page_select_organizer (TaskPage *tpage, const char *backend_address) TaskPagePrivate *priv; GList *l; EAccount *def_account; - const char *def_address; + const char *def_address = NULL; gboolean subscribed_cal = FALSE; ESource *source = NULL; const char *user_addr = NULL; def_account = itip_addresses_get_default(); - if (def_account) + if (def_account && def_account->enabled) def_address = g_strdup_printf("%s <%s>", def_account->id->name, def_account->id->address); priv = tpage->priv; @@ -1931,16 +1931,17 @@ task_page_select_organizer (TaskPage *tpage, const char *backend_address) if (user_addr) subscribed_cal = TRUE; else - user_addr = backend_address; + user_addr = (backend_address && *backend_address) ? backend_address : NULL; priv->default_address = NULL; - for (l = priv->address_strings; l != NULL; l = l->next) - if (g_strrstr ((gchar *) l->data, user_addr) != NULL) { - priv->default_address = (gchar *) l->data; - break; - } + if (user_addr) + for (l = priv->address_strings; l != NULL && user_addr; l = l->next) + if (g_strrstr ((gchar *) l->data, user_addr) != NULL) { + priv->default_address = (gchar *) l->data; + break; + } - if (!priv->default_address && def_account) + if (!priv->default_address && def_address) priv->default_address = def_address; if (priv->default_address) { @@ -2000,6 +2001,10 @@ task_page_construct (TaskPage *tpage, EMeetingStore *model, ECal *client) gchar *full = NULL; a = (EAccount *)e_iterator_get(it); + + if (!a->enabled) + continue; + full = g_strdup_printf("%s <%s>", a->id->name, a->id->address); priv->address_strings = g_list_append(priv->address_strings, full); |