Commit a587ff70 authored by Daniel Brötzmann's avatar Daniel Brötzmann Committed by Philipp Hörist

[omemo] Add infobar in fingerprints dialog

parent e271f3f9
......@@ -78,6 +78,13 @@ class KeyDialog(Gtk.Dialog):
path = self._plugin.local_file_path('gtk/key.ui')
self._ui = get_builder(path)
markup = '<a href="%s">%s</a>' % (
'https://dev.gajim.org/gajim/gajim-plugins/-/'
'wikis/omemogajimplugin', _('Read more about blind trust.'))
self._ui.btbv_link.set_markup(markup)
self._ui.infobar.set_revealed(
self._plugin.config['SHOW_HELP_FINGERPRINTS'])
self._ui.header.set_text(_('Fingerprints for %s') % self._contact.jid)
omemo_img_path = self._plugin.local_file_path('omemo.png')
......@@ -90,7 +97,7 @@ class KeyDialog(Gtk.Dialog):
ownfpr_format = get_fingerprint(self._identity_key, formatted=True)
self._ui.own_fingerprint.set_text(ownfpr_format)
self.get_content_area().add(self._ui.grid)
self.get_content_area().add(self._ui.box)
self.update()
self._load_qrcode()
......@@ -98,6 +105,11 @@ class KeyDialog(Gtk.Dialog):
self.connect('destroy', self._on_destroy)
self.show_all()
def _on_infobar_response(self, _widget, response):
if response == Gtk.ResponseType.CLOSE:
self._ui.infobar.set_revealed(False)
self._plugin.config['SHOW_HELP_FINGERPRINTS'] = False
def _filter_func(self, row, _user_data):
search_text = self._ui.search.get_text()
if search_text and search_text.lower() not in str(row.jid):
......
This diff is collapsed.
......@@ -7,8 +7,6 @@
.omemo-last-seen { font-size: 11px; }
.omemo-key-dialog > box { margin: 18px; }
.omemo-key-dialog scrolledwindow row {
border-bottom: 1px solid;
border-color: @unfocused_borders;
......
......@@ -116,7 +116,8 @@ class OmemoPlugin(GajimPlugin):
self.config_default_values = {
'DISABLED_ACCOUNTS': ([], ''),
'BLIND_TRUST': (True, '')
'BLIND_TRUST': (True, ''),
'SHOW_HELP_FINGERPRINTS': (True, ''),
}
for account in self.config['DISABLED_ACCOUNTS']:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment