aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/widgets/e-minicard-view.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-09-22 19:13:53 +0800
committerChris Lahey <clahey@src.gnome.org>2000-09-22 19:13:53 +0800
commitb2019f34096c075bedcc2f9db7ee94d493225768 (patch)
tree60117e19ac3be2357786d4fd6dec1b6454de9daa /addressbook/gui/widgets/e-minicard-view.c
parent0d39d588a7da56bca9c195615d765edd572b3a41 (diff)
downloadgsoc2013-evolution-b2019f34096c075bedcc2f9db7ee94d493225768.tar.gz
gsoc2013-evolution-b2019f34096c075bedcc2f9db7ee94d493225768.tar.zst
gsoc2013-evolution-b2019f34096c075bedcc2f9db7ee94d493225768.zip
Added evolution-addressbook-ldap.xml.
2000-09-22 Christopher James Lahey <clahey@helixcode.com> * ui/Makefile.am: Added evolution-addressbook-ldap.xml. * ui/evolution-addressbook-ldap.xml: New file. (A Variation on evolution-addressbook.xml) * ui/evolution-addressbook.xml: Added View All and Stop buttons. From addressbook/ChangeLog: 2000-09-22 Christopher James Lahey <clahey@helixcode.com> * backend/ebook/e-book.c, backend/ebook/e-book.h, backend/idl/addressbook.idl, backend/pas/pas-backend-file.c, backend/pas/pas-backend-ldap.c, backend/pas-backend.c, backend/pas/pas-backend.h, backend/pas/pas-book.c, backend/pas/pas-book.h: Added a function to query static capabilities (capabilities that can be reported immediately) and implemented them in the 2 servers. * gui/component/addressbook.c: Added a View All button and a Stop button. Sorted out the new directory server stuff a bit. * gui/widgets/e-addressbook-model.c, gui/widgets/e-addressbook-model.h: Cleaned up a bit. Added a stop function. Check for capabilities before deciding whether to load all cards when initially viewed. * gui/widgets/e-addressbook-view.c, gui/widgets/e-addressbook-view.h: Added stop and view all functions. * gui/widgets/e-minicard-view-widget.c, gui/widgets/e-minicard-view-widget.h, gui/widgets/e-minicard-view.c, gui/widgets/e-minicard-view.h: Added a stop function. Check for capabilities before deciding whether to load all cards when initially viewed. svn path=/trunk/; revision=5547
Diffstat (limited to 'addressbook/gui/widgets/e-minicard-view.c')
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c27
1 files changed, 24 insertions, 3 deletions
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 249c987802..7169e41542 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -105,6 +105,7 @@ e_minicard_view_init (EMinicardView *view)
view->remove_card_id = 0;
view->modify_card_id = 0;
view->canvas_destroy_id = 0;
+ view->first_get_view = TRUE;
gtk_object_set(GTK_OBJECT(view),
"empty_message", _("\n\nThere are no items to show in this view\n\n"
@@ -191,8 +192,18 @@ book_view_loaded (EBook *book, EBookStatus status, EBookView *book_view, gpointe
static gboolean
get_view(EMinicardView *view)
{
- if (view->book && view->query)
- e_book_get_book_view(view->book, view->query, book_view_loaded, view);
+ if (view->book && view->query) {
+ if (view->first_get_view) {
+ char *capabilities;
+ capabilities = e_book_get_static_capabilities(view->book);
+ if (strstr(capabilities, "local")) {
+ e_book_get_book_view(view->book, view->query, book_view_loaded, view);
+ }
+ view->first_get_view = FALSE;
+ }
+ else
+ e_book_get_book_view(view->book, view->query, book_view_loaded, view);
+ }
view->get_view_idle = 0;
return FALSE;
@@ -423,10 +434,20 @@ compare_to_letter(EMinicard *card, char *letter)
}
}
-void e_minicard_view_jump_to_letter (EMinicardView *view,
+void
+e_minicard_view_jump_to_letter (EMinicardView *view,
char letter)
{
e_reflow_sorted_jump(E_REFLOW_SORTED(view),
(GCompareFunc) compare_to_letter,
&letter);
}
+
+void
+e_minicard_view_stop (EMinicardView *view)
+{
+ disconnect_signals(view);
+ if (view->book_view)
+ gtk_object_unref(GTK_OBJECT(view->book_view));
+ view->book_view = NULL;
+}