diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-07-01 15:12:56 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-07-01 15:12:56 +0800 |
commit | 8fc1cb82feb23034360af987834f6bce8aebe0f3 (patch) | |
tree | c0b0045ee2e03dc09364de2107ac63b8b467f358 /shell/e-shortcuts-view-model.c | |
parent | 6077a94d84eb66bd81e52a92d3703db72ab5614a (diff) | |
download | gsoc2013-evolution-8fc1cb82feb23034360af987834f6bce8aebe0f3.tar.gz 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-model.c')
-rw-r--r-- | shell/e-shortcuts-view-model.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/shell/e-shortcuts-view-model.c b/shell/e-shortcuts-view-model.c index 15e1d3cec1..57d2762fb9 100644 --- a/shell/e-shortcuts-view-model.c +++ b/shell/e-shortcuts-view-model.c @@ -126,6 +126,21 @@ shortcuts_remove_group_cb (EShortcuts *shortcuts, } static void +shortcuts_rename_group_cb (EShortcuts *shortcuts, + int group_num, + const char *new_title, + void *data) +{ + EShortcutsViewModel *shortcuts_view_model; + + shortcuts_view_model = E_SHORTCUTS_VIEW_MODEL (data); + + e_shortcut_model_remove_group (E_SHORTCUT_MODEL (shortcuts_view_model), group_num); + e_shortcut_model_add_group (E_SHORTCUT_MODEL (shortcuts_view_model), group_num, new_title); + load_group_into_model (shortcuts_view_model, group_num); +} + +static void shortcuts_new_shortcut_cb (EShortcuts *shortcuts, int group_num, int item_num, @@ -245,6 +260,9 @@ e_shortcuts_view_model_construct (EShortcutsViewModel *model, "remove_group", GTK_SIGNAL_FUNC (shortcuts_remove_group_cb), model, GTK_OBJECT (model)); gtk_signal_connect_while_alive (GTK_OBJECT (priv->shortcuts), + "rename_group", GTK_SIGNAL_FUNC (shortcuts_rename_group_cb), model, + GTK_OBJECT (model)); + gtk_signal_connect_while_alive (GTK_OBJECT (priv->shortcuts), "new_shortcut", GTK_SIGNAL_FUNC (shortcuts_new_shortcut_cb), model, GTK_OBJECT (model)); gtk_signal_connect_while_alive (GTK_OBJECT (priv->shortcuts), |