diff gui/ui/main.c @ 36920:40ad45360c8a

Replace old item 'potmeter' by new item 'pimage'. Recent versions of the X11/GTK GUI didn't allow to control a potmeter, because that didn't seem to make any sense. In order to get rid of the confusing potmeter that doesn't distinguish from a hpotmeter and in order to allow the more useful behaviour recent versions of the X11/GTK GUI have been utilized (and because we're still supporting item 'potmeter' for reasons of compatibility with old skins), introduce new item 'pimage' that reuses most of the current potmeter code. Additionally, remove remaining code and documentation of 'potmeter'.
author ib
date Mon, 17 Mar 2014 12:29:46 +0000
parents 97a16ac7f8dd
children dcd4562389bd
line wrap: on
line diff
--- a/gui/ui/main.c	Sun Mar 16 13:30:18 2014 +0000
+++ b/gui/ui/main.c	Mon Mar 17 12:29:46 2014 +0000
@@ -146,7 +146,6 @@
           value=0;
           switch( itemtype )
            {
-            case itPotmeter:
             case itHPotmeter:
                  btnModify( item->message,100.0 * ( X - item->x ) / item->width );
 		 uiEvent( item->message,item->value );
@@ -173,7 +172,7 @@
           if (currentselected != - 1)
            {
             item=&guiApp.mainItems[currentselected];
-            if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter )||( item->type == itPotmeter ) )
+            if ( ( item->type == itHPotmeter )||( item->type == itVPotmeter ) )
              {
               item->value+=value;
               btnModify( item->message,item->value );
@@ -196,7 +195,6 @@
             case itVPotmeter:
                  item->value=100.0 - 100.0 * ( Y - item->y ) / item->height;
                  goto potihandled;
-            case itPotmeter:
             case itHPotmeter:
                  item->value=100.0 * ( X - item->x ) / item->width;
 potihandled: