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
Bronko
gajim
Commits
91bb8c33
Commit
91bb8c33
authored
Dec 27, 2019
by
Philipp Hörist
Browse files
ConversationTextview: Add nickname tag
This makes it easier for plugins to detect the nickname
parent
209cd3c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
gajim/conversation_textview.py
View file @
91bb8c33
...
@@ -272,6 +272,9 @@ def __init__(self, account, used_in_history_window=False):
...
@@ -272,6 +272,9 @@ def __init__(self, account, used_in_history_window=False):
textview_icon
=
buffer_
.
create_tag
(
'textview-icon'
)
textview_icon
=
buffer_
.
create_tag
(
'textview-icon'
)
textview_icon
.
set_property
(
'rise'
,
Pango
.
units_from_double
(
-
2.45
))
textview_icon
.
set_property
(
'rise'
,
Pango
.
units_from_double
(
-
2.45
))
# To help plugins easily identify the nickname
buffer_
.
create_tag
(
'nickname'
)
tag
=
buffer_
.
create_tag
(
'time_sometimes'
)
tag
=
buffer_
.
create_tag
(
'time_sometimes'
)
tag
.
set_property
(
'foreground'
,
'darkgrey'
)
tag
.
set_property
(
'foreground'
,
'darkgrey'
)
#Pango.SCALE_SMALL
#Pango.SCALE_SMALL
...
@@ -1227,6 +1230,7 @@ def print_name(self, name, kind, other_tags_for_name, direction_mark='',
...
@@ -1227,6 +1230,7 @@ def print_name(self, name, kind, other_tags_for_name, direction_mark='',
if
other_tags_for_name
:
if
other_tags_for_name
:
name_tags
=
other_tags_for_name
[:]
# create a new list
name_tags
=
other_tags_for_name
[:]
# create a new list
name_tags
.
append
(
kind
)
name_tags
.
append
(
kind
)
name_tags
.
append
(
'nickname'
)
for
tag
in
name_tags
:
for
tag
in
name_tags
:
if
tag
.
startswith
(
'muc_nickname_color_'
):
if
tag
.
startswith
(
'muc_nickname_color_'
):
...
...
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