]> git.0d.be Git - empathy.git/commitdiff
empathy-accounts: init cheese-gtk if needed
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 21 May 2012 08:55:46 +0000 (10:55 +0200)
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>
Mon, 21 May 2012 09:13:52 +0000 (11:13 +0200)
The avatar chooser, which is not used by empathy-accounts, may use Cheese to
take a photo.

cheese_gtk_init() has been added during the 3.4 cycle so I bumped the dep to
3.4.0 as that's the version I have tested it with it. It's an optionnal dep
anyway so...

https://bugzilla.gnome.org/show_bug.cgi?id=674553

configure.ac
src/Makefile.am
src/empathy-accounts.c

index 9a8b0f45dfc1e299658b1658028fa9efb426b597..eebe6979027e698559ca14712989f6e246a0e806 100644 (file)
@@ -73,7 +73,7 @@ ISO_CODES_REQUIRED=0.35
 NAUTILUS_SENDTO_REQUIRED=2.90.0
 NETWORK_MANAGER_REQUIRED=0.7.0
 CHAMPLAIN_REQUIRED=0.12.1
-CHEESE_GTK_REQUIRED=2.91.91.1
+CHEESE_GTK_REQUIRED=3.4.0
 
 # Use --enable-maintainer-mode to disable deprecated symbols,
 # disable single include and enable GSEAL. If this is not a released empathy,
index dfde2055883db0a8a91b807cf1d47c09e7720ba4..dc85dd9ca64a26fb82d6746b9b0732e71c5b8599 100644 (file)
@@ -59,6 +59,11 @@ empathy_accounts_SOURCES =                                           \
        empathy-accounts.c empathy-accounts.h                           \
        $(NULL)
 
+empathy_accounts_CPPFLAGS =                                            \
+       $(AM_CPPFLAGS) \
+       $(CHEESE_CFLAGS) \
+       $(NULL)
+
 empathy_accounts_LDADD =                                               \
        $(LDADD)                                                        \
        libempathy-accounts-common.la                                   \
index 6b51820f7e3d53f88b63179319ca8790a16a0ebc..efb98e9b309456d7f9c81f85dcbd0d355b574776 100644 (file)
 #include <gtk/gtk.h>
 #include <glib/gi18n.h>
 
+#ifdef HAVE_CHEESE
+#include <cheese-gtk.h>
+#endif
+
 #include <telepathy-glib/account-manager.h>
 #include <telepathy-glib/defs.h>
 #include <telepathy-glib/util.h>
@@ -223,6 +227,13 @@ main (int argc, char *argv[])
   gint retval;
 
   g_thread_init (NULL);
+  g_type_init ();
+
+#ifdef HAVE_CHEESE
+  /* Used by the avatar chooser */
+  g_return_val_if_fail (cheese_gtk_init (&argc, &argv), 1);
+#endif
+
   empathy_init ();
 
   gtk_init (&argc, &argv);