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
08062ae3
Commit
08062ae3
authored
Jul 27, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Comments.
parent
1c64dc6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
modules/gui/qt4/dialogs_provider.cpp
modules/gui/qt4/dialogs_provider.cpp
+18
-6
No files found.
modules/gui/qt4/dialogs_provider.cpp
View file @
08062ae3
...
@@ -246,9 +246,11 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
...
@@ -246,9 +246,11 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
{
{
if
(
p_arg
==
NULL
)
if
(
p_arg
==
NULL
)
{
{
msg_
Dbg
(
p_intf
,
"openFileGenericDialog() called with NULL arg"
);
msg_
Warn
(
p_intf
,
"openFileGenericDialog() called with NULL arg"
);
return
;
return
;
}
}
/* Replace the extensions to a Qt format */
int
i
=
0
;
int
i
=
0
;
QString
extensions
=
qfu
(
p_arg
->
psz_extensions
);
QString
extensions
=
qfu
(
p_arg
->
psz_extensions
);
while
(
(
i
=
extensions
.
indexOf
(
"|"
,
i
)
)
!=
-
1
)
while
(
(
i
=
extensions
.
indexOf
(
"|"
,
i
)
)
!=
-
1
)
...
@@ -260,29 +262,38 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
...
@@ -260,29 +262,38 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
}
}
extensions
.
replace
(
QString
(
";*"
),
QString
(
" *"
));
extensions
.
replace
(
QString
(
";*"
),
QString
(
" *"
));
extensions
.
append
(
")"
);
extensions
.
append
(
")"
);
/* Save */
if
(
p_arg
->
b_save
)
if
(
p_arg
->
b_save
)
{
{
QString
file
=
QFileDialog
::
getSaveFileName
(
NULL
,
p_arg
->
psz_title
,
qfu
(
p_intf
->
p_sys
->
psz_filepath
),
extensions
);
QString
file
=
QFileDialog
::
getSaveFileName
(
NULL
,
p_arg
->
psz_title
,
qfu
(
p_intf
->
p_sys
->
psz_filepath
),
extensions
);
if
(
!
file
.
isEmpty
()
)
if
(
!
file
.
isEmpty
()
)
{
{
p_arg
->
i_results
=
1
;
p_arg
->
i_results
=
1
;
p_arg
->
psz_results
=
(
char
**
)
malloc
(
p_arg
->
i_results
*
sizeof
(
char
*
)
);
p_arg
->
psz_results
=
(
char
**
)
malloc
(
p_arg
->
i_results
*
sizeof
(
char
*
)
);
p_arg
->
psz_results
[
0
]
=
strdup
(
qtu
(
file
)
);
p_arg
->
psz_results
[
0
]
=
strdup
(
qtu
(
file
)
);
}
}
else
else
p_arg
->
i_results
=
0
;
p_arg
->
i_results
=
0
;
}
}
else
else
/* non-save mode */
{
{
QStringList
files
=
QFileDialog
::
getOpenFileNames
(
NULL
,
p_arg
->
psz_title
,
qfu
(
p_intf
->
p_sys
->
psz_filepath
),
extensions
);
QStringList
files
=
QFileDialog
::
getOpenFileNames
(
NULL
,
p_arg
->
psz_title
,
qfu
(
p_intf
->
p_sys
->
psz_filepath
),
extensions
);
p_arg
->
i_results
=
files
.
count
();
p_arg
->
i_results
=
files
.
count
();
p_arg
->
psz_results
=
(
char
**
)
malloc
(
p_arg
->
i_results
*
sizeof
(
char
*
)
);
p_arg
->
psz_results
=
(
char
**
)
malloc
(
p_arg
->
i_results
*
sizeof
(
char
*
)
);
i
=
0
;
i
=
0
;
foreach
(
QString
file
,
files
)
foreach
(
QString
file
,
files
)
p_arg
->
psz_results
[
i
++
]
=
strdup
(
qtu
(
file
)
);
p_arg
->
psz_results
[
i
++
]
=
strdup
(
qtu
(
file
)
);
}
}
/* Callback */
if
(
p_arg
->
pf_callback
)
if
(
p_arg
->
pf_callback
)
p_arg
->
pf_callback
(
p_arg
);
p_arg
->
pf_callback
(
p_arg
);
/* Clean afterwards */
if
(
p_arg
->
psz_results
)
if
(
p_arg
->
psz_results
)
{
{
for
(
i
=
0
;
i
<
p_arg
->
i_results
;
i
++
)
for
(
i
=
0
;
i
<
p_arg
->
i_results
;
i
++
)
...
@@ -293,6 +304,7 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
...
@@ -293,6 +304,7 @@ void DialogsProvider::openFileGenericDialog( intf_dialog_args_t *p_arg )
free
(
p_arg
->
psz_extensions
);
free
(
p_arg
->
psz_extensions
);
free
(
p_arg
);
free
(
p_arg
);
}
}
void
DialogsProvider
::
openFileDialog
()
void
DialogsProvider
::
openFileDialog
()
{
{
openDialog
(
OPEN_FILE_TAB
);
openDialog
(
OPEN_FILE_TAB
);
...
...
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