Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
gajim
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Peter Shkenev
gajim
Commits
19d99e0a
Commit
19d99e0a
authored
19 years ago
by
Yann Leboulanger
Browse files
Options
Downloads
Patches
Plain Diff
remove the image in tc window when we get the vcard and there is no image in it
parent
cbebcfc2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/tabbed_chat_window.py
+19
-16
19 additions, 16 deletions
src/tabbed_chat_window.py
with
19 additions
and
16 deletions
src/tabbed_chat_window.py
+
19
−
16
View file @
19d99e0a
...
...
@@ -237,27 +237,30 @@ def get_specific_unread(self, jid):
return
0
# FIXME: always zero why??
def
show_avatar
(
self
,
jid
,
resource
):
if
self
.
plugin
.
avatar_pixbufs
[
jid
]
is
None
:
return
# contact has no avatar
pixbuf
=
self
.
plugin
.
avatar_pixbufs
[
jid
]
w
=
gajim
.
config
.
get
(
'
avatar_width
'
)
h
=
gajim
.
config
.
get
(
'
avatar_height
'
)
scaled_buf
=
pixbuf
.
scale_simple
(
w
,
h
,
gtk
.
gdk
.
INTERP_HYPER
)
x
=
None
# Get the XML instance
xml
=
None
if
self
.
xmls
.
has_key
(
jid
):
x
=
self
.
xmls
[
jid
]
x
ml
=
self
.
xmls
[
jid
]
else
:
# it can be xmls[jid/resource] if it's a vcard from pm
jid_with_resource
=
jid
+
'
/
'
+
resource
if
self
.
xmls
.
has_key
(
jid_with_resource
):
x
=
self
.
xmls
[
jid_with_resource
]
if
x
is
not
None
:
image
=
x
.
get_widget
(
'
avatar_image
'
)
image
.
set_from_pixbuf
(
scaled_buf
)
image
.
show_all
()
xml
=
self
.
xmls
[
jid_with_resource
]
if
not
xml
:
return
if
self
.
plugin
.
avatar_pixbufs
[
jid
]
is
None
:
# contact has no avatar
scaled_buf
=
None
else
:
pixbuf
=
self
.
plugin
.
avatar_pixbufs
[
jid
]
w
=
gajim
.
config
.
get
(
'
avatar_width
'
)
h
=
gajim
.
config
.
get
(
'
avatar_height
'
)
scaled_buf
=
pixbuf
.
scale_simple
(
w
,
h
,
gtk
.
gdk
.
INTERP_HYPER
)
image
=
xml
.
get_widget
(
'
avatar_image
'
)
image
.
set_from_pixbuf
(
scaled_buf
)
image
.
show_all
()
def
set_state_image
(
self
,
jid
):
prio
=
0
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment