GNOME Bugzilla – Bug 657945
New design for link dialog
Last modified: 2012-01-24 10:26:23 UTC
There is a new mockup for how the link dialog could look at: http://gitorious.org/gnome-design/gnome-design/blobs/master/mockups/contacts/aday/linking2.png
Would also be nice if we could link by selecting contacts from the main Contact List and then -> More -> Link Selected Contacts. I believe a common use case for this would be having: Foo Bar (gmail) Foo Bar (email) next to each other on the list, so a quick way of linking them would be handy. Right-click & "Link these contacts" could work too.
(In reply to comment #0) > There is a new mockup for how the link dialog could look at: > http://gitorious.org/gnome-design/gnome-design/blobs/master/mockups/contacts/aday/linking2.png I've got some more work on this. We should talk before taking it forward. (In reply to comment #1) > Would also be nice if we could link by selecting contacts from the main Contact > List and then -> More -> Link Selected Contacts. > > I believe a common use case for this would be having: > > Foo Bar (gmail) > Foo Bar (email) > > next to each other on the list, so a quick way of linking them would be handy. > Right-click & "Link these contacts" could work too. Multiple selections wouldn't really work in the current ui. Linking by drag and drop might be worth considering though.
(In reply to comment #2) > I've got some more work on this. We should talk before taking it forward. > Multiple selections wouldn't really work in the current ui. Linking by drag and > drop might be worth considering though. I do think DnD would look better, although I've already tried like a thousands times to select a more than one contacts, for deleting them, or something else. I could start to code the UI once get decided which is the behavior and the look of it. How do I contact you ?
fyi - latest mockups are on Github (I'll be updating the wiki once they've stabilised): https://github.com/gnome-design-team/gnome-mockups/tree/master/contacts (In reply to comment #3) > (In reply to comment #2) > > I've got some more work on this. We should talk before taking it forward. > > > Multiple selections wouldn't really work in the current ui. Linking by drag and > > drop might be worth considering though. > > I do think DnD would look better, although I've already tried like a thousands > times to select a more than one contacts, for deleting them, or something else. Oh interesting - that's good to know. > I could start to code the UI once get decided which is the behavior and the > look of it. How do I contact you ? Email or irc - I'm aday, you can usually find me on #gnome-design. Multiple selections are a pending design task. I'll try and look at it soon. Feel free to swing by IRC and say hi!
Created attachment 200404 [details] [review] git patch, with commit message Well, here goes the patch for adding DnD over list pane rows for linking contacts.
Here it is the patch for turning the Link dialog into the final mockups. It include fixes to make the dialog work in both modes link-to-my-contacts and link-to-other-contacts.
Created attachment 205921 [details] [review] New Link dialog patch.
Review of attachment 205921 [details] [review]: ::: src/contacts-link-dialog.vala @@ +67,3 @@ persona_grid.attach (label, 1, 1, 1, 1); + int is_main = contact.is_main ? 1 : 0; Its kinda weird to store an int in something named like a bool. Its probably easiest to just move the whole operation to the one place its used. @@ +78,3 @@ + foreach (var p in selected_contact.individual.personas) { + selected_contact_personas_iids += p.iid; + stdout.printf (" %s,\n", p.iid); In general we don't use the stdout printf in gnome apps, but rather g_print, which does things like utf8-to-locale conversion. In this particular case we should just not print the ids though. @@ +97,3 @@ + if (p.iid in selected_contact_personas_iids) { + unlink_persona.begin (contact, p, (obj, result) => { + unlink_persona.end (result); Link/Unlink are somewhat destructive operations, as we need to e.g. add/remove actual email addresses to link stuff. So, link + unlink could end up changing the actual data. I think we need to be a bit more careful, and have the link operation return some kind of object describing the change such that we can undo it.
I pushed this with some minor cleanups and with a new undo implementation for the linking operations.