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
9f5bed00
Commit
9f5bed00
authored
Aug 19, 2012
by
David Fuhrmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: save debug log to rtf instead rtfd
parent
8af1d49f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
modules/gui/macosx/intf.m
modules/gui/macosx/intf.m
+8
-6
No files found.
modules/gui/macosx/intf.m
View file @
9f5bed00
...
...
@@ -2117,13 +2117,12 @@ unsigned int CocoaKeyToVLC( unichar i_key )
[
saveFolderPanel
setCanSelectHiddenExtension
:
NO
];
[
saveFolderPanel
setCanCreateDirectories
:
YES
];
[
saveFolderPanel
setAllowedFileTypes
:
[
NSArray
arrayWithObject
:
@"rtf
d
"
]];
[
saveFolderPanel
beginSheetForDirectory
:
nil
file
:
[
NSString
stringWithFormat
:
_NS
(
"VLC Debug Log (%s).rtf
d
"
),
VERSION_MESSAGE
]
modalForWindow
:
o_msgs_panel
modalDelegate
:
self
didEndSelector
:
@selector
(
saveDebugLogAsRTF
:
returnCode
:
contextInfo
:
)
contextInfo
:
nil
];
[
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
];
}
-
(
void
)
saveDebugLogAsRTF
:
(
NSSavePanel
*
)
sheet
returnCode
:
(
int
)
returnCode
contextInfo
:
(
void
*
)
contextInfo
{
BOOL
b_returned
;
if
(
returnCode
==
NSOKButton
)
{
NSUInteger
count
=
[
o_msg_arr
count
];
...
...
@@ -2132,11 +2131,14 @@ unsigned int CocoaKeyToVLC( unichar i_key )
{
[
string
appendAttributedString
:
[
o_msg_arr
objectAtIndex
:
i
]];
}
b_returned
=
[[
string
RTFDFileWrapperFromRange
:
NSMakeRange
(
0
,
[
string
length
]
)
documentAttributes
:[
NSDictionary
dictionaryWithObject
:
NSRTFDTextDocumentType
forKey
:
NSDocumentTypeDocumentAttribute
]]
writeToFile
:
[[
sheet
URL
]
path
]
atomically
:
YES
updateFilenames
:
NO
];
[
string
release
];
if
(
!
b_returned
)
NSData
*
data
=
[
string
RTFFromRange
:
NSMakeRange
(
0
,
[
string
length
]
)
documentAttributes:
[
NSDictionary
dictionaryWithObject
:
NSRTFTextDocumentType
forKey
:
NSDocumentTypeDocumentAttribute
]];
if
(
[
data
writeToFile
:
[[
sheet
URL
]
path
]
atomically
:
YES
]
==
NO
)
msg_Warn
(
p_intf
,
"Error while saving the debug log"
);
[
string
release
];
}
}
...
...
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