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
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Contributor 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
mesonium
gajim
Commits
fe122aab
Commit
fe122aab
authored
5 years ago
by
Philipp Hörist
Browse files
Options
Downloads
Patches
Plain Diff
Tooltips: Fix pylint errors
parent
0b794a04
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
gajim/gtk/tooltips.py
+16
-10
16 additions, 10 deletions
gajim/gtk/tooltips.py
with
16 additions
and
10 deletions
gajim/gtk/tooltips.py
+
16
−
10
View file @
fe122aab
...
...
@@ -311,11 +311,7 @@ def _populate_grid(self, contacts, account, typ):
if
account
==
'
all
'
:
# Tooltip for merged accounts row
accounts
=
helpers
.
get_notification_icon_tooltip_dict
()
self
.
spacer_label
=
''
self
.
fill_table_with_accounts
(
accounts
)
self
.
_ui
.
tooltip_grid
.
attach
(
self
.
table
,
1
,
3
,
2
,
1
)
self
.
table
.
show_all
()
self
.
_show_merged_account_tooltip
()
return
if
typ
==
'
account
'
:
...
...
@@ -345,14 +341,16 @@ def _populate_grid(self, contacts, account, typ):
contacts
)
if
self
.
prim_contact
is
None
:
log
.
error
(
'
No contact for Roster tooltip found
'
)
log
.
error
(
'
contacts: %s, typ: %s, account: %s
'
,
contacts
,
typ
,
account
)
log
.
error
(
'
contacts: %s, typ: %s, account: %s
'
,
contacts
,
typ
,
account
)
return
self
.
contact_jid
=
self
.
prim_contact
.
jid
name
=
GLib
.
markup_escape_text
(
self
.
prim_contact
.
get_shown_name
())
name_markup
=
'
<b>{}</b>
'
.
format
(
name
)
if
app
.
config
.
get
(
'
mergeaccounts
'
):
color
=
app
.
config
.
get
(
'
tooltip_account_name_color
'
)
account_name
=
GLib
.
markup_escape_text
(
self
.
prim_contact
.
account
.
name
)
account_name
=
GLib
.
markup_escape_text
(
self
.
prim_contact
.
account
.
name
)
name_markup
+=
"
<span foreground=
'
{}
'
>({})</span>
"
.
format
(
color
,
account_name
)
...
...
@@ -360,7 +358,8 @@ def _populate_grid(self, contacts, account, typ):
name_markup
+=
_
(
'
[blocked]
'
)
try
:
if
self
.
prim_contact
.
jid
in
app
.
interface
.
minimized_controls
[
account
]:
controls
=
app
.
interface
.
minimized_controls
[
account
]
if
self
.
prim_contact
.
jid
in
controls
:
name_markup
+=
_
(
'
[minimized]
'
)
except
KeyError
:
pass
...
...
@@ -460,10 +459,17 @@ def _populate_grid(self, contacts, account, typ):
i
+=
1
self
.
last_widget
.
set_vexpand
(
True
)
def
_show_merged_account_tooltip
(
self
):
accounts
=
helpers
.
get_notification_icon_tooltip_dict
()
self
.
spacer_label
=
''
self
.
fill_table_with_accounts
(
accounts
)
self
.
_ui
.
tooltip_grid
.
attach
(
self
.
table
,
1
,
3
,
2
,
1
)
self
.
table
.
show_all
()
def
_append_pep_info
(
self
,
contact
):
"""
Append Tune, Mood, Activity, Location information of the
specified contact
to the given property list.
Append Tune, Mood, Activity, Location information of the
specified contact
to the given property list.
"""
if
PEPEventType
.
MOOD
in
contact
.
pep
:
mood
=
format_mood
(
*
contact
.
pep
[
PEPEventType
.
MOOD
])
...
...
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