aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-05-08 02:10:45 +0800
committerChris Lahey <clahey@src.gnome.org>2000-05-08 02:10:45 +0800
commit2043f685bae1373a3ea7b249ecc8e34990cf707c (patch)
tree5c1162672f6713d7cc3fa9c973640e3375984fcf /addressbook
parent8b23b4c192b118cd5c21a899c5c6009cdfe4d68a (diff)
downloadgsoc2013-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')
-rw-r--r--addressbook/ChangeLog10
-rw-r--r--addressbook/backend/pas/pas-backend-file.c12
-rw-r--r--addressbook/backend/pas/pas-backend-ldap.c12
-rw-r--r--addressbook/gui/component/addressbook.c40
4 files changed, 22 insertions, 52 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 35720216d6..7a74427110 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,15 @@
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.
+
+2000-05-07 Christopher James Lahey <clahey@helixcode.com>
+
* gui/component/addressbook.c: Make the addressbook create the
correct file uri. Added a default query. Initialize view->model
and view->view to NULL.
diff --git a/addressbook/backend/pas/pas-backend-file.c b/addressbook/backend/pas/pas-backend-file.c
index 11b5abb670..2dbd27a89a 100644
--- a/addressbook/backend/pas/pas-backend-file.c
+++ b/addressbook/backend/pas/pas-backend-file.c
@@ -947,18 +947,8 @@ pas_backend_file_load_uri (PASBackend *backend,
g_free(bf->priv->uri);
bf->priv->uri = g_strdup (uri);
- } else {
- GList *l;
-
- for (l = bf->priv->clients; l; l = l->next) {
- PASBook *book;
-
- book = PAS_BOOK (l->data);
- pas_book_respond_open (book, Evolution_BookListener_OtherError);
- }
-
+ } else
return FALSE;
- }
return TRUE;
}
diff --git a/addressbook/backend/pas/pas-backend-ldap.c b/addressbook/backend/pas/pas-backend-ldap.c
index 53d32d0e83..fa04be67de 100644
--- a/addressbook/backend/pas/pas-backend-ldap.c
+++ b/addressbook/backend/pas/pas-backend-ldap.c
@@ -898,18 +898,8 @@ pas_backend_ldap_load_uri (PASBackend *backend,
pas_backend_ldap_ensure_connected(bl);
return TRUE;
- } else {
- GList *l;
-
- for (l = bl->priv->clients; l; l = l->next) {
- PASBook *book;
-
- book = PAS_BOOK (l->data);
- pas_book_respond_open (book, Evolution_BookListener_OtherError);
- }
-
+ } else
return FALSE;
- }
}
/* Get_uri handler for the addressbook LDAP backend */
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 (