aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorChandni Verma <chandniverma2112@gmail.com>2011-02-26 06:59:46 +0800
committerChandni Verma <chandniverma2112@gmail.com>2011-05-07 01:38:56 +0800
commit9dbdbe692285c70d2b2bf713f2b21b156a87055c (patch)
tree1ac3a14acb1b3e0ee1db67b41e728b6b10061843 /src
parent5ead12fb5b53cea0c8a97e8f101e2d729ca47282 (diff)
downloadgsoc2013-empathy-9dbdbe692285c70d2b2bf713f2b21b156a87055c.tar
gsoc2013-empathy-9dbdbe692285c70d2b2bf713f2b21b156a87055c.tar.gz
gsoc2013-empathy-9dbdbe692285c70d2b2bf713f2b21b156a87055c.tar.bz2
gsoc2013-empathy-9dbdbe692285c70d2b2bf713f2b21b156a87055c.tar.lz
gsoc2013-empathy-9dbdbe692285c70d2b2bf713f2b21b156a87055c.tar.xz
gsoc2013-empathy-9dbdbe692285c70d2b2bf713f2b21b156a87055c.tar.zst
gsoc2013-empathy-9dbdbe692285c70d2b2bf713f2b21b156a87055c.zip
Fire a "part-command-entered" signal from libempathy-gtk/empathy-chat.c to be caught in src/empathy-chat-window.c
Fixes linking issues: https://bugzilla.gnome.org/show_bug.cgi?id=643295
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index 94f93e2bf..8da1cc2f2 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1482,6 +1482,27 @@ chat_window_new_message_cb (EmpathyChat *chat,
chat_window_icon_update (priv, TRUE);
}
+static void
+chat_window_command_part (EmpathyChat *chat,
+ GStrv strv)
+{
+ EmpathyChat *chat_to_be_parted;
+
+ if (strv[1] == NULL) {
+ empathy_tp_chat_leave (empathy_chat_get_tp_chat (chat), "");
+ return;
+ }
+ chat_to_be_parted = empathy_chat_window_find_chat (
+ empathy_chat_get_account (chat), strv[1]);
+
+ if (chat_to_be_parted != NULL) {
+ empathy_tp_chat_leave (empathy_chat_get_tp_chat (chat_to_be_parted),
+ strv[2]);
+ } else {
+ empathy_tp_chat_leave (empathy_chat_get_tp_chat (chat), strv[1]);
+ }
+}
+
static GtkNotebook *
notebook_create_window_cb (GtkNotebook *source,
GtkWidget *page,
@@ -1567,6 +1588,9 @@ chat_window_page_added_cb (GtkNotebook *notebook,
g_signal_connect (chat, "new-message",
G_CALLBACK (chat_window_new_message_cb),
window);
+ g_signal_connect (chat, "part-command-entered",
+ G_CALLBACK (chat_window_command_part),
+ NULL);
g_signal_connect (chat, "notify::tp-chat",
G_CALLBACK (chat_window_update_chat_tab),
window);