aboutsummaryrefslogtreecommitdiff
path: root/plugins/openpgp/src
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2017-08-24 17:24:22 +0200
committerfiaxh <git@mx.ax.lt>2017-08-25 22:30:03 +0200
commita8ba4a397419b3b6d3d167b21a8da72dcdbe1961 (patch)
treed3042a2145cf2440a467880b533ae0deacef3e9a /plugins/openpgp/src
parent5fcf8e73efeea60413a383e6e6a096a3981be1a2 (diff)
downloaddino-a8ba4a397419b3b6d3d167b21a8da72dcdbe1961.tar.gz
dino-a8ba4a397419b3b6d3d167b21a8da72dcdbe1961.zip
"Default" per-contact settings (change UI)
Diffstat (limited to 'plugins/openpgp/src')
-rw-r--r--plugins/openpgp/src/contact_details_provider.vala9
1 files changed, 4 insertions, 5 deletions
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<GPG.Key> 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);
}
}
}