aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-05-04 20:20:15 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-05-04 20:20:15 +0800
commitbb4750da5ff85a61e8e9d4643fc63fbefe34a1c0 (patch)
tree5104009c41478f4672ad3deab29c03b50e54df3b /libempathy-gtk
parent046792f3fd596574132fe1d6217dd1877bffe743 (diff)
parent61de8fbbea5d8d096aafcaa8c2b8093d0f349c87 (diff)
downloadgsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar
gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar.gz
gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar.bz2
gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar.lz
gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar.xz
gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.tar.zst
gsoc2013-empathy-bb4750da5ff85a61e8e9d4643fc63fbefe34a1c0.zip
Merge branch 'timestamp-615976'
Diffstat (limited to 'libempathy-gtk')
-rw-r--r--libempathy-gtk/empathy-chat.c6
-rw-r--r--libempathy-gtk/empathy-contact-list-view.c3
-rw-r--r--libempathy-gtk/empathy-contact-menu.c3
-rw-r--r--libempathy-gtk/empathy-new-message-dialog.c3
-rw-r--r--libempathy-gtk/empathy-ui-utils.c24
-rw-r--r--libempathy-gtk/empathy-ui-utils.h4
6 files changed, 21 insertions, 22 deletions
diff --git a/libempathy-gtk/empathy-chat.c b/libempathy-gtk/empathy-chat.c
index b06329a67..57cf62632 100644
--- a/libempathy-gtk/empathy-chat.c
+++ b/libempathy-gtk/empathy-chat.c
@@ -262,13 +262,13 @@ reconnected_connection_ready_cb (TpConnection *connection,
switch (priv->handle_type) {
case TP_HANDLE_TYPE_CONTACT:
empathy_dispatcher_chat_with_contact_id (
- connection, priv->id,
+ connection, priv->id, EMPATHY_DISPATCHER_NON_USER_ACTION,
chat_connect_channel_reconnected,
chat);
break;
case TP_HANDLE_TYPE_ROOM:
empathy_dispatcher_join_muc (connection,
- priv->id,
+ priv->id, EMPATHY_DISPATCHER_NON_USER_ACTION,
chat_connect_channel_reconnected,
chat);
break;
@@ -743,6 +743,7 @@ chat_command_join (EmpathyChat *chat,
connection = empathy_tp_chat_get_connection (priv->tp_chat);
empathy_dispatcher_join_muc (connection, rooms[i],
+ gtk_get_current_event_time (),
chat_command_join_cb,
chat);
}
@@ -767,6 +768,7 @@ chat_command_msg_internal (EmpathyChat *chat,
data->message = g_strdup (message);
connection = empathy_tp_chat_get_connection (priv->tp_chat);
empathy_dispatcher_chat_with_contact_id (connection, contact_id,
+ gtk_get_current_event_time (),
chat_command_msg_cb,
data);
}
diff --git a/libempathy-gtk/empathy-contact-list-view.c b/libempathy-gtk/empathy-contact-list-view.c
index 15df212ce..ae84e3e15 100644
--- a/libempathy-gtk/empathy-contact-list-view.c
+++ b/libempathy-gtk/empathy-contact-list-view.c
@@ -804,7 +804,8 @@ contact_list_view_row_activated (GtkTreeView *view,
if (contact) {
DEBUG ("Starting a chat");
- empathy_dispatcher_chat_with_contact (contact, NULL, NULL);
+ empathy_dispatcher_chat_with_contact (contact,
+ gtk_get_current_event_time (), NULL, NULL);
g_object_unref (contact);
}
}
diff --git a/libempathy-gtk/empathy-contact-menu.c b/libempathy-gtk/empathy-contact-menu.c
index fbcd8dc8a..e160f5e20 100644
--- a/libempathy-gtk/empathy-contact-menu.c
+++ b/libempathy-gtk/empathy-contact-menu.c
@@ -222,7 +222,8 @@ static void
empathy_contact_chat_menu_item_activated (GtkMenuItem *item,
EmpathyContact *contact)
{
- empathy_dispatcher_chat_with_contact (contact, NULL, NULL);
+ empathy_dispatcher_chat_with_contact (contact, gtk_get_current_event_time (),
+ NULL, NULL);
}
GtkWidget *
diff --git a/libempathy-gtk/empathy-new-message-dialog.c b/libempathy-gtk/empathy-new-message-dialog.c
index 338da2760..509438575 100644
--- a/libempathy-gtk/empathy-new-message-dialog.c
+++ b/libempathy-gtk/empathy-new-message-dialog.c
@@ -70,7 +70,8 @@ empathy_new_message_dialog_response (GtkDialog *dialog, int response_id)
if (EMP_STR_EMPTY (contact_id) || connection == NULL) goto out;
- empathy_dispatcher_chat_with_contact_id (connection, contact_id, NULL, NULL);
+ empathy_dispatcher_chat_with_contact_id (connection, contact_id,
+ gtk_get_current_event_time (), NULL, NULL);
out:
gtk_widget_destroy (GTK_WIDGET (dialog));
diff --git a/libempathy-gtk/empathy-ui-utils.c b/libempathy-gtk/empathy-ui-utils.c
index 3f37ea2db..2f06ae902 100644
--- a/libempathy-gtk/empathy-ui-utils.c
+++ b/libempathy-gtk/empathy-ui-utils.c
@@ -1392,10 +1392,10 @@ empathy_window_iconify (GtkWindow *window, GtkStatusIcon *status_icon)
/* Takes care of moving the window to the current workspace. */
void
-empathy_window_present (GtkWindow *window)
+empathy_window_present_with_time (GtkWindow *window,
+ guint32 timestamp)
{
GdkWindow *gdk_window;
- guint32 timestamp;
g_return_if_fail (GTK_IS_WINDOW (window));
@@ -1417,25 +1417,17 @@ empathy_window_present (GtkWindow *window)
gtk_widget_hide (GTK_WIDGET (window));
}
- timestamp = gtk_get_current_event_time ();
- if (timestamp == 0 && gdk_window != NULL) {
- GdkEventMask mask;
-
- /* According to the documentation of gdk_x11_get_server_time
- * GDK_PROPERTY_CHANGE_MASK needs to be set in its events otherwise a hang
- * can occur. Be sure to at least temporarily set this mask */
- mask = gdk_window_get_events (gdk_window);
- gdk_window_set_events (gdk_window,
- mask | GDK_PROPERTY_CHANGE_MASK);
- timestamp = gdk_x11_get_server_time (gdk_window);
- gdk_window_set_events (gdk_window, mask);
- }
-
gtk_window_present_with_time (window, timestamp);
gtk_window_set_skip_taskbar_hint (window, FALSE);
gtk_window_deiconify (window);
}
+void
+empathy_window_present (GtkWindow *window)
+{
+ empathy_window_present_with_time (window, GDK_CURRENT_TIME);
+}
+
GtkWindow *
empathy_get_toplevel_window (GtkWidget *widget)
{
diff --git a/libempathy-gtk/empathy-ui-utils.h b/libempathy-gtk/empathy-ui-utils.h
index 8834cb4c9..6dab13789 100644
--- a/libempathy-gtk/empathy-ui-utils.h
+++ b/libempathy-gtk/empathy-ui-utils.h
@@ -104,7 +104,9 @@ gboolean empathy_text_iter_backward_search (const GtkTextIter*iter,
const GtkTextIter*limit);
/* Windows */
gboolean empathy_window_get_is_visible (GtkWindow *window);
-void empathy_window_present (GtkWindow *window);
+void empathy_window_present (GtkWindow *window);
+void empathy_window_present_with_time (GtkWindow *window,
+ guint32 timestamp);
void empathy_window_iconify (GtkWindow *window,
GtkStatusIcon *status_icon);
GtkWindow * empathy_get_toplevel_window (GtkWidget *widget);