summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Plazas <kekun.plazas@laposte.net>2018-04-13 12:53:43 +0200
committerAdrien Plazas <kekun.plazas@laposte.net>2018-04-13 12:53:43 +0200
commit1a65ee457b0724d2f4c52830ba4ed9e826a91d08 (patch)
tree4e652655052a6e1ad096e8c4dc9e4bc7c42cc90d
parente9665f72c882257d3e496b9669cd616486031b17 (diff)
downloadgnome-contacts-1a65ee457b0724d2f4c52830ba4ed9e826a91d08.tar.gz
Window: Don't create a contact when creating/updatingwip/aplazas/new-contact
This avoid the contact creation and edition to conflict when an action like Ctrl+N triggers a new contact creation.
-rw-r--r--src/contacts-window.vala3
1 files changed, 3 insertions, 0 deletions
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");