aboutsummaryrefslogtreecommitdiffstats
path: root/shell/e-shortcuts-view.c
diff options
context:
space:
mode:
authorEttore Perazzoli <ettore@src.gnome.org>2002-08-01 06:10:37 +0800
committerEttore Perazzoli <ettore@src.gnome.org>2002-08-01 06:10:37 +0800
commit6d778b9fa21e33d502a6b6c98639cb19dd8becfb (patch)
tree438975cfcd79cab6af445bf294e024e26392ba03 /shell/e-shortcuts-view.c
parent57ced76e37818bd9700b6f257d1afc37ab67823b (diff)
downloadgsoc2013-evolution-6d778b9fa21e33d502a6b6c98639cb19dd8becfb.tar
gsoc2013-evolution-6d778b9fa21e33d502a6b6c98639cb19dd8becfb.tar.gz
gsoc2013-evolution-6d778b9fa21e33d502a6b6c98639cb19dd8becfb.tar.bz2
gsoc2013-evolution-6d778b9fa21e33d502a6b6c98639cb19dd8becfb.tar.lz
gsoc2013-evolution-6d778b9fa21e33d502a6b6c98639cb19dd8becfb.tar.xz
gsoc2013-evolution-6d778b9fa21e33d502a6b6c98639cb19dd8becfb.tar.zst
gsoc2013-evolution-6d778b9fa21e33d502a6b6c98639cb19dd8becfb.zip
New, implement a right-click -> "Add Default Shortcuts" menu item.
* e-shortcuts-view.c (create_default_shortcuts_cb): New, implement a right-click -> "Add Default Shortcuts" menu item. (rename_group_cb): Remove double casts. *lol* * e-shortcuts.c (e_shortcuts_add_default_shortcuts): New. (e_shortcuts_add_default_group): Use e_shortcuts_add_default_shortcuts(). svn path=/trunk/; revision=17663
Diffstat (limited to 'shell/e-shortcuts-view.c')
-rw-r--r--shell/e-shortcuts-view.c23
1 files changed, 21 insertions, 2 deletions
diff --git a/shell/e-shortcuts-view.c b/shell/e-shortcuts-view.c
index ab3841b3aa..50641c2f2f 100644
--- a/shell/e-shortcuts-view.c
+++ b/shell/e-shortcuts-view.c
@@ -215,15 +215,28 @@ rename_group_cb (GtkWidget *widget,
/* Remember the group and flip back to it. FIXME: This is a workaround
to an actual ShortcutBar bug. */
- group = e_group_bar_get_current_group_num (E_GROUP_BAR (E_SHORTCUT_BAR (shortcuts_view)));
+ group = e_group_bar_get_current_group_num (E_GROUP_BAR (shortcuts_view));
original_view_type = e_shortcut_bar_get_view_type (E_SHORTCUT_BAR (menu_data->shortcuts_view), group);
e_shortcuts_rename_group (shortcuts, menu_data->group_num, new_name);
g_free (new_name);
- e_group_bar_set_current_group_num (E_GROUP_BAR (E_SHORTCUT_BAR (shortcuts_view)), group, FALSE);
+ e_group_bar_set_current_group_num (E_GROUP_BAR (shortcuts_view), group, FALSE);
e_shortcut_bar_set_view_type (E_SHORTCUT_BAR (menu_data->shortcuts_view), group, original_view_type);
}
+static void
+create_default_shortcuts_cb (GtkWidget *widget,
+ void *data)
+{
+ RightClickMenuData *menu_data;
+ EShortcutsView *shortcuts_view;
+
+ menu_data = (RightClickMenuData *) data;
+ shortcuts_view = menu_data->shortcuts_view;
+ e_shortcuts_add_default_shortcuts (shortcuts_view->priv->shortcuts,
+ e_group_bar_get_current_group_num (E_GROUP_BAR (shortcuts_view)));
+}
+
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,
@@ -256,6 +269,12 @@ static GnomeUIInfo right_click_menu_uiinfo[] = {
N_("Hide the shortcut bar"), hide_shortcut_bar_cb, NULL,
NULL, 0, 0, 0, 0 },
+ GNOMEUIINFO_SEPARATOR,
+
+ { GNOME_APP_UI_ITEM, N_("Create _Default Shortcuts"),
+ N_("Create Default Shortcuts"), create_default_shortcuts_cb, NULL,
+ NULL, 0, 0, 0, 0 },
+
GNOMEUIINFO_END
};