Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
adde68fa
Commit
adde68fa
authored
Aug 23, 2012
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx/messages: replace deprecated API call with modern blocks-based counterpart
Additionally, fix a leak
parent
dd9ef423
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
18 deletions
+15
-18
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+15
-18
No files found.
modules/gui/macosx/intf.m
View file @
adde68fa
...
@@ -2145,28 +2145,25 @@ unsigned int CocoaKeyToVLC( unichar i_key )
...
@@ -2145,28 +2145,25 @@ unsigned int CocoaKeyToVLC( unichar i_key )
[
saveFolderPanel
setCanSelectHiddenExtension
:
NO
];
[
saveFolderPanel
setCanSelectHiddenExtension
:
NO
];
[
saveFolderPanel
setCanCreateDirectories
:
YES
];
[
saveFolderPanel
setCanCreateDirectories
:
YES
];
[
saveFolderPanel
setAllowedFileTypes
:
[
NSArray
arrayWithObject
:
@"rtf"
]];
[
saveFolderPanel
setAllowedFileTypes
:
[
NSArray
arrayWithObject
:
@"rtf"
]];
[
saveFolderPanel
beginSheetForDirectory
:
nil
file
:
[
NSString
stringWithFormat
:
_NS
(
"VLC Debug Log (%s).rtf"
),
VERSION_MESSAGE
]
modalForWindow
:
o_msgs_panel
modalDelegate
:
self
didEndSelector
:
@selector
(
saveDebugLogAsRTF
:
returnCode
:
contextInfo
:
)
contextInfo
:
nil
];
[
saveFolderPanel
setNameFieldStringValue
:[
NSString
stringWithFormat
:
_NS
(
"VLC Debug Log (%s).rtf"
),
VERSION_MESSAGE
]];
}
[
saveFolderPanel
beginSheetModalForWindow
:
o_msgs_panel
completionHandler
:
^
(
NSInteger
returnCode
)
{
if
(
returnCode
==
NSOKButton
)
-
(
void
)
saveDebugLogAsRTF
:
(
NSSavePanel
*
)
sheet
returnCode
:
(
int
)
returnCode
contextInfo
:
(
void
*
)
contextInfo
{
if
(
returnCode
==
NSOKButton
)
{
NSUInteger
count
=
[
o_msg_arr
count
];
NSMutableAttributedString
*
string
=
[[
NSMutableAttributedString
alloc
]
init
];
for
(
NSUInteger
i
=
0
;
i
<
count
;
i
++
)
{
{
[
string
appendAttributedString
:
[
o_msg_arr
objectAtIndex
:
i
]];
NSUInteger
count
=
[
o_msg_arr
count
];
}
NSMutableAttributedString
*
string
=
[[
NSMutableAttributedString
alloc
]
init
];
for
(
NSUInteger
i
=
0
;
i
<
count
;
i
++
)
[
string
appendAttributedString
:
[
o_msg_arr
objectAtIndex
:
i
]];
NSData
*
data
=
[
string
RTFFromRange
:
NSMakeRange
(
0
,
[
string
length
]
)
NSData
*
data
=
[
string
RTFFromRange
:
NSMakeRange
(
0
,
[
string
length
]
)
documentAttributes:
[
NSDictionary
dictionaryWithObject
:
NSRTFTextDocumentType
forKey
:
NSDocumentTypeDocumentAttribute
]];
documentAttributes:
[
NSDictionary
dictionaryWithObject
:
NSRTFTextDocumentType
forKey
:
NSDocumentTypeDocumentAttribute
]];
if
(
[
data
writeToFile
:
[[
sheet
URL
]
path
]
atomically
:
YES
]
==
NO
)
if
(
[
data
writeToFile
:
[[
saveFolderPanel
URL
]
path
]
atomically
:
YES
]
==
NO
)
msg_Warn
(
p_intf
,
"Error while saving the debug log"
);
msg_Warn
(
p_intf
,
"Error while saving the debug log"
);
[
string
release
];
[
string
release
];
}
}
}];
[
saveFolderPanel
release
];
}
}
#pragma mark -
#pragma mark -
...
...
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