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
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
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
Weblate
gajim
Commits
4f68782e
Commit
4f68782e
authored
17 years ago
by
Piotr Gaczkowski
Browse files
Options
Downloads
Patches
Plain Diff
Activity and Mood in tooltips now bug-free (:P)
parent
ab26867f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/common/pep.py
+19
-14
19 additions, 14 deletions
src/common/pep.py
src/tooltips.py
+4
-7
4 additions, 7 deletions
src/tooltips.py
with
23 additions
and
21 deletions
src/common/pep.py
+
19
−
14
View file @
4f68782e
from
common
import
gajim
,
xmpp
def
user_mood
(
items
,
name
,
jid
):
#FIXME: text deletion
(
user
,
resource
)
=
gajim
.
get_room_and_nick_from_fjid
(
jid
)
contacts
=
gajim
.
contacts
.
get_contact
(
name
,
user
,
resource
=
resource
)
for
item
in
items
.
getTags
(
'
item
'
):
child
=
item
.
getTag
(
'
mood
'
)
if
child
is
not
None
:
for
ch
in
child
.
getChildren
():
if
ch
.
getName
()
!=
'
text
'
:
for
contact
in
contacts
:
for
contact
in
contacts
:
if
contact
.
mood
.
has_key
(
'
mood
'
):
del
contact
.
mood
[
'
mood
'
]
if
contact
.
mood
.
has_key
(
'
text
'
):
del
contact
.
mood
[
'
text
'
]
for
ch
in
child
.
getChildren
():
if
ch
.
getName
()
!=
'
text
'
:
contact
.
mood
[
'
mood
'
]
=
ch
.
getName
()
else
:
for
contact
in
contacts
:
else
:
contact
.
mood
[
'
text
'
]
=
ch
.
getData
()
def
user_tune
(
items
,
name
,
jid
):
...
...
@@ -22,21 +24,24 @@ def user_geoloc(items, name, jid):
pass
def
user_activity
(
items
,
name
,
jid
):
#FIXME: text deletion
(
user
,
resource
)
=
gajim
.
get_room_and_nick_from_fjid
(
jid
)
contacts
=
gajim
.
contacts
.
get_contact
(
name
,
user
,
resource
=
resource
)
for
item
in
items
.
getTags
(
'
item
'
):
child
=
item
.
getTag
(
'
activity
'
)
if
child
is
not
None
:
for
ch
in
child
.
getChildren
():
if
ch
.
getName
()
!=
'
text
'
:
for
contact
in
contacts
:
for
contact
in
contacts
:
if
contact
.
activity
.
has_key
(
'
activity
'
):
del
contact
.
activity
[
'
activity
'
]
if
contact
.
activity
.
has_key
(
'
subactivity
'
):
del
contact
.
activity
[
'
subactivity
'
]
if
contact
.
activity
.
has_key
(
'
text
'
):
del
contact
.
activity
[
'
text
'
]
for
ch
in
child
.
getChildren
():
if
ch
.
getName
()
!=
'
text
'
:
contact
.
activity
[
'
activity
'
]
=
ch
.
getName
()
for
chi
in
ch
.
getChildren
():
for
contact
in
contacts
:
for
chi
in
ch
.
getChildren
():
contact
.
activity
[
'
subactivity
'
]
=
chi
.
getName
()
else
:
for
contact
in
contacts
:
else
:
contact
.
activity
[
'
text
'
]
=
ch
.
getData
()
def
user_send_mood
(
account
,
mood
,
message
=
''
):
...
...
This diff is collapsed.
Click to expand it.
src/tooltips.py
+
4
−
7
View file @
4f68782e
...
...
@@ -479,13 +479,10 @@ class RosterTooltip(NotificationAreaTooltip):
# we append show below
if
contact
.
mood
.
has_key
(
'
mood
'
):
mood
=
contact
.
mood
[
'
mood
'
].
strip
()
if
contact
.
mood
.
has_key
(
'
text
'
):
mood_text
=
contact
.
mood
[
'
text
'
].
strip
()
else
:
mood_text
=
''
if
mood
:
properties
.
append
((
'
Mood: <b>%s</b> (%s)
'
%
(
mood
,
mood_text
),
None
))
mood_string
=
'
Mood: <b>%s</b>
'
%
contact
.
mood
[
'
mood
'
].
strip
()
if
contact
.
mood
.
has_key
(
'
text
'
)
and
contact
.
mood
[
'
text
'
]
!=
''
:
mood_string
+=
'
(%s)
'
%
contact
.
mood
[
'
text
'
].
strip
()
properties
.
append
((
mood_string
,
None
))
if
contact
.
activity
.
has_key
(
'
activity
'
):
activity
=
contact
.
activity
[
'
activity
'
].
strip
()
...
...
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