aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcuts-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2001-07-01 15:12:56 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2001-07-01 15:12:56 +0800
commit8fc1cb82feb23034360af987834f6bce8aebe0f3 (patch)
treec0b0045ee2e03dc09364de2107ac63b8b467f358 /shell/e-shortcuts-view.c
parent6077a94d84eb66bd81e52a92d3703db72ab5614a (diff)
downloadgsoc2013-evolution-8fc1cb82feb23034360af987834f6bce8aebe0f3.tar
gsoc2013-evolution-8fc1cb82feb23034360af987834f6bce8aebe0f3.tar.gz
gsoc2013-evolution-8fc1cb82feb23034360af987834f6bce8aebe0f3.tar.bz2
gsoc2013-evolution-8fc1cb82feb23034360af987834f6bce8aebe0f3.tar.lz
gsoc2013-evolution-8fc1cb82feb23034360af987834f6bce8aebe0f3.tar.xz
gsoc2013-evolution-8fc1cb82feb23034360af987834f6bce8aebe0f3.tar.zst
gsoc2013-evolution-8fc1cb82feb23034360af987834f6bce8aebe0f3.zip
Implemented a "Rename Group" command. Unfortunately, it doesn't work
very well due to EShortcutBar breakage. But we'll fix that later. svn path=/trunk/; revision=10653
Diffstat (limited to 'shell/e-shortcuts-view.c')
-rw-r--r--shell/e-shortcuts-view.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c
index 4009e7e5a8..de30fdba1c 100644
--- a/shell/e-shortcuts-view.c
+++ b/shell/e-shortcuts-view.c
@@ -274,6 +274,31 @@ destroy_group_cb (GtkWidget *widget,
e_shortcuts_remove_group (shortcuts, menu_data->group_num);
}
+static void
+rename_group_cb (GtkWidget *widget,
+ void *data)
+{
+ RightClickMenuData *menu_data;
+ EShortcuts *shortcuts;
+ const char *old_name;
+ const char *new_name;
+
+ menu_data = (RightClickMenuData *) data;
+ shortcuts = menu_data->shortcuts_view->priv->shortcuts;
+
+ old_name = e_shortcuts_get_group_title (shortcuts, menu_data->group_num);
+
+ new_name = e_request_string (GTK_WINDOW (gtk_widget_get_toplevel (widget)),
+ _("Rename Shortcut Group"),
+ _("Rename selected shortcut group to:"),
+ old_name);
+
+ if (new_name == NULL)
+ return;
+
+ e_shortcuts_rename_group (shortcuts, menu_data->group_num, new_name);
+}
+
static GnomeUIInfo icon_size_radio_group_uiinfo[] = {
{ GNOME_APP_UI_ITEM, N_("_Small Icons"),
N_("Show the shortcuts as small icons"), toggle_small_icons_cb, NULL,
@@ -296,6 +321,9 @@ static GnomeUIInfo right_click_menu_uiinfo[] = {
{ GNOME_APP_UI_ITEM, N_("_Remove This Group..."),
N_("Remove this shortcut group"), destroy_group_cb, NULL,
NULL, 0, 0, 0, 0 },
+ { GNOME_APP_UI_ITEM, N_("Re_name This Group..."),
+ N_("Rename this shortcut group"), rename_group_cb, NULL,
+ NULL, 0, 0, 0, 0 },
GNOMEUIINFO_SEPARATOR,