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
Show 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):
...
@@ -65,7 +65,7 @@ class MainWindow(base_class, ui_class):
self
.
default_icon_path
=
Resources
.
get
(
'icons/default-avatar.png'
)
self
.
default_icon_path
=
Resources
.
get
(
'icons/default-avatar.png'
)
self
.
default_icon
=
QIcon
(
self
.
default_icon_path
)
self
.
default_icon
=
QIcon
(
self
.
default_icon_path
)
self
.
last_icon_directory
=
os
.
path
.
expanduser
(
'~'
)
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
.
active_sessions_label
.
hide
()
self
.
enable_call_buttons
(
False
)
self
.
enable_call_buttons
(
False
)
...
@@ -382,7 +382,7 @@ class MainWindow(base_class, ui_class):
...
@@ -382,7 +382,7 @@ class MainWindow(base_class, ui_class):
settings
=
BlinkSettings
()
settings
=
BlinkSettings
()
icon_manager
=
IconManager
()
icon_manager
=
IconManager
()
if
filename
is
not
None
:
if
filename
is
not
None
:
icon
=
icon_manager
.
store_file
(
'
myicon
'
,
filename
)
icon
=
icon_manager
.
store_file
(
'
avatar
'
,
filename
)
try
:
try
:
hash
=
hashlib
.
sha512
(
open
(
icon
.
filename
)
.
read
())
.
hexdigest
()
hash
=
hashlib
.
sha512
(
open
(
icon
.
filename
)
.
read
())
.
hexdigest
()
except
Exception
:
except
Exception
:
...
@@ -390,7 +390,7 @@ class MainWindow(base_class, ui_class):
...
@@ -390,7 +390,7 @@ class MainWindow(base_class, ui_class):
else
:
else
:
settings
.
presence
.
icon
=
IconDescriptor
(
'file://'
+
icon
.
filename
,
hash
)
settings
.
presence
.
icon
=
IconDescriptor
(
'file://'
+
icon
.
filename
,
hash
)
else
:
else
:
icon_manager
.
remove
(
'
myicon
'
)
icon_manager
.
remove
(
'
avatar
'
)
icon
=
None
icon
=
None
settings
.
presence
.
icon
=
None
settings
.
presence
.
icon
=
None
settings
.
save
()
settings
.
save
()
...
@@ -672,7 +672,7 @@ class MainWindow(base_class, ui_class):
...
@@ -672,7 +672,7 @@ class MainWindow(base_class, ui_class):
state
=
getattr
(
AccountState
,
blink_settings
.
presence
.
current_state
.
state
,
AccountState
.
Available
)
state
=
getattr
(
AccountState
,
blink_settings
.
presence
.
current_state
.
state
,
AccountState
.
Available
)
self
.
account_state
.
setState
(
state
,
blink_settings
.
presence
.
current_state
.
note
)
self
.
account_state
.
setState
(
state
,
blink_settings
.
presence
.
current_state
.
note
)
if
'presence.icon'
in
notification
.
data
.
modified
:
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
:
if
'presence.offline_note'
in
notification
.
data
.
modified
:
# TODO: set offline note -Saul
# TODO: set offline note -Saul
pass
pass
...
...
blink/presence.py
View file @
3f778101
...
@@ -192,7 +192,7 @@ class PresencePublicationHandler(object):
...
@@ -192,7 +192,7 @@ class PresencePublicationHandler(object):
def
_save_icon
(
self
,
icon_data
,
icon_hash
):
def
_save_icon
(
self
,
icon_data
,
icon_hash
):
settings
=
BlinkSettings
()
settings
=
BlinkSettings
()
if
None
not
in
(
icon_data
,
icon_hash
):
if
None
not
in
(
icon_data
,
icon_hash
):
icon
=
IconManager
()
.
store_data
(
'
myicon
'
,
icon_data
)
icon
=
IconManager
()
.
store_data
(
'
avatar
'
,
icon_data
)
if
icon
:
if
icon
:
settings
.
presence
.
icon
=
IconDescriptor
(
'file://'
+
icon
.
filename
,
icon_hash
)
settings
.
presence
.
icon
=
IconDescriptor
(
'file://'
+
icon
.
filename
,
icon_hash
)
else
:
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