Revision: 43560
Author:   maikmerten
Date:     2008-11-15 17:32:46 +0000 (Sat, 15 Nov 2008)

Log Message:
-----------
change default status bar hiding behaviour of Cortado. Show the status bar if 
the mouse has been moved over the applet, hide after (by default) 3 seconds 
without movement. Don't hide if the mouse is on the status bar.

Modified Paths:
--------------
    trunk/cortado/src/com/fluendo/player/Cortado.java

Modified: trunk/cortado/src/com/fluendo/player/Cortado.java
===================================================================
--- trunk/cortado/src/com/fluendo/player/Cortado.java   2008-11-15 16:21:57 UTC 
(rev 43559)
+++ trunk/cortado/src/com/fluendo/player/Cortado.java   2008-11-15 17:32:46 UTC 
(rev 43560)
@@ -221,7 +221,7 @@
         statusHeight = getIntParam("statusHeight", 12);
         autoPlay = getBoolParam("autoPlay", true);
         showStatus = getEnumParam("showStatus", showStatusVals, "auto");
-        hideTimeout = getIntParam("hideTimeout", 0);
+        hideTimeout = getIntParam("hideTimeout", 3);
         showSpeaker = getBoolParam("showSpeaker", true);
         keepAspect = getBoolParam("keepAspect", true);
         bufferSize = getIntParam("bufferSize", 200);
@@ -230,6 +230,9 @@
         debug = getIntParam("debug", 3);
         userId = getStringParam("userId", null);
         password = getStringParam("password", null);
+        
+        // if audio-only don't hide the status bar
+        if(!video) hideTimeout = Integer.MAX_VALUE;
 
         Debug.level = debug;
         Debug.log(Debug.INFO, "build info: " + configure.buildInfo);
@@ -434,10 +437,13 @@
           
         /* don't make invisible when the mouse pointer is inside status area */
         if (inStatus && !b) {
-            return;
+            b = true;
        }
 
-       Debug.log (Debug.INFO, "Status: "+ (b ? "Show" : "Hide"));
+        if(b != status.isVisible())
+            Debug.log (Debug.INFO, "Status: "+ (b ? "Show" : "Hide"));
+        
+        if(b) hideCounter = hideTimeout;
         status.setVisible(b);
         repaint();
     }
@@ -458,7 +464,7 @@
     }
 
     public void mouseExited(MouseEvent e) {
-        setStatusVisible(false, false);
+        inStatus = false;
     }
 
     public void mousePressed(MouseEvent e) {
@@ -490,9 +496,9 @@
             setStatusVisible(true, false);
             e.translatePoint(0, -y);
             ((MouseMotionListener) status).mouseDragged(e);
-        } else {
+        } /*else {
             setStatusVisible(false, false);
-        }
+        }*/
     }
 
     public void mouseMoved(MouseEvent e) {
@@ -501,9 +507,10 @@
             setStatusVisible(true, false);
             e.translatePoint(0, -y);
             ((MouseMotionListener) status).mouseMoved(e);
-        } else {
+        } /*else {
             setStatusVisible(false, false);
-        }
+        }*/
+        setStatusVisible(true, false);
     }
 
     public void handleMessage(Message msg) {



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to