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
d469a2c7
Commit
d469a2c7
authored
Apr 09, 2014
by
Saul Ibarra
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't close all windows when closing the main window
parent
09a20e40
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
4 deletions
+18
-4
__init__.py
blink/__init__.py
+18
-1
mainwindow.py
blink/mainwindow.py
+0
-3
No files found.
blink/__init__.py
View file @
d469a2c7
...
@@ -16,7 +16,7 @@ import cjson
...
@@ -16,7 +16,7 @@ import cjson
sip
.
setapi
(
'QString'
,
2
)
sip
.
setapi
(
'QString'
,
2
)
sip
.
setapi
(
'QVariant'
,
2
)
sip
.
setapi
(
'QVariant'
,
2
)
from
PyQt4.QtCore
import
Qt
from
PyQt4.QtCore
import
Qt
,
QEvent
from
PyQt4.QtGui
import
QApplication
from
PyQt4.QtGui
import
QApplication
from
application
import
log
from
application
import
log
...
@@ -110,6 +110,10 @@ class Blink(QApplication):
...
@@ -110,6 +110,10 @@ class Blink(QApplication):
self
.
main_window
=
MainWindow
()
self
.
main_window
=
MainWindow
()
self
.
chat_window
=
ChatWindow
()
self
.
chat_window
=
ChatWindow
()
self
.
main_window
.
__closed__
=
True
self
.
chat_window
.
__closed__
=
True
self
.
main_window
.
installEventFilter
(
self
)
self
.
chat_window
.
installEventFilter
(
self
)
self
.
main_window
.
addAction
(
self
.
chat_window
.
control_button
.
actions
.
main_window
)
self
.
main_window
.
addAction
(
self
.
chat_window
.
control_button
.
actions
.
main_window
)
self
.
chat_window
.
addAction
(
self
.
main_window
.
quit_action
)
self
.
chat_window
.
addAction
(
self
.
main_window
.
quit_action
)
...
@@ -236,6 +240,19 @@ class Blink(QApplication):
...
@@ -236,6 +240,19 @@ class Blink(QApplication):
settings
.
save
()
settings
.
save
()
return
certificate_path
return
certificate_path
def
eventFilter
(
self
,
watched
,
event
):
if
watched
in
(
self
.
main_window
,
self
.
chat_window
):
if
event
.
type
()
==
QEvent
.
Show
:
watched
.
__closed__
=
False
elif
event
.
type
()
==
QEvent
.
Close
:
watched
.
__closed__
=
True
if
self
.
main_window
.
__closed__
and
self
.
chat_window
.
__closed__
:
# close auxiliary windows
self
.
main_window
.
conference_dialog
.
close
()
self
.
main_window
.
filetransfer_window
.
close
()
self
.
main_window
.
preferences_window
.
close
()
return
False
def
customEvent
(
self
,
event
):
def
customEvent
(
self
,
event
):
handler
=
getattr
(
self
,
'_EH_
%
s'
%
event
.
name
,
Null
)
handler
=
getattr
(
self
,
'_EH_
%
s'
%
event
.
name
,
Null
)
handler
(
event
)
handler
(
event
)
...
...
blink/mainwindow.py
View file @
d469a2c7
...
@@ -233,11 +233,8 @@ class MainWindow(base_class, ui_class):
...
@@ -233,11 +233,8 @@ class MainWindow(base_class, ui_class):
QSettings
()
.
setValue
(
"main_window/geometry"
,
self
.
saveGeometry
())
QSettings
()
.
setValue
(
"main_window/geometry"
,
self
.
saveGeometry
())
super
(
MainWindow
,
self
)
.
closeEvent
(
event
)
super
(
MainWindow
,
self
)
.
closeEvent
(
event
)
self
.
about_panel
.
close
()
self
.
about_panel
.
close
()
self
.
conference_dialog
.
close
()
self
.
contact_editor_dialog
.
close
()
self
.
contact_editor_dialog
.
close
()
self
.
google_contacts_dialog
.
close
()
self
.
google_contacts_dialog
.
close
()
self
.
filetransfer_window
.
close
()
self
.
preferences_window
.
close
()
self
.
server_tools_window
.
close
()
self
.
server_tools_window
.
close
()
for
dialog
in
self
.
pending_watcher_dialogs
[:]:
for
dialog
in
self
.
pending_watcher_dialogs
[:]:
dialog
.
close
()
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