From 1a65ee457b0724d2f4c52830ba4ed9e826a91d08 Mon Sep 17 00:00:00 2001 From: Adrien Plazas Date: Fri, 13 Apr 2018 12:53:43 +0200 Subject: Window: Don't create a contact when creating/updating This avoid the contact creation and edition to conflict when an action like Ctrl+N triggers a new contact creation. --- src/contacts-window.vala | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/contacts-window.vala b/src/contacts-window.vala index 4e11ac4..f74a5a7 100644 --- a/src/contacts-window.vala +++ b/src/contacts-window.vala @@ -293,6 +293,9 @@ public class Contacts.Window : Gtk.ApplicationWindow { [GtkCallback] public void new_contact () { + if (this.state == UiState.UPDATING || this.state == UiState.CREATING) + return; + this.state = UiState.CREATING; this.right_header.title = _("New Contact"); -- cgit v1.2.1