[empathy] use the user_action_time received from TP when presenting new call window
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] use the user_action_time received from TP when presenting new call window
- Date: Wed, 7 Aug 2013 14:53:54 +0000 (UTC)
commit 9a68f9d151f0ecd31a364946f816325037bdaf42
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Wed Aug 7 16:39:02 2013 +0200
use the user_action_time received from TP when presenting new call window
https://bugzilla.gnome.org/show_bug.cgi?id=705618
src/empathy-call-factory.c | 4 ++--
src/empathy-call.c | 9 +++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/empathy-call-factory.c b/src/empathy-call-factory.c
index 9725245..71ec4d6 100644
--- a/src/empathy-call-factory.c
+++ b/src/empathy-call-factory.c
@@ -132,7 +132,7 @@ empathy_call_factory_class_init (EmpathyCallFactoryClass *klass)
NULL, NULL,
g_cclosure_marshal_generic,
G_TYPE_NONE,
- 1, EMPATHY_TYPE_CALL_HANDLER);
+ 2, EMPATHY_TYPE_CALL_HANDLER, G_TYPE_UINT64);
signals[INCOMING_CALL] =
g_signal_new ("incoming-call",
@@ -215,7 +215,7 @@ handle_channels (TpBaseClient *client,
handler = empathy_call_handler_new_for_channel (call, contact);
g_signal_emit (self, signals[NEW_CALL_HANDLER], 0,
- handler);
+ handler, user_action_time);
g_object_unref (handler);
g_object_unref (contact);
diff --git a/src/empathy-call.c b/src/empathy-call.c
index 2d403b3..2ed61e3 100644
--- a/src/empathy-call.c
+++ b/src/empathy-call.c
@@ -127,10 +127,13 @@ call_window_inhibit_cb (EmpathyCallWindow *window,
static void
new_call_handler_cb (EmpathyCallFactory *factory,
EmpathyCallHandler *handler,
+ gint64 user_action_time,
gpointer user_data)
{
EmpathyCallWindow *window;
EmpathyContact *contact;
+ guint32 x11_time;
+ gboolean present;
DEBUG ("Show the call window");
@@ -138,6 +141,9 @@ new_call_handler_cb (EmpathyCallFactory *factory,
window = g_hash_table_lookup (call_windows, contact);
+ present = tp_user_action_time_should_present (user_action_time,
+ &x11_time);
+
if (window != NULL)
{
empathy_call_window_present (window, handler);
@@ -154,6 +160,9 @@ new_call_handler_cb (EmpathyCallFactory *factory,
G_CALLBACK (call_window_inhibit_cb), NULL);
gtk_widget_show (GTK_WIDGET (window));
+
+ if (present)
+ empathy_window_present_with_time (GTK_WINDOW (window), x11_time);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]