[vlc-commits] macosx: fixed prefs compilation and fixed an appearance issue

Felix Paul Kühne git at videolan.org
Mon Jul 4 01:33:57 CEST 2011


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Mon Jul  4 01:33:47 2011 +0200| [940a60aae40b3acec7700c3ef5d59cd3929feb39] | committer: Felix Paul Kühne

macosx: fixed prefs compilation and fixed an appearance issue

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=940a60aae40b3acec7700c3ef5d59cd3929feb39
---

 modules/gui/macosx/prefs_widgets.h |    6 ++----
 modules/gui/macosx/prefs_widgets.m |   26 +++++++++++++-------------
 2 files changed, 15 insertions(+), 17 deletions(-)

diff --git a/modules/gui/macosx/prefs_widgets.h b/modules/gui/macosx/prefs_widgets.h
index 8d44a77..a146747 100644
--- a/modules/gui/macosx/prefs_widgets.h
+++ b/modules/gui/macosx/prefs_widgets.h
@@ -21,9 +21,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#define CONFIG_ITEM_STRING_LIST (CONFIG_ITEM_STRING + 1)
-#define CONFIG_ITEM_RANGED_INTEGER (CONFIG_ITEM_INTEGER + 1)
-#define CONFIG_ITEM_KEY_AFTER_10_3 (CONFIG_ITEM_KEY + 2)
+#define CONFIG_ITEM_STRING_LIST (CONFIG_ITEM_STRING + 10)
+#define CONFIG_ITEM_RANGED_INTEGER (CONFIG_ITEM_INTEGER + 10)
 #define LEFTMARGIN  18
 #define RIGHTMARGIN 18
 
@@ -208,5 +207,4 @@ static NSMenu   *o_keys_menu = nil;
 
 //#undef CONFIG_ITEM_LIST_STRING
 //#undef CONFIG_ITEM_RANGED_INTEGER
-//#undef CONFIG_ITEM_KEY_AFTER_10_3
 
diff --git a/modules/gui/macosx/prefs_widgets.m b/modules/gui/macosx/prefs_widgets.m
index 7bfc124..7d9d68e 100644
--- a/modules/gui/macosx/prefs_widgets.m
+++ b/modules/gui/macosx/prefs_widgets.m
@@ -469,7 +469,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         case CONFIG_ITEM_BOOL:
             i_margin = 7;
             break;
-        case CONFIG_ITEM_KEY_AFTER_10_3:
+        case CONFIG_ITEM_KEY:
             i_margin = 6;
             break;
         case CONFIG_ITEM_MODULE_LIST:
@@ -506,7 +506,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         case CONFIG_ITEM_BOOL:
             i_margin = 7;
             break;
-        case CONFIG_ITEM_KEY_AFTER_10_3:
+        case CONFIG_ITEM_KEY:
             i_margin = 6;
             break;
         case CONFIG_ITEM_MODULE_LIST:
@@ -544,7 +544,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         case CONFIG_ITEM_BOOL:
             i_margin = 10;
             break;
-        case CONFIG_ITEM_KEY_AFTER_10_3:
+        case CONFIG_ITEM_KEY:
             i_margin = 9;
             break;
         case CONFIG_ITEM_MODULE_LIST:
@@ -581,7 +581,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         case CONFIG_ITEM_BOOL:
             i_margin = 8;
             break;
-        case CONFIG_ITEM_KEY_AFTER_10_3:
+        case CONFIG_ITEM_KEY:
             i_margin = 7;
             break;
         case CONFIG_ITEM_MODULE_LIST:
@@ -618,7 +618,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         case CONFIG_ITEM_BOOL:
             i_margin = 7;
             break;
-        case CONFIG_ITEM_KEY_AFTER_10_3:
+        case CONFIG_ITEM_KEY:
             i_margin = 6;
             break;
         case CONFIG_ITEM_MODULE_LIST:
@@ -655,7 +655,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         case CONFIG_ITEM_BOOL:
             i_margin = 7;
             break;
-        case CONFIG_ITEM_KEY_AFTER_10_3:
+        case CONFIG_ITEM_KEY:
             i_margin = 6;
             break;
         case CONFIG_ITEM_MODULE_LIST:
@@ -692,7 +692,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         case CONFIG_ITEM_BOOL:
             i_margin = 7;
             break;
-        case CONFIG_ITEM_KEY_AFTER_10_3:
+        case CONFIG_ITEM_KEY:
             i_margin = 5;
             break;
         case CONFIG_ITEM_MODULE_LIST:
@@ -703,7 +703,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
             break;
         }
         break;
-    case CONFIG_ITEM_KEY_AFTER_10_3:
+    case CONFIG_ITEM_KEY:
         switch( i_lastItem )
         {
         case CONFIG_ITEM_STRING:
@@ -729,7 +729,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         case CONFIG_ITEM_BOOL:
             i_margin = 7;
             break;
-        case CONFIG_ITEM_KEY_AFTER_10_3:
+        case CONFIG_ITEM_KEY:
             i_margin = 8;
             break;
         case CONFIG_ITEM_MODULE_LIST:
@@ -766,7 +766,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
         case CONFIG_ITEM_BOOL:
             i_margin = 7;
             break;
-        case CONFIG_ITEM_KEY_AFTER_10_3:
+        case CONFIG_ITEM_KEY:
             i_margin = 5;
             break;
         case CONFIG_ITEM_MODULE_LIST:
@@ -826,7 +826,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
                         initWithItem: _p_item
                         withView: o_parent_view];
         }
-        else if( _p_item->min.i != 0 || _p_item->max.i != 0 )
+        else if( (_p_item->min.i != 0 || _p_item->max.i != 0) && (_p_item->min.i != INT_MIN || _p_item->max.i != INT_MAX) )
         {
             p_control = [[RangedIntegerConfigControl alloc]
                         initWithItem: _p_item
@@ -845,7 +845,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
                     withView: o_parent_view];
         break;
     case CONFIG_ITEM_FLOAT:
-        if( _p_item->min.f != 0 || _p_item->max.f != 0 )
+        if( (_p_item->min.i != 0 || _p_item->max.i != 0) && (_p_item->min.i != INT_MIN || _p_item->max.i != INT_MAX) )
         {
             p_control = [[RangedFloatConfigControl alloc]
                         initWithItem: _p_item
@@ -2073,7 +2073,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain];       \
 
     if( [super initWithFrame: mainFrame item: _p_item] != nil )
     {
-        i_view_type = CONFIG_ITEM_KEY_AFTER_10_3;
+        i_view_type = CONFIG_ITEM_KEY;
 
         o_tooltip = [[VLCMain sharedInstance] wrapString:
                      [[VLCMain sharedInstance]



More information about the vlc-commits mailing list