After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 700889 - It is possible to open unlimited New Contact windows
It is possible to open unlimited New Contact windows
Status: RESOLVED FIXED
Product: gnome-contacts
Classification: Core
Component: general
3.8.x
Other Linux
: Normal normal
: ---
Assigned To: GNOME Contacts maintainer(s)
GNOME Contacts maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2013-05-23 13:28 UTC by Chris Cummins
Modified: 2013-05-28 12:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Screenshot demonstrating the problem (246.76 KB, image/png)
2013-05-23 13:28 UTC, Chris Cummins
  Details
Prevent multiple simultaneous 'new contact' dialogs (2.28 KB, patch)
2013-05-23 13:30 UTC, Chris Cummins
reviewed Details | Review
Prevent multiple simultaneous 'new contact' dialogs (2.44 KB, patch)
2013-05-28 11:05 UTC, Chris Cummins
committed Details | Review

Description Chris Cummins 2013-05-23 13:28:41 UTC
Created attachment 245126 [details]
Screenshot demonstrating the problem

Pressing the 'New' button causes a new contact dialog to appear, regardless of whether there are already is one open (see attached screenshot).
Comment 1 Chris Cummins 2013-05-23 13:30:36 UTC
Created attachment 245127 [details] [review]
Prevent multiple simultaneous 'new contact' dialogs

This ensures that only one instance of the new contact dialog can exist at any one time, preventing users from opening multiple dialogs simultaneously by repeatedly clicking the 'New' button.
Comment 2 Erick Perez Castellanos 2013-05-23 17:16:49 UTC
This should be fixed when implementing this https://raw.github.com/gnome-design-team/gnome-mockups/master/contacts/png/new-contact.png.
Comment 3 Erick Perez Castellanos 2013-05-27 13:29:22 UTC
Review of attachment 245127 [details] [review]:

Other than that, seems good to go.

::: src/contacts-new-contact-dialog.vala
@@ +34,3 @@
   ArrayList<TypeCombo> address_combos;
 
+  public static NewContactDialog get_instance (Store contacts_store,

I would prefer to call it get_default instead
Comment 4 Chris Cummins 2013-05-28 11:05:54 UTC
Created attachment 245448 [details] [review]
Prevent multiple simultaneous 'new contact' dialogs

Ok, I guess this'll do as a fix for the current implementation.

v2: Rename 'get_instance()' to 'get_default()'.