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
734452c8
Commit
734452c8
authored
Jan 16, 2008
by
Jean-Baptiste Kempf
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4 - fix some saving and reading size bugs. Patch by Andre Weber
parent
2279878d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
5 deletions
+31
-5
modules/gui/qt4/main_interface.cpp
modules/gui/qt4/main_interface.cpp
+13
-2
modules/gui/qt4/util/qvlcframe.hpp
modules/gui/qt4/util/qvlcframe.hpp
+18
-3
No files found.
modules/gui/qt4/main_interface.cpp
View file @
734452c8
...
...
@@ -293,7 +293,15 @@ MainInterface::MainInterface( intf_thread_t *_p_intf ) : QVLCMW( _p_intf )
move
(
settings
->
value
(
"pos"
,
QPoint
(
0
,
0
)
).
toPoint
()
);
resize
(
settings
->
value
(
"size"
,
QSize
(
350
,
60
)
).
toSize
()
);
QSize
newSize
=
settings
->
value
(
"size"
,
QSize
(
350
,
60
)
).
toSize
();
if
(
newSize
.
isValid
()
)
{
resize
(
newSize
);
}
else
{
msg_Warn
(
p_intf
,
"Invalid size in constructor"
);
}
int
tgPlay
=
settings
->
value
(
"playlist-visible"
,
0
).
toInt
();
settings
->
endGroup
();
...
...
@@ -738,8 +746,11 @@ void MainInterface::togglePlaylist()
settings
->
endGroup
();
settings
->
beginGroup
(
"playlist"
);
dockPL
->
move
(
settings
->
value
(
"pos"
,
QPoint
(
0
,
0
)
).
toPoint
()
);
dockPL
->
resize
(
settings
->
value
(
"size"
,
QSize
(
400
,
300
)
).
toSize
()
);
QSize
newSize
=
settings
->
value
(
"size"
,
QSize
(
400
,
300
)
).
toSize
();
if
(
newSize
.
isValid
()
)
dockPL
->
resize
(
newSize
);
settings
->
endGroup
();
dockPL
->
show
();
playlistVisible
=
true
;
}
...
...
modules/gui/qt4/util/qvlcframe.hpp
View file @
734452c8
...
...
@@ -58,7 +58,10 @@ protected:
{
QSettings
settings
(
"vlc"
,
"vlc-qt-interface"
);
settings
.
beginGroup
(
name
);
resize
(
settings
.
value
(
"size"
,
defSize
).
toSize
()
);
/* never trust any saved size ;-) */
QSize
newSize
=
settings
.
value
(
"size"
,
defSize
).
toSize
();
if
(
newSize
.
isValid
()
)
resize
(
newSize
);
move
(
settings
.
value
(
"pos"
,
defPos
).
toPoint
()
);
settings
.
endGroup
();
}
...
...
@@ -66,7 +69,10 @@ protected:
{
QSettings
settings
(
"vlc"
,
"vlc-qt-interface"
);
settings
.
beginGroup
(
name
);
settings
.
setValue
(
"size"
,
size
()
);
/* only save valid sizes ... */
QSize
currentsize
=
size
();
if
(
currentsize
.
isValid
()
)
settings
.
setValue
(
"size"
,
currentsize
);
settings
.
setValue
(
"pos"
,
pos
()
);
settings
.
endGroup
();
}
...
...
@@ -156,18 +162,27 @@ protected:
move
(
settings
.
value
(
"pos"
,
QPoint
(
0
,
0
)
).
toPoint
()
);
settings
.
endGroup
();
}
void
readSettings
(
QString
name
)
{
QSettings
settings
(
"vlc"
,
"vlc-qt-interface"
);
settings
.
beginGroup
(
name
);
mainSize
=
settings
.
value
(
"size"
,
QSize
(
0
,
0
)
).
toSize
();
if
(
!
mainSize
.
isValid
()
)
{
mainSize
=
QSize
(
0
,
0
);
}
settings
.
endGroup
();
}
void
writeSettings
(
QString
name
)
{
QSettings
settings
(
"vlc"
,
"vlc-qt-interface"
);
settings
.
beginGroup
(
name
);
settings
.
setValue
(
"size"
,
size
()
);
/* only save valid sizes ... */
QSize
currentsize
=
size
();
if
(
currentsize
.
isValid
()
)
settings
.
setValue
(
"size"
,
currentsize
);
settings
.
setValue
(
"pos"
,
pos
()
);
settings
.
endGroup
();
}
...
...
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