diff options
author | Xavier Claessens <xclaesse@src.gnome.org> | 2007-12-29 23:58:47 +0800 |
---|---|---|
committer | Xavier Claessens <xclaesse@src.gnome.org> | 2007-12-29 23:58:47 +0800 |
commit | e4358acdec7b8c278a1950a3da24bab387a0e7b3 (patch) | |
tree | 9a15f253d9c45a90a8794143ecdd854650d58af1 /src | |
parent | b8607414ea0e41c44a09d31ebcd0437a3c867a24 (diff) | |
download | gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar.gz gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar.bz2 gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar.lz gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar.xz gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.tar.zst gsoc2013-empathy-e4358acdec7b8c278a1950a3da24bab387a0e7b3.zip |
Revert "merge git work"
This reverts commit 0cfd80847f0d66967f56c7d6b3eb46793f725859.
svn path=/trunk/; revision=519
Diffstat (limited to 'src')
-rw-r--r-- | src/.gitignore | 2 | ||||
-rw-r--r-- | src/empathy-call-chandler.c | 19 | ||||
-rw-r--r-- | src/empathy-chat-chandler.c | 15 |
3 files changed, 35 insertions, 1 deletions
diff --git a/src/.gitignore b/src/.gitignore index 75a62869e..54397d04f 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -2,3 +2,5 @@ empathy empathy-accounts empathy-chat-chandler org.gnome.Empathy.Chat.service +empathy-call-chandler +org.gnome.Empathy.Call.service diff --git a/src/empathy-call-chandler.c b/src/empathy-call-chandler.c index 3a1b51137..be9de1175 100644 --- a/src/empathy-call-chandler.c +++ b/src/empathy-call-chandler.c @@ -42,6 +42,19 @@ #define BUS_NAME "org.gnome.Empathy.CallChandler" #define OBJECT_PATH "/org/gnome/Empathy/CallChandler" +static guint nb_calls = 0; + +static void +call_chandler_weak_notify (gpointer data, + GObject *where_the_object_was) +{ + nb_calls--; + if (nb_calls == 0) { + empathy_debug (DEBUG_DOMAIN, "No more calls, leaving..."); + gtk_main_quit (); + } +} + static void call_chandler_new_channel_cb (EmpathyChandler *chandler, TpConn *tp_conn, @@ -50,13 +63,17 @@ call_chandler_new_channel_cb (EmpathyChandler *chandler, { EmpathyTpCall *call; McAccount *account; + GtkWidget *window; account = mission_control_get_account_for_connection (mc, tp_conn, NULL); call = empathy_tp_call_new (account, tp_chan); - empathy_call_window_show (call); + window = empathy_call_window_show (call); g_object_unref (account); g_object_unref (call); + + nb_calls++; + g_object_weak_ref (G_OBJECT (window), call_chandler_weak_notify, NULL); } int 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); |