aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAbner Silva <abner.silva@collabora.co.uk>2009-07-17 03:55:31 +0800
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2009-12-08 00:59:34 +0800
commit487f4d0fc504b9c0cb77a030869893054c907d6d (patch)
tree0a7ccf875702e173d58e158fa24d667cc7da702e /src
parentb8698934662ff2f97b6d1d68f409650878bbcad6 (diff)
downloadgsoc2013-empathy-487f4d0fc504b9c0cb77a030869893054c907d6d.tar
gsoc2013-empathy-487f4d0fc504b9c0cb77a030869893054c907d6d.tar.gz
gsoc2013-empathy-487f4d0fc504b9c0cb77a030869893054c907d6d.tar.bz2
gsoc2013-empathy-487f4d0fc504b9c0cb77a030869893054c907d6d.tar.lz
gsoc2013-empathy-487f4d0fc504b9c0cb77a030869893054c907d6d.tar.xz
gsoc2013-empathy-487f4d0fc504b9c0cb77a030869893054c907d6d.tar.zst
gsoc2013-empathy-487f4d0fc504b9c0cb77a030869893054c907d6d.zip
Grouping all 1-to-1 chats in one window and MUC's in another one. (Fixes #588812)
Diffstat (limited to 'src')
-rw-r--r--src/empathy-chat-window.c9
-rw-r--r--src/empathy-chat-window.h2
2 files changed, 7 insertions, 4 deletions
diff --git a/src/empathy-chat-window.c b/src/empathy-chat-window.c
index ea63f29aa..6db60b9e1 100644
--- a/src/empathy-chat-window.c
+++ b/src/empathy-chat-window.c
@@ -1848,7 +1848,7 @@ empathy_chat_window_new (void)
* be added.
*/
EmpathyChatWindow *
-empathy_chat_window_get_default (void)
+empathy_chat_window_get_default (gboolean room_filter)
{
GList *l;
gboolean separate_windows = TRUE;
@@ -1863,13 +1863,16 @@ empathy_chat_window_get_default (void)
}
for (l = chat_windows; l; l = l->next) {
+ EmpathyChatWindowPriv *priv;
EmpathyChatWindow *chat_window;
GtkWidget *dialog;
chat_window = l->data;
+ priv = GET_PRIV (chat_window);
dialog = empathy_chat_window_get_dialog (chat_window);
- if (empathy_window_get_is_visible (GTK_WINDOW (dialog))) {
+ if (empathy_window_get_is_visible (GTK_WINDOW (dialog)) &&
+ empathy_chat_is_room (priv->current_chat) == room_filter) {
/* Found a visible window on this desktop */
return chat_window;
}
@@ -2086,7 +2089,7 @@ empathy_chat_window_present_chat (EmpathyChat *chat)
/* If the chat has no window, create one */
if (window == NULL) {
- window = empathy_chat_window_get_default ();
+ window = empathy_chat_window_get_default (empathy_chat_is_room (chat));
if (!window) {
window = empathy_chat_window_new ();
}
diff --git a/src/empathy-chat-window.h b/src/empathy-chat-window.h
index 1e4a001e5..4f1920a9c 100644
--- a/src/empathy-chat-window.h
+++ b/src/empathy-chat-window.h
@@ -57,7 +57,7 @@ struct _EmpathyChatWindowClass {
};
GType empathy_chat_window_get_type (void);
-EmpathyChatWindow *empathy_chat_window_get_default (void);
+EmpathyChatWindow *empathy_chat_window_get_default (gboolean room_filter);
EmpathyChatWindow *empathy_chat_window_new (void);
GtkWidget * empathy_chat_window_get_dialog (EmpathyChatWindow *window);
void empathy_chat_window_add_chat (EmpathyChatWindow *window,