diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2007-12-29 23:49:38 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-12-29 23:49:38 +0800 |
commit | c557cb70c90bba8d33c1104e15dc693a69caa9d7 (patch) | |
tree | 37f50516cb45684512a5c0d3ad88244d975f6a35 /src/empathy-chat-chandler.c | |
parent | caec259128182461e7454090cb7d88d7919483b2 (diff) | |
download | gsoc2013-empathy-c557cb70c90bba8d33c1104e15dc693a69caa9d7.tar gsoc2013-empathy-c557cb70c90bba8d33c1104e15dc693a69caa9d7.tar.gz gsoc2013-empathy-c557cb70c90bba8d33c1104e15dc693a69caa9d7.tar.bz2 gsoc2013-empathy-c557cb70c90bba8d33c1104e15dc693a69caa9d7.tar.lz gsoc2013-empathy-c557cb70c90bba8d33c1104e15dc693a69caa9d7.tar.xz gsoc2013-empathy-c557cb70c90bba8d33c1104e15dc693a69caa9d7.tar.zst gsoc2013-empathy-c557cb70c90bba8d33c1104e15dc693a69caa9d7.zip |
Chandlers leaves when there is no more channels to handle. Translate call window title
svn path=/trunk/; revision=514
Diffstat (limited to 'src/empathy-chat-chandler.c')
-rw-r--r-- | src/empathy-chat-chandler.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/empathy-chat-chandler.c b/src/empathy-chat-chandler.c index dc2eb60f7..79bbe8a35 100644 --- a/src/empathy-chat-chandler.c +++ b/src/empathy-chat-chandler.c @@ -48,6 +48,19 @@ #define BUS_NAME "org.gnome.Empathy.ChatChandler" #define OBJECT_PATH "/org/gnome/Empathy/ChatChandler" +static guint nb_chats = 0; + +static void +chat_chandler_weak_notify (gpointer data, + GObject *where_the_object_was) +{ + nb_chats--; + if (nb_chats == 0) { + empathy_debug (DEBUG_DOMAIN, "No more chats, leaving..."); + gtk_main_quit (); + } +} + static void chat_chandler_new_channel_cb (EmpathyChandler *chandler, TpConn *tp_conn, @@ -99,6 +112,8 @@ chat_chandler_new_channel_cb (EmpathyChandler *chandler, return; } + nb_chats++; + g_object_weak_ref (G_OBJECT (chat), chat_chandler_weak_notify, NULL); empathy_chat_present (chat); g_object_unref (chat); |