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
b216a623
Commit
b216a623
authored
May 09, 2007
by
Damien Fouilleul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Qt4: remember last directory browsed in file dialog
parent
d4c99c42
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
0 deletions
+27
-0
modules/gui/qt4/components/open.cpp
modules/gui/qt4/components/open.cpp
+19
-0
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+8
-0
No files found.
modules/gui/qt4/components/open.cpp
View file @
b216a623
...
@@ -61,6 +61,14 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
...
@@ -61,6 +61,14 @@ FileOpenPanel::FileOpenPanel( QWidget *_parent, intf_thread_t *_p_intf ) :
/* dialogBox->setFileMode( QFileDialog::ExistingFiles );*/
/* dialogBox->setFileMode( QFileDialog::ExistingFiles );*/
dialogBox
->
setAcceptMode
(
QFileDialog
::
AcceptOpen
);
dialogBox
->
setAcceptMode
(
QFileDialog
::
AcceptOpen
);
/* retrieve last known path used in file browsing */
char
*
psz_filepath
=
config_GetPsz
(
p_intf
,
"qt-filedialog-path"
);
if
(
psz_filepath
)
{
dialogBox
->
setDirectory
(
QString
::
fromUtf8
(
psz_filepath
)
);
delete
psz_filepath
;
}
/* We don't want to see a grip in the middle of the window, do we? */
/* We don't want to see a grip in the middle of the window, do we? */
dialogBox
->
setSizeGripEnabled
(
false
);
dialogBox
->
setSizeGripEnabled
(
false
);
dialogBox
->
setToolTip
(
qtr
(
"Select one or multiple files, or a folder"
));
dialogBox
->
setToolTip
(
qtr
(
"Select one or multiple files, or a folder"
));
...
@@ -172,6 +180,17 @@ void FileOpenPanel::updateMRL()
...
@@ -172,6 +180,17 @@ void FileOpenPanel::updateMRL()
int
size
=
ui
.
sizeSubComboBox
->
itemData
(
ui
.
sizeSubComboBox
->
currentIndex
()
).
toInt
();
int
size
=
ui
.
sizeSubComboBox
->
itemData
(
ui
.
sizeSubComboBox
->
currentIndex
()
).
toInt
();
mrl
.
append
(
" :freetype-rel-fontsize="
+
QString
().
setNum
(
size
)
);
mrl
.
append
(
" :freetype-rel-fontsize="
+
QString
().
setNum
(
size
)
);
}
}
const
char
*
psz_filepath
=
config_GetPsz
(
p_intf
,
"qt-filedialog-path"
);
if
(
(
NULL
==
psz_filepath
)
||
strcmp
(
psz_filepath
,
dialogBox
->
directory
().
absolutePath
().
toUtf8
())
)
{
/* set dialog box current directory as last known path */
config_PutPsz
(
p_intf
,
"qt-filedialog-path"
,
dialogBox
->
directory
().
absolutePath
().
toUtf8
()
);
}
delete
psz_filepath
;
emit
mrlUpdated
(
mrl
);
emit
mrlUpdated
(
mrl
);
emit
methodChanged
(
"file-caching"
);
emit
methodChanged
(
"file-caching"
);
}
}
...
...
modules/gui/qt4/qt4.cpp
View file @
b216a623
...
@@ -57,6 +57,10 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
...
@@ -57,6 +57,10 @@ static void ShowDialog ( intf_thread_t *, int, int, intf_dialog_args_t * );
#define MINIMIZED_LONGTEXT N_("When you launch VLC with that option" \
#define MINIMIZED_LONGTEXT N_("When you launch VLC with that option" \
"VLC will start just with an icon in" \
"VLC will start just with an icon in" \
"your taskbar")
"your taskbar")
#define FILEDIALOG_PATH_TEXT N_("path to use in file dialog")
#define FILEDIALOG_PATH_LONGTEXT N_("path to use in file dialog")
vlc_module_begin
();
vlc_module_begin
();
set_shortname
(
(
char
*
)
"Qt"
);
set_shortname
(
(
char
*
)
"Qt"
);
set_description
(
(
char
*
)
_
(
"Qt interface"
)
);
set_description
(
(
char
*
)
_
(
"Qt interface"
)
);
...
@@ -79,6 +83,10 @@ vlc_module_begin();
...
@@ -79,6 +83,10 @@ vlc_module_begin();
SYSTRAY_LONGTEXT
,
VLC_FALSE
);
SYSTRAY_LONGTEXT
,
VLC_FALSE
);
add_bool
(
"qt-start-mininimized"
,
VLC_FALSE
,
NULL
,
MINIMIZED_TEXT
,
add_bool
(
"qt-start-mininimized"
,
VLC_FALSE
,
NULL
,
MINIMIZED_TEXT
,
MINIMIZED_LONGTEXT
,
VLC_TRUE
);
MINIMIZED_LONGTEXT
,
VLC_TRUE
);
add_string
(
"qt-filedialog-path"
,
NULL
,
NULL
,
FILEDIALOG_PATH_TEXT
,
FILEDIALOG_PATH_LONGTEXT
,
VLC_TRUE
);
change_autosave
();
change_internal
();
set_callbacks
(
OpenDialogs
,
Close
);
set_callbacks
(
OpenDialogs
,
Close
);
vlc_module_end
();
vlc_module_end
();
...
...
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