From 6b2a9a563f754366af99671e5df19fbc4c8c7ad8 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Tue, 22 Aug 2000 23:47:19 +0000 Subject: Started adding a time zone field to ECard. 2000-08-22 Christopher James Lahey * backend/e-card.h: Started adding a time zone field to ECard. * gui/component/e-addressbook-model.c: Added e_table_model_pre_change where appropriate. * gui/minicard/e-minicard-control.c: Added a ref and unref pair. svn path=/trunk/; revision=4971 --- addressbook/gui/component/e-addressbook-model.c | 2 ++ addressbook/gui/minicard/e-minicard-control.c | 2 ++ addressbook/gui/widgets/e-addressbook-model.c | 2 ++ addressbook/gui/widgets/e-minicard-control.c | 2 ++ 4 files changed, 8 insertions(+) (limited to 'addressbook/gui') diff --git a/addressbook/gui/component/e-addressbook-model.c b/addressbook/gui/component/e-addressbook-model.c index d46b42fe00..9df7ab7225 100644 --- a/addressbook/gui/component/e-addressbook-model.c +++ b/addressbook/gui/component/e-addressbook-model.c @@ -178,6 +178,7 @@ create_card(EBookView *book_view, EAddressbookModel *model) { model->data = g_realloc(model->data, (model->data_count + g_list_length((GList *)cards)) * sizeof(ECard *)); + e_table_model_pre_change(E_TABLE_MODEL(model)); for ( ; cards; cards = cards->next) { model->data[model->data_count++] = e_card_simple_new (E_CARD(cards->data)); e_table_model_row_inserted(E_TABLE_MODEL(model), model->data_count - 1); @@ -190,6 +191,7 @@ remove_card(EBookView *book_view, EAddressbookModel *model) { int i; + e_table_model_pre_change(E_TABLE_MODEL(model)); for ( i = 0; i < model->data_count; i++) { if ( !strcmp(e_card_simple_get_id(model->data[i]), id) ) { gtk_object_unref(GTK_OBJECT(model->data[i])); diff --git a/addressbook/gui/minicard/e-minicard-control.c b/addressbook/gui/minicard/e-minicard-control.c index 7c1838b568..d6dd70656d 100644 --- a/addressbook/gui/minicard/e-minicard-control.c +++ b/addressbook/gui/minicard/e-minicard-control.c @@ -222,6 +222,7 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) { ECard *card = closure; e_book_add_card(book, card, NULL, NULL); + gtk_object_unref(GTK_OBJECT(card)); } static void @@ -249,6 +250,7 @@ save_in_addressbook(GtkWidget *button, EMinicardWidget *minicard) gtk_object_get(GTK_OBJECT(minicard), "card", &card, NULL); + gtk_object_ref(GTK_OBJECT(card)); if (! e_book_load_uri (book, uri, book_open_cb, card)) { printf ("error calling load_uri!\n"); diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index d46b42fe00..9df7ab7225 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -178,6 +178,7 @@ create_card(EBookView *book_view, EAddressbookModel *model) { model->data = g_realloc(model->data, (model->data_count + g_list_length((GList *)cards)) * sizeof(ECard *)); + e_table_model_pre_change(E_TABLE_MODEL(model)); for ( ; cards; cards = cards->next) { model->data[model->data_count++] = e_card_simple_new (E_CARD(cards->data)); e_table_model_row_inserted(E_TABLE_MODEL(model), model->data_count - 1); @@ -190,6 +191,7 @@ remove_card(EBookView *book_view, EAddressbookModel *model) { int i; + e_table_model_pre_change(E_TABLE_MODEL(model)); for ( i = 0; i < model->data_count; i++) { if ( !strcmp(e_card_simple_get_id(model->data[i]), id) ) { gtk_object_unref(GTK_OBJECT(model->data[i])); diff --git a/addressbook/gui/widgets/e-minicard-control.c b/addressbook/gui/widgets/e-minicard-control.c index 7c1838b568..d6dd70656d 100644 --- a/addressbook/gui/widgets/e-minicard-control.c +++ b/addressbook/gui/widgets/e-minicard-control.c @@ -222,6 +222,7 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) { ECard *card = closure; e_book_add_card(book, card, NULL, NULL); + gtk_object_unref(GTK_OBJECT(card)); } static void @@ -249,6 +250,7 @@ save_in_addressbook(GtkWidget *button, EMinicardWidget *minicard) gtk_object_get(GTK_OBJECT(minicard), "card", &card, NULL); + gtk_object_ref(GTK_OBJECT(card)); if (! e_book_load_uri (book, uri, book_open_cb, card)) { printf ("error calling load_uri!\n"); -- cgit v1.2.3