aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-08-07 22:39:02 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2013-08-07 22:48:03 +0800
commit9a68f9d151f0ecd31a364946f816325037bdaf42 (patch)
tree10ff401e60d219e2cd7cfdc76237ec666618750e /src
parent3beb1bb570e4f722ae77d42e64410ef93437544b (diff)
downloadgsoc2013-empathy-9a68f9d151f0ecd31a364946f816325037bdaf42.tar.gz
gsoc2013-empathy-9a68f9d151f0ecd31a364946f816325037bdaf42.tar.zst
gsoc2013-empathy-9a68f9d151f0ecd31a364946f816325037bdaf42.zip
use the user_action_time received from TP when presenting new call window
https://bugzilla.gnome.org/show_bug.cgi?id=705618
Diffstat (limited to 'src')
-rw-r--r--src/empathy-call-factory.c4
-rw-r--r--src/empathy-call.c9
2 files changed, 11 insertions, 2 deletions
diff --git a/src/empathy-call-factory.c b/src/empathy-call-factory.c
index 972524533..71ec4d63c 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 2d403b3cd..2ed61e333 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);
}
}