Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
norstbox
gajim
Commits
29f41b22
Commit
29f41b22
authored
Apr 06, 2006
by
Yann Leboulanger
Browse files
we can now disable avatars by setting width or height to 0. Partially fixes #1816
parent
8ad5dec7
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/gajim.py
View file @
29f41b22
...
...
@@ -1053,15 +1053,17 @@ class Interface:
path_to_original_file
=
path_to_file
+
'.'
+
typ
pixbuf
.
save
(
path_to_original_file
,
typ
)
# Generate and save the resized, color avatar
path_to_normal_file
=
path_to_file
+
'_notif_size_colored.png'
pixbuf
=
gtkgui_helpers
.
get_scaled_pixbuf
(
gtkgui_helpers
.
get_pixbuf_from_data
(
photo_decoded
),
'notification'
)
pixbuf
.
save
(
path_to_normal_file
,
'png'
)
if
pixbuf
:
path_to_normal_file
=
path_to_file
+
'_notif_size_colored.png'
pixbuf
.
save
(
path_to_normal_file
,
'png'
)
# Generate and save the resized, black and white avatar
path_to_bw_file
=
path_to_file
+
'_notif_size_bw.png'
bwbuf
=
gtkgui_helpers
.
get_scaled_pixbuf
(
gtkgui_helpers
.
make_pixbuf_grayscale
(
pixbuf
),
'notification'
)
bwbuf
.
save
(
path_to_bw_file
,
'png'
)
if
bwbuf
:
path_to_bw_file
=
path_to_file
+
'_notif_size_bw.png'
bwbuf
.
save
(
path_to_bw_file
,
'png'
)
def
add_event
(
self
,
account
,
jid
,
typ
,
args
):
'''add an event to the awaiting_events var'''
...
...
src/vcard.py
View file @
29f41b22
...
...
@@ -224,8 +224,10 @@ class VcardWindow:
dialogs
.
ErrorDialog
(
_
(
'Could not load image'
),
msg
)
continue
else
:
path_to_file
=
os
.
path
.
join
(
gajim
.
TMP
,
'avatar_scaled.png'
)
scaled_pixbuf
.
save
(
path_to_file
,
'png'
)
if
scaled_pixbuf
:
path_to_file
=
os
.
path
.
join
(
gajim
.
TMP
,
'avatar_scaled.png'
)
scaled_pixbuf
.
save
(
path_to_file
,
'png'
)
done
=
True
else
:
done
=
True
...
...
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