aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/tasks-component.c
diff options
context:
space:
mode:
authorJP Rosevear <jpr@novell.com>2004-09-23 21:10:57 +0800
committerJP Rosevear <jpr@src.gnome.org>2004-09-23 21:10:57 +0800
commit919c45d4f55966934f4a07105ec468871e6add2c (patch)
treea582d331e86e95d29caebd7bb1b8aa891d96ee15 /calendar/gui/tasks-component.c
parentb15d8461ddf10cabbba7e9a963c0bd0c893489d3 (diff)
downloadgsoc2013-evolution-919c45d4f55966934f4a07105ec468871e6add2c.tar
gsoc2013-evolution-919c45d4f55966934f4a07105ec468871e6add2c.tar.gz
gsoc2013-evolution-919c45d4f55966934f4a07105ec468871e6add2c.tar.bz2
gsoc2013-evolution-919c45d4f55966934f4a07105ec468871e6add2c.tar.lz
gsoc2013-evolution-919c45d4f55966934f4a07105ec468871e6add2c.tar.xz
gsoc2013-evolution-919c45d4f55966934f4a07105ec468871e6add2c.tar.zst
gsoc2013-evolution-919c45d4f55966934f4a07105ec468871e6add2c.zip
ditto
2004-09-22 JP Rosevear <jpr@novell.com> * gui/calendar-component.c (fill_popup_menu_cb): ditto * gui/tasks-component.c (fill_popup_menu_cb): don't allow a delete of the system calendar svn path=/trunk/; revision=27339
Diffstat (limited to 'calendar/gui/tasks-component.c')
-rw-r--r--calendar/gui/tasks-component.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c
index 76843b264e..a817ca8546 100644
--- a/calendar/gui/tasks-component.c
+++ b/calendar/gui/tasks-component.c
@@ -364,17 +364,23 @@ edit_task_list_cb (GtkWidget *widget, TasksComponentView *component_view)
static void
fill_popup_menu_cb (ESourceSelector *selector, GtkMenu *menu, TasksComponentView *component_view)
{
- gboolean sensitive;
+ ESource *source;
+ gboolean sensitive, system;
+ const char *source_uri;
+
+ source = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector));
+ sensitive = source ? TRUE : FALSE;
- sensitive = e_source_selector_peek_primary_selection (E_SOURCE_SELECTOR (component_view->source_selector)) ?
- TRUE : FALSE;
+ /* FIXME Gross hack, should have a property or something */
+ source_uri = e_source_peek_relative_uri (source);
+ system = source_uri && !strcmp ("system", source_uri);
add_popup_menu_item (menu, _("New Task List"), "stock_todo",
G_CALLBACK (new_task_list_cb), component_view, TRUE);
add_popup_menu_item (menu, _("Copy"), "stock_folder-copy",
G_CALLBACK (copy_task_list_cb), component_view, sensitive);
add_popup_menu_item (menu, _("Delete"), "stock_delete", G_CALLBACK (delete_task_list_cb),
- component_view, sensitive);
+ component_view, sensitive && !system);
add_popup_menu_item (menu, _("Properties..."), NULL, G_CALLBACK (edit_task_list_cb),
component_view, sensitive);
}