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
665ba714
Commit
665ba714
authored
Apr 15, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: hopefully fix the last open file path
parent
4a45faa9
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
14 deletions
+17
-14
modules/gui/qt4/components/open_panels.cpp
modules/gui/qt4/components/open_panels.cpp
+3
-4
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+4
-4
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+8
-5
modules/gui/qt4/qt4.hpp
modules/gui/qt4/qt4.hpp
+2
-1
No files found.
modules/gui/qt4/components/open_panels.cpp
View file @
665ba714
...
...
@@ -113,7 +113,7 @@ inline void FileOpenPanel::BuildOldPanel()
/* Make this QFileDialog a child of tempWidget from the ui. */
dialogBox
=
new
FileOpenBox
(
ui
.
tempWidget
,
NULL
,
qfu
(
p_intf
->
p_sys
->
psz_filepath
)
,
""
);
p_intf
->
p_sys
->
filepath
,
""
);
dialogBox
->
setFileMode
(
QFileDialog
::
ExistingFiles
);
dialogBox
->
setAcceptMode
(
QFileDialog
::
AcceptOpen
);
...
...
@@ -190,7 +190,7 @@ void FileOpenPanel::browseFileSub()
{
// TODO Handle selection of more than one subtitles file
QStringList
files
=
THEDP
->
showSimpleOpen
(
qtr
(
"Open subtitles file"
),
EXT_FILTER_SUBTITLE
,
p_intf
->
p_sys
->
psz_
filepath
);
EXT_FILTER_SUBTITLE
,
p_intf
->
p_sys
->
filepath
);
if
(
files
.
isEmpty
()
)
return
;
ui
.
subInput
->
setText
(
files
.
join
(
" "
)
);
...
...
@@ -240,8 +240,7 @@ void FileOpenPanel::updateMRL()
/* Function called by Open Dialog when clicke on Play/Enqueue */
void
FileOpenPanel
::
accept
()
{
//FIXME
// p_intf->p_sys->psz_filepath = qtu( dialogBox->directory().absolutePath() );
p_intf
->
p_sys
->
filepath
=
dialogBox
->
directory
().
absolutePath
();
ui
.
fileListWidg
->
clear
();
}
...
...
modules/gui/qt4/dialogs_provider.cpp
View file @
665ba714
...
...
@@ -277,7 +277,7 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
if
(
p_arg
->
b_save
)
{
QString
file
=
QFileDialog
::
getSaveFileName
(
NULL
,
p_arg
->
psz_title
,
qfu
(
p_intf
->
p_sys
->
psz_filepath
)
,
extensions
);
p_intf
->
p_sys
->
filepath
,
extensions
);
if
(
!
file
.
isEmpty
()
)
{
p_arg
->
i_results
=
1
;
...
...
@@ -290,7 +290,7 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
else
/* non-save mode */
{
QStringList
files
=
QFileDialog
::
getOpenFileNames
(
NULL
,
p_arg
->
psz_title
,
qfu
(
p_intf
->
p_sys
->
psz_filepath
)
,
p_arg
->
psz_title
,
p_intf
->
p_sys
->
filepath
,
extensions
);
p_arg
->
i_results
=
files
.
count
();
p_arg
->
psz_results
=
(
char
**
)
malloc
(
p_arg
->
i_results
*
sizeof
(
char
*
)
);
...
...
@@ -386,7 +386,7 @@ QStringList DialogsProvider::showSimpleOpen( QString help,
return
QFileDialog
::
getOpenFileNames
(
NULL
,
help
.
isEmpty
()
?
qtr
(
I_OP_SEL_FILES
)
:
help
,
path
.
isEmpty
()
?
qfu
(
p_intf
->
p_sys
->
psz_filepath
)
:
path
,
path
.
isEmpty
()
?
p_intf
->
p_sys
->
filepath
:
path
,
fileTypes
);
}
...
...
@@ -512,7 +512,7 @@ void DialogsProvider::saveAPlaylist()
{
QFileDialog
*
qfd
=
new
QFileDialog
(
NULL
,
qtr
(
"Save playlist as..."
),
qfu
(
p_intf
->
p_sys
->
psz_filepath
)
,
p_intf
->
p_sys
->
filepath
,
qtr
(
"XSPF playlist (*.xspf);; "
)
+
qtr
(
"M3U playlist (*.m3u);; "
)
+
qtr
(
"HTML playlist (*.html)"
)
);
...
...
modules/gui/qt4/qt4.cpp
View file @
665ba714
...
...
@@ -460,9 +460,12 @@ static void *Thread( void *obj )
app
.
setQuitOnLastWindowClosed
(
false
);
/* Retrieve last known path used in file browsing */
char
*
psz_path
=
config_GetPsz
(
p_intf
,
"qt-filedialog-path"
);
p_intf
->
p_sys
->
psz_filepath
=
EMPTY_STR
(
psz_path
)
?
config_GetHomeDir
()
:
psz_path
;
{
char
*
psz_path
=
config_GetPsz
(
p_intf
,
"qt-filedialog-path"
);
p_intf
->
p_sys
->
filepath
=
EMPTY_STR
(
psz_path
)
?
config_GetHomeDir
()
:
qfu
(
psz_path
);
free
(
psz_path
);
}
/* Launch */
app
.
exec
();
...
...
@@ -501,8 +504,8 @@ static void *Thread( void *obj )
/* Save the path */
config_PutPsz
(
p_intf
,
"qt-filedialog-path"
,
p_intf
->
p_sys
->
psz_filepath
);
free
(
psz_path
);
config_PutPsz
(
p_intf
,
"qt-filedialog-path"
,
qtu
(
p_intf
->
p_sys
->
filepath
)
);
/* Delete the application automatically */
free
(
display
);
...
...
modules/gui/qt4/qt4.hpp
View file @
665ba714
...
...
@@ -34,6 +34,7 @@
#include <vlc_playlist.h>
/* playlist_t */
#include <QEvent>
#include <QString>
#if ( QT_VERSION < 0x040300 )
# error Update your Qt version
...
...
@@ -72,7 +73,7 @@ struct intf_sys_t
playlist_t
*
p_playlist
;
/* Core Playlist discussion */
const
char
*
psz_filepath
;
/* Last path used in dialogs */
QString
filepath
;
/* Last path used in dialogs */
QMenu
*
p_popup_menu
;
/* The right click menu */
};
...
...
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