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
7b21794c
Commit
7b21794c
authored
Aug 24, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: split StringUtility from VLCMain and move it to a separate class where it belongs
parent
a16d7de0
Changes
9
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
406 additions
and
313 deletions
+406
-313
extras/package/macosx/vlc.xcodeproj/project.pbxproj
extras/package/macosx/vlc.xcodeproj/project.pbxproj
+4
-0
modules/gui/macosx/MainMenu.m
modules/gui/macosx/MainMenu.m
+33
-33
modules/gui/macosx/MainWindow.m
modules/gui/macosx/MainWindow.m
+2
-2
modules/gui/macosx/Modules.am
modules/gui/macosx/Modules.am
+2
-0
modules/gui/macosx/StringUtility.h
modules/gui/macosx/StringUtility.h
+46
-0
modules/gui/macosx/StringUtility.m
modules/gui/macosx/StringUtility.m
+299
-0
modules/gui/macosx/intf.h
modules/gui/macosx/intf.h
+2
-13
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+3
-249
modules/gui/macosx/prefs_widgets.m
modules/gui/macosx/prefs_widgets.m
+15
-16
No files found.
extras/package/macosx/vlc.xcodeproj/project.pbxproj
View file @
7b21794c
...
...
@@ -657,6 +657,8 @@
CC206B6B14AD0A5D007935C6
/* window-fullscreen-on.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
name
=
"window-fullscreen-on.png"
;
path
=
"Resources/mainwindow_dark/window-fullscreen-on.png"
;
sourceTree
=
"<group>"
;
};
CC206B6C14AD0A5D007935C6
/* window-fullscreen-over.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
name
=
"window-fullscreen-over.png"
;
path
=
"Resources/mainwindow_dark/window-fullscreen-over.png"
;
sourceTree
=
"<group>"
;
};
CC206B6D14AD0A5D007935C6
/* window-fullscreen.png */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
image.png
;
name
=
"window-fullscreen.png"
;
path
=
"Resources/mainwindow_dark/window-fullscreen.png"
;
sourceTree
=
"<group>"
;
};
CC269A4615E7947F00F2FDC9
/* StringUtility.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
name
=
StringUtility.h
;
path
=
../../../modules/gui/macosx/StringUtility.h
;
sourceTree
=
"<group>"
;
};
CC269A4715E7947F00F2FDC9
/* StringUtility.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
name
=
StringUtility.m
;
path
=
../../../modules/gui/macosx/StringUtility.m
;
sourceTree
=
"<group>"
;
};
CC3DC89B0A7CDB9600B53F32
/* ApplicationServices.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
ApplicationServices.framework
;
path
=
/System/Library/Frameworks/ApplicationServices.framework
;
sourceTree
=
"<absolute>"
;
};
CC3F9F851350B2A000B0E885
/* Growl.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
Growl.framework
;
path
=
../../../contrib/Growl.framework
;
sourceTree
=
"<absolute>"
;
};
CC402F4B0E00ABBB006A4BA4
/* VLC.bundle */
=
{
isa
=
PBXFileReference
;
explicitFileType
=
wrapper.cfbundle
;
includeInIndex
=
0
;
path
=
VLC.bundle
;
sourceTree
=
BUILT_PRODUCTS_DIR
;
};
...
...
@@ -1018,6 +1020,8 @@
CCCE366E13817E4500694F2A
/* VideoEffects.m */
,
CC0663341566C34C003A411C
/* ConvertAndSave.h */
,
CC0663351566C34C003A411C
/* ConvertAndSave.m */
,
CC269A4615E7947F00F2FDC9
/* StringUtility.h */
,
CC269A4715E7947F00F2FDC9
/* StringUtility.m */
,
CC017A0E14A4C8B600C09A4F
/* custom UI code */
,
CC0CD0E513DE0FC600B0D90D
/* Imported Code */
,
);
...
...
modules/gui/macosx/MainMenu.m
View file @
7b21794c
...
...
@@ -128,7 +128,7 @@ static VLCMainMenu *_o_sharedInstance = nil;
NSString
*
o_key
;
playlist_t
*
p_playlist
;
vlc_value_t
val
;
id
o_vlc
main
=
[
VLCMain
sharedInstance
];
id
o_vlc
stringutility
=
[
VLCStringUtility
sharedInstance
];
char
*
key
;
/* Check if we already did this once. Opening the other nibs calls it too,
...
...
@@ -143,98 +143,98 @@ static VLCMainMenu *_o_sharedInstance = nil;
key
=
config_GetPsz
(
p_intf
,
"key-quit"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_quit
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_quit
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_quit
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_quit
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-play-pause"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_play
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_play
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_play
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_play
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-stop"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_stop
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_stop
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_stop
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_stop
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-prev"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_previous
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_previous
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_previous
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_previous
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-next"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_next
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_next
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_next
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_next
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-jump+short"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_fwd
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_fwd
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_fwd
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_fwd
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-jump-short"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_bwd
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_bwd
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_bwd
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_bwd
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-vol-up"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_vol_up
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_vol_up
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_vol_up
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_vol_up
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-vol-down"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_vol_down
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_vol_down
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_vol_down
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_vol_down
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-vol-mute"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_mute
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_mute
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_mute
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_mute
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-toggle-fullscreen"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_fullscreen
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_fullscreen
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_fullscreen
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_fullscreen
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-snapshot"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_snapshot
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_snapshot
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_snapshot
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_snapshot
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-random"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_random
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_random
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_random
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_random
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-zoom-half"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_half_window
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_half_window
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_half_window
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_half_window
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-zoom-original"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_normal_window
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_normal_window
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_normal_window
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_normal_window
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
key
=
config_GetPsz
(
p_intf
,
"key-zoom-double"
);
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
[
o_mi_double_window
setKeyEquivalent
:
[
o_vlc
main
VLCKeyToString
:
o_key
]];
[
o_mi_double_window
setKeyEquivalentModifierMask
:
[
o_vlc
main
VLCModifiersToCocoa
:
o_key
]];
[
o_mi_double_window
setKeyEquivalent
:
[
o_vlc
stringutility
VLCKeyToString
:
o_key
]];
[
o_mi_double_window
setKeyEquivalentModifierMask
:
[
o_vlc
stringutility
VLCModifiersToCocoa
:
o_key
]];
FREENULL
(
key
);
[
self
setSubmenusEnabled
:
FALSE
];
...
...
modules/gui/macosx/MainWindow.m
View file @
7b21794c
...
...
@@ -131,11 +131,11 @@ static VLCMainWindow *_o_sharedInstance = nil;
o_key
=
[
NSString
stringWithFormat
:
@"%s"
,
key
];
FREENULL
(
key
);
unsigned
int
i_keyModifiers
=
[[
VLC
Main
sharedInstance
]
VLCModifiersToCocoa
:
o_key
];
unsigned
int
i_keyModifiers
=
[[
VLC
StringUtility
sharedInstance
]
VLCModifiersToCocoa
:
o_key
];
NSString
*
characters
=
[
o_event
charactersIgnoringModifiers
];
if
([
characters
length
]
>
0
)
{
return
[[
characters
lowercaseString
]
isEqualToString
:
[[
VLC
Main
sharedInstance
]
VLCKeyToString
:
o_key
]]
&&
return
[[
characters
lowercaseString
]
isEqualToString
:
[[
VLC
StringUtility
sharedInstance
]
VLCKeyToString
:
o_key
]]
&&
(
i_keyModifiers
&
NSShiftKeyMask
)
==
([
o_event
modifierFlags
]
&
NSShiftKeyMask
)
&&
(
i_keyModifiers
&
NSControlKeyMask
)
==
([
o_event
modifierFlags
]
&
NSControlKeyMask
)
&&
(
i_keyModifiers
&
NSAlternateKeyMask
)
==
([
o_event
modifierFlags
]
&
NSAlternateKeyMask
)
&&
...
...
modules/gui/macosx/Modules.am
View file @
7b21794c
...
...
@@ -5,6 +5,8 @@ LIBTOOL=@LIBTOOL@ --tag=CC
SOURCES_macosx = \
CompatibilityFixes.h \
StringUtility.h \
StringUtility.m \
AppleRemote.h \
AppleRemote.m \
SPInvocationGrabbing.h \
...
...
modules/gui/macosx/StringUtility.h
0 → 100644
View file @
7b21794c
/*****************************************************************************
* StringUtility.h: MacOS X interface module
*****************************************************************************
* Copyright (C) 2002-2012 VLC authors and VideoLAN
* $Id$
*
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
* Derk-Jan Hartman <hartman at videolan dot org>
* Felix Paul Kühne <fkuehne at videolan dot org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#import <Cocoa/Cocoa.h>
#define _NS(s) [[VLCStringUtility sharedInstance] localizedString: s]
/* Get an alternate version of the string.
* This string is stored as '1:string' but when displayed it only displays
* the translated string. the translation should be '1:translatedstring' though */
#define _ANS(s) [[[VLCStringUtility sharedInstance] localizedString: _(s)] substringFromIndex:2]
@interface
VLCStringUtility
:
NSObject
+
(
VLCStringUtility
*
)
sharedInstance
;
-
(
NSString
*
)
localizedString
:(
const
char
*
)
psz
;
-
(
char
*
)
delocalizeString
:(
NSString
*
)
psz
;
-
(
NSString
*
)
wrapString
:
(
NSString
*
)
o_in_string
toWidth
:
(
int
)
i_width
;
-
(
NSString
*
)
VLCKeyToString
:(
NSString
*
)
theString
;
-
(
unsigned
int
)
VLCModifiersToCocoa
:(
NSString
*
)
theString
;
@end
modules/gui/macosx/StringUtility.m
0 → 100644
View file @
7b21794c
This diff is collapsed.
Click to expand it.
modules/gui/macosx/intf.h
View file @
7b21794c
...
...
@@ -40,6 +40,7 @@
#import "SPMediaKeyTap.h"
/* for the media key support */
#import "misc.h"
#import "MainWindow.h"
#import "StringUtility.h"
#import <IOKit/pwr_mgt/IOPMLib.h>
/* for sleep prevention */
...
...
@@ -50,13 +51,6 @@ unsigned int CocoaKeyToVLC( unichar i_key );
#define VLCIntf [[VLCMain sharedInstance] intf]
#define _NS(s) [[VLCMain sharedInstance] localizedString: s]
/* Get an alternate version of the string.
* This string is stored as '1:string' but when displayed it only displays
* the translated string. the translation should be '1:translatedstring' though */
#define _ANS(s) [[[VLCMain sharedInstance] localizedString: _(s)] substringFromIndex:2]
// You need to release those objects after use
input_thread_t
*
getInput
(
void
);
vout_thread_t
*
getVout
(
void
);
...
...
@@ -175,14 +169,9 @@ struct intf_sys_t
-
(
void
)
setActiveVideoPlayback
:(
BOOL
)
b_value
;
-
(
BOOL
)
activeVideoPlayback
;
-
(
void
)
applicationWillTerminate
:(
NSNotification
*
)
notification
;
-
(
NSString
*
)
localizedString
:(
const
char
*
)
psz
;
-
(
char
*
)
delocalizeString
:(
NSString
*
)
psz
;
-
(
NSString
*
)
wrapString
:
(
NSString
*
)
o_in_string
toWidth
:
(
int
)
i_width
;
-
(
BOOL
)
hasDefinedShortcutKey
:(
NSEvent
*
)
o_event
force
:(
BOOL
)
b_force
;
-
(
NSString
*
)
VLCKeyToString
:(
NSString
*
)
theString
;
-
(
unsigned
int
)
VLCModifiersToCocoa
:(
NSString
*
)
theString
;
-
(
void
)
updateCurrentlyUsedHotkeys
;
-
(
void
)
fullscreenChanged
;
-
(
BOOL
)
hasDefinedShortcutKey
:(
NSEvent
*
)
o_event
force
:(
BOOL
)
b_force
;
-
(
void
)
checkFullscreenChange
:(
NSNumber
*
)
o_full
;
-
(
void
)
PlaylistItemChanged
;
-
(
void
)
playbackStatusUpdated
;
...
...
modules/gui/macosx/intf.m
View file @
7b21794c
This diff is collapsed.
Click to expand it.
modules/gui/macosx/prefs_widgets.m
View file @
7b21794c
...
...
@@ -977,7 +977,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
else
i_view_type
=
CONFIG_ITEM_STRING
;
o_textfieldTooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_textfieldTooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
...
...
@@ -1034,7 +1034,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
-
(
char
*
)
stringValue
{
return
[[
VLC
Main
sharedInstance
]
delocalizeString
:
return
[[
VLC
StringUtility
sharedInstance
]
delocalizeString
:
[
o_textfield
stringValue
]];
}
...
...
@@ -1067,7 +1067,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
int
i_index
;
i_view_type
=
CONFIG_ITEM_STRING_LIST
;
o_textfieldTooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
(
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_textfieldTooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
(
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
...
...
@@ -1121,8 +1121,8 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
if
(
p_item
->
list
.
psz
[[
o_combo
indexOfSelectedItem
]]
!=
NULL
)
return
strdup
(
p_item
->
list
.
psz
[[
o_combo
indexOfSelectedItem
]]
);
}
else
{
if
(
[[
VLC
Main
sharedInstance
]
delocalizeString
:
[
o_combo
stringValue
]]
!=
NULL
)
return
strdup
(
[[
VLC
Main
sharedInstance
]
delocalizeString
:
[
o_combo
stringValue
]]
);
if
(
[[
VLC
StringUtility
sharedInstance
]
delocalizeString
:
[
o_combo
stringValue
]]
!=
NULL
)
return
strdup
(
[[
VLC
StringUtility
sharedInstance
]
delocalizeString
:
[
o_combo
stringValue
]]
);
}
return
NULL
;
}
...
...
@@ -1178,8 +1178,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{
i_view_type
=
CONFIG_ITEM_LOADFILE
;
o_itemTooltip
=
[[
VLCMain
sharedInstance
]
wrapString:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_itemTooltip
=
[[
VLCStringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* is it a directory */
b_directory
=
(
[
self
type
]
==
CONFIG_ITEM_DIRECTORY
)
?
YES
:
NO
;
...
...
@@ -1281,7 +1280,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{
i_view_type
=
CONFIG_ITEM_MODULE
;
o_popupTooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_popupTooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
...
...
@@ -1451,7 +1450,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{
i_view_type
=
CONFIG_ITEM_INTEGER
;
o_tooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_tooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
...
...
@@ -1546,7 +1545,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
int
i_index
;
i_view_type
=
CONFIG_ITEM_STRING_LIST
;
o_textfieldTooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_textfieldTooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
...
...
@@ -1646,7 +1645,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{
i_view_type
=
CONFIG_ITEM_RANGED_INTEGER
;
o_tooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_tooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
...
...
@@ -1762,7 +1761,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{
i_view_type
=
CONFIG_ITEM_INTEGER
;
o_tooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_tooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
...
...
@@ -1855,7 +1854,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{
i_view_type
=
CONFIG_ITEM_RANGED_INTEGER
;
o_tooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_tooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
...
...
@@ -1972,7 +1971,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
i_view_type
=
CONFIG_ITEM_BOOL
;
/* add the checkbox */
o_tooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_tooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
ADD_CHECKBOX
(
o_checkbox
,
mainFrame
,
0
,
0
,
@""
,
o_tooltip
,
p_item
->
value
.
i
,
NSImageLeft
)
[
o_checkbox
setAutoresizingMask
:
NSViewNotSizable
];
...
...
@@ -2022,7 +2021,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{
i_view_type
=
CONFIG_ITEM_KEY
;
o_tooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_tooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
...
...
@@ -2159,7 +2158,7 @@ o_textfield = [[[NSSecureTextField alloc] initWithFrame: s_rc] retain]; \
{
i_view_type
=
CONFIG_ITEM_MODULE_LIST
;
o_tooltip
=
[[
VLC
Main
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
o_tooltip
=
[[
VLC
StringUtility
sharedInstance
]
wrapString
:
_NS
((
char
*
)
p_item
->
psz_longtext
)
toWidth
:
PREFS_WRAP
];
/* add the label */
if
(
p_item
->
psz_text
)
...
...
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