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
cb658d63
Commit
cb658d63
authored
Jul 07, 2010
by
Luci Stanescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replaced use of Blink with QApplication where appropriate
parent
225dbc57
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
11 deletions
+7
-11
sessions.py
blink/sessions.py
+3
-5
util.py
blink/util.py
+4
-6
No files found.
blink/sessions.py
View file @
cb658d63
...
@@ -14,7 +14,7 @@ from functools import partial
...
@@ -14,7 +14,7 @@ from functools import partial
from
PyQt4
import
uic
from
PyQt4
import
uic
from
PyQt4.QtCore
import
Qt
,
QAbstractListModel
,
QByteArray
,
QEvent
,
QMimeData
,
QModelIndex
,
QObject
,
QSize
,
QStringList
,
QTimer
,
pyqtSignal
from
PyQt4.QtCore
import
Qt
,
QAbstractListModel
,
QByteArray
,
QEvent
,
QMimeData
,
QModelIndex
,
QObject
,
QSize
,
QStringList
,
QTimer
,
pyqtSignal
from
PyQt4.QtGui
import
QAction
,
QBrush
,
QColor
,
QDrag
,
QLinearGradient
,
QListView
,
QMenu
,
QPainter
,
QPen
,
QPixmap
,
QStyle
,
QStyledItemDelegate
from
PyQt4.QtGui
import
QAction
,
Q
Application
,
Q
Brush
,
QColor
,
QDrag
,
QLinearGradient
,
QListView
,
QMenu
,
QPainter
,
QPen
,
QPixmap
,
QStyle
,
QStyledItemDelegate
from
application.notification
import
IObserver
,
NotificationCenter
from
application.notification
import
IObserver
,
NotificationCenter
from
application.python.util
import
Null
,
Singleton
from
application.python.util
import
Null
,
Singleton
...
@@ -1935,12 +1935,11 @@ class SessionManager(object):
...
@@ -1935,12 +1935,11 @@ class SessionManager(object):
bisect
.
insort_right
(
self
.
incoming_sessions
,
incoming_session
)
bisect
.
insort_right
(
self
.
incoming_sessions
,
incoming_session
)
incoming_session
.
accepted
.
connect
(
partial
(
self
.
_SH_IncomingSessionAccepted
,
incoming_session
))
incoming_session
.
accepted
.
connect
(
partial
(
self
.
_SH_IncomingSessionAccepted
,
incoming_session
))
incoming_session
.
rejected
.
connect
(
partial
(
self
.
_SH_IncomingSessionRejected
,
incoming_session
))
incoming_session
.
rejected
.
connect
(
partial
(
self
.
_SH_IncomingSessionRejected
,
incoming_session
))
from
blink
import
Blink
try
:
try
:
position
=
self
.
dialog_positions
.
pop
(
0
)
position
=
self
.
dialog_positions
.
pop
(
0
)
except
IndexError
:
except
IndexError
:
position
=
None
position
=
None
incoming_session
.
dialog
.
show
(
activate
=
Blink
()
.
activeWindow
()
is
not
None
and
self
.
incoming_sessions
.
index
(
incoming_session
)
==
0
,
position
=
position
)
incoming_session
.
dialog
.
show
(
activate
=
QApplication
.
activeWindow
()
is
not
None
and
self
.
incoming_sessions
.
index
(
incoming_session
)
==
0
,
position
=
position
)
self
.
update_ringtone
()
self
.
update_ringtone
()
def
_NH_SIPSessionGotProposal
(
self
,
notification
):
def
_NH_SIPSessionGotProposal
(
self
,
notification
):
...
@@ -1975,12 +1974,11 @@ class SessionManager(object):
...
@@ -1975,12 +1974,11 @@ class SessionManager(object):
bisect
.
insort_right
(
self
.
incoming_sessions
,
incoming_session
)
bisect
.
insort_right
(
self
.
incoming_sessions
,
incoming_session
)
incoming_session
.
accepted
.
connect
(
partial
(
self
.
_SH_IncomingSessionAccepted
,
incoming_session
))
incoming_session
.
accepted
.
connect
(
partial
(
self
.
_SH_IncomingSessionAccepted
,
incoming_session
))
incoming_session
.
rejected
.
connect
(
partial
(
self
.
_SH_IncomingSessionRejected
,
incoming_session
))
incoming_session
.
rejected
.
connect
(
partial
(
self
.
_SH_IncomingSessionRejected
,
incoming_session
))
from
blink
import
Blink
try
:
try
:
position
=
self
.
dialog_positions
.
pop
(
0
)
position
=
self
.
dialog_positions
.
pop
(
0
)
except
IndexError
:
except
IndexError
:
position
=
None
position
=
None
incoming_session
.
dialog
.
show
(
activate
=
Blink
()
.
activeWindow
()
is
not
None
and
self
.
incoming_sessions
.
index
(
incoming_session
)
==
0
,
position
=
position
)
incoming_session
.
dialog
.
show
(
activate
=
QApplication
.
activeWindow
()
is
not
None
and
self
.
incoming_sessions
.
index
(
incoming_session
)
==
0
,
position
=
position
)
self
.
update_ringtone
()
self
.
update_ringtone
()
def
_NH_SIPSessionDidFail
(
self
,
notification
):
def
_NH_SIPSessionDidFail
(
self
,
notification
):
...
...
blink/util.py
View file @
cb658d63
...
@@ -16,9 +16,8 @@ class QSingleton(Singleton, type(QObject)):
...
@@ -16,9 +16,8 @@ class QSingleton(Singleton, type(QObject)):
def
call_in_gui_thread
(
function
,
*
args
,
**
kw
):
def
call_in_gui_thread
(
function
,
*
args
,
**
kw
):
from
blink
import
Blink
application
=
QApplication
.
instance
()
blink
=
Blink
()
application
.
postEvent
(
application
,
CallFunctionEvent
(
function
,
args
,
kw
))
blink
.
postEvent
(
blink
,
CallFunctionEvent
(
function
,
args
,
kw
))
def
call_later
(
interval
,
function
,
*
args
,
**
kw
):
def
call_later
(
interval
,
function
,
*
args
,
**
kw
):
...
@@ -30,9 +29,8 @@ def call_later(interval, function, *args, **kw):
...
@@ -30,9 +29,8 @@ def call_later(interval, function, *args, **kw):
def
run_in_gui_thread
(
func
):
def
run_in_gui_thread
(
func
):
@
preserve_signature
(
func
)
@
preserve_signature
(
func
)
def
wrapper
(
*
args
,
**
kw
):
def
wrapper
(
*
args
,
**
kw
):
from
blink
import
Blink
application
=
QApplication
.
instance
()
blink
=
Blink
()
application
.
postEvent
(
application
,
CallFunctionEvent
(
func
,
args
,
kw
))
blink
.
postEvent
(
blink
,
CallFunctionEvent
(
func
,
args
,
kw
))
return
wrapper
return
wrapper
...
...
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