aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-08 14:24:55 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-08 14:24:55 +0800
commitab44fe3e1d962e7876693929c940121e2954379d (patch)
tree337a2db277df0506b22a2954370906de3c37127c
parent98a615797554ceab22a641f21c4b364b4af21e4f (diff)
downloadgsoc2013-evolution-ab44fe3e1d962e7876693929c940121e2954379d.tar.gz
gsoc2013-evolution-ab44fe3e1d962e7876693929c940121e2954379d.tar.zst
gsoc2013-evolution-ab44fe3e1d962e7876693929c940121e2954379d.zip
add lots of libs back in since they're building now.
2002-11-07 Chris Toshok <toshok@ximian.com> * gui/component/Makefile.am (evolution_addressbook_LDADD): add lots of libs back in since they're building now. * gui/component/addressbook-config.c: more porting work. * gui/component/addressbook.c: more porting work. * gui/component/e-address-popup.[ch]: more porting work. * gui/component/e-address-widget.[ch]: more porting work. * gui/component/e-cardlist-model.[ch]: more porting work. svn path=/trunk/; revision=18658
-rw-r--r--addressbook/ChangeLog15
-rw-r--r--addressbook/gui/component/Makefile.am8
-rw-r--r--addressbook/gui/component/addressbook-config.c33
-rw-r--r--addressbook/gui/component/addressbook.c82
-rw-r--r--addressbook/gui/component/e-address-popup.c55
-rw-r--r--addressbook/gui/component/e-address-popup.h12
-rw-r--r--addressbook/gui/component/e-address-widget.c26
-rw-r--r--addressbook/gui/component/e-address-widget.h12
-rw-r--r--addressbook/gui/component/e-cardlist-model.c37
-rw-r--r--addressbook/gui/component/e-cardlist-model.h11
10 files changed, 153 insertions, 138 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index 4436121640..d8afb75777 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,5 +1,20 @@
2002-11-07 Chris Toshok <toshok@ximian.com>
+ * gui/component/Makefile.am (evolution_addressbook_LDADD): add
+ lots of libs back in since they're building now.
+
+ * gui/component/addressbook-config.c: more porting work.
+
+ * gui/component/addressbook.c: more porting work.
+
+ * gui/component/e-address-popup.[ch]: more porting work.
+
+ * gui/component/e-address-widget.[ch]: more porting work.
+
+ * gui/component/e-cardlist-model.[ch]: more porting work.
+
+2002-11-07 Chris Toshok <toshok@ximian.com>
+
* gui/component/select-names/e-select-names-bonobo.[ch]: more
porting work.
diff --git a/addressbook/gui/component/Makefile.am b/addressbook/gui/component/Makefile.am
index 445c47c83a..c3be7a7f81 100644
--- a/addressbook/gui/component/Makefile.am
+++ b/addressbook/gui/component/Makefile.am
@@ -51,7 +51,10 @@ evolution_addressbook_LDADD = \
select-names/libeselectnames.la \
$(top_builddir)/shell/libeshell.la \
$(top_builddir)/addressbook/gui/widgets/libeminicard.a \
+ $(top_builddir)/addressbook/printing/libecontactprint.a \
+ $(top_builddir)/addressbook/gui/search/libeaddressbooksearch.a \
$(top_builddir)/addressbook/backend/ebook/libebook.la \
+ $(top_builddir)/camel/libcamel.la \
$(top_builddir)/e-util/ename/libename.la \
$(top_builddir)/addressbook/gui/contact-list-editor/libecontactlisteditor.a \
$(top_builddir)/addressbook/gui/contact-editor/libecontacteditor.a \
@@ -63,12 +66,7 @@ evolution_addressbook_LDADD = \
$(EVOLUTION_ADDRESSBOOK_LIBS) $(LDAP_LIBS)
# not done yet:
-# $(top_builddir)/addressbook/gui/search/libeaddressbooksearch.a
# $(top_builddir)/filter/libfilter.la
-# $(top_builddir)/addressbook/printing/libecontactprint.a
-# $(top_builddir)/camel/libcamel.la
-
-#evolution_addressbook_LDFLAGS = `gnome-config --libs gdk_pixbuf` -export-dynamic
@INTLTOOL_SERVER_RULE@
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index 746d1d9b1c..4bfc49e9e1 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -18,7 +18,6 @@
#include <gtk/gtkentry.h>
#include <gtk/gtkmessagedialog.h>
#include <libgnome/gnome-i18n.h>
-#include <libgnomeui/gnome-dialog.h>
#include <libgnomeui/gnome-druid.h>
#include <libgnomeui/gnome-druid-page.h>
@@ -92,12 +91,12 @@ add_focus_handler (GtkWidget *widget, GtkWidget *notebook, int page_num)
focus_closure->notebook = notebook;
focus_closure->page_num = page_num;
- gtk_signal_connect_full (GTK_OBJECT (widget),
- "focus_in_event" /* XXX */,
- (GtkSignalFunc) focus_help, NULL,
- focus_closure,
- (GtkDestroyNotify) g_free,
- FALSE, FALSE);
+ g_signal_connect_data (G_OBJECT (widget),
+ "focus_in_event" /* XXX */,
+ G_CALLBACK (focus_help),
+ focus_closure,
+ (GClosureNotify) g_free,
+ (GConnectFlags)0);
}
typedef struct _AddressbookDialog AddressbookDialog;
@@ -356,7 +355,7 @@ addressbook_source_dialog_destroy (GtkWidget *widget, AddressbookSourceDialog *d
#undef IF_UNREF
#endif
- gtk_object_destroy (GTK_OBJECT (dialog->gui));
+ gtk_widget_destroy (GTK_WIDGET (dialog->gui));
g_free (dialog);
}
@@ -689,8 +688,8 @@ do_ldap_root_dse_query (GtkWidget *dialog, ETableModel *model, AddressbookSource
static void
search_base_selection_model_changed (ESelectionModel *selection_model, GtkWidget *dialog)
{
- gnome_dialog_set_sensitive (GNOME_DIALOG (dialog),
- 0 /* OK */, e_selection_model_selected_count (selection_model) == 1);
+ gtk_dialog_set_response_sensitive (GTK_DIALOG (dialog),
+ GTK_RESPONSE_OK, e_selection_model_selected_count (selection_model) == 1);
}
static void
@@ -716,11 +715,11 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
search_base_selection_model_changed (selection_model, dialog);
if (do_ldap_root_dse_query (dialog, model, source, &values)) {
- gnome_dialog_close_hides (GNOME_DIALOG(dialog), TRUE);
+ id = gtk_dialog_run (GTK_DIALOG (dialog));
- id = gnome_dialog_run_and_close (GNOME_DIALOG (dialog));
+ gtk_widget_hide (dialog);
- if (id == 0) {
+ if (id == GTK_RESPONSE_OK) {
int i;
/* OK was clicked */
@@ -1725,13 +1724,13 @@ addressbook_config_create_new_source (const char *new_source, GtkWidget *parent)
gtk_entry_set_text (GTK_ENTRY (dialog->name), new_source);
- gnome_dialog_close_hides (GNOME_DIALOG(dialog->dialog), TRUE);
+ dialog->id = gtk_dialog_run (GTK_DIALOG (dialog->dialog));
+
+ gtk_widget_hide (dialog->dialog);
- dialog->id = gnome_dialog_run_and_close (GNOME_DIALOG (dialog->dialog));
-
g_object_unref (dialog->gui);
- if (dialog->id == 0) {
+ if (dialog->id == GTK_RESPONSE_OK) {
/* Ok was clicked */
addressbook_storage_add_source (addressbook_source_copy(dialog->source));
addressbook_storage_write_sources();
diff --git a/addressbook/gui/component/addressbook.c b/addressbook/gui/component/addressbook.c
index 2bb49521b0..fb37952fe9 100644
--- a/addressbook/gui/component/addressbook.c
+++ b/addressbook/gui/component/addressbook.c
@@ -14,10 +14,12 @@
#include <glib.h>
#include <gtk/gtkframe.h>
#include <gtk/gtkvbox.h>
+#include <gtk/gtkwidget.h>
+#include <gtk/gtkmessagedialog.h>
#include <libgnome/gnome-i18n.h>
#include <libgnomeui/gnome-app.h>
+#include <libgnomeui/gnome-href.h>
#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeui/gnome-dialog.h>
#include <bonobo/bonobo-generic-factory.h>
#include <bonobo/bonobo-ui-util.h>
#include <bonobo/bonobo-exception.h>
@@ -476,18 +478,15 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure)
NULL);
}
else {
- GtkWidget *warning_dialog, *label;
+ char *label_string;
+ GtkWidget *warning_dialog;
+ GtkWidget *href = NULL;
AddressbookSource *source = NULL;
- warning_dialog = gnome_dialog_new (
- _("Unable to open addressbook"),
- GNOME_STOCK_BUTTON_CLOSE,
- NULL);
-
if (!strncmp (view->uri, "file:", 5)) {
- label = gtk_label_new (
- _("We were unable to open this addressbook. Please check that the\n"
- "path exists and that you have permission to access it."));
+ label_string =
+ _("We were unable to open this addressbook. Please check that the\n"
+ "path exists and that you have permission to access it.");
}
else {
source = addressbook_storage_get_source_by_uri (view->uri);
@@ -495,48 +494,49 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure)
if (source) {
/* special case for ldap: contact folders so we can tell the user about openldap */
#if HAVE_LDAP
- label = gtk_label_new (
- _("We were unable to open this addressbook. This either\n"
- "means you have entered an incorrect URI, or the LDAP server\n"
- "is unreachable."));
+ label_string =
+ _("We were unable to open this addressbook. This either\n"
+ "means you have entered an incorrect URI, or the LDAP server\n"
+ "is unreachable.");
#else
- label = gtk_label_new (
- _("This version of Evolution does not have LDAP support\n"
- "compiled in to it. If you want to use LDAP in Evolution\n"
- "you must compile the program from the CVS sources after\n"
- "retrieving OpenLDAP from the link below.\n"));
+ label_string =
+ _("This version of Evolution does not have LDAP support\n"
+ "compiled in to it. If you want to use LDAP in Evolution\n"
+ "you must compile the program from the CVS sources after\n"
+ "retrieving OpenLDAP from the link below.\n");
+ href = gnome_href_new ("http://www.openldap.org/", "OpenLDAP at http://www.openldap.org/");
#endif
}
else {
/* other network folders */
- label = gtk_label_new (
- _("We were unable to open this addressbook. This either\n"
- "means you have entered an incorrect URI, or the server\n"
- "is unreachable."));
+ label_string =
+ _("We were unable to open this addressbook. This either\n"
+ "means you have entered an incorrect URI, or the server\n"
+ "is unreachable.");
}
}
- gtk_misc_set_alignment(GTK_MISC(label),
- 0, .5);
- gtk_label_set_justify(GTK_LABEL(label),
- GTK_JUSTIFY_LEFT);
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox),
- label, TRUE, TRUE, 0);
- gtk_widget_show (label);
+ warning_dialog = gtk_message_dialog_new (
+ NULL /* XXX */,
+ 0,
+ GTK_MESSAGE_WARNING,
+ GTK_BUTTONS_CLOSE,
+ label_string,
+ NULL);
+
+ g_signal_connect_swapped (warning_dialog,
+ "response",
+ G_CALLBACK (gtk_widget_destroy),
+ warning_dialog);
-#ifndef HAVE_LDAP
- if (source) {
- GtkWidget *href;
- href = gnome_href_new ("http://www.openldap.org/", "OpenLDAP at http://www.openldap.org/");
- gtk_box_pack_start (GTK_BOX (GNOME_DIALOG (warning_dialog)->vbox),
+ gtk_window_set_title (GTK_WINDOW (warning_dialog), _("Unable to open addressbook"));
+
+ if (href)
+ gtk_box_pack_start (GTK_BOX (GTK_DIALOG (warning_dialog)->vbox),
href, FALSE, FALSE, 0);
- gtk_widget_show (href);
- }
-#endif
- gnome_dialog_run (GNOME_DIALOG (warning_dialog));
-
- gtk_object_destroy (GTK_OBJECT (warning_dialog));
+
+ gtk_widget_show_all (warning_dialog);
}
}
diff --git a/addressbook/gui/component/e-address-popup.c b/addressbook/gui/component/e-address-popup.c
index 976191eaef..7b8e3b4411 100644
--- a/addressbook/gui/component/e-address-popup.c
+++ b/addressbook/gui/component/e-address-popup.c
@@ -36,7 +36,6 @@
#include <bonobo/bonobo-property-bag.h>
#include <bonobo/bonobo-generic-factory.h>
#include <gal/widgets/e-popup-menu.h>
-#include <gal/widgets/e-unicode.h>
#include <addressbook/backend/ebook/e-book.h>
#include <addressbook/backend/ebook/e-book-util.h>
#include <addressbook/gui/contact-editor/e-contact-editor.h>
@@ -665,18 +664,18 @@ card_picker_init (MiniWizard *wiz, const GList *cards, const gchar *new_name, co
static GtkObjectClass *parent_class;
-static void e_address_popup_destroy (GtkObject *);
+static void e_address_popup_dispose (GObject *);
static void e_address_popup_query (EAddressPopup *);
static void
e_address_popup_class_init (EAddressPopupClass *klass)
{
- GtkObjectClass *object_class = (GtkObjectClass *) klass;
+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
- parent_class = GTK_OBJECT_CLASS (gtk_type_class (gtk_event_box_get_type ()));
+ parent_class = g_type_class_peek_parent (klass);
- object_class->destroy = e_address_popup_destroy;
+ object_class->dispose = e_address_popup_dispose;
}
static void
@@ -716,33 +715,35 @@ e_address_popup_cleanup (EAddressPopup *pop)
}
static void
-e_address_popup_destroy (GtkObject *obj)
+e_address_popup_dispose (GObject *obj)
{
EAddressPopup *pop = E_ADDRESS_POPUP (obj);
e_address_popup_cleanup (pop);
- if (GTK_OBJECT_CLASS (parent_class)->destroy)
- GTK_OBJECT_CLASS (parent_class)->destroy (obj);
+ if (G_OBJECT_CLASS (parent_class)->dispose)
+ G_OBJECT_CLASS (parent_class)->dispose (obj);
}
-GtkType
+GType
e_address_popup_get_type (void)
{
- static GtkType pop_type = 0;
+ static GType pop_type = 0;
if (!pop_type) {
- GtkTypeInfo pop_info = {
- "EAddressPopup",
- sizeof (EAddressPopup),
+ static const GTypeInfo pop_info = {
sizeof (EAddressPopupClass),
- (GtkClassInitFunc) e_address_popup_class_init,
- (GtkObjectInitFunc) e_address_popup_init,
- NULL, NULL,
- (GtkClassInitFunc) NULL
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) e_address_popup_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (EAddressPopup),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) e_address_popup_init,
};
- pop_type = gtk_type_unique (gtk_event_box_get_type (), &pop_info);
+ pop_type = g_type_register_static (gtk_event_box_get_type (), "EAddressPopup", &pop_info, 0);
}
return pop_type;
@@ -906,7 +907,7 @@ e_address_popup_construct (EAddressPopup *pop)
GtkWidget *
e_address_popup_new (void)
{
- EAddressPopup *pop = gtk_type_new (E_ADDRESS_POPUP_TYPE);
+ EAddressPopup *pop = g_object_new (E_TYPE_ADDRESS_POPUP, NULL);
e_address_popup_construct (pop);
return GTK_WIDGET (pop);
}
@@ -969,10 +970,10 @@ e_address_popup_cardify (EAddressPopup *pop, ECard *card)
b = gtk_button_new_with_label (_("Edit Contact Info"));
gtk_box_pack_start (GTK_BOX (pop->main_vbox), b, TRUE, TRUE, 0);
- gtk_signal_connect_object (GTK_OBJECT (b),
- "clicked",
- GTK_SIGNAL_FUNC (edit_contact_info_cb),
- GTK_OBJECT (pop));
+ g_signal_connect (b,
+ "clicked",
+ G_CALLBACK (edit_contact_info_cb),
+ pop);
gtk_widget_show (b);
}
@@ -999,10 +1000,10 @@ e_address_popup_no_matches (EAddressPopup *pop)
b = gtk_button_new_with_label (_("Add to Contacts"));
gtk_box_pack_start (GTK_BOX (pop->main_vbox), b, TRUE, TRUE, 0);
- gtk_signal_connect_object (GTK_OBJECT (b),
- "clicked",
- GTK_SIGNAL_FUNC (add_contacts_cb),
- GTK_OBJECT (pop));
+ g_signal_connect (b,
+ "clicked",
+ G_CALLBACK (add_contacts_cb),
+ pop);
gtk_widget_show (b);
}
diff --git a/addressbook/gui/component/e-address-popup.h b/addressbook/gui/component/e-address-popup.h
index d2a390e400..0476e52367 100644
--- a/addressbook/gui/component/e-address-popup.h
+++ b/addressbook/gui/component/e-address-popup.h
@@ -34,11 +34,11 @@
G_BEGIN_DECLS
-#define E_ADDRESS_POPUP_TYPE (e_address_popup_get_type ())
-#define E_ADDRESS_POPUP(o) (GTK_CHECK_CAST ((o), E_ADDRESS_POPUP_TYPE, EAddressPopup))
-#define E_ADDRESS_POPUP_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), E_ADDRESS_POPUP_TYPE, EAddressPopupClass))
-#define E_IS_ADDRESS_POPUP(o) (GTK_CHECK_TYPE ((o), E_ADDRESS_POPUP_TYPE))
-#define E_IS_ADDRESS_POPUP_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_ADDRESS_POPUP_TYPE))
+#define E_TYPE_ADDRESS_POPUP (e_address_popup_get_type ())
+#define E_ADDRESS_POPUP(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_ADDRESS_POPUP, EAddressPopup))
+#define E_ADDRESS_POPUP_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), E_TYPE_ADDRESS_POPUP, EAddressPopupClass))
+#define E_IS_ADDRESS_POPUP(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_ADDRESS_POPUP))
+#define E_IS_ADDRESS_POPUP_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_ADDRESS_POPUP))
typedef struct _EAddressPopup EAddressPopup;
typedef struct _EAddressPopupClass EAddressPopupClass;
@@ -72,7 +72,7 @@ struct _EAddressPopupClass {
GtkEventBoxClass parent_class;
};
-GtkType e_address_popup_get_type (void);
+GType e_address_popup_get_type (void);
void e_address_popup_set_name (EAddressPopup *, const gchar *name);
void e_address_popup_set_email (EAddressPopup *, const gchar *email);
diff --git a/addressbook/gui/component/e-address-widget.c b/addressbook/gui/component/e-address-widget.c
index 2b58fd3db9..61b65f9e4f 100644
--- a/addressbook/gui/component/e-address-widget.c
+++ b/addressbook/gui/component/e-address-widget.c
@@ -54,7 +54,7 @@ e_address_widget_class_init (EAddressWidgetClass *klass)
GtkObjectClass *object_class = (GtkObjectClass *) klass;
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
- parent_class = GTK_OBJECT_CLASS (gtk_type_class (gtk_event_box_get_type ()));
+ parent_class = g_type_class_peek_parent (klass);
object_class->destroy = e_address_widget_destroy;
@@ -94,23 +94,25 @@ e_address_widget_button_press_handler (GtkWidget *w, GdkEventButton *ev)
return FALSE;
}
-GtkType
+GType
e_address_widget_get_type (void)
{
- static GtkType aw_type = 0;
+ static GType aw_type = 0;
if (!aw_type) {
- GtkTypeInfo aw_info = {
- "EAddressWidget",
- sizeof (EAddressWidget),
+ static const GTypeInfo aw_info = {
sizeof (EAddressWidgetClass),
- (GtkClassInitFunc) e_address_widget_class_init,
- (GtkObjectInitFunc) e_address_widget_init,
- NULL, NULL, /* reserved... but for what sinister purpose? */
- (GtkClassInitFunc) NULL
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) e_address_widget_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (EAddressWidget),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) e_address_widget_init,
};
- aw_type = gtk_type_unique (gtk_event_box_get_type (), &aw_info);
+ aw_type = g_type_register_static (gtk_event_box_get_type (), "EAddressWidget", &aw_info, 0);
}
return aw_type;
@@ -224,7 +226,7 @@ e_address_widget_construct (EAddressWidget *addr)
GtkWidget *
e_address_widget_new (void)
{
- EAddressWidget *addr = gtk_type_new (e_address_widget_get_type ());
+ EAddressWidget *addr = g_object_new (E_TYPE_ADDRESS_WIDGET, NULL);
e_address_widget_construct (addr);
return GTK_WIDGET (addr);
}
diff --git a/addressbook/gui/component/e-address-widget.h b/addressbook/gui/component/e-address-widget.h
index f189392288..337ecf1609 100644
--- a/addressbook/gui/component/e-address-widget.h
+++ b/addressbook/gui/component/e-address-widget.h
@@ -36,11 +36,11 @@
G_BEGIN_DECLS
-#define E_ADDRESS_WIDGET_TYPE (e_address_widget_get_type ())
-#define E_ADDRESS_WIDGET(o) (GTK_CHECK_CAST ((o), E_ADDRESS_WIDGET_TYPE, EAddressWidget))
-#define E_ADDRESS_WIDGET_CLASS(k) (GTK_CHECK_CLASS_CAST ((k), E_ADDRESS_WIDGET_TYPE, EAddressWidgetClass))
-#define E_IS_ADDRESS_WIDGET(o) (GTK_CHECK_TYPE ((o), E_ADDRESS_WIDGET_TYPE))
-#define E_IS_ADDRESS_WIDGET_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_ADDRESS_WIDGET_TYPE))
+#define E_TYPE_ADDRESS_WIDGET (e_address_widget_get_type ())
+#define E_ADDRESS_WIDGET(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_ADDRESS_WIDGET, EAddressWidget))
+#define E_ADDRESS_WIDGET_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), E_TYPE_ADDRESS_WIDGET, EAddressWidgetClass))
+#define E_IS_ADDRESS_WIDGET(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_ADDRESS_WIDGET))
+#define E_IS_ADDRESS_WIDGET_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_ADDRESS_WIDGET))
typedef struct _EAddressWidget EAddressWidget;
typedef struct _EAddressWidgetClass EAddressWidgetClass;
@@ -66,7 +66,7 @@ struct _EAddressWidgetClass {
GtkEventBoxClass parent_class;
};
-GtkType e_address_widget_get_type (void);
+GType e_address_widget_get_type (void);
void e_address_widget_set_name (EAddressWidget *, const gchar *name);
void e_address_widget_set_email (EAddressWidget *, const gchar *email);
diff --git a/addressbook/gui/component/e-cardlist-model.c b/addressbook/gui/component/e-cardlist-model.c
index 2066d058bf..9e522e79f1 100644
--- a/addressbook/gui/component/e-cardlist-model.c
+++ b/addressbook/gui/component/e-cardlist-model.c
@@ -16,7 +16,7 @@
#define PARENT_TYPE e_table_model_get_type()
static void
-e_cardlist_model_destroy(GtkObject *object)
+e_cardlist_model_dispose(GObject *object)
{
ECardlistModel *model = E_CARDLIST_MODEL(object);
int i;
@@ -154,11 +154,11 @@ e_cardlist_model_remove(ECardlistModel *model,
}
static void
-e_cardlist_model_class_init (GtkObjectClass *object_class)
+e_cardlist_model_class_init (GObjectClass *object_class)
{
ETableModelClass *model_class = (ETableModelClass *) object_class;
- object_class->destroy = e_cardlist_model_destroy;
+ object_class->dispose = e_cardlist_model_dispose;
model_class->column_count = e_cardlist_model_col_count;
model_class->row_count = e_cardlist_model_row_count;
@@ -173,7 +173,7 @@ e_cardlist_model_class_init (GtkObjectClass *object_class)
}
static void
-e_cardlist_model_init (GtkObject *object)
+e_cardlist_model_init (GObject *object)
{
ECardlistModel *model = E_CARDLIST_MODEL(object);
model->data = NULL;
@@ -195,27 +195,28 @@ e_cardlist_model_get(ECardlistModel *model,
return NULL;
}
-GtkType
+GType
e_cardlist_model_get_type (void)
{
- static GtkType type = 0;
+ static GType aw_type = 0;
- if (!type){
- GtkTypeInfo info = {
- "ECardlistModel",
- sizeof (ECardlistModel),
+ if (!aw_type) {
+ static const GTypeInfo aw_info = {
sizeof (ECardlistModelClass),
- (GtkClassInitFunc) e_cardlist_model_class_init,
- (GtkObjectInitFunc) e_cardlist_model_init,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) e_cardlist_model_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (ECardlistModel),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) e_cardlist_model_init,
};
- type = gtk_type_unique (PARENT_TYPE, &info);
+ aw_type = g_type_register_static (PARENT_TYPE, "ECardlistModel", &aw_info, 0);
}
- return type;
+ return aw_type;
}
ETableModel *
@@ -223,7 +224,7 @@ e_cardlist_model_new (void)
{
ECardlistModel *et;
- et = gtk_type_new (e_cardlist_model_get_type ());
+ et = g_object_new (E_TYPE_CARDLIST_MODEL, NULL);
return E_TABLE_MODEL(et);
}
diff --git a/addressbook/gui/component/e-cardlist-model.h b/addressbook/gui/component/e-cardlist-model.h
index dc2da509e0..0968e936fc 100644
--- a/addressbook/gui/component/e-cardlist-model.h
+++ b/addressbook/gui/component/e-cardlist-model.h
@@ -2,17 +2,16 @@
#ifndef _E_CARDLIST_MODEL_H_
#define _E_CARDLIST_MODEL_H_
-#include <gtk/gtk.h>
#include <gal/e-table/e-table-model.h>
#include <ebook/e-book.h>
#include <ebook/e-book-view.h>
#include <ebook/e-card-simple.h>
#define E_TYPE_CARDLIST_MODEL (e_cardlist_model_get_type ())
-#define E_CARDLIST_MODEL(o) (GTK_CHECK_CAST ((o), E_TYPE_CARDLIST_MODEL, ECardlistModel))
-#define E_CARDLIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_TYPE_CARDLIST_MODEL, ECardlistModelClass))
-#define E_IS_CARDLIST_MODEL(o) (GTK_CHECK_TYPE ((o), E_TYPE_CARDLIST_MODEL))
-#define E_IS_CARDLIST_MODEL_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_TYPE_CARDLIST_MODEL))
+#define E_CARDLIST_MODEL(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), E_TYPE_CARDLIST_MODEL, ECardlistModel))
+#define E_CARDLIST_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), E_TYPE_CARDLIST_MODEL, ECardlistModelClass))
+#define E_IS_CARDLIST_MODEL(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), E_TYPE_CARDLIST_MODEL))
+#define E_IS_CARDLIST_MODEL_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), E_TYPE_CARDLIST_MODEL))
typedef struct {
ETableModel parent;
@@ -28,7 +27,7 @@ typedef struct {
} ECardlistModelClass;
-GtkType e_cardlist_model_get_type (void);
+GType e_cardlist_model_get_type (void);
ETableModel *e_cardlist_model_new (void);
/* Returns object with an extra ref count. */