Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vmj-qt
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
vmj-qt
Commits
825b87c7
Commit
825b87c7
authored
2 years ago
by
Tijmen de Mes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable encryption icon in session info panel
parent
fd384e51
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
22 additions
and
6 deletions
+22
-6
chatwindow.py
blink/chatwindow.py
+18
-6
sessions.py
blink/sessions.py
+4
-0
No files found.
blink/chatwindow.py
View file @
825b87c7
...
@@ -1901,6 +1901,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -1901,6 +1901,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
audio_info
=
blink_session
.
info
.
streams
.
audio
audio_info
=
blink_session
.
info
.
streams
.
audio
video_info
=
blink_session
.
info
.
streams
.
video
video_info
=
blink_session
.
info
.
streams
.
video
chat_info
=
blink_session
.
info
.
streams
.
chat
chat_info
=
blink_session
.
info
.
streams
.
chat
messages_info
=
blink_session
.
info
.
streams
.
messages
screen_info
=
blink_session
.
info
.
streams
.
screen_sharing
screen_info
=
blink_session
.
info
.
streams
.
screen_sharing
state
=
"
%
s"
%
blink_session
.
state
state
=
"
%
s"
%
blink_session
.
state
...
@@ -1918,6 +1919,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -1918,6 +1919,7 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
self
.
chat_value_widget
.
setEnabled
(
True
)
self
.
chat_value_widget
.
setEnabled
(
True
)
self
.
chat_value_label
.
setText
(
'Using SIP Message'
)
self
.
chat_value_label
.
setText
(
'Using SIP Message'
)
if
blink_session
.
chat_type
is
not
None
:
self
.
chat_encryption_label
.
setVisible
(
False
)
self
.
chat_encryption_label
.
setVisible
(
False
)
self
.
chat_connection_label
.
setVisible
(
False
)
self
.
chat_connection_label
.
setVisible
(
False
)
elif
state
in
state_map
:
elif
state
in
state_map
:
...
@@ -2035,14 +2037,20 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -2035,14 +2037,20 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
self
.
chat_encryption_label
.
setToolTip
(
'Media is encrypted using TLS'
)
self
.
chat_encryption_label
.
setToolTip
(
'Media is encrypted using TLS'
)
else
:
else
:
self
.
chat_encryption_label
.
setToolTip
(
'Media is not encrypted'
)
self
.
chat_encryption_label
.
setToolTip
(
'Media is not encrypted'
)
if
messages_info
.
encryption
is
not
None
:
if
messages_info
.
encryption
==
'OpenPGP'
:
self
.
chat_encryption_label
.
setToolTip
(
'Media is encrypted using {0.encryption}'
.
format
(
messages_info
))
else
:
self
.
chat_encryption_label
.
setToolTip
(
'Media is encrypted using {0.encryption} ({0.encryption_cipher})'
.
format
(
messages_info
))
self
.
_update_chat_encryption_icon
()
self
.
_update_chat_encryption_icon
()
self
.
chat_connection_label
.
setVisible
(
chat_info
.
remote_address
is
not
None
)
self
.
chat_connection_label
.
setVisible
(
chat_info
.
remote_address
is
not
None
)
self
.
chat_encryption_label
.
setVisible
(
chat_info
.
remote_address
is
not
None
and
(
chat_info
.
encryption
is
not
None
or
chat_info
.
transport
==
'tls'
)
)
self
.
chat_encryption_label
.
setVisible
(
(
chat_info
.
remote_address
is
not
None
and
(
chat_info
.
encryption
is
not
None
or
chat_info
.
transport
==
'tls'
))
or
messages_info
.
encryption
is
not
None
)
if
self
.
otr_widget
.
isVisibleTo
(
self
.
info_panel
):
if
self
.
otr_widget
.
isVisibleTo
(
self
.
info_panel
):
# refresh the OTR widget (we need to hide/change/show because in certain configurations it flickers when changed while visible)
# refresh the OTR widget (we need to hide/change/show because in certain configurations it flickers when changed while visible)
stream_info
=
blink_session
.
info
.
streams
.
chat
stream_info
=
blink_session
.
info
.
streams
.
chat
or
blink_session
.
info
.
streams
.
messages
self
.
otr_widget
.
hide
()
self
.
otr_widget
.
hide
()
self
.
otr_widget
.
peer_name
=
stream_info
.
otr_peer_name
self
.
otr_widget
.
peer_name
=
stream_info
.
otr_peer_name
self
.
otr_widget
.
peer_verified
=
stream_info
.
otr_verified
self
.
otr_widget
.
peer_verified
=
stream_info
.
otr_verified
...
@@ -2893,11 +2901,11 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -2893,11 +2901,11 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
self
.
control_button
.
setEnabled
(
False
)
self
.
control_button
.
setEnabled
(
False
)
def
_SH_OTRWidgetNameChanged
(
self
):
def
_SH_OTRWidgetNameChanged
(
self
):
stream
=
self
.
selected_session
.
chat_stream
or
Null
stream
=
self
.
selected_session
.
chat_stream
or
self
.
selected_session
.
messages_stream
or
Null
stream
.
encryption
.
peer_name
=
self
.
otr_widget
.
peer_name
stream
.
encryption
.
peer_name
=
self
.
otr_widget
.
peer_name
def
_SH_OTRWidgetStatusChanged
(
self
):
def
_SH_OTRWidgetStatusChanged
(
self
):
stream
=
self
.
selected_session
.
chat_stream
or
Null
stream
=
self
.
selected_session
.
chat_stream
or
self
.
selected_session
.
messages_stream
or
Null
stream
.
encryption
.
verified
=
self
.
otr_widget
.
peer_verified
stream
.
encryption
.
verified
=
self
.
otr_widget
.
peer_verified
def
_SH_ZRTPWidgetNameChanged
(
self
):
def
_SH_ZRTPWidgetNameChanged
(
self
):
...
@@ -2983,6 +2991,10 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
...
@@ -2983,6 +2991,10 @@ class ChatWindow(base_class, ui_class, ColorHelperMixin):
def
_EH_ChatEncryptionLabelClicked
(
self
):
def
_EH_ChatEncryptionLabelClicked
(
self
):
stream
=
self
.
selected_session
.
chat_stream
stream
=
self
.
selected_session
.
chat_stream
stream_info
=
self
.
selected_session
.
blink_session
.
info
.
streams
.
chat
stream_info
=
self
.
selected_session
.
blink_session
.
info
.
streams
.
chat
if
self
.
selected_session
.
blink_session
.
chat_type
is
None
:
stream
=
self
.
selected_session
.
messages_stream
stream_info
=
self
.
selected_session
.
blink_session
.
info
.
streams
.
messages
if
stream
is
not
None
and
not
stream
.
_done
and
stream_info
.
encryption
==
'OTR'
:
if
stream
is
not
None
and
not
stream
.
_done
and
stream_info
.
encryption
==
'OTR'
:
if
self
.
otr_widget
.
isVisible
():
if
self
.
otr_widget
.
isVisible
():
self
.
otr_widget
.
hide
()
self
.
otr_widget
.
hide
()
...
...
This diff is collapsed.
Click to expand it.
blink/sessions.py
View file @
825b87c7
...
@@ -3203,6 +3203,10 @@ class ChatSessionItem(object):
...
@@ -3203,6 +3203,10 @@ class ChatSessionItem(object):
def
chat_stream
(
self
):
def
chat_stream
(
self
):
return
self
.
blink_session
.
streams
.
get
(
'chat'
)
return
self
.
blink_session
.
streams
.
get
(
'chat'
)
@
property
def
messages_stream
(
self
):
return
self
.
blink_session
.
fake_streams
.
get
(
'messages'
)
@
property
@
property
def
audio_stream
(
self
):
def
audio_stream
(
self
):
return
self
.
blink_session
.
streams
.
get
(
'audio'
)
return
self
.
blink_session
.
streams
.
get
(
'audio'
)
...
...
This diff is collapsed.
Click to expand it.
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