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
5ca001c0
Commit
5ca001c0
authored
Jan 13, 2010
by
Erwan Tulou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qt4: make dialog provider initialization less convoluted
parent
63304ea5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
18 deletions
+17
-18
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+17
-18
No files found.
modules/gui/qt4/qt4.cpp
View file @
5ca001c0
...
@@ -55,9 +55,10 @@
...
@@ -55,9 +55,10 @@
/*****************************************************************************
/*****************************************************************************
* Local prototypes.
* Local prototypes.
*****************************************************************************/
*****************************************************************************/
static
int
Open
(
vlc_object_t
*
);
static
int
OpenIntf
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
int
OpenDialogs
(
vlc_object_t
*
);
static
int
OpenDialogs
(
vlc_object_t
*
);
static
int
Open
(
vlc_object_t
*
,
bool
);
static
void
Close
(
vlc_object_t
*
);
static
int
WindowOpen
(
vlc_object_t
*
);
static
int
WindowOpen
(
vlc_object_t
*
);
static
void
WindowClose
(
vlc_object_t
*
);
static
void
WindowClose
(
vlc_object_t
*
);
static
void
*
Thread
(
void
*
);
static
void
*
Thread
(
void
*
);
...
@@ -174,7 +175,7 @@ vlc_module_begin ()
...
@@ -174,7 +175,7 @@ vlc_module_begin ()
set_category
(
CAT_INTERFACE
)
set_category
(
CAT_INTERFACE
)
set_subcategory
(
SUBCAT_INTERFACE_MAIN
)
set_subcategory
(
SUBCAT_INTERFACE_MAIN
)
set_capability
(
"interface"
,
151
)
set_capability
(
"interface"
,
151
)
set_callbacks
(
Open
,
Close
)
set_callbacks
(
Open
Intf
,
Close
)
add_shortcut
(
"qt"
)
add_shortcut
(
"qt"
)
add_integer
(
"qt-display-mode"
,
QT_NORMAL_MODE
,
NULL
,
add_integer
(
"qt-display-mode"
,
QT_NORMAL_MODE
,
NULL
,
...
@@ -268,7 +269,7 @@ static char *x11_display = NULL;
...
@@ -268,7 +269,7 @@ static char *x11_display = NULL;
*****************************************************************************/
*****************************************************************************/
/* Open Interface */
/* Open Interface */
static
int
Open
(
vlc_object_t
*
p_this
)
static
int
Open
(
vlc_object_t
*
p_this
,
bool
isDialogProvider
)
{
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
...
@@ -286,7 +287,7 @@ static int Open( vlc_object_t *p_this )
...
@@ -286,7 +287,7 @@ static int Open( vlc_object_t *p_this )
/* Allocations of p_sys */
/* Allocations of p_sys */
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
=
new
intf_sys_t
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
=
new
intf_sys_t
;
p_
sys
->
b_isDialogProvider
=
false
;
p_
intf
->
p_sys
->
b_isDialogProvider
=
isDialogProvider
;
p_sys
->
p_popup_menu
=
NULL
;
p_sys
->
p_popup_menu
=
NULL
;
p_sys
->
p_mi
=
NULL
;
p_sys
->
p_mi
=
NULL
;
p_sys
->
p_playlist
=
pl_Hold
(
p_intf
);
p_sys
->
p_playlist
=
pl_Hold
(
p_intf
);
...
@@ -314,17 +315,16 @@ static int Open( vlc_object_t *p_this )
...
@@ -314,17 +315,16 @@ static int Open( vlc_object_t *p_this )
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
}
}
/* Open qt4 interface */
static
int
OpenIntf
(
vlc_object_t
*
p_this
)
{
return
Open
(
p_this
,
false
);
}
/* Open Dialog Provider */
/* Open Dialog Provider */
static
int
OpenDialogs
(
vlc_object_t
*
p_this
)
static
int
OpenDialogs
(
vlc_object_t
*
p_this
)
{
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
return
Open
(
p_this
,
true
);
p_intf
->
pf_show_dialog
=
ShowDialog
;
int
val
=
Open
(
p_this
);
if
(
val
)
return
val
;
return
VLC_SUCCESS
;
}
}
static
void
Close
(
vlc_object_t
*
p_this
)
static
void
Close
(
vlc_object_t
*
p_this
)
...
@@ -411,19 +411,18 @@ static void *Thread( void *obj )
...
@@ -411,19 +411,18 @@ static void *Thread( void *obj )
#endif
#endif
/* Create the normal interface in non-DP mode */
/* Create the normal interface in non-DP mode */
if
(
!
p_intf
->
p
f_show_dialog
)
if
(
!
p_intf
->
p
_sys
->
b_isDialogProvider
)
p_mi
=
new
MainInterface
(
p_intf
);
p_mi
=
new
MainInterface
(
p_intf
);
else
else
p_mi
=
NULL
;
p_mi
=
NULL
;
/* Explain how to show a dialog :D */
p_intf
->
pf_show_dialog
=
ShowDialog
;
/* */
/* */
p_intf
->
p_sys
->
p_mi
=
p_mi
;
p_intf
->
p_sys
->
p_mi
=
p_mi
;
p_intf
->
p_sys
->
b_isDialogProvider
=
p_mi
==
NULL
;
vlc_sem_post
(
&
ready
);
vlc_sem_post
(
&
ready
);
/* Explain to the core how to show a dialog :D */
p_intf
->
pf_show_dialog
=
ShowDialog
;
/* Last settings */
/* Last settings */
app
.
setQuitOnLastWindowClosed
(
false
);
app
.
setQuitOnLastWindowClosed
(
false
);
...
...
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