]> git.0d.be Git - empathy.git/blob - src/empathy-accounts.c
Make use of tp-glib debug system.
[empathy.git] / src / empathy-accounts.c
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2007-2008 Collabora Ltd.
4  *
5  * This program is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU General Public License as
7  * published by the Free Software Foundation; either version 2 of the
8  * License, or (at your option) any later version.
9  *
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 GNU
13  * General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public
16  * License along with this program; if not, write to the
17  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18  * Boston, MA 02111-1307, USA.
19  * 
20  * Authors: Xavier Claessens <xclaesse@gmail.com>
21  */
22
23 #include <config.h>
24
25 #include <string.h>
26 #include <stdlib.h>
27
28 #include <glib.h>
29 #include <gtk/gtk.h>
30
31 #include <libempathy/empathy-debug.h>
32 #include <libempathy-gtk/empathy-accounts-dialog.h>
33
34 static void
35 destroy_cb (GtkWidget *dialog,
36             gpointer   user_data)
37 {
38         gtk_main_quit ();
39 }
40
41 int
42 main (int argc, char *argv[])
43 {
44         GtkWidget *dialog;
45
46         gtk_init (&argc, &argv);
47
48         if (g_getenv ("EMPATHY_TIMING") != NULL) {
49                 g_log_set_default_handler (tp_debug_timestamped_log_handler, NULL);
50         }
51         empathy_debug_set_flags (g_getenv ("EMPATHY_DEBUG"));
52         tp_debug_divert_messages (g_getenv ("EMPATHY_LOGFILE"));
53
54         gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
55                                            PKGDATADIR G_DIR_SEPARATOR_S "icons");
56         dialog = empathy_accounts_dialog_show (NULL);
57
58         g_signal_connect (dialog, "destroy",
59                           G_CALLBACK (destroy_cb),
60                           NULL);
61
62         gtk_main ();
63
64         return EXIT_SUCCESS;
65 }
66