Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
02044642
Commit
02044642
authored
Nov 09, 2007
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - Open: clean again, and fix the clear() bug.
parent
fe986989
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
46 deletions
+49
-46
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs/open.cpp
+46
-44
modules/gui/qt4/dialogs/open.hpp
modules/gui/qt4/dialogs/open.hpp
+1
-1
modules/gui/qt4/dialogs_provider.hpp
modules/gui/qt4/dialogs_provider.hpp
+2
-1
No files found.
modules/gui/qt4/dialogs/open.cpp
View file @
02044642
...
@@ -112,13 +112,13 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -112,13 +112,13 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
CONNECT
(
captureOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
CONNECT
(
captureOpenPanel
,
mrlUpdated
(
QString
),
this
,
updateMRL
(
QString
)
);
CONNECT
(
fileOpenPanel
,
methodChanged
(
QString
),
CONNECT
(
fileOpenPanel
,
methodChanged
(
QString
),
this
,
newMethod
(
QString
)
);
this
,
new
Caching
Method
(
QString
)
);
CONNECT
(
netOpenPanel
,
methodChanged
(
QString
),
CONNECT
(
netOpenPanel
,
methodChanged
(
QString
),
this
,
newMethod
(
QString
)
);
this
,
new
Caching
Method
(
QString
)
);
CONNECT
(
discOpenPanel
,
methodChanged
(
QString
),
CONNECT
(
discOpenPanel
,
methodChanged
(
QString
),
this
,
newMethod
(
QString
)
);
this
,
new
Caching
Method
(
QString
)
);
CONNECT
(
captureOpenPanel
,
methodChanged
(
QString
),
CONNECT
(
captureOpenPanel
,
methodChanged
(
QString
),
this
,
newMethod
(
QString
)
);
this
,
new
Caching
Method
(
QString
)
);
/* Advanced frame Connects */
/* Advanced frame Connects */
CONNECT
(
ui
.
slaveText
,
textChanged
(
QString
),
this
,
updateMRL
());
CONNECT
(
ui
.
slaveText
,
textChanged
(
QString
),
this
,
updateMRL
());
...
@@ -135,7 +135,7 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
...
@@ -135,7 +135,7 @@ OpenDialog::OpenDialog( QWidget *parent, intf_thread_t *_p_intf, bool modal,
/* Initialize caching */
/* Initialize caching */
storedMethod
=
""
;
storedMethod
=
""
;
newMethod
(
"file-caching"
);
new
Caching
Method
(
"file-caching"
);
mainHeight
=
advHeight
=
0
;
mainHeight
=
advHeight
=
0
;
}
}
...
@@ -179,6 +179,31 @@ void OpenDialog::signalCurrent() {
...
@@ -179,6 +179,31 @@ void OpenDialog::signalCurrent() {
(
dynamic_cast
<
OpenPanel
*>
(
ui
.
Tab
->
currentWidget
()
))
->
updateMRL
();
(
dynamic_cast
<
OpenPanel
*>
(
ui
.
Tab
->
currentWidget
()
))
->
updateMRL
();
}
}
void
OpenDialog
::
toggleAdvancedPanel
()
{
//FIXME does not work under Windows
if
(
ui
.
advancedFrame
->
isVisible
()
)
{
ui
.
advancedFrame
->
hide
();
#ifndef WIN32
setMinimumHeight
(
1
);
resize
(
width
(),
mainHeight
);
#endif
}
else
{
#ifndef WIN32
if
(
mainHeight
==
0
)
mainHeight
=
height
();
#endif
ui
.
advancedFrame
->
show
();
#ifndef WIN32
if
(
advHeight
==
0
)
{
advHeight
=
height
()
-
mainHeight
;
}
resize
(
width
(),
mainHeight
+
advHeight
);
#endif
}
}
/***********
/***********
* Actions *
* Actions *
***********/
***********/
...
@@ -186,8 +211,9 @@ void OpenDialog::signalCurrent() {
...
@@ -186,8 +211,9 @@ void OpenDialog::signalCurrent() {
/* If Cancel is pressed or escaped */
/* If Cancel is pressed or escaped */
void
OpenDialog
::
cancel
()
void
OpenDialog
::
cancel
()
{
{
fileOpenPanel
->
clear
();
for
(
int
i
=
0
;
i
<=
OPEN_TAB_MAX
;
i
++
)
this
->
toggleVisible
();
dynamic_cast
<
OpenPanel
*>
(
ui
.
Tab
->
widget
(
i
))
->
clear
();
toggleVisible
();
if
(
isModal
()
)
reject
();
if
(
isModal
()
)
reject
();
}
}
...
@@ -230,7 +256,7 @@ void OpenDialog::stream( bool b_transcode_only )
...
@@ -230,7 +256,7 @@ void OpenDialog::stream( bool b_transcode_only )
void
OpenDialog
::
finish
(
bool
b_enqueue
=
false
)
void
OpenDialog
::
finish
(
bool
b_enqueue
=
false
)
{
{
t
his
->
t
oggleVisible
();
toggleVisible
();
mrl
=
ui
.
advancedLineInput
->
text
();
mrl
=
ui
.
advancedLineInput
->
text
();
if
(
!
isModal
()
)
if
(
!
isModal
()
)
...
@@ -240,18 +266,17 @@ void OpenDialog::finish( bool b_enqueue = false )
...
@@ -240,18 +266,17 @@ void OpenDialog::finish( bool b_enqueue = false )
{
{
bool
b_start
=
!
i
&&
!
b_enqueue
;
bool
b_start
=
!
i
&&
!
b_enqueue
;
input_item_t
*
p_input
;
input_item_t
*
p_input
;
const
char
*
psz_utf8
=
qtu
(
tempMRL
[
i
]
);
p_input
=
input_ItemNew
(
p_intf
,
psz_utf8
,
NULL
);
p_input
=
input_ItemNew
(
p_intf
,
qtu
(
tempMRL
[
i
]
)
,
NULL
);
/* Insert options */
/* Insert options */
while
(
i
+
1
<
tempMRL
.
size
()
&&
tempMRL
[
i
+
1
].
startsWith
(
":"
)
)
while
(
i
+
1
<
tempMRL
.
size
()
&&
tempMRL
[
i
+
1
].
startsWith
(
":"
)
)
{
{
i
++
;
i
++
;
psz_utf8
=
qtu
(
tempMRL
[
i
]
);
input_ItemAddOption
(
p_input
,
qtu
(
tempMRL
[
i
]
)
);
input_ItemAddOption
(
p_input
,
psz_utf8
);
}
}
/* Switch between enqueuing and starting the item */
if
(
b_start
)
if
(
b_start
)
{
{
playlist_AddInput
(
THEPL
,
p_input
,
playlist_AddInput
(
THEPL
,
p_input
,
...
@@ -261,7 +286,7 @@ void OpenDialog::finish( bool b_enqueue = false )
...
@@ -261,7 +286,7 @@ void OpenDialog::finish( bool b_enqueue = false )
else
else
{
{
playlist_AddInput
(
THEPL
,
p_input
,
playlist_AddInput
(
THEPL
,
p_input
,
PLAYLIST_APPEND
|
PLAYLIST_PREPARSE
,
PLAYLIST_APPEND
|
PLAYLIST_PREPARSE
,
PLAYLIST_END
,
VLC_TRUE
,
VLC_FALSE
);
PLAYLIST_END
,
VLC_TRUE
,
VLC_FALSE
);
}
}
}
}
...
@@ -270,29 +295,12 @@ void OpenDialog::finish( bool b_enqueue = false )
...
@@ -270,29 +295,12 @@ void OpenDialog::finish( bool b_enqueue = false )
accept
();
accept
();
}
}
void
OpenDialog
::
toggleAdvancedPanel
()
{
//FIXME does not work under Windows
if
(
ui
.
advancedFrame
->
isVisible
()
)
{
ui
.
advancedFrame
->
hide
();
#ifndef WIN32
setMinimumHeight
(
1
);
resize
(
width
(),
mainHeight
);
#endif
}
else
{
#ifndef WIN32
if
(
mainHeight
==
0
)
mainHeight
=
height
();
#endif
ui
.
advancedFrame
->
show
();
/* Update the MRL */
#ifndef WIN32
void
OpenDialog
::
updateMRL
(
QString
tempMRL
)
if
(
advHeight
==
0
)
{
{
advHeight
=
height
()
-
mainHeight
;
mainMRL
=
tempMRL
;
}
updateMRL
();
resize
(
width
(),
mainHeight
+
advHeight
);
#endif
}
}
}
void
OpenDialog
::
updateMRL
()
{
void
OpenDialog
::
updateMRL
()
{
...
@@ -312,18 +320,12 @@ void OpenDialog::updateMRL() {
...
@@ -312,18 +320,12 @@ void OpenDialog::updateMRL() {
ui
.
advancedLineInput
->
setText
(
mrl
);
ui
.
advancedLineInput
->
setText
(
mrl
);
}
}
void
OpenDialog
::
updateMRL
(
QString
tempMRL
)
void
OpenDialog
::
newCachingMethod
(
QString
method
)
{
mainMRL
=
tempMRL
;
updateMRL
();
}
void
OpenDialog
::
newMethod
(
QString
method
)
{
{
if
(
method
!=
storedMethod
)
{
if
(
method
!=
storedMethod
)
{
storedMethod
=
method
;
storedMethod
=
method
;
int
i_value
=
config_GetInt
(
p_intf
,
qta
(
storedMethod
)
);
int
i_value
=
config_GetInt
(
p_intf
,
qta
(
storedMethod
)
);
ui
.
cacheSpinBox
->
setValue
(
i_value
);
ui
.
cacheSpinBox
->
setValue
(
i_value
);
}
}
}
}
...
...
modules/gui/qt4/dialogs/open.hpp
View file @
02044642
...
@@ -92,7 +92,7 @@ private slots:
...
@@ -92,7 +92,7 @@ private slots:
void
toggleAdvancedPanel
();
void
toggleAdvancedPanel
();
void
updateMRL
(
QString
);
void
updateMRL
(
QString
);
void
updateMRL
();
void
updateMRL
();
void
new
Method
(
QString
);
void
new
CachingMethod
(
QString
);
void
signalCurrent
();
void
signalCurrent
();
};
};
...
...
modules/gui/qt4/dialogs_provider.hpp
View file @
02044642
...
@@ -74,7 +74,8 @@ enum {
...
@@ -74,7 +74,8 @@ enum {
OPEN_FILE_TAB
,
OPEN_FILE_TAB
,
OPEN_DISC_TAB
,
OPEN_DISC_TAB
,
OPEN_NETWORK_TAB
,
OPEN_NETWORK_TAB
,
OPEN_CAPTURE_TAB
OPEN_CAPTURE_TAB
,
OPEN_TAB_MAX
};
};
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