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
aa2b3392
Commit
aa2b3392
authored
Oct 22, 2011
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt: sprefs, fix caching combobox behaviour
parent
9f13c667
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
modules/gui/qt4/components/simple_preferences.cpp
modules/gui/qt4/components/simple_preferences.cpp
+11
-10
modules/gui/qt4/components/simple_preferences.hpp
modules/gui/qt4/components/simple_preferences.hpp
+2
-2
No files found.
modules/gui/qt4/components/simple_preferences.cpp
View file @
aa2b3392
...
@@ -490,16 +490,16 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
...
@@ -490,16 +490,16 @@ SPrefsPanel::SPrefsPanel( intf_thread_t *_p_intf, QWidget *_parent,
addToCachingBox
(
N_
(
"Higher latency"
),
CachingHigher
);
addToCachingBox
(
N_
(
"Higher latency"
),
CachingHigher
);
#undef addToCachingBox
#undef addToCachingBox
#define TestCaC( name ) \
#define TestCaC( name
, factor
) \
b_cache_equal = b_cache_equal && \
b_cache_equal = b_cache_equal && \
( i_cache
== config_GetInt( p_intf, name ) )
( i_cache
* factor == config_GetInt( p_intf, name ) );
/* Select the accurate value of the ComboBox */
/* Select the accurate value of the ComboBox */
bool
b_cache_equal
=
true
;
bool
b_cache_equal
=
true
;
int
i_cache
=
config_GetInt
(
p_intf
,
"file-caching"
);
int
i_cache
=
config_GetInt
(
p_intf
,
"file-caching"
);
TestCaC
(
"network-caching"
);
TestCaC
(
"network-caching"
,
10
/
3
);
TestCaC
(
"disc-caching"
);
TestCaC
(
"disc-caching"
,
1
);
TestCaC
(
"live-caching"
);
TestCaC
(
"live-caching"
,
1
);
if
(
b_cache_equal
==
1
)
if
(
b_cache_equal
==
1
)
ui
.
cachingCombo
->
setCurrentIndex
(
ui
.
cachingCombo
->
setCurrentIndex
(
ui
.
cachingCombo
->
findData
(
QVariant
(
i_cache
)
)
);
ui
.
cachingCombo
->
findData
(
QVariant
(
i_cache
)
)
);
...
@@ -770,15 +770,16 @@ void SPrefsPanel::apply()
...
@@ -770,15 +770,16 @@ void SPrefsPanel::apply()
config_PutPsz
(
p_intf
,
"cd-audio"
,
devicepath
);
config_PutPsz
(
p_intf
,
"cd-audio"
,
devicepath
);
}
}
#define CaC( name
) config_PutInt( p_intf, name, i_comboValue
)
#define CaC( name
, factor ) config_PutInt( p_intf, name, i_comboValue * factor
)
/* Caching */
/* Caching */
QComboBox
*
cachingCombo
=
qobject_cast
<
QComboBox
*>
(
optionWidgets
[
cachingCoB
]);
QComboBox
*
cachingCombo
=
qobject_cast
<
QComboBox
*>
(
optionWidgets
[
cachingCoB
]);
int
i_comboValue
=
cachingCombo
->
itemData
(
cachingCombo
->
currentIndex
()
).
toInt
();
int
i_comboValue
=
cachingCombo
->
itemData
(
cachingCombo
->
currentIndex
()
).
toInt
();
if
(
i_comboValue
)
if
(
i_comboValue
)
{
{
CaC
(
"network-caching"
);
CaC
(
"file-caching"
,
1
);
CaC
(
"disc-caching"
);
CaC
(
"network-caching"
,
10
/
3
);
CaC
(
"live-caching"
);
CaC
(
"disc-caching"
,
1
);
CaC
(
"live-caching"
,
1
);
}
}
break
;
break
;
#undef CaC
#undef CaC
...
...
modules/gui/qt4/components/simple_preferences.hpp
View file @
aa2b3392
...
@@ -59,8 +59,8 @@ enum {
...
@@ -59,8 +59,8 @@ enum {
CachingLowest
=
100
,
CachingLowest
=
100
,
CachingLow
=
200
,
CachingLow
=
200
,
CachingNormal
=
300
,
CachingNormal
=
300
,
CachingHigh
=
75
0
,
CachingHigh
=
50
0
,
CachingHigher
=
25
00
CachingHigher
=
10
00
};
};
enum
{
enum
{
...
...
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