From a8ba4a397419b3b6d3d167b21a8da72dcdbe1961 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Thu, 24 Aug 2017 17:24:22 +0200 Subject: "Default" per-contact settings (change UI) --- plugins/openpgp/src/contact_details_provider.vala | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'plugins') diff --git a/plugins/openpgp/src/contact_details_provider.vala b/plugins/openpgp/src/contact_details_provider.vala index b9cc4b42..5529549c 100644 --- a/plugins/openpgp/src/contact_details_provider.vala +++ b/plugins/openpgp/src/contact_details_provider.vala @@ -17,15 +17,14 @@ public class ContactDetailsProvider : Plugins.ContactDetailsProvider, Object { if (conversation.type_ == Conversation.Type.CHAT && type == WidgetType.GTK) { string? key_id = stream_interactor.get_module(Manager.IDENTITY).get_key_id(conversation.account, conversation.counterpart); if (key_id != null) { + Label label = new Label("") { use_markup=true, justify=Justification.RIGHT, selectable=true, visible=true }; Gee.List keys = GPGHelper.get_keylist(key_id); if (keys.size > 0) { - Label label = new Label(markup_colorize_id(keys[0].fpr, true)) { use_markup=true, justify=Justification.RIGHT, visible=true }; - contact_details.add(_("Encryption"), _("OpenPGP"), "", label); + label.label = markup_colorize_id(keys[0].fpr, true); } else { - string s = _("Key not in keychain") + "\n" + markup_colorize_id(key_id, false); - Label label = new Label(s) { use_markup=true, justify=Justification.RIGHT, visible=true }; - contact_details.add(_("Encryption"), _("OpenPGP"), "", label); + label.label = _("Key not in keychain") + "\n" + markup_colorize_id(key_id, false); } + contact_details.add(_("Encryption"), _("OpenPGP"), "", label); } } } -- cgit v1.2.3-70-g09d2