From 1a04fd272634d22277979c705ae854bea580905a Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Mon, 17 Nov 2008 19:30:33 +0000 Subject: ** Fixes bug #558322 2008-11-17 Matthew Barnes ** Fixes bug #558322 * addressbook/gui/component/addressbook-view.c (rename_addressbook_cb): * calendar/gui/calendar-component.c (rename_calendar_cb): * calendar/gui/memos-component.c (rename_memo_list_cb): * calendar/gui/tasks-component.c (rename_task_list_cb): New "Rename" item in the source selector pop-up menu calls the recently added e_source_selector_edit_primary_selection(). Still need to bind the "F2" key to this action, but I'm not sure how whether EPopup supports that. svn path=/trunk/; revision=36791 --- calendar/ChangeLog | 12 ++++++++++++ calendar/gui/calendar-component.c | 11 +++++++++++ calendar/gui/memos-component.c | 11 +++++++++++ calendar/gui/tasks-component.c | 11 +++++++++++ 4 files changed, 45 insertions(+) (limited to 'calendar') diff --git a/calendar/ChangeLog b/calendar/ChangeLog index 76bbf8d2ed..4cd2f2cbac 100644 --- a/calendar/ChangeLog +++ b/calendar/ChangeLog @@ -1,3 +1,15 @@ +2008-11-17 Matthew Barnes + + ** Fixes part of bug #558322 + + * gui/calendar-component.c (rename_calendar_cb): + * gui/memos-component.c (rename_memo_list_cb): + * gui/tasks-component.c (rename_task_list_cb): + New "Rename" item in the source selector pop-up menu calls + the recently added e_source_selector_edit_primary_selection(). + Still need to bind the "F2" key to this action, but I'm not + sure how whether EPopup supports that. + 2008-11-11 Milan Crha ** Fix for bug #559604 diff --git a/calendar/gui/calendar-component.c b/calendar/gui/calendar-component.c index 93c4407cb3..099b834c16 100644 --- a/calendar/gui/calendar-component.c +++ b/calendar/gui/calendar-component.c @@ -606,6 +606,16 @@ new_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) calendar_setup_edit_calendar (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget)), NULL, pitem->user_data); } +static void +rename_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) +{ + CalendarComponentView *component_view = data; + ESourceSelector *selector; + + selector = E_SOURCE_SELECTOR (component_view->source_selector); + e_source_selector_edit_primary_selection (selector); +} + static void edit_calendar_cb (EPopup *ep, EPopupItem *pitem, void *data) { @@ -647,6 +657,7 @@ mark_offline_cb (EPopup *ep, EPopupItem *pitem, void *data) static EPopupItem ecc_source_popups[] = { { E_POPUP_ITEM, "10.new", N_("_New Calendar"), new_calendar_cb, NULL, "x-office-calendar", 0, 0 }, { E_POPUP_ITEM, "15.copy", N_("_Copy..."), copy_calendar_cb, NULL, "edit-copy", 0, E_CAL_POPUP_SOURCE_PRIMARY }, + { E_POPUP_ITEM, "18.rename", N_("_Rename..."), rename_calendar_cb, NULL, NULL, 0, E_CAL_POPUP_SOURCE_PRIMARY }, { E_POPUP_BAR, "20.bar" }, { E_POPUP_ITEM, "20.delete", N_("_Delete"), delete_calendar_cb, NULL, "edit-delete", 0,E_CAL_POPUP_SOURCE_USER|E_CAL_POPUP_SOURCE_PRIMARY|E_CAL_POPUP_SOURCE_DELETE }, diff --git a/calendar/gui/memos-component.c b/calendar/gui/memos-component.c index 931367cf39..b8b0983d75 100644 --- a/calendar/gui/memos-component.c +++ b/calendar/gui/memos-component.c @@ -447,6 +447,16 @@ new_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) calendar_setup_new_memo_list (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget))); } +static void +rename_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +{ + MemosComponentView *component_view = data; + ESourceSelector *selector; + + selector = E_SOURCE_SELECTOR (component_view->source_selector); + e_source_selector_edit_primary_selection (selector); +} + static void edit_memo_list_cb (EPopup *ep, EPopupItem *pitem, void *data) { @@ -488,6 +498,7 @@ mark_offline_cb (EPopup *ep, EPopupItem *pitem, void *data) static EPopupItem emc_source_popups[] = { { E_POPUP_ITEM, "10.new", N_("_New Memo List"), new_memo_list_cb, NULL, "stock_notes", 0, 0 }, { E_POPUP_ITEM, "15.copy", N_("_Copy..."), copy_memo_list_cb, NULL, "edit-copy", 0, E_CAL_POPUP_SOURCE_PRIMARY }, + { E_POPUP_ITEM, "18.rename", N_("_Rename..."), rename_memo_list_cb, NULL, NULL, 0, E_CAL_POPUP_SOURCE_PRIMARY }, { E_POPUP_BAR, "20.bar" }, { E_POPUP_ITEM, "20.delete", N_("_Delete"), delete_memo_list_cb, NULL, "edit-delete", 0, E_CAL_POPUP_SOURCE_USER|E_CAL_POPUP_SOURCE_PRIMARY }, diff --git a/calendar/gui/tasks-component.c b/calendar/gui/tasks-component.c index d1f11c404c..a471450b91 100644 --- a/calendar/gui/tasks-component.c +++ b/calendar/gui/tasks-component.c @@ -438,6 +438,16 @@ new_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) calendar_setup_new_task_list (GTK_WINDOW (gtk_widget_get_toplevel(ep->target->widget))); } +static void +rename_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) +{ + TasksComponentView *component_view = data; + ESourceSelector *selector; + + selector = E_SOURCE_SELECTOR (component_view->source_selector); + e_source_selector_edit_primary_selection (selector); +} + static void edit_task_list_cb (EPopup *ep, EPopupItem *pitem, void *data) { @@ -479,6 +489,7 @@ mark_offline_cb (EPopup *ep, EPopupItem *pitem, void *data) static EPopupItem etc_source_popups[] = { { E_POPUP_ITEM, "10.new", N_("_New Task List"), new_task_list_cb, NULL, "stock_todo", 0, 0 }, { E_POPUP_ITEM, "15.copy", N_("_Copy..."), copy_task_list_cb, NULL, "edit-copy", 0, E_CAL_POPUP_SOURCE_PRIMARY }, + { E_POPUP_ITEM, "18.rename", N_("_Rename..."), rename_task_list_cb, NULL, NULL, 0, E_CAL_POPUP_SOURCE_PRIMARY }, { E_POPUP_BAR, "20.bar" }, { E_POPUP_ITEM, "20.delete", N_("_Delete"), delete_task_list_cb, NULL, "edit-delete", 0, E_CAL_POPUP_SOURCE_USER|E_CAL_POPUP_SOURCE_PRIMARY }, -- cgit v1.2.3