GNOME Bugzilla – Bug 448441
blank default addressbook in quick-add
Last modified: 2013-09-13 00:57:53 UTC
Version: 2.10 When choosing "add to address book" from RMB menu of an email address, "OK" and "Edit full" buttons have no effect unless a valid entry is chosen in the "Select address book" pull down, but no error message is generated. I think that this is a grave usability issue - when I tried to add many addresses quickly, by using RMB->add->ok, and no errors where displayed but no addresses were added to any address book. The way I see it, there are two ways to solve the problem - (1) show an error dialog when no address book is selected and "ok" is clicked. Edit full should work even when no address book is selected as you can choose the address book in the following dialog (the full contact address dialog should generate an error message if no address book is selected in the "where" entry). (2) assume a default address book and preselect it in the "add to address book" dialog. The default address book can be the first local address book, or the last address book selected in an "add to address book" dialog. Distribution: Fedora release 7 (Moonshine) Gnome Release: 2.18.2 2007-05-28 (Red Hat, Inc) BugBuddy Version: 2.18.0
what is a *non*-valid addressbook entry in that dialog? is there any default entry for you?
Created attachment 90164 [details] contact quick add dialog Please consult this screen shot and the next one. As you can clearly see, there the "select address book" pull down has no default value
Created attachment 90165 [details] contact quick add dialog with "select address book" pull down open And in this attachment you can see what the "select address book" pull down offers .
So, in the above two screen shots, if I choose "personal" and click "ok" or "edit full", then what you'd expect happens. but if don't (either don't open the pull down at all, or opens it and close it without choosing), then "ok" and "edit full" silently fail - the same effect as "cancel".
Created attachment 99146 [details] [review] proposed evo patch for evolution; I would prefer to disable those buttons when there is no default source selected. The patch does exactly that.
If I understand correctly, this patch disables the button if no source is selected (regardless of the "defaultness" of sources selected or not). I've just noticed the "mark this as default" feature of address books, which seems to suggest that some address books can be "the default address book" which means (at least) that they get automatically selected in the quick add dialog - If I understand correctly your patch does not take into consideration the default status of address books, right ? (weird that you can have more then one address book as the "default address book", in which case the one selected by the quick add dialog is the one that sorts first in a case insensitive alphabetical sort).
If you have one address book selected as default, then all will be enabled as expected, but if you do not have any default address book, then buttons will be disabled, so it respects your choice of default address book, the patch only ensures that you cannot OK/Edit Full if there is no source selected. You cannot have more than one address book selected as default, you can none, but not more than one. When you check on one, then the second (if any) will be unchecked. Just try :)
actually i did try - several combinations ( hence my comment about sort order). With evolution in gnome 2.20 you can have any number of address books marked as default.
on my evolution 2.21.5, there is no addressbook marked as default. i get the "quick-add a contact" dialog without an addressbook preselected. the OK button is not disabled, clicking it does not add the contact anywhere, but the users *thinks* it has been added to an addressbook. this results in loss of contact data. and if i click "full edit" in the quick-add dialog, i get the following shell output: ===evolution:=== (evolution:5172): libebook-CRITICAL **: file e-book.c: line 3808: assertion `source && E_IS_SOURCE (source)' failed (evolution:5172): libebook-CRITICAL **: e_book_get_source: assertion `book && E_IS_BOOK (book)' failed (evolution:5172): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (evolution:5172): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed (evolution:5172): libebook-CRITICAL **: e_book_async_open: assertion `book && E_IS_BOOK (book)' failed (evolution:5172): e-data-server-ui-CRITICAL **: e_source_combo_box_set_active_uid: assertion `gtk_tree_row_reference_valid (reference)' failed ===e-d-s:=== (evolution-data-server-2.22:2698): GLib-GObject-WARNING **: value "((ECalSourceTypeEnum) 4)" of type `ECalSourceTypeEnum' is invalid or out of range for property `source-type' of type `ECalSourceTypeEnum' solütion: 1) evolution should check at startup whether an addressbook is selected as default. if not, then evolution should silently set the default flag for the system addressbook. 2) the OK button in the quick-add dialog should be insensitive if no addressbook is selected. 3) i don't know if this failure can also happen with calendars, memo lists and task lists. the additional code of steps 1 and 2 should probably also be added to these components (don't duplicate code but share it, please).
*** Bug 444346 has been marked as a duplicate of this bug. ***
Hmm, the solution seems fine to me.
(In reply to comment #9) > on my evolution 2.21.5, there is no addressbook marked as default. > > i get the "quick-add a contact" dialog without an addressbook preselected. the > OK button is not disabled, clicking it does not add the contact anywhere, but > the users *thinks* it has been added to an addressbook. this results in loss of > contact data. sure, but the patch fixes it, right?
okay, as i have a testcase here, i have tested the patch. it does set a default addressbook here, but the second time i wanted to quick-add a contact the buttons are enabled but no addressbook is *displayed* in the dropdown. nevertheless the contact gets added to the default book, so the bug is only about displaying...
Created attachment 102052 [details] [review] proposed evo patch ][ for evolution; I guess you have no source with "default" property, and also without "system", same as me. There is a message on console: e-data-server-ui-CRITICAL **: e_source_combo_box_set_active_uid: assertion `gtk_tree_row_reference_valid (reference)' failed This patch works with this better. Also the OK/Edit is enabled only if any item is selected in combo (which wasn't in previous patch).
> There is a message on console: > e-data-server-ui-CRITICAL **: e_source_combo_box_set_active_uid: assertion > `gtk_tree_row_reference_valid (reference)' failed exactly. same here.
I just now added an address from an email that was sent to me. Message -> Add Sender to Address Book I needed to select an address book at the next dialog (Personal). ------- When I went to send a new email to that person, the address did NOT show up in the left panel listing of my Personal address book 'Select Contacts from Address book' However, if I did a 'Search', the name was found. Thereafter, the name WAS in the left panel listing. ------ There seems to be some 'refreshing' problems with the display of data in the 'Select Contacts from Address book' panel.
Bob, can you look for (and maybe file) a separate bug for it, please? Thanks in advance.
Good thought. I filled out the bug report and then decided to test it more thoroughly. During my testing, I COULD see the newly added email address. So, either I missed it before, or I had a stale contacts window open somewhere that was adopted by the clicking on the 'To:' button. Probably just missed it. I abandoned the bug report...
Milan, I think some bits missing. At times both my buttons (OK and Edit) are disabled. I dont know the specific scenarios. But happens frequently.
OK, there is no such problem, but other is. When I added there a check for writability of the address book (e_book_is_writable), then I didn't realize that the variable used in that function is initialized to proper state after the e_book is opened, before that it returns FALSE. So that's the issue number one. The second issue is that the newly created address books are unaccessible until you select them in Contacts component, so they became initialized properly (I'm just guessing based on my observations). I did add the e_book_open to the source_changed and I added there an error check too and for such address books it just shows on the console: "EBookStatus returned 20". What ever it means, it works as soon as I click on this address book in Contacts. The conclusion: You had disabled buttons for all closed address books, so if you just run fresh evo and eds and was right in the mail, then all those things was disabled. I can fix it, that's easy. Either remove the writability check or do the e_book_open when source changes in the combobox. Hard to say what I can do with the second thing (uninitialized address book store).
Milan disable the call for now. I dont think we have to open books there and commit it.
Committed to trunk. Committed revision 34791. As we discussed on IRC, I just changed it, added a message and committed to trunk. Feel free to change the text of the message. I also announced new strings.
*** Bug 538854 has been marked as a duplicate of this bug. ***