From eef595a9ceb4d1b5ce063ce40e8b11b71878628a Mon Sep 17 00:00:00 2001 From: Sushma Rai Date: Sat, 27 Nov 2004 04:39:31 +0000 Subject: Setting addressbook empty messages based on the type of addressbook. svn path=/trunk/; revision=28004 --- addressbook/ChangeLog | 6 ++++++ addressbook/gui/widgets/e-minicard-view.c | 26 ++++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) (limited to 'addressbook') diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index bd2f7ddf78..255c8f8133 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2004-11-27 Sushma Rai + + * gui/widgets/e-minicard-view.c (set_empty_message): + Checking for the static capability "do-initial-query", + and setting the relevent empty addressbook message. + 2004-11-26 JP Rosevear * gui/component/select-names/e-select-names-popup.c diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index b5803dc658..e66bb6047a 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -153,19 +153,33 @@ static void set_empty_message (EMinicardView *view) { char *empty_message; - gboolean editable = FALSE; + gboolean editable = FALSE, perform_initial_query = FALSE; + EBook *book; if (view->adapter) { g_object_get (view->adapter, "editable", &editable, NULL); + + g_object_get (view->adapter, "book", &book, NULL); + if (!e_book_check_static_capability (book, "do-initial-query")) + perform_initial_query = TRUE; } - if (editable) - empty_message = _("\n\nThere are no items to show in this view.\n\n" - "Double-click here to create a new Contact."); - else - empty_message = _("\n\nThere are no items to show in this view."); + if (editable) { + if (perform_initial_query) + empty_message = _("\n\nSearch for the Contact\n\n" + "or double-click here to create a new Contact."); + else + empty_message = _("\n\nThere are no items to show in this view.\n\n" + "Double-click here to create a new Contact."); + } + else { + if (perform_initial_query) + empty_message = _("\n\nSearch for the Contact."); + else + empty_message = _("\n\nThere are no items to show in this view."); + } g_object_set (view, "empty_message", empty_message, -- cgit v1.2.3