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
10f43be7
Commit
10f43be7
authored
Jun 23, 2013
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use a transaction to update multiple elements at once
parent
6533f554
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
presence.py
blink/presence.py
+4
-3
No files found.
blink/presence.py
View file @
10f43be7
...
...
@@ -200,6 +200,7 @@ class PresencePublicationHandler(object):
def
_NH_CFGSettingsObjectDidChange
(
self
,
notification
):
if
notification
.
sender
is
BlinkSettings
():
# TODO: use a transaction here as well? -Dan
if
'presence.offline_note'
in
notification
.
data
.
modified
:
self
.
set_xcap_offline_note
()
if
'presence.icon'
in
notification
.
data
.
modified
:
...
...
@@ -217,9 +218,9 @@ class PresencePublicationHandler(object):
account
.
icon
=
None
if
set
([
'display_name'
,
'xcap.enabled'
,
'xcap.discovered'
])
.
intersection
(
notification
.
data
.
modified
):
if
'xcap.discovered'
in
notification
.
data
.
modified
and
account
.
xcap
.
enabled
and
account
.
xcap
.
discovered
:
# TODO: group these in a transaction? Needs to be done in the file-io thread -Saul
self
.
set_xcap_offline_note
(
account
)
self
.
set_xcap_icon
(
account
)
with
account
.
xcap_manager
.
transaction
():
self
.
set_xcap_offline_note
(
account
)
self
.
set_xcap_icon
(
account
)
self
.
publish
(
account
)
def
_NH_SIPAccountWillActivate
(
self
,
notification
):
...
...
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