GNOME Bugzilla – Bug 465473
Lack of a libebookui
Last modified: 2015-06-03 09:58:18 UTC
Evolution has a contact editing window, so does openedhand's contacts program -- both based on evolution-data-server. The current situation is that libedataserverui provides ui tools for (mostly) libedataserver and a little for libebook, but not that much -- and this is where the code duplication stems from. It should be possible to share this code in a common libebookui, which all projects using e-d-s would then use.
The main problem would be coming up with an interface. I'm sure Evolution wouldn't want Contacts's editor UI, Evolution's editor UI plain won't fit in Contacts, and we've a new development branch of Contacts with another UI. The best thing really would be a contact object that doesn't actively make writing an editor hard (like EContact and EVCard do).
I indeed saw EContact/EVCard are not really live objects -- more like dead structures, but wouldn't the following scheme give acceptable results : (1) create a window with the EBook and the contact id ; (2) the window then lets the user edit things ; (3) on confirmation, it commits ; (4) the signals will then update the views?
(2) is the hard bit, which changes per-application. The rest of the logic is about 10 lines.
I don't exactly get why it would change per-application : the applications currently care very much about what the user can edit or not precisely because they have to implement it themselves! If they were given a window they can use in ten lines, wouldn't they use it? As long as the door is left open for more specialized implementations in projects which really, really, really need it, I don't think people will mind that much...
Well, this idea keeps crawling in my head. I would say it is better to have a handy default (which people can decide not to use), than propose nothing and have everyone be forced to code half-solutions.
I'm WontFix-ing this. While code duplication is bad, the applications use their own UI which may not fix across them for various reasons. Having the editors out there is not useful. Also, during the years, the libedataserverui was completely removed, then re-added for 3.16.0 with a very limited functionality.