diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-05-08 02:10:45 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-05-08 02:10:45 +0800 |
commit | 2043f685bae1373a3ea7b249ecc8e34990cf707c (patch) | |
tree | 5c1162672f6713d7cc3fa9c973640e3375984fcf /addressbook/gui/component/addressbook.c | |
parent | 8b23b4c192b118cd5c21a899c5c6009cdfe4d68a (diff) | |
download | gsoc2013-evolution-2043f685bae1373a3ea7b249ecc8e34990cf707c.tar gsoc2013-evolution-2043f685bae1373a3ea7b249ecc8e34990cf707c.tar.gz gsoc2013-evolution-2043f685bae1373a3ea7b249ecc8e34990cf707c.tar.bz2 gsoc2013-evolution-2043f685bae1373a3ea7b249ecc8e34990cf707c.tar.lz gsoc2013-evolution-2043f685bae1373a3ea7b249ecc8e34990cf707c.tar.xz gsoc2013-evolution-2043f685bae1373a3ea7b249ecc8e34990cf707c.tar.zst gsoc2013-evolution-2043f685bae1373a3ea7b249ecc8e34990cf707c.zip |
Removed some code that was notifying too many clients at the wrong times.
2000-05-07 Christopher James Lahey <clahey@helixcode.com>
* backend/pas/pas-backend-file.c, backend/pas/pas-backend-ldap.c:
Removed some code that was notifying too many clients at the wrong
times.
* gui/component/addressbook.c: Set view->book. Unreffed
view->book. Unreffed the model instead of destroying it. Removed
the /tmp/test.db stuff.
svn path=/trunk/; revision=2876
Diffstat (limited to 'addressbook/gui/component/addressbook.c')
-rw-r--r-- | addressbook/gui/component/addressbook.c | 40 |
1 files changed, 10 insertions, 30 deletions
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c index d21370891e..dc5e591a44 100644 --- a/addressbook/gui/component/addressbook.c +++ b/addressbook/gui/component/addressbook.c @@ -301,7 +301,7 @@ search_entry_activated (GtkWidget* widget, gpointer user_data) search_word); else search_query = g_strdup ( - "(contains \"full_name\" \"\")"); + "(contains \"full_name\" \"\")"); set_query(view, search_query); @@ -315,7 +315,7 @@ make_quick_search_widget (GtkSignalFunc start_search_func, GtkWidget *search_vbox = gtk_vbox_new (FALSE, 0); GtkWidget *search_entry = gtk_entry_new (); - if (start_search_func) + if (start_search_func) { gtk_signal_connect (GTK_OBJECT (search_entry), "activate", (GtkSignalFunc) search_entry_activated, @@ -324,7 +324,7 @@ make_quick_search_widget (GtkSignalFunc start_search_func, /* add the search entry to the our search_vbox */ gtk_box_pack_start (GTK_BOX (search_vbox), search_entry, - FALSE, TRUE, 3); + FALSE, TRUE, 3); gtk_box_pack_start (GTK_BOX (search_vbox), gtk_label_new("Quick Search"), FALSE, TRUE, 0); @@ -421,6 +421,8 @@ addressbook_view_free(AddressbookView *view) { if (view->properties) bonobo_object_unref(BONOBO_OBJECT(view->properties)); + if (view->book) + gtk_object_unref(GTK_OBJECT(view->book)); g_free(view->uri); g_free(view); } @@ -434,26 +436,6 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) } } -static void -ebook_create (AddressbookView *view) -{ - view->book = e_book_new (); - - if (!view->book) { - printf ("%s: %s(): Couldn't create EBook, bailing.\n", - __FILE__, - __FUNCTION__); - return; - } - - - - if (! e_book_load_uri (view->book, "file:/tmp/test.db", book_open_cb, view)) - { - printf ("error calling load_uri!\n"); - } -} - static void destroy_callback(GtkWidget *widget, gpointer data) { AddressbookView *view = data; @@ -554,11 +536,11 @@ set_prop (BonoboPropertyBag *bag, uri_data = g_strdup_printf("file://%s", file_name); g_free(file_name); } - if (! e_book_load_uri (book, uri_data, book_open_cb, view)) - { - printf ("error calling load_uri!\n"); - } + printf ("error calling load_uri!\n"); + else + view->book = book; + g_free(uri_data); g_free(uri_file); @@ -675,7 +657,7 @@ teardown_table_view (AddressbookView *view) view->table = NULL; } if (view->model) { - gtk_object_destroy (GTK_OBJECT (view->model)); + gtk_object_unref (GTK_OBJECT (view->model)); view->model = NULL; } } @@ -803,8 +785,6 @@ addressbook_factory (BonoboGenericFactory *Factory, void *closure) gtk_widget_show_all( view->vbox ); - ebook_create(view); - view->properties = bonobo_property_bag_new (get_prop, set_prop, view); bonobo_property_bag_add ( |