diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-31 20:54:01 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2008-10-31 20:54:01 +0800 |
commit | 78fd379aa7c17c60c4b5fc07e5243b32ec4a2639 (patch) | |
tree | 55a5c29dfb02f27e094b1fcf3e324904008aa5ad /calendar/modules/e-cal-shell-view-actions.c | |
parent | 9c9e85d286fe61ed11e457c737bd26e2732119ab (diff) | |
download | gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar.gz gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar.bz2 gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar.lz gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar.xz gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.tar.zst gsoc2013-evolution-78fd379aa7c17c60c4b5fc07e5243b32ec4a2639.zip |
Support inline renaming of sources in the source selector, with help
from evolution-data-server (see bug #558322).
Kill another frivolous plugin: select-one-source
svn path=/branches/kill-bonobo/; revision=36705
Diffstat (limited to 'calendar/modules/e-cal-shell-view-actions.c')
-rw-r--r-- | calendar/modules/e-cal-shell-view-actions.c | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/calendar/modules/e-cal-shell-view-actions.c b/calendar/modules/e-cal-shell-view-actions.c index f2c7d47b62..22b2250acb 100644 --- a/calendar/modules/e-cal-shell-view-actions.c +++ b/calendar/modules/e-cal-shell-view-actions.c @@ -284,6 +284,49 @@ action_calendar_purge_cb (GtkAction *action, } static void +action_calendar_rename_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ + ECalShellSidebar *cal_shell_sidebar; + ESourceSelector *selector; + + cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar; + selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); + + e_source_selector_edit_primary_selection (selector); +} + +static void +action_calendar_select_one_cb (GtkAction *action, + ECalShellView *cal_shell_view) +{ + ECalShellSidebar *cal_shell_sidebar; + ESourceSelector *selector; + ESource *primary; + GSList *list, *iter; + + /* XXX ESourceSelector should provide a function for this. */ + + cal_shell_sidebar = cal_shell_view->priv->cal_shell_sidebar; + selector = e_cal_shell_sidebar_get_selector (cal_shell_sidebar); + primary = e_source_selector_peek_primary_selection (selector); + g_return_if_fail (primary != NULL); + + list = e_source_selector_get_selection (selector); + for (iter = list; iter != NULL; iter = iter->next) { + ESource *source = iter->data; + + if (source == primary) + continue; + + e_source_selector_unselect_source (selector, source); + } + e_source_selector_free_selection (list); + + e_source_selector_select_source (selector, primary); +} + +static void action_calendar_view_cb (GtkRadioAction *action, GtkRadioAction *current, ECalShellView *cal_shell_view) @@ -615,6 +658,20 @@ static GtkActionEntry calendar_entries[] = { N_("Purge old appointments and meetings"), G_CALLBACK (action_calendar_purge_cb) }, + { "calendar-rename", + NULL, + N_("_Rename..."), + "F2", + N_("Rename the selected calendar"), + G_CALLBACK (action_calendar_rename_cb) }, + + { "calendar-select-one", + "stock_check-filled", + N_("Show _Only This Calendar"), + NULL, + NULL, /* XXX Add a tooltip! */ + G_CALLBACK (action_calendar_select_one_cb) }, + { "event-clipboard-copy", GTK_STOCK_COPY, NULL, |