aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/account_settings_dialog.vala
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/omemo/src/account_settings_dialog.vala')
-rw-r--r--plugins/omemo/src/account_settings_dialog.vala54
1 files changed, 0 insertions, 54 deletions
diff --git a/plugins/omemo/src/account_settings_dialog.vala b/plugins/omemo/src/account_settings_dialog.vala
deleted file mode 100644
index f0262c31..00000000
--- a/plugins/omemo/src/account_settings_dialog.vala
+++ /dev/null
@@ -1,54 +0,0 @@
-using Gtk;
-using Qlite;
-using Dino.Entities;
-
-namespace Dino.Plugins.Omemo {
-
-[GtkTemplate (ui = "/im/dino/Dino/omemo/account_settings_dialog.ui")]
-public class AccountSettingsDialog : Gtk.Dialog {
-
- private Plugin plugin;
- private Account account;
- private string fingerprint;
-
- [GtkChild] private Label own_fingerprint;
- [GtkChild] private ListBox other_list;
-
- public AccountSettingsDialog(Plugin plugin, Account account) {
- Object(use_header_bar : 1);
- this.plugin = plugin;
- this.account = account;
-
- string own_b64 = plugin.db.identity.row_with(plugin.db.identity.account_id, account.id)[plugin.db.identity.identity_key_public_base64];
- fingerprint = fingerprint_from_base64(own_b64);
- own_fingerprint.set_markup(fingerprint_markup(fingerprint));
-
- int own_id = plugin.db.identity.row_with(plugin.db.identity.account_id, account.id)[plugin.db.identity.device_id];
-
- int i = 0;
- foreach (Row row in plugin.db.identity_meta.with_address(account.bare_jid.to_string())) {
- if (row[plugin.db.identity_meta.device_id] == own_id) continue;
- if (i == 0) {
- other_list.foreach((widget) => { widget.destroy(); });
- }
- string? other_b64 = row[plugin.db.identity_meta.identity_key_public_base64];
- Label lbl = new Label(other_b64 != null ? fingerprint_markup(fingerprint_from_base64(other_b64)) : _("Unknown device (0x%.8x)").printf(row[plugin.db.identity_meta.device_id])) { use_markup = true, visible = true, margin = 8, selectable=true };
- if (row[plugin.db.identity_meta.now_active] && other_b64 != null) {
- other_list.insert(lbl, 0);
- } else {
- lbl.sensitive = false;
- other_list.insert(lbl, i);
- }
- i++;
- }
- }
-
- [GtkCallback]
- public void copy_button_clicked() {
- Clipboard.get_default(get_display()).set_text(fingerprint, fingerprint.length);
- }
-
-
-}
-
-}