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
1f180231
Commit
1f180231
authored
May 02, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Preferences. Add an apply button and warnings to force saving
and rebuilding when switching details depth.
parent
137e021b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
1 deletion
+21
-1
modules/gui/qt4/dialogs/preferences.cpp
modules/gui/qt4/dialogs/preferences.cpp
+20
-1
modules/gui/qt4/dialogs/preferences.hpp
modules/gui/qt4/dialogs/preferences.hpp
+1
-0
No files found.
modules/gui/qt4/dialogs/preferences.cpp
View file @
1f180231
...
...
@@ -59,6 +59,9 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
/* Choice for types */
types
=
new
QGroupBox
(
"Show settings"
);
types
->
setAlignment
(
Qt
::
AlignHCenter
);
types
->
setToolTip
(
qtr
(
"You have to apply the preferences before
\n
"
"switching settings details if you want
\n
"
"to keep them"
)
);
QHBoxLayout
*
types_l
=
new
QHBoxLayout
(
0
);
types_l
->
setSpacing
(
3
);
types_l
->
setMargin
(
3
);
small
=
new
QRadioButton
(
"Basic"
,
types
);
types_l
->
addWidget
(
small
);
...
...
@@ -75,10 +78,12 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
/* Buttons */
QDialogButtonBox
*
buttonsBox
=
new
QDialogButtonBox
();
QPushButton
*
save
=
new
QPushButton
(
qtr
(
"&Save"
)
);
QPushButton
*
apply
=
new
QPushButton
(
qtr
(
"&Apply"
)
);
QPushButton
*
cancel
=
new
QPushButton
(
qtr
(
"&Cancel"
)
);
QPushButton
*
reset
=
new
QPushButton
(
qtr
(
"&Reset Preferences"
)
);
buttonsBox
->
addButton
(
save
,
QDialogButtonBox
::
AcceptRole
);
buttonsBox
->
addButton
(
apply
,
QDialogButtonBox
::
AcceptRole
);
buttonsBox
->
addButton
(
cancel
,
QDialogButtonBox
::
RejectRole
);
buttonsBox
->
addButton
(
reset
,
QDialogButtonBox
::
ActionRole
);
...
...
@@ -110,6 +115,7 @@ PrefsDialog::PrefsDialog( intf_thread_t *_p_intf ) : QVLCFrame( _p_intf )
}
BUTTONACT
(
save
,
save
()
);
BUTTONACT
(
apply
,
apply
()
);
BUTTONACT
(
cancel
,
cancel
()
);
BUTTONACT
(
reset
,
reset
()
);
BUTTONACT
(
small
,
setSmall
()
);
...
...
@@ -243,6 +249,12 @@ void PrefsDialog::showModulePrefs( char *psz_module )
}
void
PrefsDialog
::
save
()
{
apply
();
hide
();
}
void
PrefsDialog
::
apply
()
{
if
(
small
->
isChecked
()
&&
simple_tree
)
{
...
...
@@ -252,7 +264,14 @@ void PrefsDialog::save()
else
if
(
all
->
isChecked
()
&&
advanced_tree
)
advanced_tree
->
applyAll
();
config_SaveConfigFile
(
p_intf
,
NULL
);
hide
();
/* Delete the other panel in order to force its reload after clicking
on apply - UGLY but will work for now. */
if
(
simple_panel
->
isVisible
()
)
delete
advanced_panel
;
if
(
advanced_panel
->
isVisible
()
)
delete
simple_panel
;
}
void
PrefsDialog
::
cancel
()
...
...
modules/gui/qt4/dialogs/preferences.hpp
View file @
1f180231
...
...
@@ -82,6 +82,7 @@ private slots:
void
setAll
();
void
setSmall
();
void
save
();
void
apply
();
void
cancel
();
void
reset
();
void
close
(){
save
();
};
...
...
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