aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-05-14 01:49:19 +0800
committerChris Toshok <toshok@src.gnome.org>2003-05-14 01:49:19 +0800
commit16441223cabd3f901345daa8f52d7b00e57caf3f (patch)
treec85273e77388d3f1c0eec0962fcd2d34c422fef6 /addressbook/gui
parentcd1b05ca912641d3f4bbcd0cb0f5de34b8650a86 (diff)
downloadgsoc2013-evolution-16441223cabd3f901345daa8f52d7b00e57caf3f.tar.gz
gsoc2013-evolution-16441223cabd3f901345daa8f52d7b00e57caf3f.tar.zst
gsoc2013-evolution-16441223cabd3f901345daa8f52d7b00e57caf3f.zip
rename addressbook_destroy to this, and guard against multiple calls.
2003-05-13 Chris Toshok <toshok@ximian.com> * gui/widgets/e-addressbook-table-adapter.c (addressbook_dispose): rename addressbook_destroy to this, and guard against multiple calls. (e_addressbook_table_adapter_class_init): GtkObject -> GObject, and destroy -> dispose. (e_addressbook_table_adapter_init): GtkObject -> GObject. svn path=/trunk/; revision=21157
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/widgets/e-addressbook-table-adapter.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c
index 3680af259c..e733d8a7a8 100644
--- a/addressbook/gui/widgets/e-addressbook-table-adapter.c
+++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c
@@ -81,13 +81,16 @@ build_simple_mapping(EAddressbookTableAdapter *adapter)
}
static void
-addressbook_destroy(GtkObject *object)
+addressbook_dispose(GObject *object)
{
EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(object);
- unlink_model(adapter);
+ if (adapter->priv) {
+ unlink_model(adapter);
- g_free (adapter->priv);
+ g_free (adapter->priv);
+ adapter->priv = NULL;
+ }
}
/* This function returns the number of columns in our ETableModel. */
@@ -247,13 +250,13 @@ addressbook_value_to_string (ETableModel *etc, int col, const void *value)
}
static void
-e_addressbook_table_adapter_class_init (GtkObjectClass *object_class)
+e_addressbook_table_adapter_class_init (GObjectClass *object_class)
{
ETableModelClass *model_class = (ETableModelClass *) object_class;
parent_class = g_type_class_peek_parent (object_class);
- object_class->destroy = addressbook_destroy;
+ object_class->dispose = addressbook_dispose;
model_class->column_count = addressbook_col_count;
model_class->row_count = addressbook_row_count;
@@ -269,7 +272,7 @@ e_addressbook_table_adapter_class_init (GtkObjectClass *object_class)
}
static void
-e_addressbook_table_adapter_init (GtkObject *object)
+e_addressbook_table_adapter_init (GObject *object)
{
EAddressbookTableAdapter *adapter = E_ADDRESSBOOK_TABLE_ADAPTER(object);
EAddressbookTableAdapterPrivate *priv;