From: Lauris K. <la...@ka...> - 2002-10-21 11:21:37
|
Hello! Disclaimer: I have not tested your patch yet, so everything I wrote, is pure speculation. Also, most of the xml tree code is not written by me and I am not very familiar with it. On Sun, 2002-10-20 at 04:28, MenTaLguY wrote: > Cosmetic changes: > + XML editor is now non-modal > + XML editor title now includes the document title > + more logical widget labels -- the tree widget is now labeled > "Elements"; the attribute name column is now labeled "Attribute" > + changes in the document are reflected instantly in the XML tree > widget > + element nodes now have a label in the form "<elementname>", and text > nodes now have a label in the form "\"text content\"" All this is certainly the right thing to do. But if already hacking extensively on xml dialog, how about moving it from glade to pure gtk? We want to get rid of glade, and it does not add anything useful in given case. > Implementation changes: > + added SPXMLTree and SPXMLTreeItem widgets Do you know, how extensive changes are required for gtk2? > + SPXMLTreeItem observes an SPRepr and adds/removes an SPXMLTree > subtree as necessary > + SPXMLTree observes an SPRepr and manages SPXMLTreeItems for its > children > + the dialog code doesn't have to worry about maintaining the tree > widget anymore; it takes care of itself This sound good :) > + added sp_repr_synthesize_events(SPRepr * repr, const > SPReprEventVector * vector, gpointer data), which delivers a series of > events reflecting a node's current children/attributes/contents to the > given listener -- useful if a late-coming listener wants to "catch up" on > what it missed I just do not like it being in repr code. The amount of functionality is so small, all 'latecomers' can implement it themselves IMHO. Also, if you think there are good reasons keeping it in SPRepr, we definitely should emit pre-modification events too. And that poses a problem - what if we want to return FALSE from pre-modification event, while actually all modifications are already present? > TODO: > * make text node labels reflect changes to the element content > * make the attribute and content widgets autoupdate too > * probably make the dialog a normal toplevel window instead of a dialog > > Bugs: > - selection in the XML editor has stopped following selection on the > desktop (though the reverse still works) > - the attributes/content side doesn't automatically update yet > - raising/lowering the element currently selected in the XML editor > can cause Bad Things to happen [I could use some help debugging this one > especially] I'll try to investigate this. Btw, thank you very much for your work! Best wishes, Lauris Kaplinski |