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
14ade472
Commit
14ade472
authored
Apr 07, 2021
by
Adrian Georgescu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed caching contact icon
parent
9573dece
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
resources.py
blink/resources.py
+2
-1
No files found.
blink/resources.py
View file @
14ade472
...
@@ -119,6 +119,7 @@ class IconManager(object, metaclass=Singleton):
...
@@ -119,6 +119,7 @@ class IconManager(object, metaclass=Singleton):
@
run_in_gui_thread
(
wait
=
True
)
@
run_in_gui_thread
(
wait
=
True
)
def
store_data
(
self
,
id
,
data
):
def
store_data
(
self
,
id
,
data
):
data
=
data
if
isinstance
(
data
,
bytes
)
else
data
.
encode
()
id
=
id
.
replace
(
'/'
,
'_'
)
id
=
id
.
replace
(
'/'
,
'_'
)
directory
=
ApplicationData
.
get
(
'images'
)
directory
=
ApplicationData
.
get
(
'images'
)
filename
=
os
.
path
.
join
(
directory
,
id
+
'.png'
)
filename
=
os
.
path
.
join
(
directory
,
id
+
'.png'
)
...
@@ -133,7 +134,7 @@ class IconManager(object, metaclass=Singleton):
...
@@ -133,7 +134,7 @@ class IconManager(object, metaclass=Singleton):
pixmap
.
save
(
buffer
,
'png'
)
pixmap
.
save
(
buffer
,
'png'
)
data
=
str
(
buffer
.
data
())
data
=
str
(
buffer
.
data
())
with
open
(
filename
,
'wb'
)
as
f
:
with
open
(
filename
,
'wb'
)
as
f
:
f
.
write
(
data
.
encode
()
)
f
.
write
(
data
)
icon
=
QIcon
(
pixmap
)
icon
=
QIcon
(
pixmap
)
icon
.
filename
=
filename
icon
.
filename
=
filename
icon
.
content
=
data
icon
.
content
=
data
...
...
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