1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
Index: empathy-2.33.3/src/empathy-chat-window.c
===================================================================
--- empathy-2.33.3.orig/src/empathy-chat-window.c 2011-03-15 16:04:12.372818869 -0400
+++ empathy-2.33.3/src/empathy-chat-window.c 2011-03-15 16:08:00.452818868 -0400
@@ -163,7 +163,7 @@
{ "text/uri-list", 0, DND_DRAG_TYPE_URI_LIST },
};
-static void chat_window_update (EmpathyChatWindow *window);
+static void chat_window_update (EmpathyChatWindow *window, gboolean via_focus_in);
G_DEFINE_TYPE (EmpathyChatWindow, empathy_chat_window, G_TYPE_OBJECT);
@@ -354,7 +354,7 @@
g_signal_handlers_disconnect_by_func (object,
_submenu_notify_visible_changed_cb,
userdata);
- chat_window_update (EMPATHY_CHAT_WINDOW (userdata));
+ chat_window_update (EMPATHY_CHAT_WINDOW (userdata), FALSE);
}
static void
@@ -587,7 +587,8 @@
}
static void
-chat_window_update (EmpathyChatWindow *window)
+chat_window_update (EmpathyChatWindow *window,
+ gboolean via_focus_in)
{
EmpathyChatWindowPriv *priv = GET_PRIV (window);
gint num_pages;
@@ -600,8 +601,12 @@
chat_window_conversation_menu_update (priv, window);
- chat_window_contact_menu_update (priv,
- window);
+ /* We know menu will be same as when we left it and we may confuse
+ any global menu watching. */
+ if (!via_focus_in) {
+ chat_window_contact_menu_update (priv,
+ window);
+ }
chat_window_title_update (priv);
@@ -629,7 +634,8 @@
}
static void
-chat_window_update_chat_tab (EmpathyChat *chat)
+chat_window_update_chat_tab_full (EmpathyChat *chat,
+ gboolean via_focus_in)
{
EmpathyChatWindow *window;
EmpathyChatWindowPriv *priv;
@@ -733,11 +739,17 @@
/* Update the window if it's the current chat */
if (priv->current_chat == chat) {
- chat_window_update (window);
+ chat_window_update (window, via_focus_in);
}
}
static void
+chat_window_update_chat_tab (EmpathyChat *chat)
+{
+ chat_window_update_chat_tab_full (chat, FALSE);
+}
+
+static void
chat_window_chat_notify_cb (EmpathyChat *chat)
{
EmpathyContact *old_remote_contact;
@@ -1719,7 +1731,7 @@
if (priv->chats == NULL) {
g_object_unref (window);
} else {
- chat_window_update (window);
+ chat_window_update (window, FALSE);
}
}
@@ -1738,7 +1750,7 @@
chat_window_set_urgency_hint (window, FALSE);
/* Update the title, since we now mark all unread messages as read. */
- chat_window_update_chat_tab (priv->current_chat);
+ chat_window_update_chat_tab_full (priv->current_chat, TRUE);
#ifdef HAVE_LIBINDICATE
/* Remove the indicator for the active chat */
|