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
3f778101
Commit
3f778101
authored
Jun 17, 2013
by
Dan Pascu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed myicon to avatar
parent
66bbc3f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
mainwindow.py
blink/mainwindow.py
+4
-4
presence.py
blink/presence.py
+1
-1
No files found.
blink/mainwindow.py
View file @
3f778101
...
...
@@ -65,7 +65,7 @@ class MainWindow(base_class, ui_class):
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
(
'~'
)
self
.
set_user_icon
(
IconManager
()
.
get
(
'
myicon
'
))
self
.
set_user_icon
(
IconManager
()
.
get
(
'
avatar
'
))
self
.
active_sessions_label
.
hide
()
self
.
enable_call_buttons
(
False
)
...
...
@@ -382,7 +382,7 @@ class MainWindow(base_class, ui_class):
settings
=
BlinkSettings
()
icon_manager
=
IconManager
()
if
filename
is
not
None
:
icon
=
icon_manager
.
store_file
(
'
myicon
'
,
filename
)
icon
=
icon_manager
.
store_file
(
'
avatar
'
,
filename
)
try
:
hash
=
hashlib
.
sha512
(
open
(
icon
.
filename
)
.
read
())
.
hexdigest
()
except
Exception
:
...
...
@@ -390,7 +390,7 @@ class MainWindow(base_class, ui_class):
else
:
settings
.
presence
.
icon
=
IconDescriptor
(
'file://'
+
icon
.
filename
,
hash
)
else
:
icon_manager
.
remove
(
'
myicon
'
)
icon_manager
.
remove
(
'
avatar
'
)
icon
=
None
settings
.
presence
.
icon
=
None
settings
.
save
()
...
...
@@ -672,7 +672,7 @@ class MainWindow(base_class, ui_class):
state
=
getattr
(
AccountState
,
blink_settings
.
presence
.
current_state
.
state
,
AccountState
.
Available
)
self
.
account_state
.
setState
(
state
,
blink_settings
.
presence
.
current_state
.
note
)
if
'presence.icon'
in
notification
.
data
.
modified
:
self
.
set_user_icon
(
IconManager
()
.
get
(
'
myicon
'
))
self
.
set_user_icon
(
IconManager
()
.
get
(
'
avatar
'
))
if
'presence.offline_note'
in
notification
.
data
.
modified
:
# TODO: set offline note -Saul
pass
...
...
blink/presence.py
View file @
3f778101
...
...
@@ -192,7 +192,7 @@ class PresencePublicationHandler(object):
def
_save_icon
(
self
,
icon_data
,
icon_hash
):
settings
=
BlinkSettings
()
if
None
not
in
(
icon_data
,
icon_hash
):
icon
=
IconManager
()
.
store_data
(
'
myicon
'
,
icon_data
)
icon
=
IconManager
()
.
store_data
(
'
avatar
'
,
icon_data
)
if
icon
:
settings
.
presence
.
icon
=
IconDescriptor
(
'file://'
+
icon
.
filename
,
icon_hash
)
else
:
...
...
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