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
6424a7eb
Commit
6424a7eb
authored
Apr 30, 2013
by
Felix Paul Kühne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
macosx: remove duplicate code by using the same IBAction for both Prefs Reset buttons
parent
df97baf7
Changes
5
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
167 additions
and
56 deletions
+167
-56
extras/package/macosx/Resources/English.lproj/Preferences.xib
...as/package/macosx/Resources/English.lproj/Preferences.xib
+152
-20
modules/gui/macosx/prefs.h
modules/gui/macosx/prefs.h
+0
-1
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs.m
+0
-24
modules/gui/macosx/simple_prefs.h
modules/gui/macosx/simple_prefs.h
+1
-0
modules/gui/macosx/simple_prefs.m
modules/gui/macosx/simple_prefs.m
+14
-11
No files found.
extras/package/macosx/Resources/English.lproj/Preferences.xib
View file @
6424a7eb
This diff is collapsed.
Click to expand it.
modules/gui/macosx/prefs.h
View file @
6424a7eb
...
...
@@ -50,7 +50,6 @@
-
(
void
)
showPrefsWithLevel
:(
NSInteger
)
i_window_level
;
-
(
IBAction
)
savePrefs
:
(
id
)
sender
;
-
(
IBAction
)
closePrefs
:
(
id
)
sender
;
-
(
IBAction
)
resetAll
:
(
id
)
sender
;
-
(
IBAction
)
buttonAction
:
(
id
)
sender
;
@end
...
...
modules/gui/macosx/prefs.m
View file @
6424a7eb
...
...
@@ -224,30 +224,6 @@ static VLCPrefs *_o_sharedMainInstance = nil;
[
o_prefs_window
orderOut
:
self
];
}
-
(
IBAction
)
resetAll
:
(
id
)
sender
{
NSBeginInformationalAlertSheet
(
_NS
(
"Reset Preferences"
),
_NS
(
"Cancel"
),
_NS
(
"Continue"
),
nil
,
o_prefs_window
,
self
,
@selector
(
sheetDidEnd
:
returnCode
:
contextInfo
:
),
NULL
,
nil
,
@"%@"
,
_NS
(
"Beware this will reset the VLC media player preferences.
\n
"
"Are you sure you want to continue?"
));
}
-
(
void
)
sheetDidEnd
:(
NSWindow
*
)
o_sheet
returnCode
:(
int
)
i_return
contextInfo
:(
void
*
)
o_context
{
if
(
i_return
==
NSAlertAlternateReturn
)
{
/* reset VLC's config */
config_ResetAll
(
p_intf
);
[
_rootTreeItem
resetView
];
config_SaveConfigFile
(
p_intf
);
/* reset OS X defaults */
[
NSUserDefaults
resetStandardUserDefaults
];
[[
NSUserDefaults
standardUserDefaults
]
synchronize
];
}
}
-
(
IBAction
)
buttonAction
:
(
id
)
sender
{
[
o_prefs_window
orderOut
:
self
];
...
...
modules/gui/macosx/simple_prefs.h
View file @
6424a7eb
...
...
@@ -208,6 +208,7 @@
-
(
void
)
showSimplePrefsWithLevel
:(
NSInteger
)
i_window_level
;
-
(
IBAction
)
buttonAction
:(
id
)
sender
;
-
(
IBAction
)
resetPreferences
:(
id
)
sender
;
-
(
void
)
sheetDidEnd
:(
NSWindow
*
)
o_sheet
returnCode
:(
int
)
i_return
contextInfo
:(
void
*
)
o_context
;
...
...
modules/gui/macosx/simple_prefs.m
View file @
6424a7eb
...
...
@@ -682,9 +682,17 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
[
self
saveChangedSettings
];
[[
NSFontPanel
sharedFontPanel
]
close
];
[
o_sprefs_win
orderOut
:
sender
];
}
else
if
(
sender
==
o_sprefs_reset_btn
)
}
else
if
(
sender
==
o_sprefs_showAll_btn
)
{
[
o_sprefs_win
orderOut
:
self
];
[[[
VLCMain
sharedInstance
]
preferences
]
showPrefsWithLevel
:[
o_sprefs_win
level
]];
}
else
msg_Warn
(
p_intf
,
"unknown buttonAction sender"
);
}
-
(
IBAction
)
resetPreferences
:(
NSControl
*
)
sender
{
NSBeginInformationalAlertSheet
(
_NS
(
"Reset Preferences"
),
_NS
(
"Cancel"
),
_NS
(
"Continue"
),
nil
,
o_sprefs_win
,
self
,
_NS
(
"Continue"
),
nil
,
[
sender
window
]
,
self
,
@selector
(
sheetDidEnd
:
returnCode
:
contextInfo
:
),
NULL
,
nil
,
@"%@"
,
_NS
(
"This will reset VLC media player's preferences.
\n\n
"
"Note that VLC will restart during the process, so your current "
...
...
@@ -692,11 +700,6 @@ static inline char * __config_GetLabel(vlc_object_t *p_this, const char *psz_nam
"transcoding activities will stop immediately.
\n\n
"
"The Media Library will not be affected.
\n\n
"
"Are you sure you want to continue?"
));
else
if
(
sender
==
o_sprefs_showAll_btn
)
{
[
o_sprefs_win
orderOut
:
self
];
[[[
VLCMain
sharedInstance
]
preferences
]
showPrefsWithLevel
:[
o_sprefs_win
level
]];
}
else
msg_Warn
(
p_intf
,
"unknown buttonAction sender"
);
}
-
(
void
)
sheetDidEnd
:(
NSWindow
*
)
o_sheet
...
...
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