aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/e-book-shell-module.c6
-rw-r--r--addressbook/gui/component/e-book-shell-view-actions.c20
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.c4
-rw-r--r--addressbook/gui/component/e-book-shell-view-private.h3
4 files changed, 21 insertions, 12 deletions
diff --git a/addressbook/gui/component/e-book-shell-module.c b/addressbook/gui/component/e-book-shell-module.c
index 840c4cb816..1b3e778ce8 100644
--- a/addressbook/gui/component/e-book-shell-module.c
+++ b/addressbook/gui/component/e-book-shell-module.c
@@ -200,7 +200,7 @@ book_module_book_loaded_cb (EBook *book,
if (strcmp (action_name, "contact-new") == 0)
eab_show_contact_editor (book, contact, TRUE, TRUE);
- if (strcmp (action_name, "contact-list-new") == 0)
+ if (strcmp (action_name, "contact-new-list") == 0)
eab_show_contact_list_editor (book, contact, TRUE, TRUE);
g_object_unref (contact);
@@ -256,14 +256,14 @@ static GtkActionEntry item_entries[] = {
{ "contact-new",
"contact-new",
N_("_Contact"), /* XXX Need C_() here */
- "<Control>c",
+ "<Shift><Control>c",
N_("Create a new contact"),
G_CALLBACK (action_contact_new_cb) },
{ "contact-new-list",
"stock_contact-list",
N_("Contact _List"),
- "<Control>l",
+ "<Shift><Control>l",
N_("Create a new contact list"),
G_CALLBACK (action_contact_new_cb) }
};
diff --git a/addressbook/gui/component/e-book-shell-view-actions.c b/addressbook/gui/component/e-book-shell-view-actions.c
index 9a26608d84..89ca2c22a8 100644
--- a/addressbook/gui/component/e-book-shell-view-actions.c
+++ b/addressbook/gui/component/e-book-shell-view-actions.c
@@ -280,11 +280,19 @@ static void
action_contact_new_cb (GtkAction *action,
EBookShellView *book_shell_view)
{
+ EAddressbookView *view;
+ EAddressbookModel *model;
EContact *contact;
EBook *book;
+ view = e_book_shell_view_get_current_view (book_shell_view);
+ g_return_if_fail (view != NULL);
+
+ model = e_addressbook_view_get_model (view);
+ book = e_addressbook_model_get_book (model);
+ g_return_if_fail (book != NULL);
+
contact = e_contact_new ();
- book = book_shell_view->priv->book;
eab_show_contact_editor (book, contact, TRUE, TRUE);
g_object_unref (contact);
}
@@ -293,11 +301,19 @@ static void
action_contact_new_list_cb (GtkAction *action,
EBookShellView *book_shell_view)
{
+ EAddressbookView *view;
+ EAddressbookModel *model;
EContact *contact;
EBook *book;
+ view = e_book_shell_view_get_current_view (book_shell_view);
+ g_return_if_fail (view != NULL);
+
+ model = e_addressbook_view_get_model (view);
+ book = e_addressbook_model_get_book (model);
+ g_return_if_fail (book != NULL);
+
contact = e_contact_new ();
- book = book_shell_view->priv->book;
eab_show_contact_list_editor (book, contact, TRUE, TRUE);
g_object_unref (contact);
}
diff --git a/addressbook/gui/component/e-book-shell-view-private.c b/addressbook/gui/component/e-book-shell-view-private.c
index 70ba2b2815..68d8425ef8 100644
--- a/addressbook/gui/component/e-book-shell-view-private.c
+++ b/addressbook/gui/component/e-book-shell-view-private.c
@@ -507,8 +507,6 @@ e_book_shell_view_private_dispose (EBookShellView *book_shell_view)
g_hash_table_remove_all (priv->uid_to_view);
g_hash_table_remove_all (priv->uid_to_editor);
-
- DISPOSE (priv->book);
}
void
@@ -518,8 +516,6 @@ e_book_shell_view_private_finalize (EBookShellView *book_shell_view)
g_hash_table_destroy (priv->uid_to_view);
g_hash_table_destroy (priv->uid_to_editor);
-
- g_free (priv->password);
}
EAddressbookView *
diff --git a/addressbook/gui/component/e-book-shell-view-private.h b/addressbook/gui/component/e-book-shell-view-private.h
index b8d2a0ccb7..24af21539b 100644
--- a/addressbook/gui/component/e-book-shell-view-private.h
+++ b/addressbook/gui/component/e-book-shell-view-private.h
@@ -95,9 +95,6 @@ struct _EBookShellViewPrivate {
GHashTable *uid_to_view;
GHashTable *uid_to_editor;
-
- EBook *book;
- gchar *password;
};
void e_book_shell_view_private_init