aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-01-13 04:05:35 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-01-15 22:43:40 +0800
commitd545bdb78cc302db6f3b4bd82dc3570fd5561949 (patch)
tree039d870fe122981e706c58ec20effe9e756c65b4
parent720b43ba4d86bbf2a2f4f4f6d3624bf87bd1cf69 (diff)
downloadgsoc2013-evolution-d545bdb78cc302db6f3b4bd82dc3570fd5561949.tar
gsoc2013-evolution-d545bdb78cc302db6f3b4bd82dc3570fd5561949.tar.gz
gsoc2013-evolution-d545bdb78cc302db6f3b4bd82dc3570fd5561949.tar.bz2
gsoc2013-evolution-d545bdb78cc302db6f3b4bd82dc3570fd5561949.tar.lz
gsoc2013-evolution-d545bdb78cc302db6f3b4bd82dc3570fd5561949.tar.xz
gsoc2013-evolution-d545bdb78cc302db6f3b4bd82dc3570fd5561949.tar.zst
gsoc2013-evolution-d545bdb78cc302db6f3b4bd82dc3570fd5561949.zip
Avoid deprecated libedataserver APIs.
I forgot to include this in 3.7.4, but no matter.
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c45
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c2
-rw-r--r--addressbook/gui/merging/eab-contact-compare.c4
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c16
-rw-r--r--addressbook/gui/widgets/e-contact-map-window.c2
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c2
-rw-r--r--addressbook/gui/widgets/eab-gui-util.c4
-rw-r--r--addressbook/importers/evolution-csv-importer.c2
-rw-r--r--addressbook/importers/evolution-ldif-importer.c2
-rw-r--r--addressbook/importers/evolution-vcard-importer.c4
-rw-r--r--addressbook/printing/e-contact-print.c8
-rw-r--r--modules/addressbook/e-book-shell-view-actions.c8
-rw-r--r--modules/vcard-inline/e-mail-parser-vcard-inline.c6
-rw-r--r--plugins/bbdb/bbdb.c8
-rw-r--r--plugins/bbdb/gaimbuddies.c13
15 files changed, 72 insertions, 54 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index ef0700baed..b168b79985 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -4174,17 +4174,15 @@ e_contact_editor_dispose (GObject *object)
e_contact_editor->file_selector = NULL;
}
- if (e_contact_editor->writable_fields) {
- e_client_util_free_string_slist (
- e_contact_editor->writable_fields);
- e_contact_editor->writable_fields = NULL;
- }
+ g_slist_free_full (
+ e_contact_editor->writable_fields,
+ (GDestroyNotify) g_free);
+ e_contact_editor->writable_fields = NULL;
- if (e_contact_editor->required_fields) {
- e_client_util_free_string_slist (
- e_contact_editor->required_fields);
- e_contact_editor->required_fields = NULL;
- }
+ g_slist_free_full (
+ e_contact_editor->required_fields,
+ (GDestroyNotify) g_free);
+ e_contact_editor->required_fields = NULL;
if (e_contact_editor->contact) {
g_object_unref (e_contact_editor->contact);
@@ -4260,7 +4258,7 @@ supported_fields_cb (GObject *source_object,
g_object_set (ce, "writable_fields", fields, NULL);
- e_client_util_free_string_slist (fields);
+ g_slist_free_full (fields, (GDestroyNotify) g_free);
g_free (prop_value);
eab_editor_show (EAB_EDITOR (ce));
@@ -4305,7 +4303,7 @@ required_fields_cb (GObject *source_object,
g_object_set (ce, "required_fields", fields, NULL);
- e_client_util_free_string_slist (fields);
+ g_slist_free_full (fields, (GDestroyNotify) g_free);
g_free (prop_value);
}
@@ -4499,21 +4497,22 @@ e_contact_editor_set_property (GObject *object,
break;
}
case PROP_WRITABLE_FIELDS:
- if (editor->writable_fields)
- e_client_util_free_string_slist (editor->writable_fields);
-
- editor->writable_fields =
- e_client_util_copy_string_slist (
- NULL, g_value_get_pointer (value));
+ g_slist_free_full (
+ editor->writable_fields,
+ (GDestroyNotify) g_free);
+ editor->writable_fields = g_slist_copy_deep (
+ g_value_get_pointer (value),
+ (GCopyFunc) g_strdup, NULL);
sensitize_all (editor);
break;
case PROP_REQUIRED_FIELDS:
- if (editor->required_fields)
- e_client_util_free_string_slist (editor->required_fields);
- editor->required_fields =
- e_client_util_copy_string_slist (
- NULL, g_value_get_pointer (value));
+ g_slist_free_full (
+ editor->required_fields,
+ (GDestroyNotify) g_free);
+ editor->required_fields = g_slist_copy_deep (
+ g_value_get_pointer (value),
+ (GCopyFunc) g_strdup, NULL);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index f68470d103..58ea7046dc 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -650,7 +650,7 @@ contact_list_editor_drag_data_received_cb (GtkWidget *widget,
g_object_unref (dest);
}
- e_client_util_free_object_slist (list);
+ g_slist_free_full (list, (GDestroyNotify) g_object_unref);
contact_list_editor_scroll_to_end (editor);
diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c
index 8b24ea3d57..1cd5228873 100644
--- a/addressbook/gui/merging/eab-contact-compare.c
+++ b/addressbook/gui/merging/eab-contact-compare.c
@@ -661,8 +661,8 @@ query_cb (GObject *source_object,
if (best_contact)
best_contact = g_object_ref (best_contact);
- e_client_util_free_object_slist (contacts);
- e_client_util_free_object_slist (remaining_contacts);
+ g_slist_free_full (contacts, (GDestroyNotify) g_object_unref);
+ g_slist_free_full (remaining_contacts, (GDestroyNotify) g_object_unref);
info->cb (info->contact, best_contact, best_match, info->closure);
match_search_info_free (info);
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 53402a9e6e..14293f5344 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -280,7 +280,7 @@ table_drag_data_get (ETable *table,
break;
}
- e_client_util_free_object_slist (contact_list);
+ g_slist_free_full (contact_list, (GDestroyNotify) g_object_unref);
}
static void
@@ -689,7 +689,7 @@ addressbook_view_copy_clipboard (ESelectable *selectable)
e_clipboard_set_directory (clipboard, string, -1);
g_free (string);
- e_client_util_free_object_slist (contact_list);
+ g_slist_free_full (contact_list, (GDestroyNotify) g_object_unref);
}
static void
@@ -724,7 +724,7 @@ addressbook_view_paste_clipboard (ESelectable *selectable)
registry, book_client, contact, NULL, NULL);
}
- e_client_util_free_object_slist (contact_list);
+ g_slist_free_full (contact_list, (GDestroyNotify) g_object_unref);
}
static void
@@ -1198,7 +1198,9 @@ e_addressbook_view_print (EAddressbookView *view,
contact_list = e_addressbook_view_get_selected (view);
e_contact_print (NULL, NULL, contact_list, action);
- e_client_util_free_object_slist (contact_list);
+ g_slist_free_full (
+ contact_list,
+ (GDestroyNotify) g_object_unref);
/* Print the latest query results. */
} else if (GAL_IS_VIEW_MINICARD (gal_view)) {
@@ -1395,7 +1397,7 @@ e_addressbook_view_delete_selection (EAddressbookView *view,
GTK_WINDOW (gtk_widget_get_toplevel (GTK_WIDGET (view))),
plural, is_list, name)) {
g_free (name);
- e_client_util_free_object_slist (list);
+ g_slist_free_full (list, (GDestroyNotify) g_object_unref);
return;
}
@@ -1454,7 +1456,7 @@ e_addressbook_view_delete_selection (EAddressbookView *view,
row = e_table_view_to_model_row (E_TABLE (etable), select);
e_table_set_cursor_row (E_TABLE (etable), row);
}
- e_client_util_free_object_slist (list);
+ g_slist_free_full (list, (GDestroyNotify) g_object_unref);
}
void
@@ -1499,7 +1501,7 @@ e_addressbook_view_view (EAddressbookView *view)
addressbook_view_emit_open_contact (
view, iter->data, FALSE);
- e_client_util_free_object_slist (list);
+ g_slist_free_full (list, (GDestroyNotify) g_object_unref);
}
void
diff --git a/addressbook/gui/widgets/e-contact-map-window.c b/addressbook/gui/widgets/e-contact-map-window.c
index 2e3aec5bcb..aa31f297fe 100644
--- a/addressbook/gui/widgets/e-contact-map-window.c
+++ b/addressbook/gui/widgets/e-contact-map-window.c
@@ -101,7 +101,7 @@ book_contacts_received_cb (GObject *source_object,
e_contact_map_add_contact (
window->priv->map, (EContact *) p->data);
- e_client_util_free_object_slist (contacts);
+ g_slist_free_full (contacts, (GDestroyNotify) g_object_unref);
g_object_unref (client);
}
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 08b0cdabf4..1a35f3aa09 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -124,7 +124,7 @@ e_minicard_view_drag_data_get (GtkWidget *widget,
static void
clear_drag_data (EMinicardView *view)
{
- e_client_util_free_object_slist (view->drag_list);
+ g_slist_free_full (view->drag_list, (GDestroyNotify) g_object_unref);
view->drag_list = NULL;
}
diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c
index 1fc8644833..b692fdf2ce 100644
--- a/addressbook/gui/widgets/eab-gui-util.c
+++ b/addressbook/gui/widgets/eab-gui-util.c
@@ -469,7 +469,9 @@ process_unref (ContactCopyProcess *process)
if (process->count > 0)
return;
}
- e_client_util_free_object_slist (process->contacts);
+ g_slist_free_full (
+ process->contacts,
+ (GDestroyNotify) g_object_unref);
g_object_unref (process->source);
g_object_unref (process->destination);
g_object_unref (process->registry);
diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c
index b32f8e1b7b..9a850e695c 100644
--- a/addressbook/importers/evolution-csv-importer.c
+++ b/addressbook/importers/evolution-csv-importer.c
@@ -1012,7 +1012,7 @@ csv_get_preview (EImport *ei,
contacts = g_slist_reverse (contacts);
preview = evolution_contact_importer_get_preview_widget (contacts);
- e_client_util_free_object_slist (contacts);
+ g_slist_free_full (contacts, (GDestroyNotify) g_object_unref);
fclose (file);
g_free (gci);
diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c
index db2bfbf27d..e50ef48261 100644
--- a/addressbook/importers/evolution-ldif-importer.c
+++ b/addressbook/importers/evolution-ldif-importer.c
@@ -782,7 +782,7 @@ ldif_get_preview (EImport *ei,
contacts = g_slist_reverse (contacts);
preview = evolution_contact_importer_get_preview_widget (contacts);
- e_client_util_free_object_slist (contacts);
+ g_slist_free_full (contacts, (GDestroyNotify) g_object_unref);
fclose (file);
return preview;
diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c
index 5129754501..fd5984135e 100644
--- a/addressbook/importers/evolution-vcard-importer.c
+++ b/addressbook/importers/evolution-vcard-importer.c
@@ -483,7 +483,7 @@ vcard_import_done (VCardImporter *gci)
g_free (gci->contents);
g_object_unref (gci->book_client);
- e_client_util_free_object_slist (gci->contactlist);
+ g_slist_free_full (gci->contactlist, (GDestroyNotify) g_object_unref);
e_import_complete (gci->import, gci->target);
g_object_unref (gci->import);
@@ -646,7 +646,7 @@ vcard_get_preview (EImport *ei,
preview = evolution_contact_importer_get_preview_widget (contacts);
- e_client_util_free_object_slist (contacts);
+ g_slist_free_full (contacts, (GDestroyNotify) g_object_unref);
return preview;
}
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index 248fa97515..e11273a5df 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -780,7 +780,9 @@ contact_end_print (GtkPrintOperation *operation,
pango_font_description_free (ctxt->style->footer_font);
pango_font_description_free (ctxt->letter_heading_font);
- e_client_util_free_object_slist (ctxt->contact_list);
+ g_slist_free_full (
+ ctxt->contact_list,
+ (GDestroyNotify) g_object_unref);
g_free (ctxt->style);
g_free (ctxt->section);
@@ -843,7 +845,9 @@ e_contact_print (EBookClient *book_client,
ctxt = g_new0 (EContactPrintContext, 1);
ctxt->action = action;
- ctxt->contact_list = e_client_util_copy_object_slist (NULL, contact_list);
+ ctxt->contact_list = g_slist_copy_deep (
+ (GSList *) contact_list,
+ (GCopyFunc) g_object_ref, NULL);
ctxt->style = g_new0 (EContactPrintStyle, 1);
ctxt->page_nr = 0;
ctxt->pages = 0;
diff --git a/modules/addressbook/e-book-shell-view-actions.c b/modules/addressbook/e-book-shell-view-actions.c
index 01064f2da6..cbe2ef4e32 100644
--- a/modules/addressbook/e-book-shell-view-actions.c
+++ b/modules/addressbook/e-book-shell-view-actions.c
@@ -412,7 +412,7 @@ action_address_book_save_as_cb (GtkAction *action,
g_object_unref (file);
exit:
- e_client_util_free_object_slist (list);
+ g_slist_free_full (list, (GDestroyNotify) g_object_unref);
}
static void
@@ -506,7 +506,7 @@ action_contact_forward_cb (GtkAction *action,
eab_send_as_attachment (shell, list);
- e_client_util_free_object_slist (list);
+ g_slist_free_full (list, (GDestroyNotify) g_object_unref);
}
static void
@@ -708,7 +708,7 @@ action_contact_save_as_cb (GtkAction *action,
g_object_unref (file);
exit:
- e_client_util_free_object_slist (list);
+ g_slist_free_full (list, (GDestroyNotify) g_object_unref);
}
static void
@@ -747,7 +747,7 @@ action_contact_send_message_cb (GtkAction *action,
eab_send_as_to (shell, list);
- e_client_util_free_object_slist (list);
+ g_slist_free_full (list, (GDestroyNotify) g_object_unref);
}
static void
diff --git a/modules/vcard-inline/e-mail-parser-vcard-inline.c b/modules/vcard-inline/e-mail-parser-vcard-inline.c
index 44032d4376..b871351d0a 100644
--- a/modules/vcard-inline/e-mail-parser-vcard-inline.c
+++ b/modules/vcard-inline/e-mail-parser-vcard-inline.c
@@ -127,7 +127,7 @@ client_loaded_cb (ESource *source,
g_object_unref (client);
exit:
- e_client_util_free_object_slist (contact_list);
+ g_slist_free_full (contact_list, (GDestroyNotify) g_object_unref);
}
static void
@@ -168,7 +168,9 @@ save_vcard_cb (WebKitDOMEventTarget *button,
g_return_if_fail (source != NULL);
- contact_list = e_client_util_copy_object_slist (NULL, vcard_part->contact_list);
+ contact_list = g_slist_copy_deep (
+ vcard_part->contact_list,
+ (GCopyFunc) g_object_ref, NULL);
e_client_utils_open_new (
source, E_CLIENT_SOURCE_TYPE_CONTACTS,
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index c6e60b005a..26d1e48d27 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -301,7 +301,7 @@ bbdb_do_it (EBookClient *client,
status = e_book_client_get_contacts_sync (client, query_string, &contacts, NULL, NULL);
g_free (query_string);
if (contacts != NULL || !status) {
- e_client_util_free_object_slist (contacts);
+ g_slist_free_full (contacts, (GDestroyNotify) g_object_unref);
g_free (temp_name);
return;
@@ -329,7 +329,9 @@ bbdb_do_it (EBookClient *client,
* name, just give up; we're not smart enough for
* this. */
if (!status || contacts->next != NULL) {
- e_client_util_free_object_slist (contacts);
+ g_slist_free_full (
+ contacts,
+ (GDestroyNotify) g_object_unref);
g_free (temp_name);
return;
}
@@ -341,7 +343,7 @@ bbdb_do_it (EBookClient *client,
g_error_free (error);
}
- e_client_util_free_object_slist (contacts);
+ g_slist_free_full (contacts, (GDestroyNotify) g_object_unref);
g_free (temp_name);
return;
}
diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c
index d9a0cd9bd3..228eae2613 100644
--- a/plugins/bbdb/gaimbuddies.c
+++ b/plugins/bbdb/gaimbuddies.c
@@ -245,14 +245,18 @@ bbdb_sync_buddy_list_in_thread (gpointer data)
* name, just give up; we're not smart enough for
* this. */
if (contacts->next != NULL) {
- e_client_util_free_object_slist (contacts);
+ g_slist_free_full (
+ contacts,
+ (GDestroyNotify) g_object_unref);
continue;
}
c = E_CONTACT (contacts->data);
if (!bbdb_merge_buddy_to_contact (std->client, b, c)) {
- e_client_util_free_object_slist (contacts);
+ g_slist_free_full (
+ contacts,
+ (GDestroyNotify) g_object_unref);
continue;
}
@@ -261,7 +265,10 @@ bbdb_sync_buddy_list_in_thread (gpointer data)
g_warning ("bbdb: Could not modify contact: %s", error->message);
g_error_free (error);
}
- e_client_util_free_object_slist (contacts);
+
+ g_slist_free_full (
+ contacts,
+ (GDestroyNotify) g_object_unref);
continue;
}