aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-05 19:03:01 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-05 19:03:01 +0800
commit02e66b1085341d95377d3f2173a1900102f20b9b (patch)
tree52b0116ecd1e2850a1e2c1bd4c773015880f7ad3 /addressbook
parentc8b587d9c58dbb69085af3f05250f867be1c3631 (diff)
downloadgsoc2013-evolution-02e66b1085341d95377d3f2173a1900102f20b9b.tar.gz
gsoc2013-evolution-02e66b1085341d95377d3f2173a1900102f20b9b.tar.zst
gsoc2013-evolution-02e66b1085341d95377d3f2173a1900102f20b9b.zip
don't call bonobo_activation_init directly.
2002-11-05 Chris Toshok <toshok@ximian.com> * backend/ebook/test-client-list.c (main): don't call bonobo_activation_init directly. * backend/ebook/test-client.c (get_card_cb): don't unref the card here since we never reffed it. (main): no need to call bonobo_activation_init, as gnome_program_init did it for us. * backend/ebook/e-card-simple.c (e_card_simple_get_property): s/g_value_{set,get}_pointer/g_value_{set,get}_object * backend/ebook/e-book-util.c (set_default_book_uri_local): make sure to terminate args with NULL for g_build_filename. * backend/ebook/e-book-listener.c: nuke e_book_listener_get_type and use the BONOBO_TYPE_FUNC_FULL macro. * backend/ebook/e-book-listener.h: add the epv to EBookListenerClass so BONOBO_TYPE_FUNC_FULL works. * backend/ebook/e-book-view-listener.c: nuke e_book_view_listener_get_type and use the BONOBO_TYPE_FUNC_FULL macro. * backend/ebook/e-book-view-listener.h: add the epv to EBookViewListenerClass so BONOBO_TYPE_FUNC_FULL works. svn path=/trunk/; revision=18543
Diffstat (limited to 'addressbook')
-rw-r--r--addressbook/ChangeLog29
-rw-r--r--addressbook/backend/ebook/e-book-listener.c37
-rw-r--r--addressbook/backend/ebook/e-book-listener.h1
-rw-r--r--addressbook/backend/ebook/e-book-util.c3
-rw-r--r--addressbook/backend/ebook/e-book-view-listener.c37
-rw-r--r--addressbook/backend/ebook/e-book-view-listener.h2
-rw-r--r--addressbook/backend/ebook/e-card-simple.c6
-rw-r--r--addressbook/backend/ebook/test-client-list.c1
-rw-r--r--addressbook/backend/ebook/test-client.c2
9 files changed, 53 insertions, 65 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index d739565403..c7f5fa4a7c 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,32 @@
+2002-11-05 Chris Toshok <toshok@ximian.com>
+
+ * backend/ebook/test-client-list.c (main): don't call
+ bonobo_activation_init directly.
+
+ * backend/ebook/test-client.c (get_card_cb): don't unref the card
+ here since we never reffed it.
+ (main): no need to call bonobo_activation_init, as
+ gnome_program_init did it for us.
+
+ * backend/ebook/e-card-simple.c (e_card_simple_get_property):
+ s/g_value_{set,get}_pointer/g_value_{set,get}_object
+
+ * backend/ebook/e-book-util.c (set_default_book_uri_local): make
+ sure to terminate args with NULL for g_build_filename.
+
+ * backend/ebook/e-book-listener.c: nuke e_book_listener_get_type
+ and use the BONOBO_TYPE_FUNC_FULL macro.
+
+ * backend/ebook/e-book-listener.h: add the epv to
+ EBookListenerClass so BONOBO_TYPE_FUNC_FULL works.
+
+ * backend/ebook/e-book-view-listener.c: nuke
+ e_book_view_listener_get_type and use the BONOBO_TYPE_FUNC_FULL
+ macro.
+
+ * backend/ebook/e-book-view-listener.h: add the epv to
+ EBookViewListenerClass so BONOBO_TYPE_FUNC_FULL works.
+
2002-11-02 Chris Toshok <toshok@ximian.com>
* backend/ebook/e-book-types.h: just include glib.h instead of the
diff --git a/addressbook/backend/ebook/e-book-listener.c b/addressbook/backend/ebook/e-book-listener.c
index ed3fad586a..df27e3092a 100644
--- a/addressbook/backend/ebook/e-book-listener.c
+++ b/addressbook/backend/ebook/e-book-listener.c
@@ -783,7 +783,7 @@ e_book_listener_dispose (GObject *object)
}
static void
-corba_class_init (void)
+corba_class_init (EBookListenerClass *klass)
{
POA_GNOME_Evolution_Addressbook_BookListener__vepv *vepv;
POA_GNOME_Evolution_Addressbook_BookListener__epv *epv;
@@ -795,7 +795,7 @@ corba_class_init (void)
base_epv->default_POA = NULL;
- epv = g_new0 (POA_GNOME_Evolution_Addressbook_BookListener__epv, 1);
+ epv = &klass->epv;
epv->notifyOpenBookProgress = impl_BookListener_report_open_book_progress;
epv->notifyBookOpened = impl_BookListener_respond_open_book;
@@ -834,32 +834,11 @@ e_book_listener_class_init (EBookListenerClass *klass)
object_class->dispose = e_book_listener_dispose;
- corba_class_init ();
+ corba_class_init (klass);
}
-/**
- * e_book_listener_get_type:
- */
-GType
-e_book_listener_get_type (void)
-{
- static GType type = 0;
-
- if (! type) {
- GTypeInfo info = {
- sizeof (EBookListenerClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) e_book_listener_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EBookListener),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_book_listener_init
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "EBookListener", &info, 0);
- }
-
- return type;
-}
+BONOBO_TYPE_FUNC_FULL (
+ EBookListener,
+ GNOME_Evolution_Addressbook_BookListener,
+ BONOBO_TYPE_OBJECT,
+ e_book_listener);
diff --git a/addressbook/backend/ebook/e-book-listener.h b/addressbook/backend/ebook/e-book-listener.h
index 6956d23db4..c9c0bd02d5 100644
--- a/addressbook/backend/ebook/e-book-listener.h
+++ b/addressbook/backend/ebook/e-book-listener.h
@@ -38,6 +38,7 @@ struct _EBookListener {
struct _EBookListenerClass {
BonoboObjectClass parent;
+ POA_GNOME_Evolution_Addressbook_BookListener__epv epv;
/*
* Signals
*/
diff --git a/addressbook/backend/ebook/e-book-util.c b/addressbook/backend/ebook/e-book-util.c
index a43416abbf..75d9b913b0 100644
--- a/addressbook/backend/ebook/e-book-util.c
+++ b/addressbook/backend/ebook/e-book-util.c
@@ -197,7 +197,8 @@ set_default_book_uri_local (void)
g_free (default_book_uri);
filename = g_build_filename (g_get_home_dir(),
- "evolution/local/Contacts/addressbook.db");
+ "evolution/local/Contacts/addressbook.db",
+ NULL);
default_book_uri = g_strdup_printf ("file://%s", filename);
g_free (filename);
}
diff --git a/addressbook/backend/ebook/e-book-view-listener.c b/addressbook/backend/ebook/e-book-view-listener.c
index 5e8c9300ae..fb1d0b3383 100644
--- a/addressbook/backend/ebook/e-book-view-listener.c
+++ b/addressbook/backend/ebook/e-book-view-listener.c
@@ -477,7 +477,7 @@ e_book_view_listener_dispose (GObject *object)
}
static void
-corba_class_init (void)
+corba_class_init (EBookViewListenerClass *klass)
{
POA_GNOME_Evolution_Addressbook_BookViewListener__vepv *vepv;
POA_GNOME_Evolution_Addressbook_BookViewListener__epv *epv;
@@ -489,7 +489,7 @@ corba_class_init (void)
base_epv->default_POA = NULL;
- epv = g_new0 (POA_GNOME_Evolution_Addressbook_BookViewListener__epv, 1);
+ epv = &klass->epv;
epv->notifyCardChanged = impl_BookViewListener_notify_card_changed;
epv->notifyCardRemoved = impl_BookViewListener_notify_card_removed;
epv->notifyCardAdded = impl_BookViewListener_notify_card_added;
@@ -519,32 +519,11 @@ e_book_view_listener_class_init (EBookViewListenerClass *klass)
object_class->dispose = e_book_view_listener_dispose;
- corba_class_init ();
+ corba_class_init (klass);
}
-/**
- * e_book_view_listener_get_type:
- */
-GType
-e_book_view_listener_get_type (void)
-{
- static GType type = 0;
-
- if (! type) {
- GTypeInfo info = {
- sizeof (EBookViewListenerClass),
- NULL, /* base_class_init */
- NULL, /* base_class_finalize */
- (GClassInitFunc) e_book_view_listener_class_init,
- NULL, /* class_finalize */
- NULL, /* class_data */
- sizeof (EBookViewListener),
- 0, /* n_preallocs */
- (GInstanceInitFunc) e_book_view_listener_init
- };
-
- type = g_type_register_static (G_TYPE_OBJECT, "EBookViewListener", &info, 0);
- }
-
- return type;
-}
+BONOBO_TYPE_FUNC_FULL (
+ EBookViewListener,
+ GNOME_Evolution_Addressbook_BookViewListener,
+ BONOBO_TYPE_OBJECT,
+ e_book_view_listener);
diff --git a/addressbook/backend/ebook/e-book-view-listener.h b/addressbook/backend/ebook/e-book-view-listener.h
index 3ca502dbfc..3100a2f532 100644
--- a/addressbook/backend/ebook/e-book-view-listener.h
+++ b/addressbook/backend/ebook/e-book-view-listener.h
@@ -37,6 +37,8 @@ struct _EBookViewListener {
struct _EBookViewListenerClass {
BonoboObjectClass parent;
+ POA_GNOME_Evolution_Addressbook_BookViewListener__epv epv;
+
/*
* Signals
*/
diff --git a/addressbook/backend/ebook/e-card-simple.c b/addressbook/backend/ebook/e-card-simple.c
index 9aa4638fb7..b033b81d55 100644
--- a/addressbook/backend/ebook/e-card-simple.c
+++ b/addressbook/backend/ebook/e-card-simple.c
@@ -386,8 +386,8 @@ e_card_simple_set_property (GObject *object,
g_list_foreach(simple->temp_fields, (GFunc) g_free, NULL);
g_list_free(simple->temp_fields);
simple->temp_fields = NULL;
- if (g_value_get_pointer (value))
- simple->card = E_CARD(g_value_get_pointer (value));
+ if (g_value_get_object (value))
+ simple->card = E_CARD(g_value_get_object (value));
else
simple->card = NULL;
if(simple->card)
@@ -414,7 +414,7 @@ e_card_simple_get_property (GObject *object,
switch (prop_id) {
case PROP_CARD:
e_card_simple_sync_card(simple);
- g_value_set_pointer (value, simple->card);
+ g_value_set_object (value, simple->card);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
diff --git a/addressbook/backend/ebook/test-client-list.c b/addressbook/backend/ebook/test-client-list.c
index 0c93277d5a..271d9fc3bf 100644
--- a/addressbook/backend/ebook/test-client-list.c
+++ b/addressbook/backend/ebook/test-client-list.c
@@ -58,7 +58,6 @@ main (int argc, char **argv)
{
gnome_program_init("test-client-list", "0.0", LIBGNOME_MODULE, argc, argv, NULL);
- bonobo_activation_init (argc, argv);
init_bonobo (&argc, argv);
g_idle_add (ebook_create, NULL);
diff --git a/addressbook/backend/ebook/test-client.c b/addressbook/backend/ebook/test-client.c
index 96706eea7c..8d44cb73e0 100644
--- a/addressbook/backend/ebook/test-client.c
+++ b/addressbook/backend/ebook/test-client.c
@@ -60,7 +60,6 @@ get_card_cb (EBook *book, EBookStatus status, ECard *card, gpointer closure)
vcard = e_card_get_vcard_assume_utf8(card);
printf ("Card added: [%s]\n", vcard);
g_free(vcard);
- g_object_unref(card);
printf ("Getting cards..\n");
e_book_get_cursor(book, "", get_cursor_cb, NULL);
@@ -173,7 +172,6 @@ main (int argc, char **argv)
gnome_program_init("test-client", "0.0", LIBGNOME_MODULE, argc, argv, NULL);
- bonobo_activation_init (argc, argv);
init_bonobo (&argc, argv);
cardstr = NULL;