aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/component/e-book-shell-view-actions.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-09-20 02:21:06 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-09-20 02:21:06 +0800
commit6b2295c93a40f6010d94399666a8e099aded8e85 (patch)
treec403d191ffbef6c12a7c97a0ee05838e7b23c8f3 /addressbook/gui/component/e-book-shell-view-actions.c
parent3e3c13b439668945241b32cf8c1fd3d6e625f9f5 (diff)
downloadgsoc2013-evolution-6b2295c93a40f6010d94399666a8e099aded8e85.tar
gsoc2013-evolution-6b2295c93a40f6010d94399666a8e099aded8e85.tar.gz
gsoc2013-evolution-6b2295c93a40f6010d94399666a8e099aded8e85.tar.bz2
gsoc2013-evolution-6b2295c93a40f6010d94399666a8e099aded8e85.tar.lz
gsoc2013-evolution-6b2295c93a40f6010d94399666a8e099aded8e85.tar.xz
gsoc2013-evolution-6b2295c93a40f6010d94399666a8e099aded8e85.tar.zst
gsoc2013-evolution-6b2295c93a40f6010d94399666a8e099aded8e85.zip
Fix some miscellaneous address book bugs.
Kill e-shell-constants.h. svn path=/branches/kill-bonobo/; revision=36392
Diffstat (limited to 'addressbook/gui/component/e-book-shell-view-actions.c')
-rw-r--r--addressbook/gui/component/e-book-shell-view-actions.c20
1 files changed, 18 insertions, 2 deletions
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);
}