aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-ui-utils.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2008-12-12 23:49:15 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2008-12-12 23:49:15 +0800
commit37d437ae1c69c8c70f5a289ec59363fe21836255 (patch)
treeb9743323a1a94c6ecf84cbe87892f6bbd38a6b19 /libempathy-gtk/empathy-ui-utils.c
parent7e20ee7f05f61981933be27e4332698a19cc04e6 (diff)
downloadgsoc2013-empathy-37d437ae1c69c8c70f5a289ec59363fe21836255.tar
gsoc2013-empathy-37d437ae1c69c8c70f5a289ec59363fe21836255.tar.gz
gsoc2013-empathy-37d437ae1c69c8c70f5a289ec59363fe21836255.tar.bz2
gsoc2013-empathy-37d437ae1c69c8c70f5a289ec59363fe21836255.tar.lz
gsoc2013-empathy-37d437ae1c69c8c70f5a289ec59363fe21836255.tar.xz
gsoc2013-empathy-37d437ae1c69c8c70f5a289ec59363fe21836255.tar.zst
gsoc2013-empathy-37d437ae1c69c8c70f5a289ec59363fe21836255.zip
Add empathy_init(), empathy_gtk_init() and empathy_gtk_init_with_args(). They have to be called by any process using libempathy.
svn path=/trunk/; revision=1966
Diffstat (limited to 'libempathy-gtk/empathy-ui-utils.c')
-rw-r--r--libempathy-gtk/empathy-ui-utils.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index cd5cf0766..693bd8137 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -49,6 +49,47 @@
#include <libempathy/empathy-utils.h>
#include <libempathy/empathy-dispatcher.h>
+void
+empathy_gtk_init (int *argc, char ***argv)
+{
+ static gboolean initialized = FALSE;
+
+ if (initialized)
+ return;
+
+ empathy_init ();
+ gtk_init (argc, argv);
+ gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+ PKGDATADIR G_DIR_SEPARATOR_S "icons");
+
+ initialized = TRUE;
+}
+
+gboolean
+empathy_gtk_init_with_args (int *argc,
+ char ***argv,
+ char *parameter_string,
+ GOptionEntry *entries,
+ char *translation_domain,
+ GError **error)
+{
+ static gboolean initialized = FALSE;
+ gboolean ret;
+
+ if (initialized)
+ return TRUE;
+
+ empathy_init ();
+ ret = gtk_init_with_args (argc, argv, parameter_string, entries,
+ translation_domain, error);
+ gtk_icon_theme_append_search_path (gtk_icon_theme_get_default (),
+ PKGDATADIR G_DIR_SEPARATOR_S "icons");
+
+ initialized = TRUE;
+
+ return ret;
+}
+
struct SizeData {
gint width;
gint height;