diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-12-19 22:52:40 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-06-03 11:00:40 +0800 |
commit | 7894db49b9a161f7b63d90a98e57ad6a1e1dca54 (patch) | |
tree | a0de5cadc49f5678c983d26a920bed4af31085a6 /modules/addressbook/e-book-shell-content.c | |
parent | b16443a316a0881b4996f4ec5efdf78aeca273fd (diff) | |
download | gsoc2013-evolution-7894db49b9a161f7b63d90a98e57ad6a1e1dca54.tar.gz gsoc2013-evolution-7894db49b9a161f7b63d90a98e57ad6a1e1dca54.tar.zst gsoc2013-evolution-7894db49b9a161f7b63d90a98e57ad6a1e1dca54.zip |
Adapt modules/addressbook to the new ESource API.
Diffstat (limited to 'modules/addressbook/e-book-shell-content.c')
-rw-r--r-- | modules/addressbook/e-book-shell-content.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/addressbook/e-book-shell-content.c b/modules/addressbook/e-book-shell-content.c index f3457e8999..05f8bd8d03 100644 --- a/modules/addressbook/e-book-shell-content.c +++ b/modules/addressbook/e-book-shell-content.c @@ -348,6 +348,7 @@ book_shell_content_check_state (EShellContent *shell_content) ESelectionModel *selection_model; EAddressbookModel *model; EAddressbookView *view; + GtkNotebook *notebook; gboolean has_email = TRUE; gboolean is_contact_list = TRUE; guint32 state = 0; @@ -359,6 +360,13 @@ book_shell_content_check_state (EShellContent *shell_content) } foreach_data; book_shell_content = E_BOOK_SHELL_CONTENT (shell_content); + + /* This function may be triggered at startup before any address + * book views are added. Check for that and return silently. */ + notebook = GTK_NOTEBOOK (book_shell_content->priv->notebook); + if (gtk_notebook_get_n_pages (notebook) == 0) + return 0; + view = e_book_shell_content_get_current_view (book_shell_content); model = e_addressbook_view_get_model (view); |