aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy-gtk/empathy-chat-window.c
diff options
context:
space:
mode:
authorXavier Claessens <xclaesse@src.gnome.org>2007-12-20 21:39:37 +0800
committerXavier Claessens <xclaesse@src.gnome.org>2007-12-20 21:39:37 +0800
commitafdca8a81d71ab9c78780dabea1e651a9a4ccebb (patch)
tree01b8684b6a1b6a89d40dbd880cc3e533c2db8c61 /libempathy-gtk/empathy-chat-window.c
parent511f857fef39819c913d06538836b46d68b6e832 (diff)
downloadgsoc2013-empathy-afdca8a81d71ab9c78780dabea1e651a9a4ccebb.tar
gsoc2013-empathy-afdca8a81d71ab9c78780dabea1e651a9a4ccebb.tar.gz
gsoc2013-empathy-afdca8a81d71ab9c78780dabea1e651a9a4ccebb.tar.bz2
gsoc2013-empathy-afdca8a81d71ab9c78780dabea1e651a9a4ccebb.tar.lz
gsoc2013-empathy-afdca8a81d71ab9c78780dabea1e651a9a4ccebb.tar.xz
gsoc2013-empathy-afdca8a81d71ab9c78780dabea1e651a9a4ccebb.tar.zst
gsoc2013-empathy-afdca8a81d71ab9c78780dabea1e651a9a4ccebb.zip
Simplify empaty_window_present, empathy_window_iconify and empathy_window_is_visible stuff
svn path=/trunk/; revision=491
Diffstat (limited to 'libempathy-gtk/empathy-chat-window.c')
-rw-r--r--libempathy-gtk/empathy-chat-window.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/libempathy-gtk/empathy-chat-window.c b/libempathy-gtk/empathy-chat-window.c
index 3d1608df1..d1fb7906f 100644
--- a/libempathy-gtk/empathy-chat-window.c
+++ b/libempathy-gtk/empathy-chat-window.c
@@ -476,22 +476,12 @@ empathy_chat_window_get_default (void)
for (l = chat_windows; l; l = l->next) {
EmpathyChatWindow *chat_window;
- GtkWidget *dialog;
- GdkWindow *window;
- gboolean visible;
+ GtkWidget *dialog;
chat_window = l->data;
dialog = empathy_chat_window_get_dialog (chat_window);
- window = dialog->window;
-
- g_object_get (dialog,
- "visible", &visible,
- NULL);
-
- visible = visible && !(gdk_window_get_state (window) & GDK_WINDOW_STATE_ICONIFIED);
-
- if (visible) {
+ if (empathy_window_get_is_visible (GTK_WINDOW (GTK_WINDOW (dialog)))) {
/* Found a visible window on this desktop */
return chat_window;
}