1
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*-
3
* Copyright (C) 2012 Red Hat, Inc.
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
#include "um-account-dialog.h"
25
on_dialog_complete (GObject *object,
29
GMainLoop *loop = user_data;
32
user = um_account_dialog_finish (UM_ACCOUNT_DIALOG (object), result);
34
g_printerr ("No user created\n");
36
g_printerr ("User created: %s\n", um_user_get_user_name (user));
37
g_object_unref (user);
40
g_main_loop_quit (loop);
47
UmAccountDialog *dialog;
50
gtk_init (&argc, &argv);
52
dialog = um_account_dialog_new ();
53
loop = g_main_loop_new (NULL, FALSE);
55
um_account_dialog_show (dialog, NULL, on_dialog_complete, loop);
57
g_main_loop_run (loop);
58
g_main_loop_unref (loop);