diff options
Diffstat (limited to 'addressbook/gui/widgets')
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-model.c | 2 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-table-adapter.c | 1 | ||||
-rw-r--r-- | addressbook/gui/widgets/e-addressbook-view.c | 30 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-gui-util.c | 9 | ||||
-rw-r--r-- | addressbook/gui/widgets/eab-vcard-control.c | 15 |
5 files changed, 39 insertions, 18 deletions
diff --git a/addressbook/gui/widgets/e-addressbook-model.c b/addressbook/gui/widgets/e-addressbook-model.c index edd824302b..85fa854324 100644 --- a/addressbook/gui/widgets/e-addressbook-model.c +++ b/addressbook/gui/widgets/e-addressbook-model.c @@ -8,6 +8,8 @@ */ #include <config.h> +#include <string.h> +#include <glib/gi18n.h> #include "eab-marshal.h" #include "e-addressbook-model.h" #include <libxml/tree.h> diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index a11f749523..65a82d03c9 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -1,6 +1,7 @@ /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ #include <config.h> +#include <glib/gi18n.h> #include "e-addressbook-model.h" #include "e-addressbook-table-adapter.h" #include "eab-contact-merging.h" diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 5410bef787..282f142a77 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -1859,7 +1859,8 @@ eab_view_print(EABView *view, int preview) e_contact_print_response (print, GTK_RESPONSE_APPLY, NULL); g_free (query); - e_free_object_list (list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); + g_list_free (list); } else if (view->view_type == EAB_VIEW_TABLE) { GtkWidget *dialog; @@ -1872,8 +1873,7 @@ eab_view_print(EABView *view, int preview) g_object_get(view->widget, "table", &etable, NULL); printable = e_table_get_printable(etable); - g_object_ref (printable); - gtk_object_sink (GTK_OBJECT (printable)); + g_object_ref_sink (printable); g_object_unref(etable); g_object_ref (view->widget); @@ -1916,7 +1916,8 @@ eab_view_print_preview(EABView *view) else dialog = e_contact_print_dialog_new (book, query, list); e_contact_print_response (dialog, GTK_RESPONSE_APPLY, NULL); - e_free_object_list (list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); + g_list_free (list); g_free (query); }else if (view->view_type == EAB_VIEW_TABLE) { GtkWidget *dialog; @@ -1929,8 +1930,7 @@ eab_view_print_preview(EABView *view) g_object_get(view->widget, "table", &etable, NULL); printable = e_table_get_printable(etable); - g_object_ref (printable); - gtk_object_sink (GTK_OBJECT (printable)); + g_object_ref_sink (printable); g_object_unref(etable); g_object_ref (view->widget); @@ -2003,7 +2003,8 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) !eab_editor_confirm_delete(GTK_WINDOW(gtk_widget_get_toplevel(view->widget)), plural, is_list, name)) { g_free (name); - e_free_object_list(list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); + g_list_free (list); return; } @@ -2062,7 +2063,8 @@ eab_view_delete_selection(EABView *view, gboolean is_delete) row = e_table_view_to_model_row (E_TABLE (etable), select); e_table_set_cursor_row (E_TABLE (etable), row); } - e_free_object_list(list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); + g_list_free (list); } static void @@ -2177,7 +2179,8 @@ eab_view_save_as (EABView *view, gboolean all) } if (list) eab_contact_list_save (_("Save as VCard..."), list, NULL); - e_free_object_list(list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); + g_list_free (list); } void @@ -2185,7 +2188,8 @@ eab_view_view (EABView *view) { GList *list = get_selected_contacts (view); eab_show_multiple_contacts (view->book, list, view->editable); - e_free_object_list(list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); + g_list_free (list); } void @@ -2194,7 +2198,8 @@ eab_view_send (EABView *view) GList *list = get_selected_contacts (view); if (list) eab_send_contact_list (list, EAB_DISPOSITION_AS_ATTACHMENT); - e_free_object_list(list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); + g_list_free (list); } void @@ -2203,7 +2208,8 @@ eab_view_send_to (EABView *view) GList *list = get_selected_contacts (view); if (list) eab_send_contact_list (list, EAB_DISPOSITION_AS_TO); - e_free_object_list(list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); + g_list_free (list); } void diff --git a/addressbook/gui/widgets/eab-gui-util.c b/addressbook/gui/widgets/eab-gui-util.c index 64685bf6ff..ccfbac8ada 100644 --- a/addressbook/gui/widgets/eab-gui-util.c +++ b/addressbook/gui/widgets/eab-gui-util.c @@ -26,6 +26,7 @@ #include <errno.h> #include <string.h> +#include <glib/gi18n.h> #include <libedataserver/e-data-server-util.h> #include <libedataserverui/e-source-selector.h> #include <e-util/e-util.h> @@ -687,10 +688,12 @@ process_unref (ContactCopyProcess *process) { process->count --; if (process->count == 0) { - if (process->done_cb) { + if (process->done_cb) process->done_cb (process); - } - e_free_object_list(process->contacts); + g_list_foreach ( + process->contacts, + (GFunc) g_object_unref, NULL); + g_list_free (process->contacts); g_object_unref (process->source); g_object_unref (process->destination); g_free (process); diff --git a/addressbook/gui/widgets/eab-vcard-control.c b/addressbook/gui/widgets/eab-vcard-control.c index b015f865f5..df45562fb8 100644 --- a/addressbook/gui/widgets/eab-vcard-control.c +++ b/addressbook/gui/widgets/eab-vcard-control.c @@ -125,7 +125,11 @@ pstream_load (BonoboPersistStream *ps, const Bonobo_Stream stream, return; } - e_free_object_list (vcard_control->card_list); + g_list_foreach ( + vcard_control->card_list, + (GFunc) g_object_unref, NULL); + g_list_free (vcard_control->card_list); + list = eab_contact_list_from_string (vcard); g_free(vcard); vcard_control->card_list = list; @@ -192,7 +196,8 @@ book_open_cb (EBook *book, EBookStatus status, gpointer closure) } if (book) g_object_unref (book); - e_free_object_list (list); + g_list_foreach (list, (GFunc) g_object_unref, NULL); + g_list_free (list); } static void @@ -236,7 +241,11 @@ static void free_struct (gpointer data, GObject *where_object_was) { EABVCardControl *vcard_control = data; - e_free_object_list (vcard_control->card_list); + + g_list_foreach ( + vcard_control->card_list, + (GFunc) g_object_unref, NULL); + g_list_free (vcard_control->card_list); g_free (vcard_control); } |