aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui
diff options
context:
space:
mode:
authorMilan Crha <mcrha@src.gnome.org>2007-08-23 15:54:00 +0800
committerMilan Crha <mcrha@src.gnome.org>2007-08-23 15:54:00 +0800
commit71b50d249c33e7008fd96f789a7de2c0f8879213 (patch)
tree0cfdfd2648a865641d622911c7e322314a111e29 /calendar/gui
parent7690fe3b47564b16c3e47d6ebadaa213e4297491 (diff)
downloadgsoc2013-evolution-71b50d249c33e7008fd96f789a7de2c0f8879213.tar.gz
gsoc2013-evolution-71b50d249c33e7008fd96f789a7de2c0f8879213.tar.zst
gsoc2013-evolution-71b50d249c33e7008fd96f789a7de2c0f8879213.zip
2007-08-23 mcrha Fix for bug #272167
svn path=/trunk/; revision=34069
Diffstat (limited to 'calendar/gui')
-rw-r--r--calendar/gui/e-cal-popup.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c
index f6ce2efe5f..7eccfedc14 100644
--- a/calendar/gui/e-cal-popup.c
+++ b/calendar/gui/e-cal-popup.c
@@ -669,6 +669,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;
+ char *uri;
ESource *source;
const char *offline = NULL;
const char *delete = NULL;
@@ -690,18 +691,23 @@ e_cal_popup_target_new_source(ECalPopup *eabp, ESourceSelector *selector)
else
mask &= ~E_CAL_POPUP_SOURCE_USER;
-
source = e_source_selector_peek_primary_selection (selector);
- /* 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 {
- mask &= ~E_CAL_POPUP_SOURCE_OFFLINE;
+ uri = e_source_get_uri (source);
+ if (!uri || (g_strncasecmp (uri, "file://", 7) && g_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 {
+ 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*/