Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
VLMC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
luyikei
VLMC
Commits
0ad33aa1
Commit
0ad33aa1
authored
May 29, 2009
by
Vincent Carrubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding of last directory browsing persistance
parent
8a94f651
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
src/gui/LibraryWidget.cpp
src/gui/LibraryWidget.cpp
+12
-2
src/gui/LibraryWidget.h
src/gui/LibraryWidget.h
+2
-0
No files found.
src/gui/LibraryWidget.cpp
View file @
0ad33aa1
...
...
@@ -27,7 +27,7 @@
QList
<
ListViewMediaItem
*>*
LibraryWidget
::
m_medias
=
NULL
;
LibraryWidget
::
LibraryWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
LibraryWidget
::
LibraryWidget
(
QWidget
*
parent
)
:
QWidget
(
parent
)
,
m_firstDirectoryBrowsing
(
true
)
{
m_ui
.
setupUi
(
this
);
...
...
@@ -129,14 +129,24 @@ void LibraryWidget::newMediaLoaded( Media* media )
void
LibraryWidget
::
insertNewMediasFromFileDialog
(
QString
title
,
QString
filter
,
Library
::
FileType
fileType
)
{
QSettings
settings
;
QString
path
=
settings
.
value
(
"mediaLibraryDialogPath"
,
QDir
::
homePath
()
).
toString
();
QString
path
;
if
(
m_firstDirectoryBrowsing
==
true
)
path
=
settings
.
value
(
"mediaLibraryDialogPath"
,
QDir
::
homePath
()
).
toString
();
else
path
=
m_lastDirectoryBrowsed
;
qDebug
()
<<
"PATH = "
<<
path
;
QStringList
fileNames
=
QFileDialog
::
getOpenFileNames
(
this
,
title
,
path
,
filter
);
if
(
fileNames
.
isEmpty
()
)
return
;
m_lastDirectoryBrowsed
=
QFileInfo
(
fileNames
.
front
()
).
absolutePath
();
m_firstDirectoryBrowsing
=
false
;
QString
filePath
;
// ListViewMediaItem* item = NULL;
foreach
(
filePath
,
fileNames
)
{
qDebug
()
<<
filePath
;
// item = insertNewMedia( fileName, filetype );
// if( fileType == Library::Video )
emit
newMediaLoadingAsked
(
filePath
);
...
...
src/gui/LibraryWidget.h
View file @
0ad33aa1
...
...
@@ -63,6 +63,8 @@ private:
Ui
::
LibraryWidget
m_ui
;
static
QList
<
ListViewMediaItem
*>*
m_medias
;
QString
m_lastDirectoryBrowsed
;
bool
m_firstDirectoryBrowsing
;
public
slots
:
...
...
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