Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
a3cceda1
Commit
a3cceda1
authored
Jul 30, 2006
by
Olivier Teulière
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* skins2: when restoring the previous skin because a new one failed to load,
show only the windows that were visible before
parent
de277e80
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
5 deletions
+52
-5
modules/gui/skins2/commands/cmd_change_skin.cpp
modules/gui/skins2/commands/cmd_change_skin.cpp
+2
-1
modules/gui/skins2/src/window_manager.cpp
modules/gui/skins2/src/window_manager.cpp
+31
-0
modules/gui/skins2/src/window_manager.hpp
modules/gui/skins2/src/window_manager.hpp
+19
-4
No files found.
modules/gui/skins2/commands/cmd_change_skin.cpp
View file @
a3cceda1
...
...
@@ -38,6 +38,7 @@ void CmdChangeSkin::execute()
if
(
pOldTheme
)
{
pOldTheme
->
getWindowManager
().
saveVisibility
();
pOldTheme
->
getWindowManager
().
hideAll
();
}
...
...
@@ -57,7 +58,7 @@ void CmdChangeSkin::execute()
msg_Warn
(
getIntf
(),
"a problem occurred when loading the new theme,"
" restoring the previous one"
);
getIntf
()
->
p_sys
->
p_theme
=
pOldTheme
;
pOldTheme
->
getWindowManager
().
showAll
();
pOldTheme
->
getWindowManager
().
restoreVisibility
();
}
else
{
...
...
modules/gui/skins2/src/window_manager.cpp
View file @
a3cceda1
...
...
@@ -331,6 +331,37 @@ void WindowManager::synchVisibility() const
}
void
WindowManager
::
saveVisibility
()
{
WinSet_t
::
const_iterator
it
;
m_savedWindows
.
clear
();
for
(
it
=
m_allWindows
.
begin
();
it
!=
m_allWindows
.
end
();
it
++
)
{
// Remember the window if it is visible
if
(
(
*
it
)
->
getVisibleVar
().
get
()
)
{
m_savedWindows
.
insert
(
*
it
);
}
}
}
void
WindowManager
::
restoreVisibility
()
const
{
// Warning in case we never called saveVisibility()
if
(
m_savedWindows
.
size
()
==
0
)
{
msg_Warn
(
getIntf
(),
"restoring visibility for no window"
);
}
WinSet_t
::
const_iterator
it
;
for
(
it
=
m_savedWindows
.
begin
();
it
!=
m_savedWindows
.
end
();
it
++
)
{
(
*
it
)
->
show
();
}
}
void
WindowManager
::
raiseAll
()
const
{
// Raise all the windows
...
...
modules/gui/skins2/src/window_manager.hpp
View file @
a3cceda1
...
...
@@ -59,8 +59,10 @@ class WindowManager: public SkinObject
/// Destructor
virtual
~
WindowManager
();
/// Add a window to the list of known windows. Necessary if you want
/// your window to be movable...
/**
* Add a window to the list of known windows. Necessary if you want
* your window to be movable...
*/
void
registerWindow
(
TopWindow
&
rWindow
);
/// Remove a previously registered window
...
...
@@ -105,6 +107,12 @@ class WindowManager: public SkinObject
/// Synchronize the windows with their visibility variable
void
synchVisibility
()
const
;
/// Save the current visibility of the windows
void
saveVisibility
();
/// Restore the saved visibility of the windows
void
restoreVisibility
()
const
;
/// Raise the given window
void
raise
(
TopWindow
&
rWindow
)
const
{
rWindow
.
raise
();
}
...
...
@@ -164,8 +172,15 @@ class WindowManager: public SkinObject
map
<
TopWindow
*
,
WinSet_t
>
m_dependencies
;
/// Store all the windows
WinSet_t
m_allWindows
;
/// Store the moving windows; this set is updated at every start of
/// move.
/**
* Store the windows that were visible when saveVisibility() was
* last called.
*/
WinSet_t
m_savedWindows
;
/// Store the moving windows
/**
* This set is updated at every start of move.
*/
WinSet_t
m_movingWindows
;
/**
* Store the moving windows in the context of resizing
...
...
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