[MPlayer-cvslog] r37037 - in trunk/gui/ui: main.c playbar.c

ib subversion at mplayerhq.hu
Fri Mar 21 16:46:15 CET 2014


Author: ib
Date: Fri Mar 21 16:46:15 2014
New Revision: 37037

Log:
Remove redundant code.

The only necessary call - uiEvent() - is performed after the switch
statement anyway, so it isn't necessary to do this also in the case
statement.

The btnModify() calls are pointless, because these will be performed
in the windows' draw handler prior to rendering anyway.

Modified:
   trunk/gui/ui/main.c
   trunk/gui/ui/playbar.c

Modified: trunk/gui/ui/main.c
==============================================================================
--- trunk/gui/ui/main.c	Fri Mar 21 16:21:11 2014	(r37036)
+++ trunk/gui/ui/main.c	Fri Mar 21 16:46:15 2014	(r37037)
@@ -148,14 +148,10 @@ static void uiMainMouse( int Button,int 
           switch( itemtype )
            {
             case itHPotmeter:
-                 btnModify( item->message,100.0 * ( X - item->x ) / item->width );
-		 uiEvent( item->message,item->value );
-                 value=item->value;
+                 value=100.0 * ( X - item->x ) / item->width;
                  break;
 	    case itVPotmeter:
-                 btnModify( item->message,100.0 - 100.0 * ( Y - item->y ) / item->height );
-		 uiEvent( item->message,item->value );
-                 value=item->value;
+                 value=100.0 - 100.0 * ( Y - item->y ) / item->height;
                  break;
            }
           uiEvent( item->message,value );

Modified: trunk/gui/ui/playbar.c
==============================================================================
--- trunk/gui/ui/playbar.c	Fri Mar 21 16:21:11 2014	(r37036)
+++ trunk/gui/ui/playbar.c	Fri Mar 21 16:46:15 2014	(r37037)
@@ -177,14 +177,10 @@ static void uiPlaybarMouse( int Button, 
 	switch( itemtype )
 	 {
 	  case itHPotmeter:
-	       btnModify( item->message,100.0 * ( X - item->x ) / item->width);
-	       uiEvent( item->message,item->value );
-	       value=item->value;
+	       value=100.0 * ( X - item->x ) / item->width;
 	       break;
 	  case itVPotmeter:
-	       btnModify( item->message,100.0 - 100.0 * ( Y - item->y ) / item->height );
-	       uiEvent( item->message,item->value );
-	       value=item->value;
+	       value=100.0 - 100.0 * ( Y - item->y ) / item->height;
 	       break;
 	 }
 	uiEvent( item->message,value );


More information about the MPlayer-cvslog mailing list