From 6b2295c93a40f6010d94399666a8e099aded8e85 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 19 Sep 2008 18:21:06 +0000 Subject: Fix some miscellaneous address book bugs. Kill e-shell-constants.h. svn path=/branches/kill-bonobo/; revision=36392 --- addressbook/gui/component/e-book-shell-module.c | 6 +++--- .../gui/component/e-book-shell-view-actions.c | 20 ++++++++++++++++++-- .../gui/component/e-book-shell-view-private.c | 4 ---- .../gui/component/e-book-shell-view-private.h | 3 --- 4 files changed, 21 insertions(+), 12 deletions(-) (limited to 'addressbook/gui') 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 */ - "c", + "c", N_("Create a new contact"), G_CALLBACK (action_contact_new_cb) }, { "contact-new-list", "stock_contact-list", N_("Contact _List"), - "l", + "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 -- cgit v1.2.3