aboutsummaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorfiaxh <git@lightrise.org>2019-12-13 16:27:05 +0100
committerfiaxh <git@lightrise.org>2019-12-13 20:55:39 +0100
commit21c01dcdcb3ba7f7d5c6fcd18c5fd2117f050e5e (patch)
tree2c24a13339ca9588330732ae35b1354d8133bfa9 /plugins
parentd194eae61d4fda8504a037daa721d9810ed1fe3e (diff)
downloaddino-21c01dcdcb3ba7f7d5c6fcd18c5fd2117f050e5e.tar.gz
dino-21c01dcdcb3ba7f7d5c6fcd18c5fd2117f050e5e.zip
Omemo contact details dialog: Only show inactive keys Expander if there are any
Diffstat (limited to 'plugins')
-rw-r--r--plugins/omemo/data/contact_details_dialog.ui6
-rw-r--r--plugins/omemo/src/ui/contact_details_dialog.vala8
2 files changed, 8 insertions, 6 deletions
diff --git a/plugins/omemo/data/contact_details_dialog.ui b/plugins/omemo/data/contact_details_dialog.ui
index 97f2dc2b..188bf06e 100644
--- a/plugins/omemo/data/contact_details_dialog.ui
+++ b/plugins/omemo/data/contact_details_dialog.ui
@@ -235,8 +235,8 @@
</object>
</child>
<child>
- <object class="GtkExpander">
- <property name="visible">True</property>
+ <object class="GtkExpander" id="inactive_keys_expander">
+ <property name="visible">False</property>
<child type="label">
<object class="GtkLabel" id="inactive_expander_label">
<property name="visible">True</property>
@@ -256,7 +256,7 @@
<property name="visible">True</property>
<property name="propagate_natural_height">True</property>
<child>
- <object class="GtkListBox" id="unused_keys_listbox">
+ <object class="GtkListBox" id="inactive_keys_listbox">
<property name="visible">True</property>
<property name="selection-mode">none</property>
</object>
diff --git a/plugins/omemo/src/ui/contact_details_dialog.vala b/plugins/omemo/src/ui/contact_details_dialog.vala
index c5adef9a..a26c426f 100644
--- a/plugins/omemo/src/ui/contact_details_dialog.vala
+++ b/plugins/omemo/src/ui/contact_details_dialog.vala
@@ -30,7 +30,8 @@ public class ContactDetailsDialog : Gtk.Dialog {
[GtkChild] private ListBox new_keys_listbox;
[GtkChild] private Box keys_container;
[GtkChild] private ListBox keys_listbox;
- [GtkChild] private ListBox unused_keys_listbox;
+ [GtkChild] private Expander inactive_keys_expander;
+ [GtkChild] private ListBox inactive_keys_listbox;
[GtkChild] private Switch auto_accept_switch;
[GtkChild] private Button copy_button;
[GtkChild] private Button show_qrcode_button;
@@ -59,7 +60,7 @@ public class ContactDetailsDialog : Gtk.Dialog {
}
keys_listbox.row_activated.connect(on_key_entry_clicked);
- unused_keys_listbox.row_activated.connect(on_key_entry_clicked);
+ inactive_keys_listbox.row_activated.connect(on_key_entry_clicked);
auto_accept_switch.state_set.connect(on_auto_accept_toggled);
int identity_id = plugin.db.identity.get_id(account.id);
@@ -134,7 +135,8 @@ public class ContactDetailsDialog : Gtk.Dialog {
keys_container.visible = true;
keys_listbox.add(fingerprint_row);
} else {
- unused_keys_listbox.add(fingerprint_row);
+ inactive_keys_expander.visible=true;
+ inactive_keys_listbox.add(fingerprint_row);
}
}