1 /* bug-buddy bug submitting program
3 * Copyright (C) 2006 Fernando Herrera
5 * Author: Fernando Herrera <fherrera@onirica.com>
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of version 2 of the GNU General Public
9 * License as published by the Free Software Foundation.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
25 #include <gconf/gconf-client.h>
28 #include <libebook/e-book.h>
31 #include "eds-buddy.h"
34 get_default_user_email (void)
36 GConfClient
*conf_client
;
43 conf_client
= gconf_client_get_default ();
44 tmp
= gconf_client_get_string (conf_client
, "/apps/bug-buddy/email_address", NULL
);
45 g_object_unref (conf_client
);
47 if (tmp
!= NULL
&& strlen (tmp
) > 0)
51 e_book_get_self (&me
, &book
, NULL
);
55 tmp
= e_contact_get (me
, E_CONTACT_EMAIL_2
);
56 if (tmp
!= NULL
&& strlen (tmp
) > 0)
59 tmp
= e_contact_get (me
, E_CONTACT_EMAIL_1
);
60 if (tmp
!= NULL
&& strlen (tmp
) > 0)