Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
poezio
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Maxime Buquet
poezio
Commits
d6ec1897
Verified
Commit
d6ec1897
authored
Dec 08, 2014
by
mathieui
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a visual “feature check” for chat states too
parent
ad20d6db
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
1 deletion
+23
-1
src/tabs/basetabs.py
src/tabs/basetabs.py
+23
-1
No files found.
src/tabs/basetabs.py
View file @
d6ec1897
...
...
@@ -710,11 +710,33 @@ class OneToOneTab(ChatTab):
# change this to True or False when
# we know that the remote user wants chatstates, or not.
# None means we don’t know yet, and we send only "active" chatstates
self
.
remote_wants_chatstates
=
None
self
.
_
remote_wants_chatstates
=
None
self
.
remote_supports_attention
=
True
self
.
remote_supports_receipts
=
True
self
.
check_features
()
@
property
def
remote_wants_chatstates
(
self
):
return
self
.
_remote_wants_chatstates
@
remote_wants_chatstates
.
setter
def
remote_wants_chatstates
(
self
,
value
):
old_value
=
self
.
_remote_wants_chatstates
self
.
_remote_wants_chatstates
=
value
if
(
old_value
is
None
and
value
!=
None
)
or
\
(
old_value
!=
value
and
value
!=
None
):
ok
=
get_theme
().
CHAR_OK
nope
=
get_theme
().
CHAR_EMPTY
support
=
ok
if
value
else
nope
if
value
:
msg
=
_
(
'
\x19
%s}Contact supports chat states [%s].'
)
else
:
msg
=
_
(
'
\x19
%s}Contact does not support chat states [%s].'
)
color
=
dump_tuple
(
get_theme
().
COLOR_INFORMATION_TEXT
)
msg
=
msg
%
(
color
,
support
)
self
.
add_message
(
msg
,
typ
=
0
)
self
.
core
.
refresh_window
()
def
ack_message
(
self
,
msg_id
):
"""
Ack a message
...
...
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