Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
50dabf20
Commit
50dabf20
authored
Jan 06, 2009
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Finish the initialization in the Open function.
It fixes embed video at start.
parent
5f033381
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
44 deletions
+46
-44
modules/gui/skins2/src/skin_main.cpp
modules/gui/skins2/src/skin_main.cpp
+46
-44
No files found.
modules/gui/skins2/src/skin_main.cpp
View file @
50dabf20
...
...
@@ -166,6 +166,52 @@ static int Open( vlc_object_t *p_this )
Dialogs
::
instance
(
p_intf
);
ThemeRepository
::
instance
(
p_intf
);
// Load a theme
char
*
skin_last
=
config_GetPsz
(
p_intf
,
"skins2-last"
);
ThemeLoader
*
pLoader
=
new
ThemeLoader
(
p_intf
);
if
(
!
skin_last
||
!*
skin_last
||
!
pLoader
->
load
(
skin_last
)
)
{
// Get the resource path and try to load the default skin
OSFactory
*
pOSFactory
=
OSFactory
::
instance
(
p_intf
);
const
list
<
string
>
&
resPath
=
pOSFactory
->
getResourcePath
();
const
string
&
sep
=
pOSFactory
->
getDirSeparator
();
list
<
string
>::
const_iterator
it
;
for
(
it
=
resPath
.
begin
();
it
!=
resPath
.
end
();
it
++
)
{
string
path
=
(
*
it
)
+
sep
+
"default.vlt"
;
if
(
pLoader
->
load
(
path
)
)
{
// Theme loaded successfully
break
;
}
}
if
(
it
==
resPath
.
end
()
)
{
// Last chance: the user can select a new theme file
if
(
Dialogs
::
instance
(
p_intf
)
)
{
CmdDlgChangeSkin
*
pCmd
=
new
CmdDlgChangeSkin
(
p_intf
);
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
p_intf
);
pQueue
->
push
(
CmdGenericPtr
(
pCmd
)
);
}
else
{
// No dialogs provider, just quit...
CmdQuit
*
pCmd
=
new
CmdQuit
(
p_intf
);
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
p_intf
);
pQueue
->
push
(
CmdGenericPtr
(
pCmd
)
);
msg_Err
(
p_intf
,
"cannot show the
\"
open skin
\"
dialog: exiting..."
);
}
}
}
delete
pLoader
;
free
(
skin_last
);
#ifdef WIN32
p_intf
->
b_should_run_on_first_thread
=
true
;
#endif
...
...
@@ -211,50 +257,6 @@ static void Close( vlc_object_t *p_this )
static
void
Run
(
intf_thread_t
*
p_intf
)
{
int
canc
=
vlc_savecancel
();
// Load a theme
ThemeLoader
*
pLoader
=
new
ThemeLoader
(
p_intf
);
char
*
skin_last
=
config_GetPsz
(
p_intf
,
"skins2-last"
);
if
(
!
skin_last
||
!*
skin_last
||
!
pLoader
->
load
(
skin_last
)
)
{
// Get the resource path and try to load the default skin
OSFactory
*
pOSFactory
=
OSFactory
::
instance
(
p_intf
);
const
list
<
string
>
&
resPath
=
pOSFactory
->
getResourcePath
();
const
string
&
sep
=
pOSFactory
->
getDirSeparator
();
list
<
string
>::
const_iterator
it
;
for
(
it
=
resPath
.
begin
();
it
!=
resPath
.
end
();
it
++
)
{
string
path
=
(
*
it
)
+
sep
+
"default.vlt"
;
if
(
pLoader
->
load
(
path
)
)
{
// Theme loaded successfully
break
;
}
}
if
(
it
==
resPath
.
end
()
)
{
// Last chance: the user can select a new theme file
if
(
Dialogs
::
instance
(
p_intf
)
)
{
CmdDlgChangeSkin
*
pCmd
=
new
CmdDlgChangeSkin
(
p_intf
);
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
p_intf
);
pQueue
->
push
(
CmdGenericPtr
(
pCmd
)
);
}
else
{
// No dialogs provider, just quit...
CmdQuit
*
pCmd
=
new
CmdQuit
(
p_intf
);
AsyncQueue
*
pQueue
=
AsyncQueue
::
instance
(
p_intf
);
pQueue
->
push
(
CmdGenericPtr
(
pCmd
)
);
msg_Err
(
p_intf
,
"cannot show the
\"
open skin
\"
dialog: exiting..."
);
}
}
}
delete
pLoader
;
free
(
skin_last
);
// Get the instance of OSLoop
OSLoop
*
loop
=
OSFactory
::
instance
(
p_intf
)
->
getOSLoop
();
...
...
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