changeset 4117:a5779105e6d2

on ctrl-tab switch only between visible windows (Bugzilla #14)
author Tomasz Mon <desowin@gmail.com>
date Tue, 25 Dec 2007 16:03:27 +0100
parents 5853d43e539a
children 1112f53ecc18
files src/audacious/ui_equalizer.c src/audacious/ui_main.c src/audacious/ui_playlist.c
diffstat 3 files changed, 16 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/audacious/ui_equalizer.c	Tue Dec 25 19:15:44 2007 +0900
+++ b/src/audacious/ui_equalizer.c	Tue Dec 25 16:03:27 2007 +0100
@@ -288,7 +288,10 @@
                       gpointer data)
 {
     if (event->keyval == GDK_Tab && event->state & GDK_CONTROL_MASK) {
-	playlistwin_show();
+        if (cfg.playlist_visible)
+            gtk_window_present(GTK_WINDOW(playlistwin));
+        else if (cfg.player_visible)
+            gtk_window_present(GTK_WINDOW(mainwin));
         return TRUE;
     }
 
--- a/src/audacious/ui_main.c	Tue Dec 25 19:15:44 2007 +0900
+++ b/src/audacious/ui_main.c	Tue Dec 25 16:03:27 2007 +0100
@@ -982,8 +982,12 @@
         mainwin_minimize_cb();
         break;
     case GDK_Tab:
-        if (event->state & GDK_CONTROL_MASK)
-	    equalizerwin_real_show();
+        if (event->state & GDK_CONTROL_MASK) {
+            if (cfg.equalizer_visible)
+                gtk_window_present(GTK_WINDOW(equalizerwin));
+            else if (cfg.playlist_visible)
+                gtk_window_present(GTK_WINDOW(playlistwin));
+        }
         break;
     case GDK_c:
 	if (event->state & GDK_CONTROL_MASK) {
--- a/src/audacious/ui_playlist.c	Tue Dec 25 19:15:44 2007 +0900
+++ b/src/audacious/ui_playlist.c	Tue Dec 25 16:03:27 2007 +0100
@@ -1268,8 +1268,12 @@
         mainwin_minimize_cb();
         break;
     case GDK_Tab:
-        if (event->state & GDK_CONTROL_MASK)
-            gtk_window_present(GTK_WINDOW(mainwin));
+        if (event->state & GDK_CONTROL_MASK) {
+            if (cfg.player_visible)
+                gtk_window_present(GTK_WINDOW(mainwin));
+            else if (cfg.equalizer_visible)
+                gtk_window_present(GTK_WINDOW(equalizerwin));
+        }
         break;
     default:
         return FALSE;