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
l-n-s
gajim
Commits
b6e7f5c6
Commit
b6e7f5c6
authored
6 years ago
by
Daniel Brötzmann
Committed by
Philipp Hörist
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Format OMEMO fingerprint in tooltip
parent
4acf36c9
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
gajim/conversation_textview.py
+3
-1
3 additions, 1 deletion
gajim/conversation_textview.py
gajim/gtk/util.py
+11
-0
11 additions, 0 deletions
gajim/gtk/util.py
with
14 additions
and
1 deletion
gajim/conversation_textview.py
+
3
−
1
View file @
b6e7f5c6
...
...
@@ -49,6 +49,7 @@ from gajim.common.const import StyleAttr, Trust
from
gajim.gtk
import
util
from
gajim.gtk.util
import
load_icon
from
gajim.gtk.util
import
get_cursor
from
gajim.gtk.util
import
format_fingerprint
from
gajim.gtk.emoji_data
import
emoji_pixbufs
from
gajim.gtk.emoji_data
import
is_emoji
from
gajim.gtk.emoji_data
import
get_emoji_pixbuf
...
...
@@ -1159,7 +1160,8 @@ class ConversationTextview(GObject.GObject):
icon
,
trust_tooltip
,
color
=
TRUST_SYMBOL_DATA
[
trust
]
tooltip
=
tooltip
+
'
\n
'
+
trust_tooltip
if
fingerprint
is
not
None
:
tooltip
=
tooltip
+
'
(
'
+
fingerprint
+
'
)
'
fingerprint
=
format_fingerprint
(
fingerprint
)
tooltip
=
tooltip
+
'
\n
'
+
fingerprint
temp_mark
=
self
.
_buffer
.
create_mark
(
None
,
iter_
,
True
)
self
.
_buffer
.
insert
(
iter_
,
'
'
)
...
...
This diff is collapsed.
Click to expand it.
gajim/gtk/util.py
+
11
−
0
View file @
b6e7f5c6
...
...
@@ -23,6 +23,7 @@ from typing import Optional
import
os
import
sys
import
logging
import
textwrap
import
xml.etree.ElementTree
as
ET
from
pathlib
import
Path
from
functools
import
wraps
...
...
@@ -578,3 +579,13 @@ def format_location(location):
'
tag
'
:
tag
.
capitalize
(),
'
text
'
:
text
}
return
location_string
.
strip
()
def
format_fingerprint
(
fingerprint
):
fplen
=
len
(
fingerprint
)
wordsize
=
fplen
//
8
buf
=
''
for
w
in
range
(
0
,
fplen
,
wordsize
):
buf
+=
'
{0}
'
.
format
(
fingerprint
[
w
:
w
+
wordsize
])
buf
=
textwrap
.
fill
(
buf
,
width
=
36
)
return
buf
.
rstrip
().
upper
()
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