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
6afece09
Commit
6afece09
authored
Jan 15, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: fixed correct display of UTF8 strings within the Extension dialogs (fixes #5848)
parent
7ac6ae55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
modules/gui/macosx/ExtensionsDialogProvider.m
modules/gui/macosx/ExtensionsDialogProvider.m
+4
-4
modules/gui/macosx/ExtensionsManager.m
modules/gui/macosx/ExtensionsManager.m
+2
-2
modules/gui/macosx_dialog_provider/dialogProvider.m
modules/gui/macosx_dialog_provider/dialogProvider.m
+3
-3
No files found.
modules/gui/macosx/ExtensionsDialogProvider.m
View file @
6afece09
...
...
@@ -154,7 +154,7 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget,
assert
([
control
isKindOfClass
:[
NSTextView
class
]]);
NSTextView
*
textView
=
(
NSTextView
*
)
control
;
NSString
*
string
=
[
NSString
stringWithUTF8String
:
widget
->
psz_text
];
NSAttributedString
*
attrString
=
[[
NSAttributedString
alloc
]
initWithHTML
:[
string
dataUsingEncoding
:
NSUTF8
StringEncoding
]
documentAttributes
:
NULL
];
NSAttributedString
*
attrString
=
[[
NSAttributedString
alloc
]
initWithHTML
:[
string
dataUsingEncoding
:
NSISOLatin1
StringEncoding
]
documentAttributes
:
NULL
];
[[
textView
textStorage
]
setAttributedString
:
attrString
];
[
textView
setNeedsDisplay
:
YES
];
[
textView
scrollRangeToVisible
:
NSMakeRange
(
0
,
0
)];
...
...
@@ -170,8 +170,8 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget,
break
;
assert
([
control
isKindOfClass
:[
NSControl
class
]]);
NSControl
*
field
=
(
NSControl
*
)
control
;
NSString
*
string
=
[
NSString
stringWith
UTF8String
:
widget
->
psz_text
];
NSAttributedString
*
attrString
=
[[
NSAttributedString
alloc
]
initWithHTML
:[
string
dataUsingEncoding
:
NSUTF8
StringEncoding
]
documentAttributes
:
NULL
];
NSString
*
string
=
[
NSString
stringWith
CString
:
widget
->
psz_text
encoding
:
NSUTF8StringEncoding
];
NSAttributedString
*
attrString
=
[[
NSAttributedString
alloc
]
initWithHTML
:[
string
dataUsingEncoding
:
NSISOLatin1
StringEncoding
]
documentAttributes
:
NULL
];
[
field
setAttributedStringValue
:
attrString
];
[
attrString
release
];
break
;
...
...
@@ -552,7 +552,7 @@ static ExtensionsDialogProvider *_o_sharedInstance = nil;
p_dialog
->
psz_title
)
!=
0
)
{
NSString
*
titleString
=
[
NSString
stringWithCString
:
p_dialog
->
psz_title
encoding:
NS
ASCII
StringEncoding
];
encoding:
NS
UTF8
StringEncoding
];
[
dialogWindow
setTitle
:
titleString
];
}
...
...
modules/gui/macosx/ExtensionsManager.m
View file @
6afece09
...
...
@@ -93,7 +93,7 @@ static ExtensionsManager* instance = nil;
bool
b_Active
=
extension_IsActivated
(
p_extensions_manager
,
p_ext
);
NSString
*
titleString
=
[
NSString
stringWithCString
:
p_ext
->
psz_title
encoding:
NS
ASCII
StringEncoding
];
encoding:
NS
UTF8
StringEncoding
];
if
(
b_Active
&&
extension_HasMenu
(
p_extensions_manager
,
p_ext
)
)
{
...
...
@@ -116,7 +116,7 @@ static ExtensionsManager* instance = nil;
{
++
i_num
;
titleString
=
[
NSString
stringWithCString
:
ppsz_titles
[
i
]
encoding:
NS
ASCII
StringEncoding
];
encoding:
NS
UTF8
StringEncoding
];
NSMenuItem
*
menuItem
=
[
submenu
addItemWithTitle
:
titleString
action:
@selector
(
triggerMenu
:)
keyEquivalent:
@""
];
...
...
modules/gui/macosx_dialog_provider/dialogProvider.m
View file @
6afece09
...
...
@@ -675,7 +675,7 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget,
// assert([control isKindOfClass:[NSTextView class]]);
// NSTextView *textView = (NSTextView *)control;
// NSString *string = [NSString stringWithUTF8String:widget->psz_text];
// NSAttributedString *attrString = [[NSAttributedString alloc] initWithHTML:[string dataUsingEncoding:NS
UTF8
StringEncoding] documentAttributes:NULL];
// NSAttributedString *attrString = [[NSAttributedString alloc] initWithHTML:[string dataUsingEncoding:NS
ISOLatin1
StringEncoding] documentAttributes:NULL];
// [[textView textStorage] setAttributedString:[[NSAttributedString alloc] initWithString:@"Hello"]];
// NSLog(@"%@", string);
// [textView setNeedsDisplay:YES];
...
...
@@ -688,7 +688,7 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget,
assert
([
control
isKindOfClass
:[
NSTextView
class
]]);
NSTextView
*
textView
=
(
NSTextView
*
)
control
;
NSString
*
string
=
[
NSString
stringWithUTF8String
:
widget
->
psz_text
];
NSAttributedString
*
attrString
=
[[
NSAttributedString
alloc
]
initWithHTML
:[
string
dataUsingEncoding
:
NS
UTF8
StringEncoding
]
documentAttributes
:
NULL
];
NSAttributedString
*
attrString
=
[[
NSAttributedString
alloc
]
initWithHTML
:[
string
dataUsingEncoding
:
NS
ISOLatin1
StringEncoding
]
documentAttributes
:
NULL
];
[[
textView
textStorage
]
setAttributedString
:
attrString
];
[
textView
setNeedsDisplay
:
YES
];
[
textView
scrollRangeToVisible
:
NSMakeRange
(
0
,
0
)];
...
...
@@ -705,7 +705,7 @@ static void updateControlFromWidget(NSView *control, extension_widget_t *widget,
assert
([
control
isKindOfClass
:[
NSControl
class
]]);
NSControl
*
field
=
(
NSControl
*
)
control
;
NSString
*
string
=
[
NSString
stringWithUTF8String
:
widget
->
psz_text
];
NSAttributedString
*
attrString
=
[[
NSAttributedString
alloc
]
initWithHTML
:[
string
dataUsingEncoding
:
NS
UTF8
StringEncoding
]
documentAttributes
:
NULL
];
NSAttributedString
*
attrString
=
[[
NSAttributedString
alloc
]
initWithHTML
:[
string
dataUsingEncoding
:
NS
ISOLatin1
StringEncoding
]
documentAttributes
:
NULL
];
[
field
setAttributedStringValue
:
attrString
];
[
attrString
release
];
break
;
...
...
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