From 6d778b9fa21e33d502a6b6c98639cb19dd8becfb Mon Sep 17 00:00:00 2001 From: Ettore Perazzoli Date: Wed, 31 Jul 2002 22:10:37 +0000 Subject: 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 --- shell/e-shortcuts.c | 33 +++++++++++++++++++++------------ 1 file changed, 21 insertions(+), 12 deletions(-) (limited to 'shell/e-shortcuts.c') diff --git a/shell/e-shortcuts.c b/shell/e-shortcuts.c index 9b1a26cb79..8ad70eba0f 100644 --- a/shell/e-shortcuts.c +++ b/shell/e-shortcuts.c @@ -1043,36 +1043,45 @@ e_shortcuts_update_shortcut (EShortcuts *shortcuts, void -e_shortcuts_add_default_group (EShortcuts *shortcuts) +e_shortcuts_add_default_shortcuts (EShortcuts *shortcuts, + int group_num) { char *utf; - g_return_if_fail (shortcuts != NULL); - g_return_if_fail (E_IS_SHORTCUTS (shortcuts)); - - utf = e_utf8_from_locale_string (_("Shortcuts")); - e_shortcuts_add_group (shortcuts, -1, utf); - g_free (utf); - utf = e_utf8_from_locale_string (_("Summary")); e_shortcuts_add_shortcut (shortcuts, 0, -1, E_SUMMARY_URI, utf, 0, "summary", NULL); g_free (utf); utf = e_utf8_from_locale_string (_("Inbox")); - e_shortcuts_add_shortcut (shortcuts, 0, -1, E_LOCAL_INBOX_URI, utf, 0, "mail", "inbox"); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:mail", utf, 0, "mail", "inbox"); g_free (utf); utf = e_utf8_from_locale_string (_("Calendar")); - e_shortcuts_add_shortcut (shortcuts, 0, -1, E_LOCAL_CALENDAR_URI, utf, 0, "calendar", NULL); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:calendar", utf, 0, "calendar", NULL); g_free (utf); utf = e_utf8_from_locale_string (_("Tasks")); - e_shortcuts_add_shortcut (shortcuts, 0, -1, E_LOCAL_TASKS_URI, utf, 0, "tasks", NULL); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:tasks", utf, 0, "tasks", NULL); g_free (utf); utf = e_utf8_from_locale_string (_("Contacts")); - e_shortcuts_add_shortcut (shortcuts, 0, -1, E_LOCAL_CONTACTS_URI, utf, 0, "contacts", NULL); + e_shortcuts_add_shortcut (shortcuts, 0, -1, "default:contacts", utf, 0, "contacts", NULL); + g_free (utf); +} + +void +e_shortcuts_add_default_group (EShortcuts *shortcuts) +{ + char *utf; + + g_return_if_fail (shortcuts != NULL); + g_return_if_fail (E_IS_SHORTCUTS (shortcuts)); + + utf = e_utf8_from_locale_string (_("Shortcuts")); + e_shortcuts_add_group (shortcuts, -1, utf); g_free (utf); + + e_shortcuts_add_default_shortcuts (shortcuts, -1); } void -- cgit v1.2.3