aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/tools/evolution-addressbook-export.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-02-26 04:28:18 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-02-26 06:36:08 +0800
commit361dd78922ab2332a576bb7695466387b021c97a (patch)
tree8b69ce583f61891d786d9cbdd1ae0aaa11e58cd0 /addressbook/tools/evolution-addressbook-export.c
parent4d1bf133ce8dd5d46a010f96031d57cb3cb8e9cb (diff)
downloadgsoc2013-evolution-361dd78922ab2332a576bb7695466387b021c97a.tar
gsoc2013-evolution-361dd78922ab2332a576bb7695466387b021c97a.tar.gz
gsoc2013-evolution-361dd78922ab2332a576bb7695466387b021c97a.tar.bz2
gsoc2013-evolution-361dd78922ab2332a576bb7695466387b021c97a.tar.lz
gsoc2013-evolution-361dd78922ab2332a576bb7695466387b021c97a.tar.xz
gsoc2013-evolution-361dd78922ab2332a576bb7695466387b021c97a.tar.zst
gsoc2013-evolution-361dd78922ab2332a576bb7695466387b021c97a.zip
evolution-addressbook-export: Add ESourceRegistry to ActionContext.
Diffstat (limited to 'addressbook/tools/evolution-addressbook-export.c')
-rw-r--r--addressbook/tools/evolution-addressbook-export.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/addressbook/tools/evolution-addressbook-export.c b/addressbook/tools/evolution-addressbook-export.c
index 428877bf95..685fab27f7 100644
--- a/addressbook/tools/evolution-addressbook-export.c
+++ b/addressbook/tools/evolution-addressbook-export.c
@@ -74,7 +74,6 @@ gint
main (gint argc,
gchar **argv)
{
- ESourceRegistry *registry;
ActionContext actctx;
GOptionContext *context;
GError *error = NULL;
@@ -120,7 +119,7 @@ main (gint argc,
exit (-1);
}
- registry = e_source_registry_new_sync (NULL, &error);
+ actctx.registry = e_source_registry_new_sync (NULL, &error);
if (error != NULL) {
g_printerr ("%s\n", error->message);
g_error_free (error);
@@ -162,7 +161,7 @@ main (gint argc,
} else {
actctx.output_file = g_strdup (opt_output_file);
}
- action_list_folders_init (registry, &actctx);
+ action_list_folders_init (&actctx);
} else if (current_action == ACTION_LIST_CARDS) {
actctx.action_type = current_action;
@@ -176,13 +175,15 @@ main (gint argc,
actctx.addressbook_source_uid =
g_strdup (opt_addressbook_source_uid);
- action_list_cards_init (registry, &actctx);
+ action_list_cards_init (&actctx);
} else {
g_warning (_("Unhandled error"));
exit (-1);
}
+ g_object_unref (actctx.registry);
+
/*FIXME:should free actctx's some gchar * field, such as output_file! but since the program will end, so that will not cause mem leak. */
return 0;