]> git.sesse.net Git - vlc/blobdiff - modules/gui/macosx/prefs_widgets.m
* finally use the iTunes volumeslider knob that we have had since 0.7.0 but which...
[vlc] / modules / gui / macosx / prefs_widgets.m
index 0ff2465190e61f7fb4a6e39436bc7dda65d2f00c..559ac0b1ada00e58599ecfff1a57794e522facc4 100644 (file)
@@ -1,7 +1,7 @@
 /*****************************************************************************
  * prefs_widgets.m: Preferences controls
  *****************************************************************************
- * Copyright (C) 2002-2003 VideoLAN (Centrale Réseaux) and its contributors
+ * Copyright (C) 2002-2003 the VideoLAN team
  * $Id$
  *
  * Authors: Derk-Jan Hartman <hartman at videolan.org>
@@ -981,6 +981,12 @@ if( MACOS_VERSION >= 10.3 )                                                 \
 {
     return [o_label frame].size.width;
 }
+
+- (void) alignWithXPosition:(int)i_xPos;
+{
+    /* FIXME: not implemented atm, but created to shut up the warning
+     * about "method definition not found" -- FK @ 7/24/05 */
+}
 @end
 
 @implementation StringConfigControl
@@ -1930,39 +1936,27 @@ if( MACOS_VERSION >= 10.3 )                                                 \
     {
         i_view_type = CONFIG_ITEM_BOOL;
 
+        /* add the checkbox */
+        o_tooltip = [[VLCMain sharedInstance]
+            wrapString: [[VLCMain sharedInstance]
+            localizedString: p_item->psz_longtext ] toWidth: PREFS_WRAP];
+        ADD_CHECKBOX( o_checkbox, mainFrame, 0,
+                        0, @"", o_tooltip, p_item->i_value, NSImageLeft)
+        [o_checkbox setAutoresizingMask:NSViewNotSizable ];
+        [self addSubview: o_checkbox];
         /* add the label */
         if( p_item->psz_text )
             o_labelString = [[VLCMain sharedInstance]
                                 localizedString: p_item->psz_text];
         else
             o_labelString = [NSString stringWithString:@""];
-        ADD_LABEL( o_label, mainFrame, 0, 0, o_labelString )
+        ADD_LABEL( o_label, mainFrame, [o_checkbox frame].size.width, 0, o_labelString )
         [o_label setAutoresizingMask:NSViewNotSizable ];
         [self addSubview: o_label];
-        /* add the checkbox */
-        o_tooltip = [[VLCMain sharedInstance]
-            wrapString: [[VLCMain sharedInstance]
-            localizedString: p_item->psz_longtext ] toWidth: PREFS_WRAP];
-        ADD_CHECKBOX( o_checkbox, mainFrame, [o_label frame].size.width,
-                        0, @"", o_tooltip, p_item->i_value, NSImageLeft)
-        [o_checkbox setAutoresizingMask:NSViewNotSizable ];
-        [self addSubview: o_checkbox];
     }
     return self;
 }
 
-- (void) alignWithXPosition:(int)i_xPos
-{
-    NSRect frame;
-    frame = [o_label frame];
-    frame.origin.x = i_xPos - frame.size.width - 3;
-    [o_label setFrame:frame];
-
-    frame = [o_checkbox frame];
-    frame.origin.x = i_xPos;
-    [o_checkbox setFrame:frame];
-}
-
 - (void)dealloc
 {
     [o_checkbox release];
@@ -2119,7 +2113,7 @@ if( MACOS_VERSION >= 10.3 )                                                 \
     i_new_key |= ([o_shift_checkbox state] == NSOnState) ?
         KEY_MODIFIER_SHIFT : 0;
 
-    i_new_key |= StringToKey([[[o_popup selectedItem] title] cString]);
+    i_new_key |= StringToKey((char *)[[[o_popup selectedItem] title] cString]);
     return i_new_key;
 }
 @end