Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
db29a57a
Commit
db29a57a
authored
Jul 15, 2011
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: simplified and re-arranged the Open dialog's file tab
parent
f61167e7
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
503 additions
and
147 deletions
+503
-147
extras/package/macosx/Resources/English.lproj/Open.nib/designable.nib
...ge/macosx/Resources/English.lproj/Open.nib/designable.nib
+451
-124
extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib
.../macosx/Resources/English.lproj/Open.nib/keyedobjects.nib
+0
-0
modules/gui/macosx/open.h
modules/gui/macosx/open.h
+8
-2
modules/gui/macosx/open.m
modules/gui/macosx/open.m
+44
-21
No files found.
extras/package/macosx/Resources/English.lproj/Open.nib/designable.nib
View file @
db29a57a
This diff is collapsed.
Click to expand it.
extras/package/macosx/Resources/English.lproj/Open.nib/keyedobjects.nib
View file @
db29a57a
No preview for this file type
modules/gui/macosx/open.h
View file @
db29a57a
...
@@ -47,12 +47,17 @@
...
@@ -47,12 +47,17 @@
IBOutlet
id
o_sout_options
;
IBOutlet
id
o_sout_options
;
/* open file */
/* open file */
IBOutlet
id
o_file_path
;
IBOutlet
id
o_file_name
;
IBOutlet
id
o_file_name_stub
;
IBOutlet
id
o_file_icon_well
;
IBOutlet
id
o_file_btn_browse
;
IBOutlet
id
o_file_btn_browse
;
IBOutlet
id
o_file_stream
;
IBOutlet
id
o_file_stream
;
IBOutlet
id
o_file_slave_ckbox
;
IBOutlet
id
o_file_slave_ckbox
;
IBOutlet
id
o_file_slave_select_btn
;
IBOutlet
id
o_file_slave_select_btn
;
IBOutlet
id
o_file_slave_filename_txt
;
IBOutlet
id
o_file_slave_filename_lbl
;
IBOutlet
id
o_file_slave_icon_well
;
IBOutlet
id
o_file_subtitles_filename_lbl
;
IBOutlet
id
o_file_subtitles_icon_well
;
/* open disc */
/* open disc */
IBOutlet
id
o_disc_icon_well
;
IBOutlet
id
o_disc_icon_well
;
...
@@ -207,6 +212,7 @@
...
@@ -207,6 +212,7 @@
id
o_currentOpticalMediaView
;
id
o_currentOpticalMediaView
;
NSMutableArray
*
o_opticalDevices
;
NSMutableArray
*
o_opticalDevices
;
NSMutableArray
*
o_specialMediaFolders
;
NSMutableArray
*
o_specialMediaFolders
;
NSString
*
o_file_path
;
id
o_currentCaptureView
;
id
o_currentCaptureView
;
NSString
*
o_file_slave_path
;
NSString
*
o_file_slave_path
;
NSString
*
o_mrl
;
NSString
*
o_mrl
;
...
...
modules/gui/macosx/open.m
View file @
db29a57a
...
@@ -113,11 +113,18 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -113,11 +113,18 @@ static VLCOpen *_o_sharedMainInstance = nil;
[[
o_tabview
tabViewItemAtIndex
:
2
]
setLabel
:
_NS
(
"Network"
)];
[[
o_tabview
tabViewItemAtIndex
:
2
]
setLabel
:
_NS
(
"Network"
)];
[[
o_tabview
tabViewItemAtIndex
:
3
]
setLabel
:
_NS
(
"Capture"
)];
[[
o_tabview
tabViewItemAtIndex
:
3
]
setLabel
:
_NS
(
"Capture"
)];
[
o_file_name
setStringValue
:
@""
];
[
o_file_name_stub
setStringValue
:
_NS
(
"Choose a file"
)];
[
o_file_icon_well
setImage
:
[
NSImage
imageNamed
:
@"generic"
]];
[
o_file_btn_browse
setTitle
:
_NS
(
"Browse..."
)];
[
o_file_btn_browse
setTitle
:
_NS
(
"Browse..."
)];
[
o_file_stream
setTitle
:
_NS
(
"Treat as a pipe rather than as a file"
)];
[
o_file_stream
setTitle
:
_NS
(
"Treat as a pipe rather than as a file"
)];
[
o_file_stream
setHidden
:
NO
];
[
o_file_slave_ckbox
setTitle
:
_NS
(
"Play another media synchronously"
)];
[
o_file_slave_ckbox
setTitle
:
_NS
(
"Play another media synchronously"
)];
[
o_file_slave_select_btn
setTitle
:
_NS
(
"Choose..."
)];
[
o_file_slave_select_btn
setTitle
:
_NS
(
"Choose..."
)];
[
o_file_slave_filename_txt
setStringValue
:
@""
];
[
o_file_slave_filename_lbl
setStringValue
:
@""
];
[
o_file_slave_icon_well
setImage
:
NULL
];
[
o_file_subtitles_filename_lbl
setStringValue
:
@""
];
[
o_file_subtitles_icon_well
setImage
:
NULL
];
[
o_disc_selector_pop
removeAllItems
];
[
o_disc_selector_pop
removeAllItems
];
[
o_disc_selector_pop
setHidden
:
NO
];
[
o_disc_selector_pop
setHidden
:
NO
];
...
@@ -212,11 +219,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -212,11 +219,6 @@ static VLCOpen *_o_sharedMainInstance = nil;
[
self
setSubPanel
];
[
self
setSubPanel
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
openFilePathChanged
:)
name:
NSControlTextDidChangeNotification
object:
o_file_path
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
openNetInfoChanged
:)
selector:
@selector
(
openNetInfoChanged
:)
name:
NSControlTextDidChangeNotification
name:
NSControlTextDidChangeNotification
...
@@ -507,15 +509,16 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -507,15 +509,16 @@ static VLCOpen *_o_sharedMainInstance = nil;
o_file_slave_path
=
[[[
o_open_panel
URLs
]
objectAtIndex
:
0
]
path
];
o_file_slave_path
=
[[[
o_open_panel
URLs
]
objectAtIndex
:
0
]
path
];
[
o_file_slave_path
retain
];
[
o_file_slave_path
retain
];
}
}
else
[
o_file_slave_filename_txt
setStringValue
:
@""
];
}
}
if
(
o_file_slave_path
)
if
(
o_file_slave_path
&&
[
o_file_slave_ckbox
state
]
==
NSOnState
)
{
[
o_file_slave_filename_lbl
setStringValue
:
[[
NSFileManager
defaultManager
]
displayNameAtPath
:
o_file_slave_path
]];
[
o_file_slave_icon_well
setImage
:
[[
NSWorkspace
sharedWorkspace
]
iconForFile
:
o_file_slave_path
]];
}
else
{
{
NSFileWrapper
*
o_file_wrapper
;
[
o_file_slave_filename_lbl
setStringValue
:
@""
];
o_file_wrapper
=
[[
NSFileWrapper
alloc
]
initWithPath
:
o_file_slave_path
];
[
o_file_slave_icon_well
setImage
:
NULL
];
[
o_file_slave_filename_txt
setStringValue
:
[
NSString
stringWithFormat
:
@"
\"
%@
\"
"
,
[
o_file_wrapper
preferredFilename
]]];
[
o_file_wrapper
release
];
}
}
}
}
...
@@ -547,16 +550,14 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -547,16 +550,14 @@ static VLCOpen *_o_sharedMainInstance = nil;
-
(
void
)
openFilePathChanged
:(
NSNotification
*
)
o_notification
-
(
void
)
openFilePathChanged
:(
NSNotification
*
)
o_notification
{
{
NSString
*
o_filename
=
[
o_file_path
stringValue
];
if
(
o_file_path
&&
[
o_file_path
length
]
>
0
)
if
(
o_filename
&&
[
o_filename
length
]
>
0
)
{
{
bool
b_stream
=
[
o_file_stream
state
];
bool
b_stream
=
[
o_file_stream
state
];
BOOL
b_dir
=
NO
;
BOOL
b_dir
=
NO
;
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
o_file
name
isDirectory
:
&
b_dir
];
[[
NSFileManager
defaultManager
]
fileExistsAtPath
:
o_file
_path
isDirectory
:
&
b_dir
];
char
*
psz_uri
=
make_URI
([
o_file
name
UTF8String
],
"file"
);
char
*
psz_uri
=
make_URI
([
o_file
_path
UTF8String
],
"file"
);
if
(
!
psz_uri
)
return
;
if
(
!
psz_uri
)
return
;
NSMutableString
*
o_mrl_string
=
[
NSMutableString
stringWithUTF8String
:
psz_uri
];
NSMutableString
*
o_mrl_string
=
[
NSMutableString
stringWithUTF8String
:
psz_uri
];
...
@@ -568,10 +569,21 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -568,10 +569,21 @@ static VLCOpen *_o_sharedMainInstance = nil;
else
if
(
b_stream
)
else
if
(
b_stream
)
[
o_mrl_string
replaceCharactersInRange
:
offile
withString
:
@"stream"
];
[
o_mrl_string
replaceCharactersInRange
:
offile
withString
:
@"stream"
];
[
o_file_name
setStringValue
:
[[
NSFileManager
defaultManager
]
displayNameAtPath
:
o_file_path
]];
[
o_file_name_stub
setHidden
:
YES
];
[
o_file_stream
setHidden
:
NO
];
[
o_file_icon_well
setImage
:
[[
NSWorkspace
sharedWorkspace
]
iconForFile
:
o_file_path
]];
[
o_file_icon_well
setHidden
:
NO
];
[
self
setMRL
:
o_mrl_string
];
[
self
setMRL
:
o_mrl_string
];
}
}
else
else
{
[
o_file_name
setStringValue
:
@""
];
[
o_file_name_stub
setHidden
:
NO
];
[
o_file_stream
setHidden
:
YES
];
[
o_file_icon_well
setImage
:
[
NSImage
imageNamed
:
@"generic"
]];
[
self
setMRL
:
@""
];
[
self
setMRL
:
@""
];
}
}
}
-
(
IBAction
)
openFileBrowse
:(
id
)
sender
-
(
IBAction
)
openFileBrowse
:(
id
)
sender
...
@@ -598,8 +610,10 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -598,8 +610,10 @@ static VLCOpen *_o_sharedMainInstance = nil;
{
{
if
(
returnCode
==
NSFileHandlingPanelOKButton
)
if
(
returnCode
==
NSFileHandlingPanelOKButton
)
{
{
NSString
*
o_filename
=
[[[
sheet
URLs
]
objectAtIndex
:
0
]
path
];
if
(
o_file_path
)
[
o_file_path
setStringValue
:
o_filename
];
[
o_file_path
release
];
o_file_path
=
[[[
sheet
URLs
]
objectAtIndex
:
0
]
path
];
[
o_file_path
retain
];
[
self
openFilePathChanged
:
nil
];
[
self
openFilePathChanged
:
nil
];
}
}
}
}
...
@@ -800,7 +814,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -800,7 +814,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
[
o_opticalDevices
addObjectsFromArray
:
o_specialMediaFolders
];
[
o_opticalDevices
addObjectsFromArray
:
o_specialMediaFolders
];
if
([
o_opticalDevices
count
]
>
0
)
{
if
([
o_opticalDevices
count
]
>
0
)
{
for
(
int
i
=
0
;
i
<
[
o_opticalDevices
count
]
;
i
++
)
for
(
int
i
=
0
;
i
<
[
o_opticalDevices
count
]
;
i
++
)
[
o_disc_selector_pop
addItemWithTitle
:
[
o_opticalDevices
objectAtIndex
:
i
]];
[
o_disc_selector_pop
addItemWithTitle
:
[
[
NSFileManager
defaultManager
]
displayNameAtPath
:[
o_opticalDevices
objectAtIndex
:
i
]
]];
if
([
o_disc_selector_pop
numberOfItems
]
<=
1
)
if
([
o_disc_selector_pop
numberOfItems
]
<=
1
)
[
o_disc_selector_pop
setHidden
:
YES
];
[
o_disc_selector_pop
setHidden
:
YES
];
...
@@ -1274,10 +1288,16 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1274,10 +1288,16 @@ static VLCOpen *_o_sharedMainInstance = nil;
if
([
o_file_sub_ckbox
state
]
==
NSOnState
)
if
([
o_file_sub_ckbox
state
]
==
NSOnState
)
{
{
[
o_file_sub_btn_settings
setEnabled
:
YES
];
[
o_file_sub_btn_settings
setEnabled
:
YES
];
if
([[
o_file_sub_path
stringValue
]
length
]
>
0
)
{
[
o_file_subtitles_filename_lbl
setStringValue
:
[[
NSFileManager
defaultManager
]
displayNameAtPath
:[
o_file_sub_path
stringValue
]]];
[
o_file_subtitles_icon_well
setImage
:
[[
NSWorkspace
sharedWorkspace
]
iconForFile
:
[
o_file_sub_path
stringValue
]]];
}
}
}
else
else
{
{
[
o_file_sub_btn_settings
setEnabled
:
NO
];
[
o_file_sub_btn_settings
setEnabled
:
NO
];
[
o_file_subtitles_filename_lbl
setStringValue
:
@""
];
[
o_file_subtitles_icon_well
setImage
:
NULL
];
}
}
}
}
...
@@ -1292,6 +1312,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1292,6 +1312,7 @@ static VLCOpen *_o_sharedMainInstance = nil;
-
(
IBAction
)
subCloseSheet
:(
id
)
sender
-
(
IBAction
)
subCloseSheet
:(
id
)
sender
{
{
[
self
subsChanged
:
nil
];
[
o_file_sub_sheet
orderOut
:
sender
];
[
o_file_sub_sheet
orderOut
:
sender
];
[
NSApp
endSheet
:
o_file_sub_sheet
];
[
NSApp
endSheet
:
o_file_sub_sheet
];
}
}
...
@@ -1308,6 +1329,8 @@ static VLCOpen *_o_sharedMainInstance = nil;
...
@@ -1308,6 +1329,8 @@ static VLCOpen *_o_sharedMainInstance = nil;
{
{
NSString
*
o_filename
=
[[[
o_open_panel
URLs
]
objectAtIndex
:
0
]
path
];
NSString
*
o_filename
=
[[[
o_open_panel
URLs
]
objectAtIndex
:
0
]
path
];
[
o_file_sub_path
setStringValue
:
o_filename
];
[
o_file_sub_path
setStringValue
:
o_filename
];
[
o_file_subtitles_filename_lbl
setStringValue
:
[[
NSFileManager
defaultManager
]
displayNameAtPath
:
o_filename
]];
[
o_file_subtitles_icon_well
setImage
:
[[
NSWorkspace
sharedWorkspace
]
iconForFile
:
o_filename
]];
}
}
}
}
...
...
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