Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
28edbac2
Commit
28edbac2
authored
Jul 03, 2013
by
Saul Ibarra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Save and restore main window geometry across restarts
parent
1d70bc8f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
__init__.py
blink/__init__.py
+6
-0
mainwindow.py
blink/mainwindow.py
+8
-1
No files found.
blink/__init__.py
View file @
28edbac2
...
...
@@ -97,6 +97,12 @@ class Blink(QApplication):
self
.
setAttribute
(
Qt
.
AA_DontShowIconsInMenus
,
False
)
self
.
application
=
SIPApplication
()
self
.
first_run
=
False
self
.
setOrganizationDomain
(
"ag-projects.com"
)
self
.
setOrganizationName
(
"AG Projects"
)
self
.
setApplicationName
(
"Blink"
)
self
.
setApplicationVersion
(
__version__
)
self
.
main_window
=
MainWindow
()
self
.
ip_address_monitor
=
IPAddressMonitor
()
self
.
log_manager
=
LogManager
()
...
...
blink/mainwindow.py
View file @
28edbac2
...
...
@@ -9,7 +9,7 @@ import os
from
functools
import
partial
from
PyQt4
import
uic
from
PyQt4.QtCore
import
Qt
,
QUrl
from
PyQt4.QtCore
import
Qt
,
Q
Settings
,
Q
Url
from
PyQt4.QtGui
import
QAction
,
QActionGroup
,
QDesktopServices
,
QShortcut
from
PyQt4.QtGui
import
QFileDialog
,
QIcon
,
QStyle
,
QStyleOptionComboBox
,
QStyleOptionFrameV2
...
...
@@ -64,6 +64,11 @@ class MainWindow(base_class, ui_class):
self
.
setWindowTitle
(
'Blink'
)
self
.
setWindowIconText
(
'Blink'
)
qt_settings
=
QSettings
()
geometry
=
qt_settings
.
value
(
"main_window/geometry"
)
if
geometry
:
self
.
restoreGeometry
(
geometry
)
self
.
default_icon_path
=
Resources
.
get
(
'icons/default-avatar.png'
)
self
.
default_icon
=
QIcon
(
self
.
default_icon_path
)
self
.
last_icon_directory
=
os
.
path
.
expanduser
(
'~'
)
...
...
@@ -209,6 +214,8 @@ class MainWindow(base_class, ui_class):
self
.
identity
.
setStyleSheet
(
"""QComboBox { padding: 0px 4px 0px 4px; }"""
if
wide_padding
else
""
)
def
closeEvent
(
self
,
event
):
qt_settings
=
QSettings
()
qt_settings
.
setValue
(
"main_window/geometry"
,
self
.
saveGeometry
())
super
(
MainWindow
,
self
)
.
closeEvent
(
event
)
self
.
about_panel
.
close
()
self
.
conference_dialog
.
close
()
...
...
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