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
ec401825
Commit
ec401825
authored
Mar 24, 2008
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
implemented the display device selector.
Neeeeds testing on multi-screen setups!
parent
8679868f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
6 deletions
+23
-6
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+23
-6
No files found.
modules/gui/macosx/simple_prefs.m
View file @
ec401825
...
@@ -24,6 +24,7 @@
...
@@ -24,6 +24,7 @@
#import "simple_prefs.h"
#import "simple_prefs.h"
#import "prefs.h"
#import "prefs.h"
#import <vlc_keys.h>
#import <vlc_keys.h>
#import "misc.h"
static
NSString
*
VLCSPrefsToolbarIdentifier
=
@"Our Simple Preferences Toolbar Identifier"
;
static
NSString
*
VLCSPrefsToolbarIdentifier
=
@"Our Simple Preferences Toolbar Identifier"
;
static
NSString
*
VLCIntfSettingToolbarIdentifier
=
@"Intf Settings Item Identifier"
;
static
NSString
*
VLCIntfSettingToolbarIdentifier
=
@"Intf Settings Item Identifier"
;
...
@@ -312,7 +313,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
...
@@ -312,7 +313,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
int
i
,
y
=
0
;
int
i
,
y
=
0
;
char
*
psz_tmp
;
char
*
psz_tmp
;
#define SetupIntList( object, name ) \
#define SetupIntList( object, name ) \
[object removeAllItems]; \
[object removeAllItems]; \
p_item = config_FindConfig( VLC_OBJECT(p_intf), name ); \
p_item = config_FindConfig( VLC_OBJECT(p_intf), name ); \
for( i = 0; i < p_item->i_list; i++ ) \
for( i = 0; i < p_item->i_list; i++ ) \
...
@@ -328,7 +329,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
...
@@ -328,7 +329,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
[object selectItemAtIndex: 0]; \
[object selectItemAtIndex: 0]; \
[object setToolTip: _NS( p_item->psz_longtext )]
[object setToolTip: _NS( p_item->psz_longtext )]
#define SetupStringList( object, name ) \
#define SetupStringList( object, name ) \
[object removeAllItems]; \
[object removeAllItems]; \
y = 0; \
y = 0; \
p_item = config_FindConfig( VLC_OBJECT(p_intf), name ); \
p_item = config_FindConfig( VLC_OBJECT(p_intf), name ); \
...
@@ -341,7 +342,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
...
@@ -341,7 +342,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
[object selectItemAtIndex: y]; \
[object selectItemAtIndex: y]; \
[object setToolTip: _NS( p_item->psz_longtext )]
[object setToolTip: _NS( p_item->psz_longtext )]
#define SetupModuleList( object, name ) \
#define SetupModuleList( object, name ) \
p_item = config_FindConfig( VLC_OBJECT(p_intf), name ); \
p_item = config_FindConfig( VLC_OBJECT(p_intf), name ); \
p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE ); \
p_list = vlc_list_find( p_intf, VLC_OBJECT_MODULE, FIND_ANYWHERE ); \
[object removeAllItems]; \
[object removeAllItems]; \
...
@@ -404,6 +405,8 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
...
@@ -404,6 +405,8 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
else
else
[
o_audio_last_ckb
setState
:
NSOffState
];
[
o_audio_last_ckb
setState
:
NSOffState
];
}
}
else
[
o_audio_last_ckb
setEnabled
:
NO
];
/******************
/******************
* video settings *
* video settings *
...
@@ -416,8 +419,22 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
...
@@ -416,8 +419,22 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
SetupModuleList
(
o_video_output_pop
,
"vout"
);
SetupModuleList
(
o_video_output_pop
,
"vout"
);
msg_Warn
(
p_intf
,
"display device selector not implemented!"
);
[
o_video_device_pop
removeAllItems
];
[
o_video_device_pop
removeAllItems
];
i
=
0
;
y
=
[[
NSScreen
screens
]
count
];
[
o_video_device_pop
addItemWithTitle
:
_NS
(
"Default"
)];
[[
o_video_device_pop
lastItem
]
setTag
:
0
];
while
(
i
<
y
)
{
NSRect
s_rect
=
[[[
NSScreen
screens
]
objectAtIndex
:
i
]
frame
];
[
o_video_device_pop
addItemWithTitle
:
[
NSString
stringWithFormat
:
@"%@ %i (%ix%i)"
,
_NS
(
"Screen"
),
i
+
1
,
(
int
)
s_rect
.
size
.
width
,
(
int
)
s_rect
.
size
.
height
]];
[[
o_video_device_pop
lastItem
]
setTag
:
[[[
NSScreen
screens
]
objectAtIndex
:
i
]
displayID
]];
i
++
;
}
[
o_video_device_pop
selectItemAtIndex
:
0
];
[
o_video_device_pop
selectItemWithTag
:
config_GetInt
(
p_intf
,
"macosx-vdev"
)];
if
(
config_GetPsz
(
p_intf
,
"snapshot-path"
)
!=
NULL
)
if
(
config_GetPsz
(
p_intf
,
"snapshot-path"
)
!=
NULL
)
[
o_video_snap_folder_fld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"snapshot-path"
)]];
[
o_video_snap_folder_fld
setStringValue
:
[
NSString
stringWithUTF8String
:
config_GetPsz
(
p_intf
,
"snapshot-path"
)]];
...
@@ -642,7 +659,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
...
@@ -642,7 +659,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
} \
} \
vlc_list_release( p_list ); \
vlc_list_release( p_list ); \
if( [[[object selectedItem] title] isEqualToString: _NS( "Default" )] ) \
if( [[[object selectedItem] title] isEqualToString: _NS( "Default" )] ) \
config_PutPsz( p_intf, name, "
Default
" )
config_PutPsz( p_intf, name, "" )
/**********************
/**********************
* interface settings *
* interface settings *
...
@@ -740,7 +757,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
...
@@ -740,7 +757,7 @@ static VLCSimplePrefs *_o_sharedInstance = nil;
config_PutInt
(
p_intf
,
"macosx-black"
,
[
o_video_black_ckb
state
]
);
config_PutInt
(
p_intf
,
"macosx-black"
,
[
o_video_black_ckb
state
]
);
SaveModuleList
(
o_video_output_pop
,
"vout"
);
SaveModuleList
(
o_video_output_pop
,
"vout"
);
msg_Warn
(
p_intf
,
"display device selector not implemented!"
);
config_PutInt
(
p_intf
,
"macosx-vdev"
,
[[
o_video_device_pop
selectedItem
]
tag
]
);
config_PutPsz
(
p_intf
,
"snapshot-path"
,
[[
o_video_snap_folder_fld
stringValue
]
UTF8String
]
);
config_PutPsz
(
p_intf
,
"snapshot-path"
,
[[
o_video_snap_folder_fld
stringValue
]
UTF8String
]
);
config_PutPsz
(
p_intf
,
"snapshot-prefix"
,
[[
o_video_snap_prefix_fld
stringValue
]
UTF8String
]
);
config_PutPsz
(
p_intf
,
"snapshot-prefix"
,
[[
o_video_snap_prefix_fld
stringValue
]
UTF8String
]
);
...
...
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