aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/e-book-shell-view-actions.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-08-30 06:32:46 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-08-30 06:32:46 +0800
commite0c501b7018f12d37b10e32923f95b7a01c7982c (patch)
tree0114cbe9529000ec06dbe4ebe927e8c6cafbf0ba /addressbook/gui/component/e-book-shell-view-actions.c
parent02a9eb68308537fe712e757017ae4bb372863a8c (diff)
downloadgsoc2013-evolution-e0c501b7018f12d37b10e32923f95b7a01c7982c.tar
gsoc2013-evolution-e0c501b7018f12d37b10e32923f95b7a01c7982c.tar.gz
gsoc2013-evolution-e0c501b7018f12d37b10e32923f95b7a01c7982c.tar.bz2
gsoc2013-evolution-e0c501b7018f12d37b10e32923f95b7a01c7982c.tar.lz
gsoc2013-evolution-e0c501b7018f12d37b10e32923f95b7a01c7982c.tar.xz
gsoc2013-evolution-e0c501b7018f12d37b10e32923f95b7a01c7982c.tar.zst
gsoc2013-evolution-e0c501b7018f12d37b10e32923f95b7a01c7982c.zip
Progress update:
- Contacts module partially working! - Implement UI merging. Also merge EInfoLabel into ESidebar. The shell window now manages the icon and labels and keeps them up-to-date via EShellView properties. svn path=/branches/kill-bonobo/; revision=36214
Diffstat (limited to 'addressbook/gui/component/e-book-shell-view-actions.c')
-rw-r--r--addressbook/gui/component/e-book-shell-view-actions.c77
1 files changed, 69 insertions, 8 deletions
diff --git a/addressbook/gui/component/e-book-shell-view-actions.c b/addressbook/gui/component/e-book-shell-view-actions.c
index 8d2d1a7739..d5f961ec66 100644
--- a/addressbook/gui/component/e-book-shell-view-actions.c
+++ b/addressbook/gui/component/e-book-shell-view-actions.c
@@ -20,8 +20,11 @@
#include "e-book-shell-view-private.h"
+#include <e-util/e-error.h>
#include <e-util/e-util.h>
+#include <addressbook-config.h>
+
static void
action_address_book_copy_cb (GtkAction *action,
EBookShellView *book_shell_view)
@@ -101,6 +104,19 @@ action_address_book_move_cb (GtkAction *action,
}
static void
+action_address_book_new_cb (GtkAction *action,
+ EBookShellView *book_shell_view)
+{
+ EShellView *shell_view;
+ EShellWindow *shell_window;
+
+ shell_view = E_SHELL_VIEW (book_shell_view);
+ shell_window = e_shell_view_get_window (shell_view);
+
+ addressbook_config_create_new_source (GTK_WIDGET (shell_window));
+}
+
+static void
action_address_book_properties_cb (GtkAction *action,
EBookShellView *book_shell_view)
{
@@ -127,7 +143,7 @@ action_address_book_properties_cb (GtkAction *action,
GtkWidget *editor;
editor = addressbook_config_edit_source (
- GTK_WINDOW (shell_window), source);
+ GTK_WIDGET (shell_window), source);
closure = g_new (EditorUidClosure, 1);
closure->editor = editor;
@@ -342,19 +358,26 @@ static GtkActionEntry contact_entries[] = {
N_("Move the contacts of the selected address book to another"),
G_CALLBACK (action_address_book_move_cb) },
+ { "address-book-new",
+ "address-book-new",
+ N_("_New Address Book"),
+ NULL,
+ N_("Create a new address book"),
+ G_CALLBACK (action_address_book_new_cb) },
+
{ "address-book-properties",
GTK_STOCK_PROPERTIES,
N_("Address _Book Properties"),
NULL,
- N_("Change the properties of the selected address book"),
+ N_("Show properties of the selected address book"),
G_CALLBACK (action_address_book_properties_cb) },
{ "address-book-save-as",
GTK_STOCK_SAVE_AS,
- N_("S_ave Address Book as VCard"),
+ N_("S_ave Address Book as vCard"),
NULL,
- N_("Save the contacts of the selected address book as a VCard"),
- G_CALLBACK (action_address_book_save_as) },
+ N_("Save the contacts of the selected address book as a vCard"),
+ G_CALLBACK (action_address_book_save_as_cb) },
{ "address-book-stop",
GTK_STOCK_STOP,
@@ -435,9 +458,9 @@ static GtkActionEntry contact_entries[] = {
{ "contact-save-as",
GTK_STOCK_SAVE_AS,
- N_("Save as VCard..."),
+ N_("Save as vCard..."),
NULL,
- N_("Save selected contacts as a VCard"),
+ N_("Save selected contacts as a vCard"),
G_CALLBACK (action_contact_save_as_cb) },
{ "contact-select-all",
@@ -452,7 +475,39 @@ static GtkActionEntry contact_entries[] = {
N_("_Send Message to Contact..."),
NULL,
N_("Send a message to the selected contacts"),
- G_CALLBACK (action_contact_send_message_cb) }
+ G_CALLBACK (action_contact_send_message_cb) },
+
+ /*** Menus ***/
+
+ { "actions-menu",
+ NULL,
+ N_("_Actions"),
+ NULL,
+ NULL,
+ NULL },
+
+ /*** Address Book Popup Actions ***/
+
+ { "address-book-popup-delete",
+ GTK_STOCK_DELETE,
+ NULL,
+ NULL,
+ N_("Delete this address book"),
+ G_CALLBACK (action_address_book_delete_cb) },
+
+ { "address-book-popup-properties",
+ GTK_STOCK_PROPERTIES,
+ NULL,
+ NULL,
+ N_("Show properties of this address book"),
+ G_CALLBACK (action_address_book_properties_cb) },
+
+ { "address-book-popup-save-as",
+ GTK_STOCK_SAVE_AS,
+ N_("_Save as vCard..."),
+ NULL,
+ N_("Save the contents of this address book as a vCard"),
+ G_CALLBACK (action_address_book_save_as_cb) }
};
static GtkToggleActionEntry contact_toggle_entries[] = {
@@ -473,6 +528,7 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view)
EShellWindow *shell_window;
GtkActionGroup *action_group;
GtkUIManager *manager;
+ GtkAction *action;
const gchar *domain;
shell_view = E_SHELL_VIEW (book_shell_view);
@@ -491,4 +547,9 @@ e_book_shell_view_actions_init (EBookShellView *book_shell_view)
action_group, contact_toggle_entries,
G_N_ELEMENTS (contact_toggle_entries), book_shell_view);
gtk_ui_manager_insert_action_group (manager, action_group, 0);
+
+ /* Fine tuning. */
+
+ action = ACTION (CONTACT_DELETE);
+ g_object_set (action, "short-label", _("Delete"), NULL);
}