aboutsummaryrefslogtreecommitdiff
path: root/plugins/omemo/src/manage_key_dialog.vala
diff options
context:
space:
mode:
authorSamuel Hand <samuel.hand@openmailbox.org>2018-08-09 15:29:15 +0100
committerSamuel Hand <samuel.hand@openmailbox.org>2018-08-09 15:29:15 +0100
commite1afda10e33bdd892ee655cda7b94c066d269817 (patch)
tree4884685d2469d736603c82188380eb30500bc35f /plugins/omemo/src/manage_key_dialog.vala
parentb5d5a05a1edb701fb6cf6ed471e4ab5d532c0f5e (diff)
downloaddino-e1afda10e33bdd892ee655cda7b94c066d269817.tar.gz
dino-e1afda10e33bdd892ee655cda7b94c066d269817.zip
Make constructors the first function
Diffstat (limited to 'plugins/omemo/src/manage_key_dialog.vala')
-rw-r--r--plugins/omemo/src/manage_key_dialog.vala40
1 files changed, 20 insertions, 20 deletions
diff --git a/plugins/omemo/src/manage_key_dialog.vala b/plugins/omemo/src/manage_key_dialog.vala
index d359fd81..e13b9279 100644
--- a/plugins/omemo/src/manage_key_dialog.vala
+++ b/plugins/omemo/src/manage_key_dialog.vala
@@ -31,26 +31,6 @@ public class ManageKeyDialog : Gtk.Dialog {
private bool return_to_main;
private int current_response;
- private void handle_cancel() {
- if (manage_stack.get_visible_child_name() == "main") close();
-
- if (manage_stack.get_visible_child_name() == "verify") {
- manage_stack.set_visible_child_name("main");
- cancel_button.label = "Cancel";
- }
-
- if (manage_stack.get_visible_child_name() == "confirm") {
- if (return_to_main) {
- manage_stack.set_visible_child_name("main");
- cancel_button.label = "Cancel";
- } else {
- manage_stack.set_visible_child_name("verify");
- }
- }
-
- ok_button.sensitive = false;
- }
-
public ManageKeyDialog(Row device, Database db) {
Object(use_header_bar : 1);
@@ -85,6 +65,26 @@ public class ManageKeyDialog : Gtk.Dialog {
});
}
+ private void handle_cancel() {
+ if (manage_stack.get_visible_child_name() == "main") close();
+
+ if (manage_stack.get_visible_child_name() == "verify") {
+ manage_stack.set_visible_child_name("main");
+ cancel_button.label = "Cancel";
+ }
+
+ if (manage_stack.get_visible_child_name() == "confirm") {
+ if (return_to_main) {
+ manage_stack.set_visible_child_name("main");
+ cancel_button.label = "Cancel";
+ } else {
+ manage_stack.set_visible_child_name("verify");
+ }
+ }
+
+ ok_button.sensitive = false;
+ }
+
private Box make_action_box(string title, string desc){
Box box = new Box(Orientation.VERTICAL, 0) { visible = true, margin_start = 20, margin_end = 20, margin_top = 14, margin_bottom = 14 };
Label lbl_title = new Label(title) { visible = true, halign = Align.START };