* be added.
*/
EmpathyChatWindow *
-empathy_chat_window_get_default (void)
+empathy_chat_window_get_default (gboolean room_filter)
{
GList *l;
gboolean separate_windows = TRUE;
}
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;
}
/* 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 ();
}
};
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,