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
bc5cee00
Commit
bc5cee00
authored
Jun 14, 2005
by
Derk-Jan Hartman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* Fix the Reset button for OS X preferences (closes #193)
parent
f0665477
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
2 deletions
+22
-2
modules/gui/macosx/prefs.h
modules/gui/macosx/prefs.h
+1
-0
modules/gui/macosx/prefs.m
modules/gui/macosx/prefs.m
+21
-2
No files found.
modules/gui/macosx/prefs.h
View file @
bc5cee00
...
@@ -39,6 +39,7 @@
...
@@ -39,6 +39,7 @@
-
(
BOOL
)
hasPrefs
:(
NSString
*
)
o_module_name
;
-
(
BOOL
)
hasPrefs
:(
NSString
*
)
o_module_name
;
-
(
NSView
*
)
showView
:(
NSScrollView
*
)
o_prefs_view
advancedView
:(
vlc_bool_t
)
b_advanced
;
-
(
NSView
*
)
showView
:(
NSScrollView
*
)
o_prefs_view
advancedView
:(
vlc_bool_t
)
b_advanced
;
-
(
void
)
applyChanges
;
-
(
void
)
applyChanges
;
-
(
void
)
resetView
;
@end
@end
...
...
modules/gui/macosx/prefs.m
View file @
bc5cee00
...
@@ -146,7 +146,9 @@ static VLCPrefs *_o_sharedMainInstance = nil;
...
@@ -146,7 +146,9 @@ static VLCPrefs *_o_sharedMainInstance = nil;
{
{
if
(
i_return
==
NSAlertAlternateReturn
)
if
(
i_return
==
NSAlertAlternateReturn
)
{
{
[
o_prefs_view
setDocumentView
:
o_empty_view
];
config_ResetAll
(
p_intf
);
config_ResetAll
(
p_intf
);
[[
VLCTreeItem
rootItem
]
resetView
];
[[
o_tree
itemAtRow
:[
o_tree
selectedRow
]]
[[
o_tree
itemAtRow
:[
o_tree
selectedRow
]]
showView:
o_prefs_view
advancedView
:
showView:
o_prefs_view
advancedView
:
(
[
o_advanced_ckb
state
]
==
NSOnState
)
?
VLC_TRUE
:
VLC_FALSE
];
(
[
o_advanced_ckb
state
]
==
NSOnState
)
?
VLC_TRUE
:
VLC_FALSE
];
...
@@ -310,7 +312,8 @@ static VLCTreeItem *o_root_item = nil;
...
@@ -310,7 +312,8 @@ static VLCTreeItem *o_root_item = nil;
case
CONFIG_SUBCATEGORY
:
case
CONFIG_SUBCATEGORY
:
o_child_name
=
[[
VLCMain
sharedInstance
]
o_child_name
=
[[
VLCMain
sharedInstance
]
localizedString:
config_CategoryNameGet
(
p_item
->
i_value
)
];
localizedString:
config_CategoryNameGet
(
p_item
->
i_value
)
];
if
(
p_item
->
i_value
!=
SUBCAT_VIDEO_GENERAL
&&
if
(
p_item
->
i_value
!=
SUBCAT_PLAYLIST_GENERAL
&&
p_item
->
i_value
!=
SUBCAT_VIDEO_GENERAL
&&
p_item
->
i_value
!=
SUBCAT_AUDIO_GENERAL
)
p_item
->
i_value
!=
SUBCAT_AUDIO_GENERAL
)
[
p_last_category
->
o_children
[
p_last_category
->
o_children
addObject:
[[
VLCTreeItem
alloc
]
addObject:
[[
VLCTreeItem
alloc
]
...
@@ -555,7 +558,8 @@ static VLCTreeItem *o_root_item = nil;
...
@@ -555,7 +558,8 @@ static VLCTreeItem *o_root_item = nil;
}
}
p_item
=
(
p_parser
->
p_config
+
i_object_category
);
p_item
=
(
p_parser
->
p_config
+
i_object_category
);
if
(
(
p_item
->
i_type
==
CONFIG_CATEGORY
)
&&
if
(
(
p_item
->
i_type
==
CONFIG_CATEGORY
)
&&
(
(
p_item
->
i_value
==
CAT_AUDIO
)
||
(
(
p_item
->
i_value
==
CAT_PLAYLIST
)
||
(
p_item
->
i_value
==
CAT_AUDIO
)
||
(
p_item
->
i_value
==
CAT_VIDEO
)
)
)
(
p_item
->
i_value
==
CAT_VIDEO
)
)
)
p_item
++
;
p_item
++
;
...
@@ -684,6 +688,21 @@ static VLCTreeItem *o_root_item = nil;
...
@@ -684,6 +688,21 @@ static VLCTreeItem *o_root_item = nil;
[[
o_children
objectAtIndex
:
i
]
applyChanges
];
[[
o_children
objectAtIndex
:
i
]
applyChanges
];
}
}
-
(
void
)
resetView
{
unsigned
int
i
;
if
(
o_subviews
!=
nil
)
{
//Item has been shown
[
o_subviews
release
];
o_subviews
=
nil
;
}
if
(
o_children
!=
IsALeafNode
)
for
(
i
=
0
;
i
<
[
o_children
count
]
;
i
++
)
[[
o_children
objectAtIndex
:
i
]
resetView
];
}
@end
@end
...
...
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