r43560 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r43559‎ | r43560 | r43561 >
Date:17:32, 15 November 2008
Author:maikmerten
Status:deferred
Tags:
Comment:
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) (history)

Diff [purge]

Index: trunk/cortado/src/com/fluendo/player/Cortado.java
@@ -221,7 +221,7 @@
222222 statusHeight = getIntParam("statusHeight", 12);
223223 autoPlay = getBoolParam("autoPlay", true);
224224 showStatus = getEnumParam("showStatus", showStatusVals, "auto");
225 - hideTimeout = getIntParam("hideTimeout", 0);
 225+ hideTimeout = getIntParam("hideTimeout", 3);
226226 showSpeaker = getBoolParam("showSpeaker", true);
227227 keepAspect = getBoolParam("keepAspect", true);
228228 bufferSize = getIntParam("bufferSize", 200);
@@ -230,6 +230,9 @@
231231 debug = getIntParam("debug", 3);
232232 userId = getStringParam("userId", null);
233233 password = getStringParam("password", null);
 234+
 235+ // if audio-only don't hide the status bar
 236+ if(!video) hideTimeout = Integer.MAX_VALUE;
234237
235238 Debug.level = debug;
236239 Debug.log(Debug.INFO, "build info: " + configure.buildInfo);
@@ -434,10 +437,13 @@
435438
436439 /* don't make invisible when the mouse pointer is inside status area */
437440 if (inStatus && !b) {
438 - return;
 441+ b = true;
439442 }
440443
441 - Debug.log (Debug.INFO, "Status: "+ (b ? "Show" : "Hide"));
 444+ if(b != status.isVisible())
 445+ Debug.log (Debug.INFO, "Status: "+ (b ? "Show" : "Hide"));
 446+
 447+ if(b) hideCounter = hideTimeout;
442448 status.setVisible(b);
443449 repaint();
444450 }
@@ -458,7 +464,7 @@
459465 }
460466
461467 public void mouseExited(MouseEvent e) {
462 - setStatusVisible(false, false);
 468+ inStatus = false;
463469 }
464470
465471 public void mousePressed(MouseEvent e) {
@@ -490,9 +496,9 @@
491497 setStatusVisible(true, false);
492498 e.translatePoint(0, -y);
493499 ((MouseMotionListener) status).mouseDragged(e);
494 - } else {
 500+ } /*else {
495501 setStatusVisible(false, false);
496 - }
 502+ }*/
497503 }
498504
499505 public void mouseMoved(MouseEvent e) {
@@ -501,9 +507,10 @@
502508 setStatusVisible(true, false);
503509 e.translatePoint(0, -y);
504510 ((MouseMotionListener) status).mouseMoved(e);
505 - } else {
 511+ } /*else {
506512 setStatusVisible(false, false);
507 - }
 513+ }*/
 514+ setStatusVisible(true, false);
508515 }
509516
510517 public void handleMessage(Message msg) {

Status & tagging log