aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui/contact-list-editor/e-contact-list-model.c
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2002-11-06 16:22:36 +0800
committerChris Toshok <toshok@src.gnome.org>2002-11-06 16:22:36 +0800
commit5ae49242fcdbdb41bdfa642f43eb1805dc209534 (patch)
treed6f115e266025e092f92eb2a12492c207ac7f7bc /addressbook/gui/contact-list-editor/e-contact-list-model.c
parent4d53826308a95d959a986b7b7cc57abf80e85862 (diff)
downloadgsoc2013-evolution-5ae49242fcdbdb41bdfa642f43eb1805dc209534.tar.gz
gsoc2013-evolution-5ae49242fcdbdb41bdfa642f43eb1805dc209534.tar.zst
gsoc2013-evolution-5ae49242fcdbdb41bdfa642f43eb1805dc209534.zip
ignore the marshal generated stuff.
2002-11-05 Chris Toshok <toshok@ximian.com> * gui/contact-list-editor/.cvsignore: ignore the marshal generated stuff. * gui/contact-list-editor/Makefile.am: typical port stuff. add marshaller generation foo, dist it... * gui/contact-list-editor/e-contact-list-editor.[ch]: Port to GObject/gnome2. * gui/contact-list-editor/e-contact-list-model.[ch]: Port to GObject/gnome2. svn path=/trunk/; revision=18590
Diffstat (limited to 'addressbook/gui/contact-list-editor/e-contact-list-model.c')
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-model.c37
1 files changed, 19 insertions, 18 deletions
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-model.c b/addressbook/gui/contact-list-editor/e-contact-list-model.c
index c4321c2820..147e4ba1f3 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-model.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-model.c
@@ -85,7 +85,7 @@ contact_list_model_destroy (GtkObject *o)
int i;
for (i = 0; i < model->data_count; i ++) {
- gtk_object_unref (GTK_OBJECT (model->data[i]));
+ g_object_unref (model->data[i]);
}
g_free (model->data);
@@ -98,7 +98,7 @@ e_contact_list_model_class_init (GtkObjectClass *object_class)
{
ETableModelClass *model_class = (ETableModelClass *) object_class;
- parent_class = gtk_type_class (PARENT_TYPE);
+ parent_class = g_type_class_ref (PARENT_TYPE);
object_class->destroy = contact_list_model_destroy;
@@ -124,27 +124,28 @@ e_contact_list_model_init (GtkObject *object)
model->data = g_new (EDestination*, model->data_alloc);
}
-GtkType
+GType
e_contact_list_model_get_type (void)
{
- static GtkType type = 0;
+ static GType cle_type = 0;
- if (!type){
- GtkTypeInfo info = {
- "EContactListModel",
- sizeof (EContactListModel),
+ if (!cle_type) {
+ static const GTypeInfo cle_info = {
sizeof (EContactListModelClass),
- (GtkClassInitFunc) e_contact_list_model_class_init,
- (GtkObjectInitFunc) e_contact_list_model_init,
- NULL, /* reserved 1 */
- NULL, /* reserved 2 */
- (GtkClassInitFunc) NULL
+ NULL, /* base_init */
+ NULL, /* base_finalize */
+ (GClassInitFunc) e_contact_list_model_class_init,
+ NULL, /* class_finalize */
+ NULL, /* class_data */
+ sizeof (EContactListModel),
+ 0, /* n_preallocs */
+ (GInstanceInitFunc) e_contact_list_model_init,
};
- type = gtk_type_unique (PARENT_TYPE, &info);
+ cle_type = g_type_register_static (E_TABLE_MODEL_TYPE, "EContactListModel", &cle_info, 0);
}
- return type;
+ return cle_type;
}
void
@@ -176,7 +177,7 @@ e_contact_list_model_add_destination (EContactListModel *model, EDestination *de
}
model->data[model->data_count ++] = dest;
- gtk_object_ref (GTK_OBJECT (dest));
+ g_object_ref (dest);
gtk_object_sink (GTK_OBJECT (dest));
e_table_model_changed (E_TABLE_MODEL (model));
@@ -218,7 +219,7 @@ e_contact_list_model_remove_row (EContactListModel *model, int row)
g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
g_return_if_fail (0 <= row && row < model->data_count);
- gtk_object_unref (GTK_OBJECT (model->data[row]));
+ g_object_unref (model->data[row]);
memmove (model->data + row, model->data + row + 1, sizeof (EDestination*) * (model->data_count - row - 1));
model->data_count --;
@@ -233,7 +234,7 @@ e_contact_list_model_remove_all (EContactListModel *model)
g_return_if_fail (E_IS_CONTACT_LIST_MODEL (model));
for (i = 0; i < model->data_count; i ++) {
- gtk_object_unref (GTK_OBJECT (model->data[i]));
+ g_object_unref (model->data[i]);
model->data[i] = NULL;
}