Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
35736da0
Commit
35736da0
authored
May 06, 2005
by
Jérome Decoodt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: remove useless code
parent
060244a8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
58 additions
and
233 deletions
+58
-233
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs.m
+18
-153
modules/gui/macosx/prefs_widgets.h
modules/gui/macosx/prefs_widgets.h
+14
-27
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/prefs_widgets.m
+26
-53
No files found.
modules/gui/macosx/prefs.m
View file @
35736da0
...
...
@@ -491,8 +491,6 @@ fprintf( stderr, "[%s] showView\n", [o_name UTF8String] );
}
p_item
=
p_parser
->
p_config
;
int
i
=
0
;
int
i_yPos
=
-
2
;
int
i_lastItem
=
0
;
p_item
=
p_parser
->
p_config
+
1
;
...
...
@@ -521,83 +519,20 @@ fprintf( stderr, "end of (sub)category\n" );
fprintf
(
stderr
,
"skipping hint usage
\n
"
);
break
;
default:
fprintf
(
stderr
,
"%s (%d)
is
"
,
p_item
->
psz_name
,
p_item
->
i_type
);
fprintf
(
stderr
,
"%s (%d)"
,
p_item
->
psz_name
,
p_item
->
i_type
);
{
VLCConfigControl
*
o_control
=
nil
;
int
i_widget
=
0
;
switch
(
p_item
->
i_type
)
o_control
=
[
VLCConfigControl
newControl
:
p_item
withView:
o_view
];
if
(
o_control
!=
nil
)
{
case
CONFIG_ITEM_STRING
:
fprintf
(
stderr
,
"CONFIG_ITEM_STRING"
);
if
(
!
p_item
->
i_list
)
i_widget
=
CONFIG_ITEM_STRING
;
else
i_widget
=
CONFIG_ITEM_STRING_LIST
;
break
;
case
CONFIG_ITEM_FILE
:
case
CONFIG_ITEM_DIRECTORY
:
fprintf
(
stderr
,
"CONFIG_ITEM_FILE"
);
i_widget
=
CONFIG_ITEM_FILE
;
break
;
case
CONFIG_ITEM_MODULE
:
case
CONFIG_ITEM_MODULE_CAT
:
fprintf
(
stderr
,
"CONFIG_ITEM_MODULE"
);
i_widget
=
CONFIG_ITEM_MODULE
;
break
;
case
CONFIG_ITEM_INTEGER
:
fprintf
(
stderr
,
"CONFIG_ITEM_INTEGER"
);
if
(
p_item
->
i_list
)
i_widget
=
CONFIG_ITEM_STRING_LIST
;
else
if
(
p_item
->
i_min
!=
0
||
p_item
->
i_max
!=
0
)
i_widget
=
CONFIG_ITEM_RANGED_INTEGER
;
else
i_widget
=
CONFIG_ITEM_INTEGER
;
break
;
case
CONFIG_ITEM_FLOAT
:
fprintf
(
stderr
,
"CONFIG_ITEM_FLOAT"
);
if
(
p_item
->
f_min
!=
0
||
p_item
->
f_max
!=
0
)
i_widget
=
CONFIG_ITEM_RANGED_INTEGER
;
else
i_widget
=
CONFIG_ITEM_INTEGER
;
break
;
case
CONFIG_ITEM_BOOL
:
fprintf
(
stderr
,
"CONFIG_ITEM_BOOL"
);
i_widget
=
CONFIG_ITEM_BOOL
;
break
;
case
CONFIG_ITEM_KEY
:
fprintf
(
stderr
,
"CONFIG_ITEM_KEY"
);
if
(
MACOS_VERSION
<
10
.
3
)
i_widget
=
CONFIG_ITEM_KEY_BEFORE_10_3
;
else
i_widget
=
CONFIG_ITEM_KEY_AFTER_10_3
;
break
;
case
CONFIG_ITEM_MODULE_LIST
:
case
CONFIG_ITEM_MODULE_LIST_CAT
:
fprintf
(
stderr
,
"CONFIG_ITEM_MODULE_LIST"
);
i_widget
=
CONFIG_ITEM_MODULE_LIST
;
break
;
default:
fprintf
(
stderr
,
"***UNKNOWN***"
);
}
if
(
i_widget
!=
0
)
{
i_yPos
+=
[
VLCConfigControl
calcVerticalMargin:
i_widget
lastItem
:
i_lastItem
];
o_control
=
[
VLCConfigControl
newControl
:
p_item
withView:
o_view
yOffset:
i_yPos
];
if
(
o_control
!=
nil
)
{
i_yPos
+=
[
o_control
frame
].
size
.
height
;
i_lastItem
=
i_widget
;
[
o_control
setAutoresizingMask
:
NSViewMaxYMargin
|
NSViewWidthSizable
];
[
o_subviews
addObject
:
o_control
];
}
[
o_control
setAutoresizingMask
:
NSViewMaxYMargin
|
NSViewWidthSizable
];
[
o_subviews
addObject
:
o_control
];
}
fprintf
(
stderr
,
"
\n
"
);
break
;
}
break
;
}
}
while
(
p_item
++->
i_type
!=
CONFIG_HINT_END
);
...
...
@@ -606,8 +541,6 @@ fprintf( stderr, "\n" );
else
{
int
i
=
0
;
int
i_yPos
=
-
2
;
int
i_lastItem
=
0
;
int
i_index
;
p_list
=
vlc_list_find
(
p_intf
,
VLC_OBJECT_MODULE
,
FIND_ANYWHERE
);
if
(
!
p_list
)
return
o_view
;
...
...
@@ -659,81 +592,17 @@ fprintf( stderr, "end of (sub)category\n" );
fprintf
(
stderr
,
"skipping hint usage
\n
"
);
break
;
default:
fprintf
(
stderr
,
"%s (%d)
is
"
,
p_item
->
psz_name
,
p_item
->
i_type
);
fprintf
(
stderr
,
"%s (%d)"
,
p_item
->
psz_name
,
p_item
->
i_type
);
{
VLCConfigControl
*
o_control
=
nil
;
int
i_widget
=
0
;
switch
(
p_item
->
i_type
)
o_control
=
[
VLCConfigControl
newControl
:
p_item
withView:
o_view
];
if
(
o_control
!=
nil
)
{
case
CONFIG_ITEM_STRING
:
fprintf
(
stderr
,
"CONFIG_ITEM_STRING"
);
if
(
!
p_item
->
i_list
)
i_widget
=
CONFIG_ITEM_STRING
;
else
i_widget
=
CONFIG_ITEM_STRING_LIST
;
break
;
case
CONFIG_ITEM_FILE
:
case
CONFIG_ITEM_DIRECTORY
:
fprintf
(
stderr
,
"CONFIG_ITEM_FILE"
);
i_widget
=
CONFIG_ITEM_FILE
;
break
;
case
CONFIG_ITEM_MODULE
:
case
CONFIG_ITEM_MODULE_CAT
:
fprintf
(
stderr
,
"CONFIG_ITEM_MODULE"
);
i_widget
=
CONFIG_ITEM_MODULE
;
break
;
case
CONFIG_ITEM_INTEGER
:
fprintf
(
stderr
,
"CONFIG_ITEM_INTEGER"
);
if
(
p_item
->
i_list
)
i_widget
=
CONFIG_ITEM_STRING_LIST
;
else
if
(
p_item
->
i_min
!=
0
||
p_item
->
i_max
!=
0
)
i_widget
=
CONFIG_ITEM_RANGED_INTEGER
;
else
i_widget
=
CONFIG_ITEM_INTEGER
;
break
;
case
CONFIG_ITEM_FLOAT
:
fprintf
(
stderr
,
"CONFIG_ITEM_FLOAT"
);
if
(
p_item
->
f_min
!=
0
||
p_item
->
f_max
!=
0
)
i_widget
=
CONFIG_ITEM_RANGED_INTEGER
;
else
i_widget
=
CONFIG_ITEM_INTEGER
;
break
;
case
CONFIG_ITEM_BOOL
:
fprintf
(
stderr
,
"CONFIG_ITEM_BOOL"
);
i_widget
=
CONFIG_ITEM_BOOL
;
break
;
case
CONFIG_ITEM_KEY
:
fprintf
(
stderr
,
"CONFIG_ITEM_KEY"
);
if
(
MACOS_VERSION
<
10
.
3
)
i_widget
=
CONFIG_ITEM_KEY_BEFORE_10_3
;
else
i_widget
=
CONFIG_ITEM_KEY_AFTER_10_3
;
break
;
case
CONFIG_ITEM_MODULE_LIST
:
case
CONFIG_ITEM_MODULE_LIST_CAT
:
fprintf
(
stderr
,
"CONFIG_ITEM_MODULE_LIST"
);
i_widget
=
CONFIG_ITEM_MODULE_LIST
;
break
;
default:
fprintf
(
stderr
,
"***UNKNOWN***"
);
}
if
(
i_widget
!=
0
)
{
i_yPos
+=
[
VLCConfigControl
calcVerticalMargin:
i_widget
lastItem
:
i_lastItem
];
o_control
=
[
VLCConfigControl
newControl
:
p_item
withView:
o_view
yOffset:
i_yPos
];
if
(
o_control
!=
nil
)
{
i_yPos
+=
[
o_control
frame
].
size
.
height
;
i_lastItem
=
i_widget
;
[
o_control
setAutoresizingMask
:
NSViewMaxYMargin
|
NSViewWidthSizable
];
[
o_subviews
addObject
:
o_control
];
}
[
o_control
setAutoresizingMask
:
NSViewMaxYMargin
|
NSViewWidthSizable
];
[
o_subviews
addObject
:
o_control
];
}
fprintf
(
stderr
,
"
\n
"
);
break
;
}
}
...
...
@@ -748,7 +617,7 @@ fprintf( stderr, "\n" );
if
(
o_view
!=
nil
)
{
int
i_lastItem
=
0
;
int
i_yPos
=
0
;
int
i_yPos
=
-
2
;
unsigned
int
i
;
for
(
i
=
0
;
i
<
[
o_subviews
count
]
;
i
++
)
{
...
...
@@ -763,8 +632,6 @@ fprintf( stderr, "\n" );
[
o_widget
setYPos
:
i_yPos
];
i_yPos
+=
[
o_widget
frame
].
size
.
height
;
i_lastItem
=
i_widget
;
[
o_widget
setAutoresizingMask
:
NSViewMaxYMargin
|
NSViewWidthSizable
];
[
o_view
addSubview
:
o_widget
];
}
...
...
@@ -777,12 +644,10 @@ fprintf( stderr, "\n" );
{
unsigned
int
i
;
if
(
o_subviews
!=
nil
)
{
//Item has been shown
fprintf
(
stderr
,
"[%s] applying changes
\n
"
,
[
o_name
cString
]);
//Item has been shown
for
(
i
=
0
;
i
<
[
o_subviews
count
]
;
i
++
)
[[
o_subviews
objectAtIndex
:
i
]
applyChanges
];
}
if
(
o_children
!=
IsALeafNode
)
for
(
i
=
0
;
i
<
[
o_children
count
]
;
i
++
)
[[
o_children
objectAtIndex
:
i
]
applyChanges
];
...
...
modules/gui/macosx/prefs_widgets.h
View file @
35736da0
...
...
@@ -40,7 +40,7 @@
}
+
(
VLCConfigControl
*
)
newControl
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
yOffset
:(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
-
(
id
)
initWithFrame
:
(
NSRect
)
frame
item
:
(
module_config_t
*
)
p_item
;
-
(
NSString
*
)
getName
;
-
(
int
)
getType
;
...
...
@@ -63,8 +63,7 @@ static NSMenu *o_keys_menu = nil;
}
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
@end
...
...
@@ -74,8 +73,7 @@ static NSMenu *o_keys_menu = nil;
}
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
@end
...
...
@@ -87,8 +85,7 @@ static NSMenu *o_keys_menu = nil;
}
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
-
(
IBAction
)
openFileDialog
:
(
id
)
sender
;
-
(
void
)
pathChosenInPanel
:(
NSOpenPanel
*
)
o_sheet
withReturn
:(
int
)
i_return_code
contextInfo
:(
void
*
)
o_context_info
;
...
...
@@ -101,8 +98,7 @@ static NSMenu *o_keys_menu = nil;
}
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
@end
...
...
@@ -114,8 +110,7 @@ static NSMenu *o_keys_menu = nil;
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
-
(
IBAction
)
stepperChanged
:(
id
)
sender
;
-
(
void
)
textfieldChanged
:(
NSNotification
*
)
o_notification
;
...
...
@@ -127,8 +122,7 @@ static NSMenu *o_keys_menu = nil;
}
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
@end
...
...
@@ -142,8 +136,7 @@ static NSMenu *o_keys_menu = nil;
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
-
(
IBAction
)
sliderChanged
:(
id
)
sender
;
-
(
void
)
textfieldChanged
:(
NSNotification
*
)
o_notification
;
...
...
@@ -155,8 +148,7 @@ static NSMenu *o_keys_menu = nil;
}
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
@end
...
...
@@ -168,8 +160,7 @@ static NSMenu *o_keys_menu = nil;
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
-
(
IBAction
)
stepperChanged
:(
id
)
sender
;
-
(
void
)
textfieldChanged
:(
NSNotification
*
)
o_notification
;
...
...
@@ -185,8 +176,7 @@ static NSMenu *o_keys_menu = nil;
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
-
(
IBAction
)
sliderChanged
:(
id
)
sender
;
-
(
void
)
textfieldChanged
:(
NSNotification
*
)
o_notification
;
...
...
@@ -202,8 +192,7 @@ static NSMenu *o_keys_menu = nil;
}
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
@end
...
...
@@ -213,8 +202,7 @@ static NSMenu *o_keys_menu = nil;
}
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
@end
...
...
@@ -226,8 +214,7 @@ static NSMenu *o_keys_menu = nil;
}
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
;
withView
:
(
NSView
*
)
o_parent_view
;
@end
...
...
modules/gui/macosx/prefs_widgets.m
View file @
35736da0
...
...
@@ -833,7 +833,6 @@ if( MACOS_VERSION >= 10.3 ) \
+
(
VLCConfigControl
*
)
newControl
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
yOffset
:(
int
)
i_yPos
{
VLCConfigControl
*
p_control
=
NULL
;
switch
(
_p_item
->
i_type
)
...
...
@@ -843,74 +842,64 @@ if( MACOS_VERSION >= 10.3 ) \
{
p_control
=
[[
StringConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
}
else
{
p_control
=
[[
StringListConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
}
break
;
case
CONFIG_ITEM_FILE
:
case
CONFIG_ITEM_DIRECTORY
:
p_control
=
[[
FileConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
break
;
case
CONFIG_ITEM_MODULE
:
case
CONFIG_ITEM_MODULE_CAT
:
p_control
=
[[
ModuleConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
break
;
case
CONFIG_ITEM_INTEGER
:
if
(
_p_item
->
i_list
)
{
p_control
=
[[
IntegerListConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
}
else
if
(
_p_item
->
i_min
!=
0
||
_p_item
->
i_max
!=
0
)
{
p_control
=
[[
RangedIntegerConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
}
else
{
p_control
=
[[
IntegerConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
}
break
;
case
CONFIG_ITEM_BOOL
:
p_control
=
[[
BoolConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
break
;
case
CONFIG_ITEM_FLOAT
:
if
(
_p_item
->
f_min
!=
0
||
_p_item
->
f_max
!=
0
)
{
p_control
=
[[
RangedFloatConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
}
else
{
p_control
=
[[
FloatConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
}
break
;
case
CONFIG_ITEM_KEY
:
...
...
@@ -918,23 +907,20 @@ if( MACOS_VERSION >= 10.3 ) \
{
p_control
=
[[
KeyConfigControlBefore103
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
}
else
{
p_control
=
[[
KeyConfigControlAfter103
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
}
break
;
case
CONFIG_ITEM_MODULE_LIST
:
case
CONFIG_ITEM_MODULE_LIST_CAT
:
p_control
=
[[
ModuleListConfigControl
alloc
]
initWithItem:
_p_item
withView:
o_parent_view
withVerticalOffset:
i_yPos
];
withView:
o_parent_view
];
break
;
default:
break
;
...
...
@@ -1012,14 +998,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation
StringConfigControl
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_textfieldString
,
*
o_textfieldTooltip
;
mainFrame
.
size
.
height
=
22
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1069,14 +1054,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation
StringListConfigControl
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_textfieldTooltip
;
mainFrame
.
size
.
height
=
22
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
+
1
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1144,7 +1128,6 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation
FileConfigControl
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_buttonTooltip
,
*
o_textfieldString
;
...
...
@@ -1152,7 +1135,7 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
mainFrame
.
size
.
height
=
46
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1248,14 +1231,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation
ModuleConfigControl
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_popupTooltip
;
mainFrame
.
size
.
height
=
22
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
+
1
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1398,14 +1380,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation
IntegerConfigControl
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_tooltip
,
*
o_textfieldString
;
mainFrame
.
size
.
height
=
23
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
+
1
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1480,14 +1461,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_textfieldTooltip
;
mainFrame
.
size
.
height
=
22
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
+
1
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1557,14 +1537,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation
RangedIntegerConfigControl
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_tooltip
;
mainFrame
.
size
.
height
=
50
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1655,14 +1634,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation
FloatConfigControl
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_tooltip
,
*
o_textfieldString
;
mainFrame
.
size
.
height
=
23
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
+
1
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1735,14 +1713,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation
RangedFloatConfigControl
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_tooltip
;
mainFrame
.
size
.
height
=
50
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1835,14 +1812,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_tooltip
;
mainFrame
.
size
.
height
=
17
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1882,14 +1858,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_tooltip
;
mainFrame
.
size
.
height
=
37
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
+
1
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -1997,14 +1972,13 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation
KeyConfigControlAfter103
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
NSRect
mainFrame
=
[
o_parent_view
frame
];
NSString
*
o_labelString
,
*
o_tooltip
;
mainFrame
.
size
.
height
=
22
;
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
+
1
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
...
...
@@ -2062,7 +2036,6 @@ fprintf( stderr, "Applying %f to %s\n" , [self floatValue], psz_name );
@implementation
ModuleListConfigControl
-
(
id
)
initWithItem
:
(
module_config_t
*
)
_p_item
withView
:
(
NSView
*
)
o_parent_view
withVerticalOffset
:
(
int
)
i_yPos
{
if
(
_p_item
->
i_type
==
CONFIG_ITEM_MODULE_LIST
)
//TODO....
...
...
@@ -2116,7 +2089,7 @@ if( _p_item->i_type == CONFIG_ITEM_MODULE_LIST )
mainFrame
.
size
.
height
=
30
+
18
*
[
o_modulearray
count
];
mainFrame
.
size
.
width
=
mainFrame
.
size
.
width
-
LEFTMARGIN
-
RIGHTMARGIN
;
mainFrame
.
origin
.
x
=
LEFTMARGIN
;
mainFrame
.
origin
.
y
=
i_yPos
;
mainFrame
.
origin
.
y
=
0
;
if
(
[
super
initWithFrame
:
mainFrame
item
:
_p_item
]
!=
nil
)
{
i_view_type
=
CONFIG_ITEM_MODULE_LIST
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment