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
0fa97fa1
Commit
0fa97fa1
authored
Oct 19, 2010
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made AccountInfo.name a property based on the account ID
parent
41d2a77a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
accounts.py
blink/accounts.py
+6
-4
No files found.
blink/accounts.py
View file @
0fa97fa1
...
...
@@ -34,12 +34,15 @@ from blink.util import QSingleton, call_in_auxiliary_thread, call_in_gui_thread,
class
AccountInfo
(
object
):
def
__init__
(
self
,
name
,
account
,
icon
=
None
):
self
.
name
=
name
def
__init__
(
self
,
account
,
icon
=
None
):
self
.
account
=
account
self
.
icon
=
icon
self
.
registration_state
=
None
@
property
def
name
(
self
):
return
u'Bonjour'
if
self
.
account
is
BonjourAccount
()
else
unicode
(
self
.
account
.
id
)
def
__eq__
(
self
,
other
):
if
isinstance
(
other
,
basestring
):
return
self
.
name
==
other
...
...
@@ -94,7 +97,6 @@ class AccountModel(QAbstractListModel):
def
_NH_SIPAccountManagerDidAddAccount
(
self
,
notification
):
account
=
notification
.
data
.
account
name
=
u'Bonjour'
if
account
is
BonjourAccount
()
else
unicode
(
account
.
id
)
icon
=
None
if
account
is
BonjourAccount
():
pixmap
=
QPixmap
()
...
...
@@ -102,7 +104,7 @@ class AccountModel(QAbstractListModel):
pixmap
=
pixmap
.
scaled
(
16
,
16
,
Qt
.
KeepAspectRatio
,
Qt
.
SmoothTransformation
)
icon
=
QIcon
(
pixmap
)
self
.
beginInsertRows
(
QModelIndex
(),
len
(
self
.
accounts
),
len
(
self
.
accounts
))
self
.
accounts
.
append
(
AccountInfo
(
name
,
account
,
icon
))
self
.
accounts
.
append
(
AccountInfo
(
account
,
icon
))
self
.
endInsertRows
()
def
_NH_CFGSettingsObjectDidChange
(
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