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
64ba020d
Commit
64ba020d
authored
Aug 30, 2004
by
Benjamin Pracht
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Add some options to the subtitle selection dialog. (relative size, encoding, and alignement).
parent
9dce48b6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
107 additions
and
12 deletions
+107
-12
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
...s/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
+6
-0
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
+2
-1
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
...s/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
+0
-0
modules/gui/macosx/open.h
modules/gui/macosx/open.h
+8
-1
modules/gui/macosx/open.m
modules/gui/macosx/open.m
+91
-10
No files found.
extras/MacOSX/Resources/English.lproj/MainMenu.nib/classes.nib
View file @
64ba020d
...
...
@@ -293,12 +293,16 @@
"o_file_btn_browse" = id;
"o_file_path" = id;
"o_file_stream" = id;
"o_file_sub_align_lbl" = id;
"o_file_sub_align_pop" = id;
"o_file_sub_btn_browse" = id;
"o_file_sub_btn_settings" = id;
"o_file_sub_ckbox" = id;
"o_file_sub_delay" = id;
"o_file_sub_delay_lbl" = id;
"o_file_sub_delay_stp" = id;
"o_file_sub_encoding_lbl" = id;
"o_file_sub_encoding_pop" = id;
"o_file_sub_fps" = id;
"o_file_sub_fps_lbl" = id;
"o_file_sub_fps_stp" = id;
...
...
@@ -306,6 +310,8 @@
"o_file_sub_override" = id;
"o_file_sub_path" = id;
"o_file_sub_sheet" = id;
"o_file_sub_size_lbl" = id;
"o_file_sub_size_pop" = id;
"o_mrl" = id;
"o_mrl_lbl" = id;
"o_net_http_url" = id;
...
...
extras/MacOSX/Resources/English.lproj/MainMenu.nib/info.nib
View file @
64ba020d
...
...
@@ -3,7 +3,7 @@
<plist
version=
"1.0"
>
<dict>
<key>
IBDocumentLocation
</key>
<string>
799 152 505 517 0 0 1280 1002
</string>
<string>
396 229 505 517 0 0 1024 746
</string>
<key>
IBEditorPositions
</key>
<dict>
<key>
1617
</key>
...
...
@@ -22,6 +22,7 @@
<key>
IBOpenObjects
</key>
<array>
<integer>
29
</integer>
<integer>
1263
</integer>
<integer>
21
</integer>
</array>
<key>
IBSystem Version
</key>
...
...
extras/MacOSX/Resources/English.lproj/MainMenu.nib/objects.nib
View file @
64ba020d
No preview for this file type
modules/gui/macosx/open.h
View file @
64ba020d
...
...
@@ -82,12 +82,19 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class );
IBOutlet
id
o_file_sub_fps
;
IBOutlet
id
o_file_sub_fps_lbl
;
IBOutlet
id
o_file_sub_fps_stp
;
IBOutlet
id
o_file_sub_encoding_pop
;
IBOutlet
id
o_file_sub_encoding_lbl
;
IBOutlet
id
o_file_sub_size_pop
;
IBOutlet
id
o_file_sub_size_lbl
;
IBOutlet
id
o_file_sub_align_pop
;
IBOutlet
id
o_file_sub_align_lbl
;
IBOutlet
id
o_file_sub_ok_btn
;
IBOutlet
id
o_output_ckbox
;
IBOutlet
id
o_sout_options
;
}
-
(
void
)
setSubPanel
;
-
(
void
)
openTarget
:(
int
)
i_type
;
-
(
void
)
tabView
:(
NSTabView
*
)
o_tv
didSelectTabViewItem
:(
NSTabViewItem
*
)
o_tvi
;
...
...
modules/gui/macosx/open.m
View file @
64ba020d
...
...
@@ -7,6 +7,7 @@
* Authors: Jon Lech Johansen <jon-vl@nanocrew.net>
* Christophe Massiot <massiot@via.ecp.fr>
* Derk-Jan Hartman <thedj@users.sourceforge.net>
* Benjamin Pracht <bigben 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
...
...
@@ -168,16 +169,9 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
[
o_net_udp_port
setIntValue
:
config_GetInt
(
p_intf
,
"server-port"
)];
[
o_net_udp_port_stp
setIntValue
:
config_GetInt
(
p_intf
,
"server-port"
)];
[
o_file_sub_ckbox
setTitle
:
_NS
(
"Load subtitles file:"
)];
[
o_file_sub_btn_settings
setTitle
:
_NS
(
"Settings..."
)];
[
o_file_sub_btn_browse
setTitle
:
_NS
(
"Browse..."
)];
[
o_file_sub_override
setTitle
:
_NS
(
"Override"
)];
[
o_file_sub_delay_lbl
setStringValue
:
_NS
(
"delay"
)];
[
o_file_sub_delay_stp
setEnabled
:
NO
];
[
o_file_sub_fps_lbl
setStringValue
:
_NS
(
"fps"
)];
[
o_file_sub_fps_stp
setEnabled
:
NO
];
[
o_file_sub_ok_btn
setStringValue
:
_NS
(
"OK"
)];
[
self
setSubPanel
];
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector:
@selector
(
openFilePathChanged
:)
name:
NSControlTextDidChangeNotification
...
...
@@ -218,6 +212,74 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
object:
o_net_http_url
];
}
-
(
void
)
setSubPanel
{
intf_thread_t
*
p_intf
=
VLCIntf
;
int
i_index
;
module_config_t
*
p_item
;
[
o_file_sub_ckbox
setTitle
:
_NS
(
"Load subtitles file:"
)];
[
o_file_sub_btn_settings
setTitle
:
_NS
(
"Settings..."
)];
[
o_file_sub_btn_browse
setTitle
:
_NS
(
"Browse..."
)];
[
o_file_sub_override
setTitle
:
_NS
(
"Override"
)];
[
o_file_sub_delay_lbl
setStringValue
:
_NS
(
"delay"
)];
[
o_file_sub_delay_stp
setEnabled
:
NO
];
[
o_file_sub_fps_lbl
setStringValue
:
_NS
(
"fps"
)];
[
o_file_sub_fps_stp
setEnabled
:
NO
];
[
o_file_sub_encoding_lbl
setStringValue
:
_NS
(
"Subtitles text encoding"
)];
[
o_file_sub_encoding_pop
removeAllItems
];
[
o_file_sub_size_lbl
setStringValue
:
_NS
(
"Font size"
)];
[
o_file_sub_size_pop
removeAllItems
];
[
o_file_sub_align_lbl
setStringValue
:
_NS
(
"Subtitles justification"
)];
[
o_file_sub_align_pop
removeAllItems
];
[
o_file_sub_ok_btn
setStringValue
:
_NS
(
"OK"
)];
p_item
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
"subsdec-encoding"
);
if
(
p_item
)
{
for
(
i_index
=
0
;
p_item
->
ppsz_list
&&
p_item
->
ppsz_list
[
i_index
];
i_index
++
)
{
[
o_file_sub_encoding_pop
addItemWithTitle
:
[
NSString
stringWithCString
:
p_item
->
ppsz_list
[
i_index
]]];
}
[
o_file_sub_encoding_pop
selectItemWithTitle
:
[
NSString
stringWithCString
:
p_item
->
psz_value
]];
}
p_item
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
"subsdec-align"
);
if
(
p_item
)
{
for
(
i_index
=
0
;
i_index
<
p_item
->
i_list
;
i_index
++
)
{
[
o_file_sub_align_pop
addItemWithTitle
:
[
NSString
stringWithUTF8String
:
p_item
->
ppsz_list_text
[
i_index
]]];
}
[
o_file_sub_align_pop
selectItemAtIndex
:
p_item
->
i_value
];
}
p_item
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
"freetype-rel-fontsize"
);
if
(
p_item
)
{
for
(
i_index
=
0
;
i_index
<
p_item
->
i_list
;
i_index
++
)
{
[
o_file_sub_size_pop
addItemWithTitle
:
[
NSString
stringWithUTF8String
:
p_item
->
ppsz_list_text
[
i_index
]]];
if
(
p_item
->
i_value
==
p_item
->
pi_list
[
i_index
]
)
{
[
o_file_sub_size_pop
selectItemAtIndex
:
i_index
];
}
}
}
}
-
(
void
)
openTarget
:(
int
)
i_type
{
int
i_result
;
...
...
@@ -237,12 +299,31 @@ NSArray *GetEjectableMediaOfClass( const char *psz_class )
o_dic
=
[
NSMutableDictionary
dictionaryWithObject
:
[
o_mrl
stringValue
]
forKey
:
@"ITEM_URL"
];
if
(
[
o_file_sub_ckbox
state
]
==
NSOnState
)
{
intf_thread_t
*
p_intf
=
VLCIntf
;
module_config_t
*
p_item
;
[
o_options
addObject
:
[
NSString
stringWithFormat
:
@"sub-file=%s"
,
[[
o_file_sub_path
stringValue
]
fileSystemRepresentation
]]];
if
(
[
o_file_sub_override
state
]
==
NSOnState
)
{
[
o_options
addObject
:
[
NSString
stringWithFormat
:
@"sub-delay=%i"
,
(
int
)(
[
o_file_sub_delay
intValue
]
*
10
)]];
[
o_options
addObject
:
[
NSString
stringWithFormat
:
@"sub-fps=%f"
,
[
o_file_sub_fps
floatValue
]]];
}
[
o_options
addObject
:
[
NSString
stringWithFormat
:
@"subsdec-encoding=%@"
,
[
o_file_sub_encoding_pop
titleOfSelectedItem
]]];
[
o_options
addObject
:
[
NSString
stringWithFormat
:
@"subsdec-align=%i"
,
[
o_file_sub_align_pop
indexOfSelectedItem
]]];
p_item
=
config_FindConfig
(
VLC_OBJECT
(
p_intf
),
"freetype-rel-fontsize"
);
if
(
p_item
)
{
[
o_options
addObject
:
[
NSString
stringWithFormat
:
@"freetype-rel-fontsize=%i"
,
p_item
->
pi_list
[[
o_file_sub_size_pop
indexOfSelectedItem
]]]];
}
}
if
(
[
o_output_ckbox
state
]
==
NSOnState
)
{
...
...
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