aboutsummaryrefslogtreecommitdiffstats
path: root/src/empathy-chat-main.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2007-05-14 19:25:56 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-05-14 19:25:56 +0800
commitbc3fac61996f1b403df48bf59826a38540b5d4c2 (patch)
tree59f5f2a590e75706183fa93356172cd0b4ce9764 /src/empathy-chat-main.c
parent3bb247b7f7eaa730a9f6cdc22ace430dba57ecd8 (diff)
downloadgsoc2013-empathy-bc3fac61996f1b403df48bf59826a38540b5d4c2.tar
gsoc2013-empathy-bc3fac61996f1b403df48bf59826a38540b5d4c2.tar.gz
gsoc2013-empathy-bc3fac61996f1b403df48bf59826a38540b5d4c2.tar.bz2
gsoc2013-empathy-bc3fac61996f1b403df48bf59826a38540b5d4c2.tar.lz
gsoc2013-empathy-bc3fac61996f1b403df48bf59826a38540b5d4c2.tar.xz
gsoc2013-empathy-bc3fac61996f1b403df48bf59826a38540b5d4c2.tar.zst
gsoc2013-empathy-bc3fac61996f1b403df48bf59826a38540b5d4c2.zip
po/POTFILES.in
2006-05-14 Xavier Claessens <xclaesse@gmail.com> * src/empathy-chat-main.c: * src/Makefile.am: * src/empathy-main.c: * po/POTFILES.in * po/LINGUAS: * TODO: Setting up i18n support. * po/Makefile.in.in: Removed, it's generated at build time. svn path=/trunk/; revision=62
Diffstat (limited to 'src/empathy-chat-main.c')
-rw-r--r--src/empathy-chat-main.c36
1 files changed, 31 insertions, 5 deletions
diff --git a/src/empathy-chat-main.c b/src/empathy-chat-main.c
index 5c3478435..fedc9066a 100644
--- a/src/empathy-chat-main.c
+++ b/src/empathy-chat-main.c
@@ -25,8 +25,12 @@
#include <stdlib.h>
#include <glib.h>
+#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <libgnome/gnome-program.h>
+#include <libgnomeui/gnome-ui-init.h>
+
#include <libtelepathy/tp-conn.h>
#include <libtelepathy/tp-chan.h>
#include <libmissioncontrol/mc-account.h>
@@ -38,6 +42,7 @@
#include <libempathy/empathy-contact-manager.h>
#include <libempathy/empathy-contact-list.h>
#include <libempathy/empathy-tp-chat.h>
+#include <libempathy/gossip-paths.h>
#include <libempathy-gtk/gossip-private-chat.h>
#define DEBUG_DOMAIN "ChatMain"
@@ -49,9 +54,9 @@
#define EXIT_TIMEOUT 5
-static guint chat_count = 0;
-static guint exit_timeout = 0;
-
+static guint chat_count = 0;
+static guint exit_timeout = 0;
+static gboolean debug_mode = FALSE;
static gboolean
exit_timeout_cb (gpointer user_data)
@@ -66,7 +71,7 @@ exit_timeout_cb (gpointer user_data)
static void
exit_timeout_start (void)
{
- if (exit_timeout) {
+ if (exit_timeout || debug_mode) {
return;
}
@@ -163,8 +168,26 @@ int
main (int argc, char *argv[])
{
EmpathyChandler *chandler;
+ GnomeProgram *program;
+ gchar *localedir;
+
+ localedir = gossip_paths_get_locale_path ();
+ bindtextdomain (GETTEXT_PACKAGE, localedir);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ textdomain (GETTEXT_PACKAGE);
+ g_free (localedir);
+
+ program = gnome_program_init ("empathy-chat",
+ PACKAGE_VERSION,
+ LIBGNOMEUI_MODULE,
+ argc, argv,
+ GNOME_PROGRAM_STANDARD_PROPERTIES,
+ GNOME_PARAM_HUMAN_READABLE_NAME, PACKAGE_NAME,
+ NULL);
- gtk_init (&argc, &argv);
+ if (g_getenv ("EMPATHY_DEBUG")) {
+ debug_mode = TRUE;
+ }
exit_timeout_start ();
chandler = empathy_chandler_new (BUS_NAME, OBJECT_PATH);
@@ -175,6 +198,9 @@ main (int argc, char *argv[])
gtk_main ();
+ g_object_unref (program);
+ g_object_unref (chandler);
+
return EXIT_SUCCESS;
}