changeset 9f2826c1f9f4 in /home/hg/repos/gajim-plugins
author: lovetox forenjunkie@chello.at branches: details:gajim-plugins?cmd=changeset;node=9f2826c1f9f4 description: Initial commit Config Dialog
diffstat:
omemo/__init__.py | 8 +- omemo/config_dialog.ui | 289 ++++++++++++++++++++++++++++++++++++ omemo/omemo/liteidentitykeystore.py | 17 ++ omemo/ui.py | 156 +++++++++++++++++++- 4 files changed, 466 insertions(+), 4 deletions(-)
diffs (truncated from 533 to 300 lines):
diff -r 07c3ea5b8e5b -r 9f2826c1f9f4 omemo/__init__.py --- a/omemo/__init__.py Thu Jun 09 22:54:33 2016 +0200 +++ b/omemo/__init__.py Sat May 28 17:33:52 2016 +0200 @@ -21,6 +21,7 @@ import logging import os import sqlite3 +import ui
# pylint: disable=import-error from common import caps_cache, gajim, ged @@ -30,6 +31,7 @@
from nbxmpp.simplexml import Node
+ from .ui import Ui from .xmpp import ( NS_NOTIFY, NS_OMEMO, BundleInformationAnnouncement, BundleInformationQuery, @@ -75,7 +77,7 @@ 'stanza-message-outgoing': (ged.PRECORE, self.handle_outgoing_msgs), } - self.config_dialog = None + self.config_dialog = ui.OMEMOConfigDialog(self) self.gui_extension_points = {'chat_control': (self.connect_ui, None)} SUPPORTED_PERSONAL_USER_EVENTS.append(DevicelistPEP)
@@ -216,8 +218,8 @@ log.info(account_name + ' ⇒ Received device_list for ' + contact_jid + ':' + str(devices_list)) state.set_devices(contact_jid, devices_list) - if account_name in self.ui_list and contact_jid not in self.ui_list[ - account_name]: + if (account_name in self.ui_list and + contact_jid not in self.ui_list[account_name]):
chat_control = gajim.interface.msg_win_mgr.get_control( contact_jid, account_name) diff -r 07c3ea5b8e5b -r 9f2826c1f9f4 omemo/config_dialog.ui --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/omemo/config_dialog.ui Sat May 28 17:33:52 2016 +0200 @@ -0,0 +1,289 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <requires lib="gtk+" version="2.16"/> + <!-- interface-naming-policy toplevel-contextual --> + <object class="GtkListStore" id="account_store"> + <columns> + <!-- column-name accountname --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkListStore" id="fingerprint_store"> + <columns> + <!-- column-name id --> + <column type="gint"/> + <!-- column-name screenname --> + <column type="gchararray"/> + <!-- column-name trust --> + <column type="gchararray"/> + <!-- column-name fingerprint --> + <column type="gchararray"/> + </columns> + </object> + <object class="GtkNotebook" id="notebook1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <child> + <object class="GtkVBox" id="vbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">10</property> + <property name="left_padding">12</property> + <child> + <object class="GtkVBox" id="vbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">6</property> + <child> + <object class="GtkHBox" id="hbox1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">5</property> + <child> + <object class="GtkLabel" id="fingerprint_label_desc"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" comments="Descriptive label">Fingerprint:</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkLabel" id="fingerprint_label"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label"><tt>-------- -------- -------- -------- -------- </tt></property> + <property name="use_markup">True</property> + <property name="selectable">True</property> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child> + <placeholder/> + </child> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkHBox" id="hbox2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">5</property> + <child> + <object class="GtkLabel" id="label4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" comments="label for account selector"><b>Account:</b></property> + <property name="use_markup">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkComboBox" id="account_combobox"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="model">account_store</property> + <signal name="changed" handler="account_combobox_changed_cb" swapped="no"/> + <child> + <object class="GtkCellRendererText" id="cellrenderertext1"/> + <attributes> + <attribute name="text">0</attribute> + </attributes> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + </object> + </child> + <child type="tab"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes" comments="tab label">Own Fingerprints</property> + </object> + <packing> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <object class="GtkVBox" id="vbox4"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="border_width">12</property> + <child> + <object class="GtkScrolledWindow" id="scrolledwindow1"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hscrollbar_policy">automatic</property> + <property name="vscrollbar_policy">automatic</property> + <child> + <object class="GtkTreeView" id="fingerprint_view"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="model">fingerprint_store</property> + <property name="search_column">0</property> + <property name="tooltip_column">3</property> + <signal name="button-press-event" handler="fpr_button_pressed_cb" swapped="no"/> + <child> + <object class="GtkTreeViewColumn" id="name_column"> + <property name="resizable">True</property> + <property name="title">Name</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext2"/> + <attributes> + <attribute name="text">1</attribute> + </attributes> + </child> + </object> + </child> + <child> + <object class="GtkTreeViewColumn" id="trust_column"> + <property name="resizable">True</property> + <property name="title">Trust</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertoggle1"/> + <attributes> + <attribute name="text">2</attribute> + </attributes> + </child> + </object> + </child> + <child> + <object class="GtkTreeViewColumn" id="fingerprint_column"> + <property name="resizable">True</property> + <property name="title">Fingerprint</property> + <child> + <object class="GtkCellRendererText" id="cellrenderertext4"/> + <attributes> + <attribute name="markup">3</attribute> + </attributes> + </child> + </object> + </child> + </object> + </child> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkHBox" id="hbox3"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="spacing">5</property> + <property name="homogeneous">True</property> + <child> + <object class="GtkButton" id="trust_button"> + <property name="label" translatable="yes" comments="button">Trust Fingerprint</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <signal name="clicked" handler="trust_button_clicked_cb" swapped="no"/> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="untrust_button"> + <property name="label" translatable="yes" comments="button">UnTrust Fingerprint</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <signal name="clicked" handler="untrust_button_clicked_cb" swapped="no"/> + </object> + <packing> + <property name="expand">True</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing>