diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-27 11:50:19 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-01-27 11:50:19 +0800 |
commit | 98d262b594caefd053a2d075e2d8482b2d8a12c8 (patch) | |
tree | 1474ebf4401477049436bf89a1432447995d0b00 /addressbook | |
parent | e0f414941dd4e13ea074996d10606b0dae7e494b (diff) | |
download | gsoc2013-evolution-98d262b594caefd053a2d075e2d8482b2d8a12c8.tar.gz gsoc2013-evolution-98d262b594caefd053a2d075e2d8482b2d8a12c8.tar.zst gsoc2013-evolution-98d262b594caefd053a2d075e2d8482b2d8a12c8.zip |
Add action groups to support lockdown, starting with printing.
Other categories to follow. Editors still need lockdown support.
svn path=/branches/kill-bonobo/; revision=37136
Diffstat (limited to 'addressbook')
-rw-r--r-- | addressbook/gui/component/e-book-shell-view-actions.c | 51 |
1 files changed, 33 insertions, 18 deletions
diff --git a/addressbook/gui/component/e-book-shell-view-actions.c b/addressbook/gui/component/e-book-shell-view-actions.c index 36c04eaf6b..a264f7f84b 100644 --- a/addressbook/gui/component/e-book-shell-view-actions.c +++ b/addressbook/gui/component/e-book-shell-view-actions.c @@ -667,20 +667,6 @@ static GtkActionEntry contact_entries[] = { N_("View the current contact"), G_CALLBACK (action_contact_open_cb) }, - { "contact-print", - GTK_STOCK_PRINT, - NULL, - "<Control>p", - N_("Print selected contacts"), - G_CALLBACK (action_contact_print_cb) }, - - { "contact-print-preview", - GTK_STOCK_PRINT_PREVIEW, - NULL, - NULL, - N_("Preview the contacts to be printed"), - G_CALLBACK (action_contact_print_preview_cb) }, - { "contact-save-as", GTK_STOCK_SAVE_AS, N_("Save as vCard..."), @@ -762,10 +748,6 @@ static EPopupActionEntry contact_popup_entries[] = { NULL, "contact-open" }, - { "contact-popup-print", - NULL, - "contact-print" }, - { "contact-popup-save-as", NULL, "contact-save-as" }, @@ -827,6 +809,30 @@ static GtkRadioActionEntry contact_search_entries[] = { CONTACT_SEARCH_NAME_CONTAINS } }; +static GtkActionEntry lockdown_printing_entries[] = { + + { "contact-print", + GTK_STOCK_PRINT, + NULL, + "<Control>p", + N_("Print selected contacts"), + G_CALLBACK (action_contact_print_cb) }, + + { "contact-print-preview", + GTK_STOCK_PRINT_PREVIEW, + NULL, + NULL, + N_("Preview the contacts to be printed"), + G_CALLBACK (action_contact_print_preview_cb) } +}; + +static EPopupActionEntry lockdown_printing_popup_entries[] = { + + { "contact-popup-print", + NULL, + "contact-print" } +}; + void e_book_shell_view_actions_init (EBookShellView *book_shell_view) { @@ -869,6 +875,15 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view) gtk_action_group_set_translation_domain (action_group, domain); gtk_ui_manager_insert_action_group (ui_manager, action_group, 0); + /* Lockdown Printing Actions */ + action_group = ACTION_GROUP (LOCKDOWN_PRINTING); + gtk_action_group_add_actions ( + action_group, lockdown_printing_entries, + G_N_ELEMENTS (lockdown_printing_entries), book_shell_view); + e_action_group_add_popup_actions ( + action_group, lockdown_printing_popup_entries, + G_N_ELEMENTS (lockdown_printing_popup_entries)); + /* Bind GObject properties to GConf keys. */ bridge = gconf_bridge_get (); |