aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-popup.c
diff options
context:
space:
mode:
authorSuman Manjunath <msuman@src.gnome.org>2008-10-13 18:24:07 +0800
committerSuman Manjunath <msuman@src.gnome.org>2008-10-13 18:24:07 +0800
commita3b38ef1293fa8c8f162be5310e5b3dec8782a2e (patch)
tree71abf784120c4ad329a10d0868a934569425045a /calendar/gui/e-cal-popup.c
parent1f9fc79ef8f6a5391d51b4970b8d4c367f8edc52 (diff)
downloadgsoc2013-evolution-a3b38ef1293fa8c8f162be5310e5b3dec8782a2e.tar.gz
gsoc2013-evolution-a3b38ef1293fa8c8f162be5310e5b3dec8782a2e.tar.zst
gsoc2013-evolution-a3b38ef1293fa8c8f162be5310e5b3dec8782a2e.zip
Fix for bug #424818 (bugzilla.novell.com) - Integrate the mark-calendar-offline plugin into the main code as we already have a similar per-calendar option which does the same thing.
svn path=/trunk/; revision=36610
Diffstat (limited to 'calendar/gui/e-cal-popup.c')
-rw-r--r--calendar/gui/e-cal-popup.c32
1 files changed, 11 insertions, 21 deletions
diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c
index c18464d8ce..a8b0551bcb 100644
--- a/calendar/gui/e-cal-popup.c
+++ b/calendar/gui/e-cal-popup.c
@@ -696,7 +696,7 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector)
{
ECalPopupTargetSource *t = e_popup_target_new(&eabp->popup, E_CAL_POPUP_TARGET_SOURCE, sizeof(*t));
guint32 mask = ~0;
- const char *source_uri;
+ const char *relative_uri;
char *uri;
ESource *source;
const char *offline = NULL;
@@ -713,42 +713,32 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector)
mask &= ~E_CAL_POPUP_SOURCE_PRIMARY;
/* FIXME Gross hack, should have a property or something */
- source_uri = e_source_peek_relative_uri(source);
- if (source_uri && !strcmp("system", source_uri))
+ relative_uri = e_source_peek_relative_uri(source);
+ if (relative_uri && !strcmp("system", relative_uri))
mask &= ~E_CAL_POPUP_SOURCE_SYSTEM;
else
mask &= ~E_CAL_POPUP_SOURCE_USER;
- source = e_source_selector_peek_primary_selection (selector);
uri = e_source_get_uri (source);
if (!uri || (g_ascii_strncasecmp (uri, "file://", 7) && g_ascii_strncasecmp (uri, "contacts://", 11))) {
/* check for e_target_selector's offline_status property here */
- offline = e_source_get_property (source, "offline");
-
- if (offline && strcmp (offline,"1") == 0) {
- /* set the menu item to Mark Offline - */
- mask &= ~E_CAL_POPUP_SOURCE_NO_OFFLINE;
- } else {
+ offline = e_source_get_property (source, "offline_sync");
+ if (offline && strcmp (offline, "1") == 0)
+ mask &= ~E_CAL_POPUP_SOURCE_NO_OFFLINE; /* set the menu item to Mark Offline */
+ else
mask &= ~E_CAL_POPUP_SOURCE_OFFLINE;
- }
} else {
mask |= E_CAL_POPUP_SOURCE_NO_OFFLINE;
mask |= E_CAL_POPUP_SOURCE_OFFLINE;
}
g_free (uri);
- source = e_source_selector_peek_primary_selection (selector);
- /*check for delete_status property here*/
+ /* check for delete_status property here */
delete = e_source_get_property (source, "delete");
-
- if (delete && strcmp (delete,"no") == 0) {
- /*set the menu item to non deletable */
- mask &= ~E_CAL_POPUP_SOURCE_NO_DELETE;
- }
- else {
+ if (delete && strcmp (delete, "no") == 0)
+ mask &= ~E_CAL_POPUP_SOURCE_NO_DELETE; /* set the menu item to non deletable */
+ else
mask &= ~E_CAL_POPUP_SOURCE_DELETE;
- }
-
t->target.mask = mask;