diff options
author | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-27 18:48:30 +0800 |
---|---|---|
committer | Guillaume Desmottes <guillaume.desmottes@collabora.co.uk> | 2012-09-28 18:09:35 +0800 |
commit | 837375ce5a897ede2f219957eb9b9b4a4eaee6c8 (patch) | |
tree | 104cc6b34fc68a2071a6732fac8f7c05bf4c5b96 /src | |
parent | 863beae29119b3a230511c6968b245ae747f4181 (diff) | |
download | gsoc2013-empathy-837375ce5a897ede2f219957eb9b9b4a4eaee6c8.tar gsoc2013-empathy-837375ce5a897ede2f219957eb9b9b4a4eaee6c8.tar.gz gsoc2013-empathy-837375ce5a897ede2f219957eb9b9b4a4eaee6c8.tar.bz2 gsoc2013-empathy-837375ce5a897ede2f219957eb9b9b4a4eaee6c8.tar.lz gsoc2013-empathy-837375ce5a897ede2f219957eb9b9b4a4eaee6c8.tar.xz gsoc2013-empathy-837375ce5a897ede2f219957eb9b9b4a4eaee6c8.tar.zst gsoc2013-empathy-837375ce5a897ede2f219957eb9b9b4a4eaee6c8.zip |
empathy_chat_window_present_chat: return the window presenting the chat
Diffstat (limited to 'src')
-rw-r--r-- | src/empathy-chat-window.c | 9 | ||||
-rw-r--r-- | src/empathy-chat-window.h | 2 |
2 files changed, 6 insertions, 5 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c index 674be15f3..a8c5b6be2 100644 --- a/src/empathy-chat-window.c +++ b/src/empathy-chat-window.c @@ -2664,14 +2664,14 @@ empathy_chat_window_find_chat (TpAccount *account, return NULL; } -void +EmpathyChatWindow * empathy_chat_window_present_chat (EmpathyChat *chat, gint64 timestamp) { EmpathyChatWindow *self; guint32 x_timestamp; - g_return_if_fail (EMPATHY_IS_CHAT (chat)); + g_return_val_if_fail (EMPATHY_IS_CHAT (chat), NULL); self = chat_window_find_chat (chat); @@ -2695,7 +2695,7 @@ empathy_chat_window_present_chat (EmpathyChat *chat, * an action by the user */ if (!tp_user_action_time_should_present (timestamp, &x_timestamp)) - return; + return self; if (x_timestamp != GDK_CURRENT_TIME) { @@ -2705,7 +2705,7 @@ empathy_chat_window_present_chat (EmpathyChat *chat, if (self->priv->x_user_action_time != 0 && X_EARLIER_OR_EQL (x_timestamp, self->priv->x_user_action_time)) - return; + return self; self->priv->x_user_action_time = x_timestamp; } @@ -2719,6 +2719,7 @@ empathy_chat_window_present_chat (EmpathyChat *chat, empathy_move_to_window_desktop (GTK_WINDOW (self->priv->dialog), x_timestamp); gtk_widget_grab_focus (chat->input_text_view); + return self; } static void diff --git a/src/empathy-chat-window.h b/src/empathy-chat-window.h index d7ddc2b6b..2be55cdf8 100644 --- a/src/empathy-chat-window.h +++ b/src/empathy-chat-window.h @@ -79,7 +79,7 @@ EmpathyChat * empathy_chat_window_find_chat (TpAccount *account, const gchar *id, gboolean sms_channel); -void empathy_chat_window_present_chat (EmpathyChat *chat, +EmpathyChatWindow * empathy_chat_window_present_chat (EmpathyChat *chat, gint64 timestamp); G_END_DECLS |