diff options
author | Samuel Hand <samuel.hand@openmailbox.org> | 2018-08-12 12:16:42 +0100 |
---|---|---|
committer | Samuel Hand <samuel.hand@openmailbox.org> | 2018-08-12 12:16:42 +0100 |
commit | 380e5edc5108d549d2faa0b3b5819a7c2ee03bd8 (patch) | |
tree | b70209b0479eea543b8706427b2f2cc39d97a734 /plugins/omemo/src/plugin.vala | |
parent | c59faad5bf62b9e9a124a6e330745885c993ea21 (diff) | |
download | dino-380e5edc5108d549d2faa0b3b5819a7c2ee03bd8.tar.gz dino-380e5edc5108d549d2faa0b3b5819a7c2ee03bd8.zip |
Change own-notifcation wording and add a default action
Diffstat (limited to 'plugins/omemo/src/plugin.vala')
-rw-r--r-- | plugins/omemo/src/plugin.vala | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/omemo/src/plugin.vala b/plugins/omemo/src/plugin.vala index 81cf5c7f..ab22651f 100644 --- a/plugins/omemo/src/plugin.vala +++ b/plugins/omemo/src/plugin.vala @@ -51,6 +51,18 @@ public class Plugin : RootInterface, Object { }); Manager.start(this.app.stream_interactor, db, trust_manager); + SimpleAction own_keys_action = new SimpleAction("own-keys", VariantType.INT32); + own_keys_action.activate.connect((variant) => { + foreach(Dino.Entities.Account account in this.app.stream_interactor.get_accounts()) { + if(account.id == variant.get_int32()) { + ContactDetailsDialog dialog = new ContactDetailsDialog(this, account, account.bare_jid); + dialog.set_transient_for((this.app as Gtk.Application).get_active_window()); + dialog.present(); + } + } + }); + this.app.add_action(own_keys_action); + string locales_dir; if (app.search_path_generator != null) { locales_dir = ((!)app.search_path_generator).get_locale_path(GETTEXT_PACKAGE, LOCALE_INSTALL_DIR); |