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
38c8ba58
Commit
38c8ba58
authored
Sep 22, 2006
by
Yann Leboulanger
Browse files
Do not propose to save avatar in profile window if it's not on HD. Fixes #2428
parent
74471acd
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/profile_window.py
View file @
38c8ba58
...
...
@@ -159,12 +159,20 @@ class ProfileWindow:
'''If right-clicked, show popup'''
if
event
.
button
==
3
and
self
.
avatar_encoded
:
# right click
menu
=
gtk
.
Menu
()
nick
=
gajim
.
config
.
get_per
(
'accounts'
,
self
.
account
,
'name'
)
menuitem
=
gtk
.
ImageMenuItem
(
gtk
.
STOCK_SAVE_AS
)
menuitem
.
connect
(
'activate'
,
gtkgui_helpers
.
on_avatar_save_as_menuitem_activate
,
self
.
jid
,
None
,
nick
+
'.jpeg'
)
menu
.
append
(
menuitem
)
# Try to get pixbuf
is_fake
=
False
if
account
and
gajim
.
contacts
.
is_pm_from_jid
(
account
,
jid
):
is_fake
=
True
pixbuf
=
get_avatar_pixbuf_from_cache
(
jid
,
is_fake
)
if
pixbuf
:
nick
=
gajim
.
config
.
get_per
(
'accounts'
,
self
.
account
,
'name'
)
menuitem
=
gtk
.
ImageMenuItem
(
gtk
.
STOCK_SAVE_AS
)
menuitem
.
connect
(
'activate'
,
gtkgui_helpers
.
on_avatar_save_as_menuitem_activate
,
self
.
jid
,
None
,
nick
+
'.jpeg'
)
menu
.
append
(
menuitem
)
# show clear
menuitem
=
gtk
.
ImageMenuItem
(
gtk
.
STOCK_CLEAR
)
menuitem
.
connect
(
'activate'
,
self
.
on_clear_button_clicked
)
...
...
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