aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c9
-rw-r--r--src/empathy-chat-window.h2
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