"Bo Peng" <[EMAIL PROTECTED]> writes: | Finally... | | > |+void Buffer::getSourceCode(ostream& os, lyx::pit_type par_begin, lyx::pit_type par_end) | > |+{ | > | > space before (and after) '&' please (same for '*') | > (I see that you are not quite consistent) | | Yes. Have double-checked, but ... | | > |+ // this is personal. I think source code should be in fixed-size font | > |+ QFont font("Courier New"); | > | > Perhaps, but the users should be able to decide for itself. | | Flexibility is good, but we should not have everything variable as a | rc entry. I will wait till someone complains about the fix font here. | The best thing would be a right button mouse event to change the font. | I only see copy and select though. (Maybe qt4 has more?)
Or to not specify any specific font, but just ask for the guis typewriter font. But hardcoding as it is not is not nice. | | | > |+ std::swap(par_begin, par_end); | > |+ ostringstream ostr; | > |+ bv->buffer()->getSourceCode(ostr, par_begin, par_end + 1); | > |+ // display the dialog and show source code | > |+ bv->owner()->getDialogs().update("view-source", ostr.str()); | > |+ } | > | break; | | > I don't think it should be the cores responisibility to feed the | > view-source to the frontend, but rather the frontend should come get | > it when needed. | | Define 'when needed' please. When the frontend deem it neccessary. | I intentionally avoid some update button | on the dialog. A user can close the dialog when it is not needed. If | it is open, it will be automatically updated. | | > The core should only inform the frontend about a | > cursor change/paragraph change imho. | | You are right, To make sure: do you mean to move this pit_begin, | pit_end part to controll/ControllViewSource.C 's update function? Hmm... yes... think so. | > And it seems you are doing the | > | > |+ if (par_begin > par_end) | > |+ std::swap(par_begin, par_end); | > | > double up? (didn't getSourceCode also do that game?) | | No. It has to be done here since getSourceCode will get the [ ) style interval. Ok, where was the other place where this was done? | I have submitted the patch. I will make all the changes in a followup | patch, after I hear more from others. (BTW, with all the name changes, | none of my patches can be cleanly applied now. So, better apply | earlier than later. :-) Not quite sure if I agree. ;-/ -- Lgb