aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@gmail.com>2011-04-26 17:52:33 +0800
committerXavier Claessens <xclaesse@gmail.com>2011-04-27 19:51:13 +0800
commit5360a078c1b0d1e80a031fab38b865144447080d (patch)
tree916f2ca595cf58db1d419a8e4b5a49f3f26696af /libempathy-gtk/empathy-chat.c
parente4e176e847974f11e5155f434c1620c042dacd69 (diff)
downloadgsoc2013-empathy-5360a078c1b0d1e80a031fab38b865144447080d.tar
gsoc2013-empathy-5360a078c1b0d1e80a031fab38b865144447080d.tar.gz
gsoc2013-empathy-5360a078c1b0d1e80a031fab38b865144447080d.tar.bz2
gsoc2013-empathy-5360a078c1b0d1e80a031fab38b865144447080d.tar.lz
gsoc2013-empathy-5360a078c1b0d1e80a031fab38b865144447080d.tar.xz
gsoc2013-empathy-5360a078c1b0d1e80a031fab38b865144447080d.tar.zst
gsoc2013-empathy-5360a078c1b0d1e80a031fab38b865144447080d.zip
Use focus feature of adium themes
Diffstat (limited to 'libempathy-gtk/empathy-chat.c')
-rw-r--r--libempathy-gtk/empathy-chat.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index 53c4677fc..c146941b3 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -1753,6 +1753,14 @@ chat_input_realize_cb (GtkWidget *widget,
}
static void
+chat_input_has_focus_notify_cb (GtkWidget *widget,
+ GParamSpec *pspec,
+ EmpathyChat *chat)
+{
+ empathy_chat_view_focus_toggled (chat->view, gtk_widget_has_focus (widget));
+}
+
+static void
chat_insert_smiley_activate_cb (EmpathySmileyManager *manager,
EmpathySmiley *smiley,
gpointer user_data)
@@ -2710,7 +2718,9 @@ chat_create_ui (EmpathyChat *chat)
/* Add input GtkTextView */
chat->input_text_view = empathy_input_text_view_new ();
-
+ g_signal_connect (chat->input_text_view, "notify::has-focus",
+ G_CALLBACK (chat_input_has_focus_notify_cb),
+ chat);
g_signal_connect (chat->input_text_view, "key-press-event",
G_CALLBACK (chat_input_key_press_event_cb),
chat);
@@ -3789,9 +3799,11 @@ empathy_chat_messages_read (EmpathyChat *self)
return;
if (priv->tp_chat != NULL ) {
- empathy_tp_chat_acknowledge_all_messages (priv->tp_chat);
+ empathy_tp_chat_acknowledge_all_messages (priv->tp_chat);
}
priv->unread_messages = 0;
+
+ empathy_chat_view_focus_toggled (self->view, TRUE);
}
/* Return TRUE if on of the contacts in this chat is composing */