Re: Keep CXXFLAGS from clobbering LyX required options (and vs.)
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes: | Lars This patch tries to make us kinder to the user that wants to set | Lars his own compiler options. With this patch the user does not have | Lars to add the options that we require for a correct build. | Great! I can remove it from my TODO. | Lars If the flags (CXXFLAGS) is user supplied, the debug flag and the | Lars optimizer flag (+ the warnings) is overrided by the user input. | Lars Comments? | If it works, I like it. WFM. | BTW, why do you change the ordering of lyx_flags? To never start the string with a space, which would be the case on first set: var='$var hello' - var == hello were as I want hello. That is the only reason. -- Lgb
Re: Packaging of LyX/Win 1.3.6
Jean-Marc Lasgouttes wrote: Angus I've managed to write a script to automate the process of Angus producing a LyX/Win package. I describe below what it does; Angus have I missed anything? It would be great to have an installer. Does the installer actually create the package in the first place (ie, do the work of this script) or is it just a glorified unzip? I do not know how to do that, though. Me neither. However googling on 'Windows installer author' turns up some stuff. I see that Aspell uses InnoSetup, for example. http://www.jrsoftware.org/isinfo.php Angus (I propose not to package python, perl or a shell environment. Angus Instead I think we should tell people to go and get their own.) How big are these things? ftp://ftp.python.org/pub/www.python.org/ftp/python/2.4.1/python-2.4.1.msi 11.0MB http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.6.811-MSWin32-x86-122208.msi 12.6MB http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download 14.8MB I think it would be better to package just what we need, like Ruurd did. This is much easier for users (unless the installer can grab the files for us). My primary motivation has been that those who already use LyX/Win won't need to grab anything. Why download stuff needlessly? I've seen installers that tell people to go grab other bits and pieces. Presumably we'd add an aspell dictionary of your favourite language to this list. http://aspell.net/win32/ Angus The script uses the MinGW/MinSYS environment and compiler. It Angus asks whether the Qt and LyX cvs trees are up to date. (It's not Angus easy to use TortoiseCVS from the command line.) It asks whether Angus the Qt library has been compiled. (Qt/WinFree must be compiled Angus from a cmd shell, not a mingw console.) It checks that Angus qt-mt3.dll, libiconv-2.dll, mingw10.dll and clean_dvi.py exist. Angus It compiles the dv2dt and dt2dv utilites. It compiles and Angus installs the Aspell library. It compiles and installs LyX. It Angus copies the dv2dt and dt2dv utilites, the .dlls and clean_dvi.py Angus to the lyx package. It modifies the Resources/lyx/configure Angus script to ensure that the generated .dvi file is usable. Looks good :) Why don't you compile qt as static? The main reason is that Qt/WinFree changes almost everyday. I just replace the .dll and enjoy the improvements. I imagine that our users would do the same once LyX 1.3.6 is released. (We suggest that you replace qt-mt3.dll in your LyX 1.3.6 package with the version here as it squashes heaps of irritating little bugs...) -- Angus
Re: Should I commit my zero traffic cursor patch?
Lars Gullik Bjønnes wrote: | (See attached.) I can't remember if any concensus was reached. The code | is certainly conceptually cleaner than what we have now, even if it | transpires that it doesn't actually reduce traffic that much. | If nodody says commit it, Angus, I'll just leave it to rot in my | pending directory. I like it. I committed it. For reference here's the patch again created with $ cvs -q diff -Bbw src/frontends/qt2 zero_traffic.diff -- AngusIndex: src/frontends/qt2/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v retrieving revision 1.780 diff -u -p -B -b -w -r1.780 ChangeLog --- src/frontends/qt2/ChangeLog 16 May 2005 09:14:17 - 1.780 +++ src/frontends/qt2/ChangeLog 19 May 2005 16:28:36 - @@ -1,3 +1,7 @@ +2005-05-19 Angus Leeming [EMAIL PROTECTED] + + * qscreen.[Ch]: cache and reuse pixmaps to show the flashing cursor. + 2005-05-13 Angus Leeming [EMAIL PROTECTED] * QBibtex.C (build_dialog): Index: src/frontends/qt2/qscreen.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/qscreen.C,v retrieving revision 1.28 diff -u -p -B -b -w -r1.28 qscreen.C --- src/frontends/qt2/qscreen.C 20 May 2004 09:36:28 - 1.28 +++ src/frontends/qt2/qscreen.C 19 May 2005 16:28:36 - @@ -14,12 +14,10 @@ #include qscreen.h #include debug.h -#include LColor.h +#include lcolorcache.h #include qapplication.h -using std::endl; - namespace { @@ -60,7 +58,7 @@ void QScreen::repaint() void QScreen::expose(int x, int y, int w, int h) { lyxerr[Debug::GUI] expose w 'x' h - '+' x '+' y endl; + '+' x '+' y std::endl; owner_.getContent()-update(x, y, w, h); } @@ -68,6 +66,10 @@ void QScreen::expose(int x, int y, int w void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape) { + if (!qApp-focusWidget()) + return; + + // Cache the dimensions of the cursor. cursor_x_ = x; cursor_y_ = y; cursor_h_ = h; @@ -85,35 +87,63 @@ void QScreen::showCursor(int x, int y, i break; } - if (!nocursor_pixmap_.get() - || cursor_w_ != nocursor_pixmap_-width() - || cursor_h_ != nocursor_pixmap_-height()) { - nocursor_pixmap_.reset(new QPixmap(cursor_w_, cursor_h_)); + // We cache three pixmaps: + // 1 the rectangle of the original screen. + // 2 the vertical line of the cursor. + // 3 the horizontal line of the L-shaped cursor (if necessary). + + // Initialise storage for these pixmaps as necessary. + if (cursor_w_ != nocursor_pixmap_.width() || + cursor_h_ != nocursor_pixmap_.height()) { + nocursor_pixmap_.resize(cursor_w_, cursor_h_); + } + + QColor const required_color = lcolorcache.get(LColor::cursor); + bool const cursor_color_changed = required_color != cursor_color_; + if (cursor_color_changed) + cursor_color_ = required_color; + + if (cursor_h_ != vcursor_pixmap_.height() || cursor_color_changed) { + if (cursor_h_ != vcursor_pixmap_.height()) + vcursor_pixmap_.resize(1, cursor_h_); + vcursor_pixmap_.fill(cursor_color_); } - if (!qApp-focusWidget()) - return; + switch (shape) { + case BAR_SHAPE: + break; + case REVERSED_L_SHAPE: + case L_SHAPE: + if (cursor_w_ != hcursor_pixmap_.width() || + cursor_color_changed) { + if (cursor_w_ != hcursor_pixmap_.width()) +hcursor_pixmap_.resize(cursor_w_, 1); + hcursor_pixmap_.fill(cursor_color_); + } + break; + } - // save old area - bitBlt(nocursor_pixmap_.get(), 0, 0, owner_.getPixmap(), + // Save the old area (no cursor). + bitBlt(nocursor_pixmap_, 0, 0, owner_.getPixmap(), cursor_x_, cursor_y_, cursor_w_, cursor_h_); - Painter pain(owner_.getPainter()); - pain.start(); - pain.line(x, y, x, y + h - 1, LColor::cursor); + // Draw the new (vertical) cursor using the cached store. + bitBlt(owner_.getPixmap(), x, y, + vcursor_pixmap_, 0, 0, + vcursor_pixmap_.width(), vcursor_pixmap_.height()); + // Draw the new (horizontal) cursor if necessary. switch (shape) { case BAR_SHAPE: break; case REVERSED_L_SHAPE: case L_SHAPE: - pain.line(cursor_x_, y + h - 1, cursor_x_ + cursor_w_ - 1, -y + h - 1, LColor::cursor); + bitBlt(owner_.getPixmap(), cursor_x_, y + h - 1, + hcursor_pixmap_, 0, 0, + hcursor_pixmap_.width(), hcursor_pixmap_.height()); break; } - pain.end(); - owner_.getContent()-repaint( cursor_x_, cursor_y_, cursor_w_, cursor_h_); @@ -123,13 +153,12 @@ void QScreen::showCursor(int x, int y, i void QScreen::removeCursor() { // before first showCursor - if (!nocursor_pixmap_.get()) + if (nocursor_pixmap_.isNull()) return; bitBlt(owner_.getPixmap(), cursor_x_, cursor_y_, - nocursor_pixmap_.get(), 0, 0, cursor_w_, cursor_h_); + nocursor_pixmap_, 0, 0, cursor_w_, cursor_h_); - owner_.getContent()-repaint( - cursor_x_, cursor_y_, - cursor_w_, cursor_h_); + owner_.getContent() +
Re: [PATCH] More text changes
Jean-Marc Lasgouttes wrote: Michael Hello, some more text message changes. This patch (almost) Michael finishes my cleanup. Michael Please check and apply. This looks good to me. Anybody out there willing and able to apply the patch? I like clean working copies :-) Michael
Re: [PATCH] More text changes
Michael Schmitt wrote: Anybody out there willing and able to apply the patch? I like clean working copies :-) Done. Georg
Re: The Literate Programming error boxes?
Anyone have a look at this? It's been a while since I have actively done Literate Programming with LyX and I have need of this functionality again. What happened with the error boxes? Angus, do you know (or know who might know)? Thanks everyone! ---Kayvan On Wed, May 18, 2005 at 11:23:18AM -0700, Kayvan A. Sylvan wrote: Has something happened to the error boxes recently? It used to be that I could hit Build Program and if there were errors, then LyX (with the help of listerrors) would put error boxes in the right place. Now, all I get is There were errors and I have to look through the LaTeX log file.
Re: The Literate Programming error boxes?
Kayvan A. Sylvan wrote: Anyone have a look at this? It's been a while since I have actively done Literate Programming with LyX and I have need of this functionality again. What happened with the error boxes? I think that they died and were replaced by Alfredo's ErrorList. See src/frontends/controllers/ErrorList.C and ControlErrorList::goTo. In other words, you have a single dialog to help you navigate rather than a multitude of error insets. Angus, do you know (or know who might know)? Why blame me? :) There seems to be lots of stuff that invokes showErrorList (grep showErrorList src/*.C) where showErrorList actually lauches the dialog: void BufferView::showErrorList(string const action) const { if (getErrorList().size()) { string const title = bformat(_(LyX: %1$s errors (%2$s)), action, buffer()-fileName()); owner()-getDialogs().show(errorlist, title); pimpl_-errorlist_.clear(); } } Does this help you track things down? Angus
Re: The Literate Programming error boxes?
On Thu, May 19, 2005 at 09:50:36PM +, Angus Leeming wrote: Kayvan A. Sylvan wrote: Anyone have a look at this? It's been a while since I have actively done Literate Programming with LyX and I have need of this functionality again. What happened with the error boxes? I think that they died and were replaced by Alfredo's ErrorList. See src/frontends/controllers/ErrorList.C and ControlErrorList::goTo. In other words, you have a single dialog to help you navigate rather than a multitude of error insets. Angus, do you know (or know who might know)? Why blame me? :) My friend, (you should always be wary when someone begins this way) ;-) My dear dear friend, I am not blaming you, I am merely acknowledging that you know far far more about the code base than I, and if you don't know, you might be able to point me to someone who does. :-) Does this help you track things down? Sure. Now I know who to blame. ;-) ;-) Alfredo, can you take a quick look and see what needs fixing in the literate programming related code? ---Kayvan -- Kayvan A. Sylvan | Proud husband of | Father to my kids: Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena (8/8/89) http://sylvan.com/~kayvan | crown of her husband | Robin Gregory (2/28/92)
Bug in the 13x file browser
Some notes to self (and JMarc of course :) I've just spent an evening doing some real work with LyX, so I tried out the Windows version of LyX 1.3.x installed at C:\Program Files\LyX. As a result * we now have a new version of clean_dvi.py, * I've discovered that my intermediate dvi format must still have a .dvi extension (rather than, say, .dvi2) and * I've also discovered that C:\Program Files\LyX\Resources\lyx\configure *must* have unix-style line endings or common versions of sed (mine, for example :) get horribly confused by chkconfig.sed. There's nothing like trying things out for real, is there? I even managed to get some of that real work done, though not as much as I might have. A couple of bugs/potential problems still remain: Leaving the logic to check whether a file name has spaces in the file browser means that I can't change my bind file in the preferences dialog. (C:\Program Files\LyX\Resources\lyx\bind\emacs.bind) Also, I found that we are unable to launch any executables as C:\Program Files\LyX\bin\foo.exe because the executable cannot be quoted. Hence the new version of clean_dvi.py on the wiki. Yes, Windows is weird. In general, we should add LyX\bin to the PATH and simply invoke foo.exe. Not sure that this is a problem in practice (the PATH already contains the directory, but we may try and invoke stuff with an absolute path). Angus
Re: The Literate Programming error boxes?
Kayvan A. Sylvan wrote: Why blame me? :) My friend, (you should always be wary when someone begins this way) ;-) There speaks a wise man. My dear dear friend, I am not blaming you, I am merely acknowledging that you know far far more about the code base than I, and if you don't know, you might be able to point me to someone who does. :-) Does this help you track things down? Sure. Now I know who to blame. ;-) ;-) Alfredo, can you take a quick look and see what needs fixing in the literate programming related code? You might get a speedier response if you mailed him direct. abraunst AT lyx.org What happens if you use the minibuffer to launch the dialog? M-x dialog-show errorlist my_title Angus
Re: gnome frontend to the attic
Michael Schmitt wrote: I think nobody complained about moving the gnome frontend to the attic. Indeed. More importantly, I saw that John Spray would be OK if it was booted upstairs. If nobody continues to complain then I'll do so in the next few days. Angus
Re: QIndex
Michael Schmitt wrote: Hello again, there is a problem with QIndex. According to .../qt2/Dialogs.C, the class and its dialog are used for two things nowadays: Labels and indexes. For that reason, the tooltip in QIndexDialogBase.ui is not longer valid. I propose to remove it (along with the label (Keyword)) from the ui file. You could be smart and add code to QIndexDialog.C to add the tooltip in QIndexDialog's constructor depending on the dialog type? You could also simplify the code in Dialogs.C by defining a Type enum rather than by passing all those strings. Eg: class QIndex { public: enum Type { Index, Label }; QIndex(Dialog parent, Type type) : base_class(parent, type == Index ? _(Index Entry) : _(Label)), type_(type), label_(type == Index ? qt_(Keyword) : qt_(Label)) {} // Used by QIndexDialog.C's c-tor when setting tooltips, etc. Type type() const { return type_; } private: Type type_; QString const label_; }; IMHO we should also rename the class and its dialog to avoid confusion. Could somebody with some knowledge of the QT frontend and CVS access please do this? Surely, you have enough info to have a go yourself now? I am also wondering whether it is possible to merge QIndexDialog and QAskForTextDialog (or remove the latter)... Slowly, Michael, slowly :) Angus
Re: Bug report: Qt Citations BibTeX
Juergen Spitzmueller wrote: Juergen Spitzmueller wrote: + // resort if filename only (because of missing path) + if (!withFullPath) + dialog_-fileList-sort(); This does not work (the vector itself has to be reordered). I send a better patch tomorrow. Here it is. It looks more complicated, but a lot of the stuff is getting the tex_helper functions up to date. Now the entries without path are sorted correctly and they are looking for their path when the user wants to view the file. OK? Jürgen I'm afraid I've got confused by which patch I should be looking at. I'm also afraid that I've broken it with my file names with spaces patch. If you have the energy to make the patch again, I'll try and find the energy to look at it carefully :) Angus
Re: math panel symbol
Uwe Sthr wrote: Hello LyXers, what is the name of the xpm for the QT math panel symbol Sets limits style? Post a screen shot of the dialog you mean. Angus
Re: Qt immodule
Jose' Matos wrote: Incidentally, have you asked in the immodule list about this stuff? (Given that none of us know anything about this stuff either.) Sure not, real men don't ask questions they jump the cliff. ;-) I have noticed that its mailing has been really quiet lately. I will ask there and I will hope they don't laugh me. :-) I'm curious. Did they help or did they laugh? :) Angus
Re: Lyx 1.4 usability problem when opening several documents
Alfredo Braunstein wrote: Alfredo An alternative is to associate a bv with a buffer for ever, Alfredo and only make the active bv visible, as opposed to having Alfredo just one bv but changing the buffer of it. How difficult is it? Good question ;-) I'll try to have a look. Does this mean that you're planning to fix the problem, or should I try my band-aid solution? Angus
Re: lyx2lyx does not cope with spaces in path names
I think the email subject says it all. It seems that lyx2lyx must be fixed before LyX 1.4 is ready for the Windows platform. Michael could you open a new report on bugzilla for this issue? I plan to fix this issue this week and a bugilla helps not to forget it. :-) Michael, this should now be fixed. Please confirm. Angus
Re: Latex import problem
Angus Leeming wrote: Angus Leeming wrote: That way, we don't tie a particular lyx to a particular lyx2lyx I see that José was ahead of the game. LyX 1.3.x already does this. Sorry about the noise. I saw that too, and it is also in 1.4. Now I wonder why I had to do the change when I replaced the lyx2lyx that comes with 1.3. Georg
Re: Some new problems with cvs
Angus Leeming wrote: It looks good to me, but we should still ascertain why if (last_loaded-dispatch(batch_command, success)) is failing. Is it? I got the errors when lyx2lyx failed. loadLyXFile() returns false in this case and the statement above is never executed. Or did you observe the error in other cases, too? Georg
Re: LyX meeting in Paris. What about July 14-18?
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: | Jean-Marc So, which date shall we choose? For the first week-end, | Jean-Marc July 15-19 would indeed be a little bit easier to organize, | Jean-Marc since I am not sure when my little family will leave for | Jean-Marc the holidays. Other than that, it's up to you. | OK, it turns out that Juky 14-18 is OK too. Shall we select this date? | Where are all the people who were eager to see the choice done? busy with May 17. (our constitution day) So July 14-18 (the 16. weekend) it is? -- Lgb
Re: [PATCH 13x] inputing files with spaces
Angus == Angus Leeming [EMAIL PROTECTED] writes: I think I'd prefer that, if it is possible and not too complicated. Basically I just want to allow people to work with paths with spaces transparently in cases where it is possible. Angus Ok, try this. Super simple, no? This looks just like what I wanted :) JMarc
Re: lengthvalidator.*
Andre Poenitz [EMAIL PROTECTED] writes: | On Thu, May 12, 2005 at 08:45:24PM -0400, Rob Bearman wrote: Multiply defined symbols? Just remove lengthvalidator.* -- Angus Could the attached patch to development/win32/lyx.vcproj be applied, please? This takes care of the lengthvalidator/validator changes for the MSVC build. | Btw, I keep getting errors wrt some missing boost header (something with | detaisl/msvc/while.hpp or such in the path) when I try to compile LyX | with MSVC. | Have you ever seen such problem? This is possible. the exact error message would be nice. -- Lgb
Re: [PATCHES 13x, 14x] quote file names passed to lyx2lyx
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus These are needed to enable lyx2lyx to work with files with Angus spaces. As an added bonus, the alert will now be triggered if Angus lyx2lyx is not found. This looks good. BTW, I had recently to work on a file which name contains single quotes (for a conference, some people will use files like KI'05.tex). Result, this is a pain, but I am not sure it is worth working around. JMarc
Re: [Patch] Re: [Patch] Re: Timing experiments
Martin Vermeer [EMAIL PROTECTED] writes: | On Fri, May 13, 2005 at 10:59:44PM +0200, Andre Poenitz wrote: On Fri, May 13, 2005 at 09:46:29PM +0300, Martin Vermeer wrote: Actually it should be noted that paintText called from LyXScreen::redraw still draws _three_ paragraphs: the one containing the cursor, and the ones above and below, see rowpainter.C. I'm sure there is a good reason for this when redrawing the whole screen... We need up-to-date metrics in the paragraph below to handle e.g. Down when the cursor is in the last line of a paragraph. I think this was the reason before the null painter was invented... we could easily propagate the bool onlypar (by adding it to ViewMetricsInfo?) to prevent also this, giving a further speed-up. Is this a sensible direction? I think so. -void BufferView::update(bool fitcursor, bool forceupdate) +void BufferView::update(bool fitcursor, bool forceupdate, bool onlypar) { - pimpl_-update(fitcursor, forceupdate); + pimpl_-update(fitcursor, forceupdate, onlypar); } Pretty much looks like the old update flags now. I knew there must have been a reason... enum UpdateFlags { UpdateFitCursor = 1, UpdateForce = 2, UpdateOnlyPar = 4 }; + void update(UpdateFlags = UpdateFitCursor | UpdateForce); This makes things like + cur.bv().update(false, true, true); a bit mmore readble: cur.bv().update(UpdateForce | UpdateOnlyPar); Andre' | So here is the patch again... OK to commit? No. You have some fixing to do first. | -void BufferView::update(bool fitcursor, bool forceupdate) | +void BufferView::update(int updateflags) void Bufferview::update(UpdateFlags flags) | { | - pimpl_-update(fitcursor, forceupdate); | + pimpl_-update(updateflags); | } | | | Index: BufferView.h | === | RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView.h,v | retrieving revision 1.186 | diff -u -p -r1.186 BufferView.h | --- BufferView.h 26 Apr 2005 11:12:09 - 1.186 | +++ BufferView.h 15 May 2005 08:51:40 - | @@ -81,7 +81,14 @@ public: |* position changes. \c forceupdate means to force an update |* in any case. |*/ | - void update(bool fitcursor = true, bool forceupdate = true); | + | + enum UpdateFlags { | + UpdateFitCursor = 1, | + UpdateForce = 2, | + UpdateSinglePar = 4 | + }; | + | + void update(int updateflags = UpdateFitCursor | UpdateForce); void update(UpdateFlags flags = UpdateFutCursor | UpdateForce); | -void BufferView::Pimpl::update(bool fitcursor, bool forceupdate) | +void BufferView::Pimpl::update(int updateflags) void BufferView::Pimpl::update(UpdateFlags flags) | { | lyxerr BOOST_CURRENT_FUNCTION | - [fitcursor = fitcursor ',' | - forceupdate = forceupdate | + [fitcursor = (updateflags UpdateFitCursor) | + , forceupdate = (updateflags UpdateForce) | + , singlepar = (updateflags UpdateSinglePar) | ] buffer: buffer_ endl; | | // Check needed to survive LyX startup | @@ -632,10 +633,11 @@ void BufferView::Pimpl::update(bool fitc | | // First drawing step | ViewMetricsInfo vi = metrics(); | + bool forceupdate(updateflags UpdateForce); | | - if (fitcursor fitCursor()) { | + if ((updateflags UpdateFitCursor) fitCursor()) { | forceupdate = true; | - vi = metrics(); | + vi = metrics(updateflags UpdateSinglePar); | } | if (forceupdate) { | // Second drawing step | @@ -934,7 +936,10 @@ bool BufferView::Pimpl::workAreaDispatch | | if (cur.result().dispatched()) { | // Redraw if requested or necessary. | - update(cur.result().update(), cur.result().update()); | + if (cur.result().update()) | + update(UpdateFitCursor | UpdateForce); | + else | + update(); | } | | // See workAreaKeyPress | @@ -1246,7 +1251,7 @@ bool BufferView::Pimpl::dispatch(FuncReq | } | | | -ViewMetricsInfo BufferView::Pimpl::metrics() | +ViewMetricsInfo BufferView::Pimpl::metrics(bool singlepar) | { | // Remove old position cache | theCoords.clear(); | @@ -1274,7 +1279,7 @@ ViewMetricsInfo BufferView::Pimpl::metri | | // Redo paragraphs above cursor if necessary | int y1 = y0; | - while (y1 0 pit1 0) { | + while (!singlepar y1 0 pit1 0) { | y1 -= text-getPar(pit1).ascent(); | --pit1; | text-redoParagraph(pit1); | @@ -1298,7 +1303,7 @@ ViewMetricsInfo BufferView::Pimpl::metri | | // Redo paragraphs below cursor if necessary |
Re: LyX frontends
Martin Vermeer [EMAIL PROTECTED] writes: So, whilst multiple possible frontends is somehow nice, it's not very important IMO. | Entropy, Angus. That, and human nature. It's like with platform or | achitecture independence: if actually using multiple platforms isn't | forcing you, it _will_ slowly decay. Oh. if what Andre says is true we will soon have a Qt4 frontend to maintain as well :-) -- Lgb
Re: Profiling LyX-140 on Mac
Andre Poenitz [EMAIL PROTECTED] writes: | On Sat, May 14, 2005 at 04:02:10PM +0300, Martin Vermeer wrote: On Sat, May 14, 2005 at 01:42:58PM +0100, John Levon wrote: On Fri, May 13, 2005 at 09:25:31PM +0200, Andre Poenitz wrote: So why not solve that he other way round: Do not blink the cursor unless all draws have been finished? I thought that's what Martin was planning (and it certainly sounds right) I'm note sure we are talking about the same thing now. Anyway I am happy the way things have turned out with Lars' cache (though I still don't grok it). | I don't thing anything based on tweaking timers is a conceptionally | sound solution. It miht work, and this might all we need to get 1.4 | out of the door, but it does not sound right. It is not tweaking timers it is mostly about getting access to the event queue. (or do you have a nother way of peeking in the event queue?) -- Lgb
Re: [patch] key event queue
Andre Poenitz [EMAIL PROTECTED] writes: | On Thu, May 12, 2005 at 06:47:50PM +0200, Lars Gullik Bjønnes wrote: this is kindo a proof-of-concept. | Is there a specific reason this queue is in the frontend and not in the | core? | If it were in the core we could have an 'update' lfuns, and a 'dont need | up-to-date cache' lfun flags and play games... | Suppose we have a queue like a, b, Down, c, i.e. | Key-a[implicitupdate] Key-b[implicitupdate] | Down[implicitupdate] Key-c[implicitpdate] ... | we'd flag Key-* as 'dont need cache' and Down as 'need cache' and | transform the queue to | Key-a Key-b Update Down Key-c ... For 1.5. I have plans to move some into the core. (the possibility to handle more than one char-insert f.x. with update only on last one) but the handling of the queue and the event pruning (which is all that is happening now) should stay in the frontend. -- Lgb
Re: LyX frontends
Angus Leeming [EMAIL PROTECTED] writes: | Oh, sure. That's why you'll note I was not advocating killing the gtk port. | The XForms port should go, IMO, because it will become too much effort to | maintain in a unicoded LyX. Personally, I'm not going to invest effort in | a gtk port, but I'm not going to stand in anybody's way if that's what | they want to do. I don't want to ditch XForms just like that. Let it stay, at least for a little while after we begin the Unicode dance in 1.5.x. As long as we only talk about the document window it should not be too hard making XForms handle this. Also this will make us see problems more easily. (IMHO) -- Lgb
Re: Spellchecking and LANG trouble
Helge Hafting [EMAIL PROTECTED] writes: | The qt GUI used to have trouble with LANG=no_NO.UTF-8, but that | is solved. So no need to reset LANG to no_NO to run lyx-1.4, | except when spellchecking: | Aspell seems to puke on every word containing non-ascii when | LANG=no_NO.UTF-8, and inserting a replacement word (containing | non-ascii) inserts garbage characters. | Clearly a character set mismatch, aspell thinks lyx wants unicode | whne LANG contains UTF-8. Is it possible for lyx to | strip off the .UTF-8 part from LANG when invoking aspell? | That'd avoid the need for a wrapper script for running lyx. As in chaning the environment just for the spellcheking process... | Spellchecking works fine with LANG=no_NO. Would be better if you could live with the wrapper script for 1.4.x, In 1.5.x we (I) plan to tackle the whole Unicode-utf8 thing. -- Lgb
Re: Profiling LyX-140 on Mac
Andre Poenitz [EMAIL PROTECTED] writes: | On Sat, May 14, 2005 at 01:42:58PM +0100, John Levon wrote: On Fri, May 13, 2005 at 09:25:31PM +0200, Andre Poenitz wrote: So why not solve that he other way round: Do not blink the cursor unless all draws have been finished? I thought that's what Martin was planning (and it certainly sounds right) | Oh I see. I was swamped with messages suggesting that we try to hide | the problem using some well-tuned timer It is my event queue thingie you are talking about that is not about tweaking some timer. -- Lgb
Re: [PATCH 13x] inputing files with spaces
Jean-Marc Lasgouttes wrote: I think I'd prefer that, if it is possible and not too complicated. Basically I just want to allow people to work with paths with spaces transparently in cases where it is possible. Angus Ok, try this. Super simple, no? This looks just like what I wanted :) :) Now committed. -- Angus
Re: Some new problems with cvs
Georg Baum wrote: It looks good to me, but we should still ascertain why if (last_loaded-dispatch(batch_command, success)) is failing. Is it? I got the errors when lyx2lyx failed. loadLyXFile() returns false in this case and the statement above is never executed. Or did you observe the error in other cases, too? No, I'm just guessing why control didn't get passed to the QuitLyX(); exit(!success); block. -- Angus
Re: [PATCHES 13x, 14x] quote file names passed to lyx2lyx
Jean-Marc Lasgouttes wrote: Angus These are needed to enable lyx2lyx to work with files with Angus spaces. As an added bonus, the alert will now be triggered if Angus lyx2lyx is not found. This looks good. I'll commit to both trees then. BTW, I had recently to work on a file which name contains single quotes (for a conference, some people will use files like KI'05.tex). Result, this is a pain, but I am not sure it is worth working around. I don't think that we're in a position to work around it yet. If I ever commit my command line parser then this sort of thing becomes trivial, but for now QuoteName just isn't powerful enough. -- Angus
Should I commit my zero traffic cursor patch?
(See attached.) I can't remember if any concensus was reached. The code is certainly conceptually cleaner than what we have now, even if it transpires that it doesn't actually reduce traffic that much. If nodody says commit it, Angus, I'll just leave it to rot in my pending directory. -- AngusIndex: src/frontends/qt2/qscreen.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/qscreen.C,v retrieving revision 1.28 diff -u -p -r1.28 qscreen.C --- src/frontends/qt2/qscreen.C 20 May 2004 09:36:28 - 1.28 +++ src/frontends/qt2/qscreen.C 5 May 2005 20:58:26 - @@ -14,12 +14,10 @@ #include qscreen.h #include debug.h -#include LColor.h +#include lcolorcache.h #include qapplication.h -using std::endl; - namespace { @@ -60,7 +58,7 @@ void QScreen::repaint() void QScreen::expose(int x, int y, int w, int h) { lyxerr[Debug::GUI] expose w 'x' h - '+' x '+' y endl; + '+' x '+' y std::endl; owner_.getContent()-update(x, y, w, h); } @@ -68,51 +66,83 @@ void QScreen::expose(int x, int y, int w void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape) { + if (!qApp-focusWidget()) + return; + + // Cache the dimensions of the cursor. cursor_x_ = x; cursor_y_ = y; cursor_h_ = h; switch (shape) { - case BAR_SHAPE: - cursor_w_ = 1; - break; - case L_SHAPE: - cursor_w_ = cursor_h_ / 3; - break; - case REVERSED_L_SHAPE: - cursor_w_ = cursor_h_ / 3; - cursor_x_ = x - cursor_w_ + 1; - break; + case BAR_SHAPE: + cursor_w_ = 1; + break; + case L_SHAPE: + cursor_w_ = cursor_h_ / 3; + break; + case REVERSED_L_SHAPE: + cursor_w_ = cursor_h_ / 3; + cursor_x_ = x - cursor_w_ + 1; + break; } - if (!nocursor_pixmap_.get() - || cursor_w_ != nocursor_pixmap_-width() - || cursor_h_ != nocursor_pixmap_-height()) { - nocursor_pixmap_.reset(new QPixmap(cursor_w_, cursor_h_)); + // We cache three pixmaps: + // 1 the rectangle of the original screen. + // 2 the vertical line of the cursor. + // 3 the horizontal line of the L-shaped cursor (if necessary). + + // Initialise storage for these pixmaps as necessary. + if (cursor_w_ != nocursor_pixmap_.width() || + cursor_h_ != nocursor_pixmap_.height()) { + nocursor_pixmap_.resize(cursor_w_, cursor_h_); } - if (!qApp-focusWidget()) - return; - - // save old area - bitBlt(nocursor_pixmap_.get(), 0, 0, owner_.getPixmap(), - cursor_x_, cursor_y_, cursor_w_, cursor_h_); - - Painter pain(owner_.getPainter()); - pain.start(); - pain.line(x, y, x, y + h - 1, LColor::cursor); + QColor const required_color = lcolorcache.get(LColor::cursor); + bool const cursor_color_changed = required_color != cursor_color_; + if (cursor_color_changed) + cursor_color_ = required_color; + + if (cursor_h_ != vcursor_pixmap_.height() || cursor_color_changed) { + if (cursor_h_ != vcursor_pixmap_.height()) + vcursor_pixmap_.resize(1, cursor_h_); + vcursor_pixmap_.fill(cursor_color_); + } switch (shape) { - case BAR_SHAPE: - break; - case REVERSED_L_SHAPE: - case L_SHAPE: - pain.line(cursor_x_, y + h - 1, cursor_x_ + cursor_w_ - 1, -y + h - 1, LColor::cursor); - break; + case BAR_SHAPE: + break; + case REVERSED_L_SHAPE: + case L_SHAPE: + if (cursor_w_ != hcursor_pixmap_.width() || + cursor_color_changed) { + if (cursor_w_ != hcursor_pixmap_.width()) +hcursor_pixmap_.resize(cursor_w_, 1); + hcursor_pixmap_.fill(cursor_color_); + } + break; } - pain.end(); + // Save the old area (no cursor). + bitBlt(nocursor_pixmap_, 0, 0, owner_.getPixmap(), + cursor_x_, cursor_y_, cursor_w_, cursor_h_); + + // Draw the new (vertical) cursor using the cached store. + bitBlt(owner_.getPixmap(), x, y, + vcursor_pixmap_, 0, 0, + vcursor_pixmap_.width(), vcursor_pixmap_.height()); + + // Draw the new (horizontal) cursor if necessary. + switch (shape) { + case BAR_SHAPE: + break; + case REVERSED_L_SHAPE: + case L_SHAPE: + bitBlt(owner_.getPixmap(), cursor_x_, y + h - 1, + hcursor_pixmap_, 0, 0, + hcursor_pixmap_.width(), hcursor_pixmap_.height()); + break; + } owner_.getContent()-repaint( cursor_x_, cursor_y_, @@ -123,13 +153,12 @@ void QScreen::showCursor(int x, int y, i void QScreen::removeCursor() { // before first showCursor - if (!nocursor_pixmap_.get()) + if (nocursor_pixmap_.isNull()) return; bitBlt(owner_.getPixmap(), cursor_x_, cursor_y_, - nocursor_pixmap_.get(), 0, 0, cursor_w_, cursor_h_); + nocursor_pixmap_, 0, 0, cursor_w_, cursor_h_); - owner_.getContent()-repaint( - cursor_x_, cursor_y_, - cursor_w_, cursor_h_); + owner_.getContent() + -repaint(cursor_x_, cursor_y_, cursor_w_, cursor_h_); } Index: src/frontends/qt2/qscreen.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/qscreen.h,v retrieving revision 1.11 diff -u -p -r1.11 qscreen.h ---
Re: Some new problems with cvs
Angus Leeming wrote: No, I'm just guessing why control didn't get passed to the QuitLyX(); exit(!success); block. Fine, then I am going to apply the patch. Georg
Re: [PATCHES 13x, 14x] quote file names passed to lyx2lyx
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus I don't think that we're in a position to work around it yet. Angus If I ever commit my command line parser then this sort of thing Angus becomes trivial, but for now QuoteName just isn't powerful Angus enough. Indeed. JMarc
Re: [PATCH] More text changes
Michael == Michael Schmitt [EMAIL PROTECTED] writes: Michael Hello, some more text message changes. This patch (almost) Michael finishes my cleanup. Michael Please check and apply. This looks good to me. JMarc
Re: [PATCH 1.4] user interface, 2nd try
Michael == Michael Schmitt [EMAIL PROTECTED] writes: Michael Jean-Marc, this is another attempt to correct the UI files Michael and make them consistent. This time, I used ellipses (...) Michael according to the KDE human interface guideline. This looks good to me, but I'll let John comment too. Just one thing: inset-toggle may not exist anymore, but we have two lfuns instead { LFUN_NEXT_INSET_TOGGLE, next-inset-toggle, ReadOnly }, { LFUN_ALL_INSETS_TOGGLE, all-insets-toggle, ReadOnly }, Wouldn't it make sense to add them to the menu? JMarc
Re: [PATCH 1.4] user interface, 2nd try
Michael == Michael Schmitt [EMAIL PROTECTED] writes: Michael Jean-Marc, this is another attempt to correct the UI files Michael and make them consistent. This time, I used ellipses (...) Michael according to the KDE human interface guideline. Another text change that would be great is to change all occurences of ASCII with 'Plain Text' (also in formats). This should not be too difficult (and this is bug 1572). JMarc
Re: Should I commit my zero traffic cursor patch?
Angus Leeming [EMAIL PROTECTED] writes: | (See attached.) I can't remember if any concensus was reached. The code is | certainly conceptually cleaner than what we have now, even if it | transpires that it doesn't actually reduce traffic that much. | If nodody says commit it, Angus, I'll just leave it to rot in my pending | directory. I like it. But the patch would have been easier to read with -Bbw and without the non-ws reformatting... | void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape) | { | + if (!qApp-focusWidget()) | + return; | + Does this mean that we don't show the cursor if the window lack focus? Why don't we want that? -- Lgb
Re: Should I commit my zero traffic cursor patch?
Lars Gullik Bjønnes wrote: Angus Leeming [EMAIL PROTECTED] writes: | (See attached.) I can't remember if any concensus was reached. The code is | certainly conceptually cleaner than what we have now, even if it | transpires that it doesn't actually reduce traffic that much. | If nodody says commit it, Angus, I'll just leave it to rot in my pending | directory. I like it. But the patch would have been easier to read with -Bbw and without the non-ws reformatting... So, my .cvsrc should read $ cat .cvsrc update -dP diff -upNBbw rdiff -upNBbw ? | void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape) | { | + if (!qApp-focusWidget()) | + return; | + Does this mean that we don't show the cursor if the window lack focus? Why don't we want that? shrugIt's what we've always done./shrug FWIW, emacs continues to show the cursor but stops it flashing and changes its shape. Angus
Label text suggestions when inserting labels in lyx-1.4
The mechanism for inserting labels is a little too eager when finding text to put into the label. Example 1: A label inserted _after_ a float will come up with a suggestion based on text inside the float. The text suggestion should probably not go into a float, giving up with whatever litte or no text there was _after_ the float is better. The label box coming up blank is better than coming up with something the user surely will have to delete. Lyx will also break into boxes to get text, this may be ok as boxes doesn't float to some different location. Example 2: Insert several labels consecutively (possibly with a very small amount of text inbetween.) The suggested labeltext for the last label will then be something like: text-cap:something-text-sec:somethingelse-text which isn't all that useful. Skipping over other labels, similar to how ERT already seems to be skipped over is my suggestion here. Example 3: Insert a label right after a table. The label box comes up with the label +---+---+++---+-|- Well, at least the number of columns was almost right. :-/ I also tried a label right after inserted graphichs. The labeltext based on the filename surprised me, but it makes sense in a document full of pictures and little else. Example 4: A label after math tends to suggest a text version of the entire formula. Ok for small formulas, but they aren't all small. Helge Hafting
Box gui-size problems, and box dialog issues.
I wanted an extra border around a table, so I put it in a rectangular box. The idea was to get the same effect as \fbox{ ... } around the table. At first I struggled with this - boxes unfortunately seems to have a width of their own. (I can see how that is useful in a number of other cases of course.) I then discovered that after setting the type to rectangular instead of no frame allows me to specify the mysterious inner box:none which magically enables setting the width to some multiple of width. A bit tricky, but 1\width gives me exactly what I want which is nice. Unfortunately, the GUI seems to think that 1\width is really narrow, so the big wide table inside gets squashed in lyx. It'd be better if lyx did this a bit more latex-like and simply didn't change the width of the box content in this case. The squased view looks bad. A smaller problem is the tricky way this dialog box works. Some choices resets others, i.e. going from rectangular to no frame also resets the inner box from none to parbox. That kind of behaviour is fine with me, _if_ no frame+no innerbox really is unsupported. (I still think lyx should support this configuration, as \makebox can do exactly that. The combination isn't useless.) However, there are other cases where choices simply get hidden. no inner box is unavailable unless some framing is selected. Instead, it should be available but reset the type as necessary. similar for the width specification width - it should reset the inner box to none when used instead of being invisible. This is consistent with how type works. Remember, users don't always fill out dialogs in top-down order, particularly not when making changes to something existing. If you disagree with me about showing all choices all the time, how about at least showing the impossible options grayed-out instead of hiding them completely? Seeing that it is possible to get the width specification for box width is very helpful, even if I have to make some other changes in order to activate it. Helge Hafting
lyx140cvs: lyxline
Why do we put vspace around the lyxline? lyx_sty.C line 25ff: string const lyxline_def = \\newcommand{\\lyxline}[1]{\n {#1 \\vspace{1ex} \\hrule width \\columnwidth \\vspace{1ex}}\n }; Can't we let the user decide if and how much he wants? -- Viele Grüße, Hartmut Hungerhilfe: http://www.thehungersite.com Das heutige Motto: You love peace.
Keep CXXFLAGS from clobbering LyX required options (and vs.)
This patch tries to make us kinder to the user that wants to set his own compiler options. With this patch the user does not have to add the options that we require for a correct build. If the flags (CXXFLAGS) is user supplied, the debug flag and the optimizer flag (+ the warnings) is overrided by the user input. Comments? ? flags-1.diff ? lib/texput.log Index: configure.ac === RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.51 diff -u -p -B -b -w -r1.51 configure.ac --- configure.ac 3 May 2005 20:32:55 - 1.51 +++ configure.ac 19 May 2005 13:59:16 - @@ -78,7 +78,7 @@ AC_ARG_ENABLE(assertions, enable_assertions=no; fi;]) if test x$enable_assertions = xyes ; then - lyx_flags=$lyx_flags assertions + lyx_flags=assertions $lyx_flags AC_DEFINE(ENABLE_ASSERTIONS,1, [Define if you want assertions to be enabled in the code]) fi @@ -112,7 +112,7 @@ if test x$lyx_use_aiksaurus != xno; then AC_CHECK_LIB(Aiksaurus, main, [AC_DEFINE(HAVE_LIBAIKSAURUS,1,[Define this if you have the AikSaurus library]) AIKSAURUS_LIBS=-lAiksaurus - lyx_flags=$lyx_flags aiksaurus + lyx_flags=aiksaurus $lyx_flags ]) AC_CHECK_HEADER(Aiksaurus.h,[ ac_cv_header_aiksaurus_h=yes @@ -269,7 +269,7 @@ if test $use_compression=true ; then AC_CHECK_LIB(z, gzopen,[use_compression=true;LIBS=$LIBS -lz], use_compression=false) if test $use_compression = true ; then AC_DEFINE(USE_COMPRESSION, 1, [Define as 1 if you want to support compressed files.]) - lyx_flags=$lyx_flags compression + lyx_flags=compression $lyx_flags fi fi AM_CONDITIONAL(USE_COMPRESSION, test x$use_compression = xtrue) @@ -302,11 +302,14 @@ real_datadir=`eval echo \`eval \echo $ VERSION_INFO=Configuration\n\ Host type: ${host}\n\ Special build flags: ${lyx_flags}\n\ - C Compiler: ${CC}\n\ + C Compiler: ${CC} ${CC_VERSION}\n\ + C Compiler LyX flags: ${AM_CPPFLAGS} ${AM_CFLAGS}\n\ C Compiler flags: ${CPPFLAGS} ${CFLAGS}\n\ C++ Compiler: ${CXX} ${CXX_VERSION}\n\ + C++ Compiler LyX flags: ${AM_CPPFLAGS} ${AM_CXXFLAGS}\n\ C++ Compiler flags: ${CPPFLAGS} ${CXXFLAGS}\n\ - Linker flags: ${LDFLAGS}\n\ + Linker flags: ${AM_LDFLAGS}\n\ + Linker user flags: ${LDFLAGS}\n\ ${FRONTEND_INFO}\ Packaging: ${lyx_use_packaging}\n\ LyX binary dir: ${real_bindir}\n\ @@ -315,6 +318,10 @@ ${FRONTEND_INFO}\ AC_SUBST(VERSION_INFO) AC_SUBST(RPM_FRONTEND) +AC_SUBST(AM_CPPFLAGS) +AC_SUBST(AM_CXXFLAGS) +AC_SUBST(AM_CFLAGS) +AC_SUBST(AM_LDFLAGS) ## Some config.h stuff Index: boost/libs/filesystem/src/Makefile.am === RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/libs/filesystem/src/Makefile.am,v retrieving revision 1.6 diff -u -p -B -b -w -r1.6 Makefile.am --- boost/libs/filesystem/src/Makefile.am 5 Dec 2004 17:10:56 - 1.6 +++ boost/libs/filesystem/src/Makefile.am 19 May 2005 13:59:17 - @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libboost_filesystem.la -AM_CPPFLAGS = \ +AM_CPPFLAGS += \ $(PCH_FLAGS) \ -DBOOST_USER_CONFIG=config.h \ $(BOOST_INCLUDES) Index: boost/libs/regex/src/Makefile.am === RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/libs/regex/src/Makefile.am,v retrieving revision 1.12 diff -u -p -B -b -w -r1.12 Makefile.am --- boost/libs/regex/src/Makefile.am 5 Dec 2004 17:10:56 - 1.12 +++ boost/libs/regex/src/Makefile.am 19 May 2005 13:59:17 - @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libboost_regex.la -AM_CPPFLAGS = \ +AM_CPPFLAGS += \ $(PCH_FLAGS) \ -DBOOST_USER_CONFIG=config.h \ $(BOOST_INCLUDES) Index: boost/libs/signals/src/Makefile.am === RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/libs/signals/src/Makefile.am,v retrieving revision 1.7 diff -u -p -B -b -w -r1.7 Makefile.am --- boost/libs/signals/src/Makefile.am 5 Dec 2004 17:10:56 - 1.7 +++ boost/libs/signals/src/Makefile.am 19 May 2005 13:59:17 - @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libboost_signals.la -AM_CPPFLAGS = \ +AM_CPPFLAGS += \ $(PCH_FLAGS) \ -DBOOST_USER_CONFIG=config.h \ $(BOOST_INCLUDES) Index: config/lyxinclude.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v retrieving revision 1.107 diff -u -p -B -b -w -r1.107 lyxinclude.m4 --- config/lyxinclude.m4 4 Feb 2005 09:19:55 - 1.107 +++ config/lyxinclude.m4 19 May 2005 13:59:17 - @@ -169,7 +169,7 @@ AC_ARG_ENABLE(warnings,
Re: Keep CXXFLAGS from clobbering LyX required options (and vs.)
Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes: Lars This patch tries to make us kinder to the user that wants to set Lars his own compiler options. With this patch the user does not have Lars to add the options that we require for a correct build. Great! I can remove it from my TODO. Lars If the flags (CXXFLAGS) is user supplied, the debug flag and the Lars optimizer flag (+ the warnings) is overrided by the user input. Lars Comments? If it works, I like it. BTW, why do you change the ordering of lyx_flags? JMarc
Packaging of LyX/Win 1.3.6
I do believe that LyX 1.3.6 is looking like a realistic prospect :) What else is planned? I see that bugzilla comes up with five bugs in the 1.3.x series: http://tinyurl.com/7aghm (Incidentally, http://bugzilla.lyx.org/buglist.cgi?target_milestone=1.3.6 comes up with only three bugs.) I've managed to write a script to automate the process of producing a LyX/Win package. I describe below what it does; have I missed anything? (I propose not to package python, perl or a shell environment. Instead I think we should tell people to go and get their own.) The script uses the MinGW/MinSYS environment and compiler. It asks whether the Qt and LyX cvs trees are up to date. (It's not easy to use TortoiseCVS from the command line.) It asks whether the Qt library has been compiled. (Qt/WinFree must be compiled from a cmd shell, not a mingw console.) It checks that qt-mt3.dll, libiconv-2.dll, mingw10.dll and clean_dvi.py exist. It compiles the dv2dt and dt2dv utilites. It compiles and installs the Aspell library. It compiles and installs LyX. It copies the dv2dt and dt2dv utilites, the .dlls and clean_dvi.py to the lyx package. It modifies the Resources/lyx/configure script to ensure that the generated .dvi file is usable. Finally, it strips the executables and zips the entire contents into a .zip archive (8.8MB). Unzipping it will produce a directory LyX that can be installed as the user chooses. I've been using this package installed at C:\Program Files\LyX without any problems. Moreover, the mods described above to integrate the clean_dvi.py script mean that I can produce usable .dvi and .ps files. (I could already produce pdf files with pdflatex.) Are we getting to the stage where we could shove a pre-release on the wiki and ask some hardy souls to try it out? Angus #! /bin/sh # This script aims to do averything necessary to automate the building # of a LyX/Win package. # Notes: # It uses the MinGW/MinSYS environment and compiler. # It asks whether the Qt and LyX cvs trees are up to date. # It asks whether the Qt library has been compiled. # It checks that qt-mt3.dll, libiconv-2.dll, # mingw10.dll and clean_dvi.py exist. # It compiles the dv2dt and dt2dv utilites. # It compiles and installs the Aspell library. # It compiles and installs LyX. # It copies the dv2dt and dt2dv utilites, the .dlls and # clean_dvi.py to the lyx package. # It modifies the Resources/lyx/configure script to # ensure that the generated .dvi file is usable. # Finally, it strips the executables and zips the # entire contents into an archive. # Unzipping it will produce a directory LyX that can # be installed as the user chooses. # The script compiles the .dll version of the Qt libraries. Linking of lyx # against this will, therefore, take some time. # It compiles the static version of the Aspell libraries because no # .dll version exists. QT_DIR=$HOME/qt3 ASPELL_DIR=$HOME/aspell-0.50.5 LYX_DIR=$HOME/lyx/13x DTL_DIR=$HOME/dtl CLEAN_DVI_DIR=$HOME/lyx ASPELL_INSTALL_DIR=/j/Programs/Aspell-0.50.5 LYX_INSTALL_DIR=J:/Programs/LyX # These are all installed in the final LyX package QT_DLL=${QT_DIR}/bin/qt-mt3.dll LIBICONV_DLL=/j/MinGW/bin/libiconv-2.dll MINGW_DLL=/j/MinGW/bin/mingwm10.dll DT2DV=$DTL_DIR/dt2dv.exe DV2DT=$DTL_DIR/dv2dt.exe CLEAN_DVI_PY=$CLEAN_DVI_DIR/clean_dvi.py # If everything in this succeeds, then it will # create this archive. (With a .zip extension) ARCHIVEBASE=lyx_win32_13x_`date +%d%b%y` # Change this to 'mv -f' when you are confident that # the various sed scripts are working correctly. MV='mv -i' for dir in $QT_DIR $ASPELL_DIR $LYX_DIR $DTL_DIR $CLEAN_DVI_DIR do test -d $dir || { echo $dir does not exist 2 exit 1 } done echo Please ensure that the Qt and LyX cvs trees are up to date echo Press any key to continue read ans echo Please ensure that the Qt library is compiled and ready to go echo Press any key to continue read ans # Check that the dlls and clean_dvi.py exist for file in ${QT_DLL} ${LIBICONV_DLL} ${MINGW_DLL} ${CLEAN_DVI_PY} do test -r ${file} || { echo $file does not exist 2 exit 1 } done # dt2dv and dv2dt ( cd $DTL_DIR || { echo Unable to cd $DTL_DIR 2 exit 1 } make || { echo Failed to make $DTL_DIR 2 exit 1 } ) for file in ${DT2DV} ${DV2DT} do test -x $file || { echo ${file} does not exist or is not executable 2 exit 1 } done # Aspell ( cd $ASPELL_DIR || { echo Unable to cd $ASPELL_DIR 2 exit 1 } ./configure --enable-static --disable-shared --prefix=${ASPELL_INSTALL_DIR} || { echo Failed to configure $ASPELL_DIR 2 exit 1 } # We have to clean up two of the generated Makefiles. TMP=tmp.$$ MAKEFILE=examples/Makefile sed ' # Replace CC = gcc with CC = g++ s/^ *\(CC *= *\)gcc *$/\1g++/ # Remove trailing / from the -I directory. [EMAIL PROTECTED] *\(INCLUDES *= *-I\${top_srcdir}/interfaces/cc\)/ [EMAIL PROTECTED]@ ' ${MAKEFILE} ${TMP} cmp -s ${MAKEFILE} ${TMP} {
Re: Should I commit my zero traffic cursor patch?
Angus Leeming [EMAIL PROTECTED] writes: | Lars Gullik Bjønnes wrote: Angus Leeming [EMAIL PROTECTED] writes: | (See attached.) I can't remember if any concensus was reached. The code is | certainly conceptually cleaner than what we have now, even if it | transpires that it doesn't actually reduce traffic that much. | If nodody says commit it, Angus, I'll just leave it to rot in my pending | directory. I like it. But the patch would have been easier to read with -Bbw and without the non-ws reformatting... | So, my .cvsrc should read | $ cat .cvsrc | update -dP | diff -upNBbw | rdiff -upNBbw | ? Nah... add -Bbw on a case-by-case basis. Often you don't want it... and I am unsure whether a patch generated with it will apply... But in some cases it surely makes the patch a lot easier to read. -- Lgb
Re: Packaging of LyX/Win 1.3.6
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus I do believe that LyX 1.3.6 is looking like a realistic Angus prospect :) What else is planned? Not much... Angus I see that bugzilla comes up with five bugs in the 1.3.x Angus series: http://tinyurl.com/7aghm Some of these would be very easy to fix. Angus (Incidentally, Angus http://bugzilla.lyx.org/buglist.cgi?target_milestone=1.3.6 Angus comes up with only three bugs.) Because we do not plan to fix the others? Angus I've managed to write a script to automate the process of Angus producing a LyX/Win package. I describe below what it does; Angus have I missed anything? It would be great to have an installer. I do not know how to do that, though. Angus (I propose not to package python, perl or a shell environment. Angus Instead I think we should tell people to go and get their own.) How big are these things? I think it would be better to package just what we need, like Ruurd did. This is much easier for users (unless the installer can grab the files for us). Angus The script uses the MinGW/MinSYS environment and compiler. It Angus asks whether the Qt and LyX cvs trees are up to date. (It's not Angus easy to use TortoiseCVS from the command line.) It asks whether Angus the Qt library has been compiled. (Qt/WinFree must be compiled Angus from a cmd shell, not a mingw console.) It checks that Angus qt-mt3.dll, libiconv-2.dll, mingw10.dll and clean_dvi.py exist. Angus It compiles the dv2dt and dt2dv utilites. It compiles and Angus installs the Aspell library. It compiles and installs LyX. It Angus copies the dv2dt and dt2dv utilites, the .dlls and clean_dvi.py Angus to the lyx package. It modifies the Resources/lyx/configure Angus script to ensure that the generated .dvi file is usable. Looks good :) Why don't you compile qt as static? JMarc
Re: Latex import problem
Angus Leeming wrote: > Angus Leeming wrote: >> That way, we don't tie a particular lyx to a particular lyx2lyx > > I see that José was ahead of the game. LyX 1.3.x already does this. Sorry > about the noise. I saw that too, and it is also in 1.4. Now I wonder why I had to do the change when I replaced the lyx2lyx that comes with 1.3. Georg
Re: Some new problems with cvs
Angus Leeming wrote: > It looks good to me, but we should still ascertain why > if (last_loaded->dispatch(batch_command, )) > is failing. Is it? I got the errors when lyx2lyx failed. loadLyXFile() returns false in this case and the statement above is never executed. Or did you observe the error in other cases, too? Georg
Re: LyX meeting in Paris. What about July 14-18?
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: >> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: > | Jean-Marc> So, which date shall we choose? For the first week-end, | Jean-Marc> July 15-19 would indeed be a little bit easier to organize, | Jean-Marc> since I am not sure when my little family will leave for | Jean-Marc> the holidays. Other than that, it's up to you. > | OK, it turns out that Juky 14-18 is OK too. Shall we select this date? > | Where are all the people who were eager to see the choice done? busy with "May 17." (our constitution day) So July 14-18 (the 16. weekend) it is? -- Lgb
Re: [PATCH 13x] inputing "files with spaces"
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: >> I think I'd prefer that, if it is possible and not too >> complicated. Basically I just want to allow people to work with >> paths with spaces transparently in cases where it is possible. Angus> Ok, try this. Super simple, no? This looks just like what I wanted :) JMarc
Re: lengthvalidator.*
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Thu, May 12, 2005 at 08:45:24PM -0400, Rob Bearman wrote: >> > Multiply defined symbols? Just remove lengthvalidator.* >> > >> > -- >> > Angus >> > >> >> Could the attached patch to development/win32/lyx.vcproj be applied, >> please? This takes care of the lengthvalidator/validator changes for the >> MSVC build. > | Btw, I keep getting errors wrt some missing boost header (something with | detaisl/msvc/while.hpp or such in the path) when I try to compile LyX | with MSVC. > | Have you ever seen such problem? This is possible. the exact error message would be nice. -- Lgb
Re: [PATCHES 13x, 14x] quote file names passed to lyx2lyx
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> These are needed to enable lyx2lyx to work with "files with Angus> spaces". As an added bonus, the alert will now be triggered if Angus> lyx2lyx is not found. This looks good. BTW, I had recently to work on a file which name contains single quotes (for a conference, some people will use files like KI'05.tex). Result, this is a pain, but I am not sure it is worth working around. JMarc
Re: [Patch] Re: [Patch] Re: Timing experiments
Martin Vermeer <[EMAIL PROTECTED]> writes: | On Fri, May 13, 2005 at 10:59:44PM +0200, Andre Poenitz wrote: >> On Fri, May 13, 2005 at 09:46:29PM +0300, Martin Vermeer wrote: >> > Actually it should be noted that paintText called from LyXScreen::redraw >> > still draws _three_ paragraphs: the one containing the cursor, and the >> > ones above and below, see rowpainter.C. I'm sure there is a good reason >> > for this when redrawing the whole screen... >> >> We need up-to-date metrics in the paragraph below to handle e.g. >> when the cursor is in the last line of a paragraph. >> >> I think this was the reason before the null painter was invented... >> >> > we could easily propagate the bool onlypar (by adding it to >> > ViewMetricsInfo?) to prevent also this, giving a further speed-up. >> > >> > Is this a sensible direction? >> >> I think so. >> >> > -void BufferView::update(bool fitcursor, bool forceupdate) >> > +void BufferView::update(bool fitcursor, bool forceupdate, bool onlypar) >> > { >> > - pimpl_->update(fitcursor, forceupdate); >> > + pimpl_->update(fitcursor, forceupdate, onlypar); >> > } >> >> Pretty much looks like the old update flags now. I knew there must have >> been a reason... >> >> enum UpdateFlags { UpdateFitCursor = 1, UpdateForce = 2, UpdateOnlyPar = >> 4 }; >> >> + void update(UpdateFlags = UpdateFitCursor | UpdateForce); >> >> >> This makes things like >> >> > + cur.bv().update(false, true, true); >> >> a bit mmore readble: >> >> cur.bv().update(UpdateForce | UpdateOnlyPar); >> >> Andre' > | So here is the patch again... OK to commit? No. You have some fixing to do first. | -void BufferView::update(bool fitcursor, bool forceupdate) | +void BufferView::update(int updateflags) void Bufferview::update(UpdateFlags flags) | { | - pimpl_->update(fitcursor, forceupdate); | + pimpl_->update(updateflags); | } | | | Index: BufferView.h | === | RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView.h,v | retrieving revision 1.186 | diff -u -p -r1.186 BufferView.h | --- BufferView.h 26 Apr 2005 11:12:09 - 1.186 | +++ BufferView.h 15 May 2005 08:51:40 - | @@ -81,7 +81,14 @@ public: |* position changes. \c forceupdate means to force an update |* in any case. |*/ | - void update(bool fitcursor = true, bool forceupdate = true); | + | + enum UpdateFlags { | + UpdateFitCursor = 1, | + UpdateForce = 2, | + UpdateSinglePar = 4 | + }; | + | + void update(int updateflags = UpdateFitCursor | UpdateForce); void update(UpdateFlags flags = UpdateFutCursor | UpdateForce); | -void BufferView::Pimpl::update(bool fitcursor, bool forceupdate) | +void BufferView::Pimpl::update(int updateflags) void BufferView::Pimpl::update(UpdateFlags flags) | { | lyxerr << BOOST_CURRENT_FUNCTION | -<< "[fitcursor = " << fitcursor << ',' | -<< " forceupdate = " << forceupdate | +<< "[fitcursor = " << (updateflags & UpdateFitCursor) | +<< ", forceupdate = " << (updateflags & UpdateForce) | +<< ", singlepar = " << (updateflags & UpdateSinglePar) | << "] buffer: " << buffer_ << endl; | | // Check needed to survive LyX startup | @@ -632,10 +633,11 @@ void BufferView::Pimpl::update(bool fitc | | // First drawing step | ViewMetricsInfo vi = metrics(); | + bool forceupdate(updateflags & UpdateForce); | | - if (fitcursor && fitCursor()) { | + if ((updateflags & UpdateFitCursor) && fitCursor()) { | forceupdate = true; | - vi = metrics(); | + vi = metrics(updateflags & UpdateSinglePar); | } | if (forceupdate) { | // Second drawing step | @@ -934,7 +936,10 @@ bool BufferView::Pimpl::workAreaDispatch | | if (cur.result().dispatched()) { | // Redraw if requested or necessary. | - update(cur.result().update(), cur.result().update()); | + if (cur.result().update()) | + update(UpdateFitCursor | UpdateForce); | + else | + update(); | } | | // See workAreaKeyPress | @@ -1246,7 +1251,7 @@ bool BufferView::Pimpl::dispatch(FuncReq | } | | | -ViewMetricsInfo BufferView::Pimpl::metrics() | +ViewMetricsInfo BufferView::Pimpl::metrics(bool singlepar) | { | // Remove old position cache | theCoords.clear(); | @@ -1274,7 +1279,7 @@ ViewMetricsInfo BufferView::Pimpl::metri | | // Redo paragraphs above cursor if necessary | int y1 = y0; | - while (y1 > 0 && pit1 > 0) { | + while (!singlepar && y1 > 0 && pit1 > 0) { | y1 -= text->getPar(pit1).ascent(); | --pit1; |
Re: LyX frontends
Martin Vermeer <[EMAIL PROTECTED]> writes: >> So, whilst multiple possible frontends is somehow "nice", it's not very >> important IMO. > | Entropy, Angus. That, and human nature. It's like with platform or | achitecture independence: if actually using multiple platforms isn't | forcing you, it _will_ slowly decay. Oh. if what Andre says is true we will soon have a Qt4 frontend to maintain as well :-) -- Lgb
Re: Profiling LyX-140 on Mac
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Sat, May 14, 2005 at 04:02:10PM +0300, Martin Vermeer wrote: >> On Sat, May 14, 2005 at 01:42:58PM +0100, John Levon wrote: >> > On Fri, May 13, 2005 at 09:25:31PM +0200, Andre Poenitz wrote: >> > >> > > So why not solve that he other way round: Do not blink the cursor unless >> > > all draws have been finished? >> > >> > I thought that's what Martin was planning (and it certainly sounds >> > right) >> >> I'm note sure we are talking about the same thing now. Anyway I am happy >> the way things have turned out with Lars' cache (though I still don't >> grok it). > | I don't thing anything based on tweaking timers is a conceptionally | sound solution. It miht work, and this might all we need to get 1.4 | out of the door, but it does not sound right. It is not tweaking timers it is mostly about getting access to the event queue. (or do you have a nother way of peeking in the event queue?) -- Lgb
Re: [patch] key event queue
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Thu, May 12, 2005 at 06:47:50PM +0200, Lars Gullik Bjønnes wrote: >> this is kindo a proof-of-concept. > | Is there a specific reason this queue is in the frontend and not in the | core? > | If it were in the core we could have an 'update' lfuns, and a 'dont need | up-to-date cache' lfun flags and play games... > | Suppose we have a queue like a, b, , c, i.e. > | [implicitupdate] [implicitupdate] | [implicitupdate] [implicitpdate] ... > | we'd flagas 'dont need cache' and as 'need cache' and | transform the queue to > |... For 1.5. I have plans to move some into the core. (the possibility to handle more than one char-insert f.x. with update only on last one) but the handling of the queue and the event pruning (which is all that is happening now) should stay in the frontend. -- Lgb
Re: LyX frontends
Angus Leeming <[EMAIL PROTECTED]> writes: | Oh, sure. That's why you'll note I was not advocating killing the gtk port. | The XForms port should go, IMO, because it will become too much effort to | maintain in a unicoded LyX. Personally, I'm not going to invest effort in | a gtk port, but I'm not going to stand in anybody's way if that's what | they want to do. I don't want to ditch XForms just like that. Let it stay, at least for a little while after we begin the Unicode dance in 1.5.x. As long as we only talk about the document window it should not be too hard making XForms handle this. Also this will make us see problems more easily. (IMHO) -- Lgb
Re: Spellchecking and LANG trouble
Helge Hafting <[EMAIL PROTECTED]> writes: | The qt GUI used to have trouble with LANG=no_NO.UTF-8, but that | is solved. So no need to reset LANG to no_NO to run lyx-1.4, | except when spellchecking: > | Aspell seems to puke on every word containing non-ascii when | LANG=no_NO.UTF-8, and inserting a replacement word (containing | non-ascii) inserts garbage characters. > | Clearly a character set mismatch, aspell thinks lyx wants unicode | whne LANG contains UTF-8. Is it possible for lyx to | strip off the ".UTF-8" part from "LANG" when invoking aspell? | That'd avoid the need for a wrapper script for running lyx. As in chaning the environment just for the spellcheking process... | Spellchecking works fine with LANG=no_NO. Would be better if you could live with the wrapper script for 1.4.x, In 1.5.x we (I) plan to tackle the whole Unicode-utf8 thing. -- Lgb
Re: Profiling LyX-140 on Mac
Andre Poenitz <[EMAIL PROTECTED]> writes: | On Sat, May 14, 2005 at 01:42:58PM +0100, John Levon wrote: >> On Fri, May 13, 2005 at 09:25:31PM +0200, Andre Poenitz wrote: >> >> > So why not solve that he other way round: Do not blink the cursor unless >> > all draws have been finished? >> >> I thought that's what Martin was planning (and it certainly sounds >> right) > | Oh I see. I was swamped with messages suggesting that we try to hide | the problem using some well-tuned timer It is my event queue thingie you are talking about that is not about tweaking some timer. -- Lgb
Re: [PATCH 13x] inputing "files with spaces"
Jean-Marc Lasgouttes wrote: >>> I think I'd prefer that, if it is possible and not too >>> complicated. Basically I just want to allow people to work with >>> paths with spaces transparently in cases where it is possible. > > Angus> Ok, try this. Super simple, no? > > This looks just like what I wanted :) :) Now committed. -- Angus
Re: Some new problems with cvs
Georg Baum wrote: >> It looks good to me, but we should still ascertain why >> if (last_loaded->dispatch(batch_command, )) >> is failing. > > Is it? I got the errors when lyx2lyx failed. loadLyXFile() returns false > in this case and the statement above is never executed. Or did you > observe the error in other cases, too? No, I'm just guessing why control didn't get passed to the QuitLyX(); exit(!success); block. -- Angus
Re: [PATCHES 13x, 14x] quote file names passed to lyx2lyx
Jean-Marc Lasgouttes wrote: > Angus> These are needed to enable lyx2lyx to work with "files with > Angus> spaces". As an added bonus, the alert will now be triggered if > Angus> lyx2lyx is not found. > > This looks good. I'll commit to both trees then. > BTW, I had recently to work on a file which name contains single > quotes (for a conference, some people will use files like KI'05.tex). > Result, this is a pain, but I am not sure it is worth working around. I don't think that we're in a position to work around it yet. If I ever commit my command line parser then this sort of thing becomes trivial, but for now QuoteName just isn't powerful enough. -- Angus
Should I commit my "zero traffic cursor" patch?
(See attached.) I can't remember if any concensus was reached. The code is certainly conceptually cleaner than what we have now, even if it transpires that it doesn't actually reduce traffic that much. If nodody says "commit it, Angus", I'll just leave it to rot in my pending directory. -- AngusIndex: src/frontends/qt2/qscreen.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/qscreen.C,v retrieving revision 1.28 diff -u -p -r1.28 qscreen.C --- src/frontends/qt2/qscreen.C 20 May 2004 09:36:28 - 1.28 +++ src/frontends/qt2/qscreen.C 5 May 2005 20:58:26 - @@ -14,12 +14,10 @@ #include "qscreen.h" #include "debug.h" -#include "LColor.h" +#include "lcolorcache.h" #include -using std::endl; - namespace { @@ -60,7 +58,7 @@ void QScreen::repaint() void QScreen::expose(int x, int y, int w, int h) { lyxerr[Debug::GUI] << "expose " << w << 'x' << h - << '+' << x << '+' << y << endl; + << '+' << x << '+' << y << std::endl; owner_.getContent()->update(x, y, w, h); } @@ -68,51 +66,83 @@ void QScreen::expose(int x, int y, int w void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape) { + if (!qApp->focusWidget()) + return; + + // Cache the dimensions of the cursor. cursor_x_ = x; cursor_y_ = y; cursor_h_ = h; switch (shape) { - case BAR_SHAPE: - cursor_w_ = 1; - break; - case L_SHAPE: - cursor_w_ = cursor_h_ / 3; - break; - case REVERSED_L_SHAPE: - cursor_w_ = cursor_h_ / 3; - cursor_x_ = x - cursor_w_ + 1; - break; + case BAR_SHAPE: + cursor_w_ = 1; + break; + case L_SHAPE: + cursor_w_ = cursor_h_ / 3; + break; + case REVERSED_L_SHAPE: + cursor_w_ = cursor_h_ / 3; + cursor_x_ = x - cursor_w_ + 1; + break; } - if (!nocursor_pixmap_.get() - || cursor_w_ != nocursor_pixmap_->width() - || cursor_h_ != nocursor_pixmap_->height()) { - nocursor_pixmap_.reset(new QPixmap(cursor_w_, cursor_h_)); + // We cache three pixmaps: + // 1 the rectangle of the original screen. + // 2 the vertical line of the cursor. + // 3 the horizontal line of the L-shaped cursor (if necessary). + + // Initialise storage for these pixmaps as necessary. + if (cursor_w_ != nocursor_pixmap_.width() || + cursor_h_ != nocursor_pixmap_.height()) { + nocursor_pixmap_.resize(cursor_w_, cursor_h_); } - if (!qApp->focusWidget()) - return; - - // save old area - bitBlt(nocursor_pixmap_.get(), 0, 0, owner_.getPixmap(), - cursor_x_, cursor_y_, cursor_w_, cursor_h_); - - Painter & pain(owner_.getPainter()); - pain.start(); - pain.line(x, y, x, y + h - 1, LColor::cursor); + QColor const & required_color = lcolorcache.get(LColor::cursor); + bool const cursor_color_changed = required_color != cursor_color_; + if (cursor_color_changed) + cursor_color_ = required_color; + + if (cursor_h_ != vcursor_pixmap_.height() || cursor_color_changed) { + if (cursor_h_ != vcursor_pixmap_.height()) + vcursor_pixmap_.resize(1, cursor_h_); + vcursor_pixmap_.fill(cursor_color_); + } switch (shape) { - case BAR_SHAPE: - break; - case REVERSED_L_SHAPE: - case L_SHAPE: - pain.line(cursor_x_, y + h - 1, cursor_x_ + cursor_w_ - 1, -y + h - 1, LColor::cursor); - break; + case BAR_SHAPE: + break; + case REVERSED_L_SHAPE: + case L_SHAPE: + if (cursor_w_ != hcursor_pixmap_.width() || + cursor_color_changed) { + if (cursor_w_ != hcursor_pixmap_.width()) +hcursor_pixmap_.resize(cursor_w_, 1); + hcursor_pixmap_.fill(cursor_color_); + } + break; } - pain.end(); + // Save the old area (no cursor). + bitBlt(_pixmap_, 0, 0, owner_.getPixmap(), + cursor_x_, cursor_y_, cursor_w_, cursor_h_); + + // Draw the new (vertical) cursor using the cached store. + bitBlt(owner_.getPixmap(), x, y, + _pixmap_, 0, 0, + vcursor_pixmap_.width(), vcursor_pixmap_.height()); + + // Draw the new (horizontal) cursor if necessary. + switch (shape) { + case BAR_SHAPE: + break; + case REVERSED_L_SHAPE: + case L_SHAPE: + bitBlt(owner_.getPixmap(), cursor_x_, y + h - 1, + _pixmap_, 0, 0, + hcursor_pixmap_.width(), hcursor_pixmap_.height()); + break; + } owner_.getContent()->repaint( cursor_x_, cursor_y_, @@ -123,13 +153,12 @@ void QScreen::showCursor(int x, int y, i void QScreen::removeCursor() { // before first showCursor - if (!nocursor_pixmap_.get()) + if (nocursor_pixmap_.isNull()) return; bitBlt(owner_.getPixmap(), cursor_x_, cursor_y_, - nocursor_pixmap_.get(), 0, 0, cursor_w_, cursor_h_); + _pixmap_, 0, 0, cursor_w_, cursor_h_); - owner_.getContent()->repaint( - cursor_x_, cursor_y_, - cursor_w_, cursor_h_); + owner_.getContent() + ->repaint(cursor_x_, cursor_y_, cursor_w_, cursor_h_); } Index: src/frontends/qt2/qscreen.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/qscreen.h,v retrieving revision 1.11 diff -u -p -r1.11 qscreen.h ---
Re: Some new problems with cvs
Angus Leeming wrote: > No, I'm just guessing why control didn't get passed to the > QuitLyX(); > exit(!success); > block. Fine, then I am going to apply the patch. Georg
Re: [PATCHES 13x, 14x] quote file names passed to lyx2lyx
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> I don't think that we're in a position to work around it yet. Angus> If I ever commit my command line parser then this sort of thing Angus> becomes trivial, but for now QuoteName just isn't powerful Angus> enough. Indeed. JMarc
Re: [PATCH] More text changes
> "Michael" == Michael Schmitt <[EMAIL PROTECTED]> writes: Michael> Hello, some more text message changes. This patch (almost) Michael> finishes my cleanup. Michael> Please check and apply. This looks good to me. JMarc
Re: [PATCH 1.4] user interface, 2nd try
> "Michael" == Michael Schmitt <[EMAIL PROTECTED]> writes: Michael> Jean-Marc, this is another attempt to correct the UI files Michael> and make them consistent. This time, I used ellipses (...) Michael> according to the KDE human interface guideline. This looks good to me, but I'll let John comment too. Just one thing: inset-toggle may not exist anymore, but we have two lfuns instead { LFUN_NEXT_INSET_TOGGLE, "next-inset-toggle", ReadOnly }, { LFUN_ALL_INSETS_TOGGLE, "all-insets-toggle", ReadOnly }, Wouldn't it make sense to add them to the menu? JMarc
Re: [PATCH 1.4] user interface, 2nd try
> "Michael" == Michael Schmitt <[EMAIL PROTECTED]> writes: Michael> Jean-Marc, this is another attempt to correct the UI files Michael> and make them consistent. This time, I used ellipses (...) Michael> according to the KDE human interface guideline. Another text change that would be great is to change all occurences of ASCII with 'Plain Text' (also in formats). This should not be too difficult (and this is bug 1572). JMarc
Re: Should I commit my "zero traffic cursor" patch?
Angus Leeming <[EMAIL PROTECTED]> writes: | (See attached.) I can't remember if any concensus was reached. The code is | certainly conceptually cleaner than what we have now, even if it | transpires that it doesn't actually reduce traffic that much. > | If nodody says "commit it, Angus", I'll just leave it to rot in my pending | directory. I like it. But the patch would have been easier to read with "-Bbw" and without the non-ws reformatting... | void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape) | { | + if (!qApp->focusWidget()) | + return; | + Does this mean that we don't show the cursor if the window lack focus? Why don't we want that? -- Lgb
Re: Should I commit my "zero traffic cursor" patch?
Lars Gullik Bjønnes wrote: Angus Leeming <[EMAIL PROTECTED]> writes: | (See attached.) I can't remember if any concensus was reached. The code is | certainly conceptually cleaner than what we have now, even if it | transpires that it doesn't actually reduce traffic that much. | If nodody says "commit it, Angus", I'll just leave it to rot in my pending | directory. I like it. But the patch would have been easier to read with "-Bbw" and without the non-ws reformatting... So, my .cvsrc should read $ cat .cvsrc update -dP diff -upNBbw rdiff -upNBbw ? | void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape) | { | + if (!qApp->focusWidget()) | + return; | + Does this mean that we don't show the cursor if the window lack focus? Why don't we want that? It's what we've always done. FWIW, emacs continues to show the cursor but stops it flashing and changes its shape. Angus
Label text suggestions when inserting labels in lyx-1.4
The mechanism for inserting labels is a little too eager when finding text to put into the label. Example 1: A label inserted _after_ a float will come up with a suggestion based on text inside the float. The text suggestion should probably not go into a float, giving up with whatever litte or no text there was _after_ the float is better. The label box coming up blank is better than coming up with something the user surely will have to delete. Lyx will also break into boxes to get text, this may be ok as boxes doesn't float to some different location. Example 2: Insert several labels consecutively (possibly with a very small amount of text inbetween.) The suggested labeltext for the last label will then be something like: "text--text--text" which isn't all that useful. Skipping over other labels, similar to how ERT already seems to be skipped over is my suggestion here. Example 3: Insert a label right after a table. The label box comes up with the label "+---+---+++---+-|-" Well, at least the number of columns was almost right. :-/ I also tried a label right after inserted graphichs. The labeltext based on the filename surprised me, but it makes sense in a document full of pictures and little else. Example 4: A label after math tends to suggest a text version of the entire formula. Ok for small formulas, but they aren't all small. Helge Hafting
Box gui-size problems, and box dialog issues.
I wanted an extra border around a table, so I put it in a rectangular box. The idea was to get the same effect as \fbox{ ... } around the table. At first I struggled with this - boxes unfortunately seems to have a width of their own. (I can see how that is useful in a number of other cases of course.) I then discovered that after setting the type to "rectangular" instead of "no frame" allows me to specify the mysterious "inner box:none" which magically enables setting the width to some multiple of "width". A bit tricky, but 1\width gives me exactly what I want which is nice. Unfortunately, the GUI seems to think that 1\width is really narrow, so the big wide table inside gets squashed in lyx. It'd be better if lyx did this a bit more latex-like and simply didn't change the width of the box content in this case. The squased view looks bad. A smaller problem is the tricky way this dialog box works. Some choices resets others, i.e. going from "rectangular" to "no frame" also resets the inner box from "none" to "parbox". That kind of behaviour is fine with me, _if_ "no frame+no innerbox" really is unsupported. (I still think lyx should support this configuration, as \makebox can do exactly that. The combination isn't "useless.") However, there are other cases where choices simply get hidden. "no inner box" is unavailable unless some framing is selected. Instead, it should be available but reset the "type" as necessary. similar for the width specification "width" - it should reset the inner box to "none" when used instead of being invisible. This is consistent with how "type" works. Remember, users don't always fill out dialogs in top-down order, particularly not when making changes to something existing. If you disagree with me about showing all choices all the time, how about at least showing the "impossible" options grayed-out instead of hiding them completely? Seeing that it is possible to get the "width" specification for box width is very helpful, even if I have to make some other changes in order to activate it. Helge Hafting
lyx140cvs: lyxline
Why do we put vspace around the lyxline? lyx_sty.C line 25ff: string const lyxline_def = "\\newcommand{\\lyxline}[1]{\n" " {#1 \\vspace{1ex} \\hrule width \\columnwidth \\vspace{1ex}}\n" "}"; Can't we let the user decide if and how much he wants? -- Viele Grüße, Hartmut Hungerhilfe: http://www.thehungersite.com Das heutige Motto: You love peace.
Keep CXXFLAGS from clobbering LyX required options (and vs.)
This patch tries to make us kinder to the user that wants to set his own compiler options. With this patch the user does not have to add the options that we require for a correct build. If the flags (CXXFLAGS) is user supplied, the debug flag and the optimizer flag (+ the warnings) is overrided by the user input. Comments? ? flags-1.diff ? lib/texput.log Index: configure.ac === RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.51 diff -u -p -B -b -w -r1.51 configure.ac --- configure.ac 3 May 2005 20:32:55 - 1.51 +++ configure.ac 19 May 2005 13:59:16 - @@ -78,7 +78,7 @@ AC_ARG_ENABLE(assertions, enable_assertions=no; fi;]) if test "x$enable_assertions" = xyes ; then - lyx_flags="$lyx_flags assertions" + lyx_flags="assertions $lyx_flags" AC_DEFINE(ENABLE_ASSERTIONS,1, [Define if you want assertions to be enabled in the code]) fi @@ -112,7 +112,7 @@ if test x$lyx_use_aiksaurus != xno; then AC_CHECK_LIB(Aiksaurus, main, [AC_DEFINE(HAVE_LIBAIKSAURUS,1,[Define this if you have the AikSaurus library]) AIKSAURUS_LIBS="-lAiksaurus" - lyx_flags="$lyx_flags aiksaurus" + lyx_flags="aiksaurus $lyx_flags" ]) AC_CHECK_HEADER(Aiksaurus.h,[ ac_cv_header_aiksaurus_h=yes @@ -269,7 +269,7 @@ if test $use_compression=true ; then AC_CHECK_LIB(z, gzopen,[use_compression=true;LIBS="$LIBS -lz"], use_compression=false) if test $use_compression = true ; then AC_DEFINE(USE_COMPRESSION, 1, [Define as 1 if you want to support compressed files.]) - lyx_flags="$lyx_flags compression" + lyx_flags="compression $lyx_flags" fi fi AM_CONDITIONAL(USE_COMPRESSION, test x$use_compression = xtrue) @@ -302,11 +302,14 @@ real_datadir=`eval "echo \`eval \"echo $ VERSION_INFO="Configuration\n\ Host type: ${host}\n\ Special build flags: ${lyx_flags}\n\ - C Compiler: ${CC}\n\ + C Compiler: ${CC} ${CC_VERSION}\n\ + C Compiler LyX flags: ${AM_CPPFLAGS} ${AM_CFLAGS}\n\ C Compiler flags: ${CPPFLAGS} ${CFLAGS}\n\ C++ Compiler: ${CXX} ${CXX_VERSION}\n\ + C++ Compiler LyX flags: ${AM_CPPFLAGS} ${AM_CXXFLAGS}\n\ C++ Compiler flags: ${CPPFLAGS} ${CXXFLAGS}\n\ - Linker flags: ${LDFLAGS}\n\ + Linker flags: ${AM_LDFLAGS}\n\ + Linker user flags: ${LDFLAGS}\n\ ${FRONTEND_INFO}\ Packaging: ${lyx_use_packaging}\n\ LyX binary dir: ${real_bindir}\n\ @@ -315,6 +318,10 @@ ${FRONTEND_INFO}\ AC_SUBST(VERSION_INFO) AC_SUBST(RPM_FRONTEND) +AC_SUBST(AM_CPPFLAGS) +AC_SUBST(AM_CXXFLAGS) +AC_SUBST(AM_CFLAGS) +AC_SUBST(AM_LDFLAGS) ## Some config.h stuff Index: boost/libs/filesystem/src/Makefile.am === RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/libs/filesystem/src/Makefile.am,v retrieving revision 1.6 diff -u -p -B -b -w -r1.6 Makefile.am --- boost/libs/filesystem/src/Makefile.am 5 Dec 2004 17:10:56 - 1.6 +++ boost/libs/filesystem/src/Makefile.am 19 May 2005 13:59:17 - @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libboost_filesystem.la -AM_CPPFLAGS = \ +AM_CPPFLAGS += \ $(PCH_FLAGS) \ -DBOOST_USER_CONFIG="" \ $(BOOST_INCLUDES) Index: boost/libs/regex/src/Makefile.am === RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/libs/regex/src/Makefile.am,v retrieving revision 1.12 diff -u -p -B -b -w -r1.12 Makefile.am --- boost/libs/regex/src/Makefile.am 5 Dec 2004 17:10:56 - 1.12 +++ boost/libs/regex/src/Makefile.am 19 May 2005 13:59:17 - @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libboost_regex.la -AM_CPPFLAGS = \ +AM_CPPFLAGS += \ $(PCH_FLAGS) \ -DBOOST_USER_CONFIG="" \ $(BOOST_INCLUDES) Index: boost/libs/signals/src/Makefile.am === RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/libs/signals/src/Makefile.am,v retrieving revision 1.7 diff -u -p -B -b -w -r1.7 Makefile.am --- boost/libs/signals/src/Makefile.am 5 Dec 2004 17:10:56 - 1.7 +++ boost/libs/signals/src/Makefile.am 19 May 2005 13:59:17 - @@ -2,7 +2,7 @@ include $(top_srcdir)/config/common.am noinst_LTLIBRARIES = libboost_signals.la -AM_CPPFLAGS = \ +AM_CPPFLAGS += \ $(PCH_FLAGS) \ -DBOOST_USER_CONFIG="" \ $(BOOST_INCLUDES) Index: config/lyxinclude.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/lyxinclude.m4,v retrieving revision 1.107 diff -u -p -B -b -w -r1.107 lyxinclude.m4 --- config/lyxinclude.m4 4 Feb 2005 09:19:55 - 1.107 +++ config/lyxinclude.m4 19 May 2005 13:59:17 - @@ -169,7 +169,7 @@ AC_ARG_ENABLE(warnings,
Re: Keep CXXFLAGS from clobbering LyX required options (and vs.)
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> This patch tries to make us kinder to the user that wants to set Lars> his own compiler options. With this patch the user does not have Lars> to add the options that we require for a correct build. Great! I can remove it from my TODO. Lars> If the flags (CXXFLAGS) is user supplied, the debug flag and the Lars> optimizer flag (+ the warnings) is overrided by the user input. Lars> Comments? If it works, I like it. BTW, why do you change the ordering of lyx_flags? JMarc
Packaging of LyX/Win 1.3.6
I do believe that LyX 1.3.6 is looking like a realistic prospect :) What else is planned? I see that bugzilla comes up with five bugs in the 1.3.x series: http://tinyurl.com/7aghm (Incidentally, http://bugzilla.lyx.org/buglist.cgi?target_milestone=1.3.6 comes up with only three bugs.) I've managed to write a script to automate the process of producing a LyX/Win package. I describe below what it does; have I missed anything? (I propose not to package python, perl or a shell environment. Instead I think we should tell people to go and get their own.) The script uses the MinGW/MinSYS environment and compiler. It asks whether the Qt and LyX cvs trees are up to date. (It's not easy to use TortoiseCVS from the command line.) It asks whether the Qt library has been compiled. (Qt/WinFree must be compiled from a cmd shell, not a mingw console.) It checks that qt-mt3.dll, libiconv-2.dll, mingw10.dll and clean_dvi.py exist. It compiles the dv2dt and dt2dv utilites. It compiles and installs the Aspell library. It compiles and installs LyX. It copies the dv2dt and dt2dv utilites, the .dlls and clean_dvi.py to the lyx package. It modifies the Resources/lyx/configure script to ensure that the generated .dvi file is usable. Finally, it strips the executables and zips the entire contents into a .zip archive (8.8MB). Unzipping it will produce a directory LyX that can be installed as the user chooses. I've been using this package installed at C:\Program Files\LyX without any problems. Moreover, the mods described above to integrate the clean_dvi.py script mean that I can produce usable .dvi and .ps files. (I could already produce pdf files with pdflatex.) Are we getting to the stage where we could shove a pre-release on the wiki and ask some hardy souls to try it out? Angus #! /bin/sh # This script aims to do averything necessary to automate the building # of a LyX/Win package. # Notes: # It uses the MinGW/MinSYS environment and compiler. # It asks whether the Qt and LyX cvs trees are up to date. # It asks whether the Qt library has been compiled. # It checks that qt-mt3.dll, libiconv-2.dll, # mingw10.dll and clean_dvi.py exist. # It compiles the dv2dt and dt2dv utilites. # It compiles and installs the Aspell library. # It compiles and installs LyX. # It copies the dv2dt and dt2dv utilites, the .dlls and # clean_dvi.py to the lyx package. # It modifies the Resources/lyx/configure script to # ensure that the generated .dvi file is usable. # Finally, it strips the executables and zips the # entire contents into an archive. # Unzipping it will produce a directory LyX that can # be installed as the user chooses. # The script compiles the .dll version of the Qt libraries. Linking of lyx # against this will, therefore, take "some time". # It compiles the static version of the Aspell libraries because no # .dll version exists. QT_DIR=$HOME/qt3 ASPELL_DIR=$HOME/aspell-0.50.5 LYX_DIR=$HOME/lyx/13x DTL_DIR=$HOME/dtl CLEAN_DVI_DIR=$HOME/lyx ASPELL_INSTALL_DIR="/j/Programs/Aspell-0.50.5" LYX_INSTALL_DIR="J:/Programs/LyX" # These are all installed in the final LyX package QT_DLL="${QT_DIR}/bin/qt-mt3.dll" LIBICONV_DLL="/j/MinGW/bin/libiconv-2.dll" MINGW_DLL="/j/MinGW/bin/mingwm10.dll" DT2DV="$DTL_DIR/dt2dv.exe" DV2DT="$DTL_DIR/dv2dt.exe" CLEAN_DVI_PY="$CLEAN_DVI_DIR/clean_dvi.py" # If everything in this succeeds, then it will # create this archive. (With a .zip extension) ARCHIVEBASE="lyx_win32_13x_"`date +%d%b%y` # Change this to 'mv -f' when you are confident that # the various sed scripts are working correctly. MV='mv -i' for dir in "$QT_DIR" "$ASPELL_DIR" "$LYX_DIR" "$DTL_DIR" "$CLEAN_DVI_DIR" do test -d "$dir" || { echo "$dir does not exist" >&2 exit 1 } done echo "Please ensure that the Qt and LyX cvs trees are up to date" echo "Press any key to continue" read ans echo "Please ensure that the Qt library is compiled and ready to go" echo "Press any key to continue" read ans # Check that the dlls and clean_dvi.py exist for file in "${QT_DLL}" "${LIBICONV_DLL}" "${MINGW_DLL}" "${CLEAN_DVI_PY}" do test -r "${file}" || { echo "$file does not exist" >&2 exit 1 } done # dt2dv and dv2dt ( cd "$DTL_DIR" || { echo "Unable to cd $DTL_DIR" >&2 exit 1 } make || { echo "Failed to make $DTL_DIR" >&2 exit 1 } ) for file in "${DT2DV}" "${DV2DT}" do test -x "$file" || { echo "${file} does not exist or is not executable" >&2 exit 1 } done # Aspell ( cd "$ASPELL_DIR" || { echo "Unable to cd $ASPELL_DIR" >&2 exit 1 } ./configure --enable-static --disable-shared --prefix="${ASPELL_INSTALL_DIR}" || { echo "Failed to configure $ASPELL_DIR" >&2 exit 1 } # We have to clean up two of the generated Makefiles. TMP=tmp.$$ MAKEFILE=examples/Makefile sed ' # Replace "CC = gcc" with "CC = g++" s/^ *\(CC *= *\)gcc *$/\1g++/ # Remove trailing "/" from the -I directory. [EMAIL PROTECTED] *\(INCLUDES *=
Re: Should I commit my "zero traffic cursor" patch?
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: >> Angus Leeming <[EMAIL PROTECTED]> writes: >> | (See attached.) I can't remember if any concensus was reached. The >> code is >> | certainly conceptually cleaner than what we have now, even if it >> | transpires that it doesn't actually reduce traffic that much. >> | If nodody says "commit it, Angus", I'll just leave it to rot in my >> pending >> | directory. >> I like it. >> But the patch would have been easier to read with "-Bbw" and without >> the non-ws reformatting... > | So, my .cvsrc should read > | $ cat .cvsrc | update -dP | diff -upNBbw | rdiff -upNBbw > | ? Nah... add -Bbw on a case-by-case basis. Often you don't want it... and I am unsure whether a patch generated with it will apply... But in some cases it surely makes the patch a lot easier to read. -- Lgb
Re: Packaging of LyX/Win 1.3.6
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> I do believe that LyX 1.3.6 is looking like a realistic Angus> prospect :) What else is planned? Not much... Angus> I see that bugzilla comes up with five bugs in the 1.3.x Angus> series: http://tinyurl.com/7aghm Some of these would be very easy to fix. Angus> (Incidentally, Angus> http://bugzilla.lyx.org/buglist.cgi?target_milestone=1.3.6 Angus> comes up with only three bugs.) Because we do not plan to fix the others? Angus> I've managed to write a script to automate the process of Angus> producing a LyX/Win package. I describe below what it does; Angus> have I missed anything? It would be great to have an installer. I do not know how to do that, though. Angus> (I propose not to package python, perl or a shell environment. Angus> Instead I think we should tell people to go and get their own.) How big are these things? I think it would be better to package just what we need, like Ruurd did. This is much easier for users (unless the installer can grab the files for us). Angus> The script uses the MinGW/MinSYS environment and compiler. It Angus> asks whether the Qt and LyX cvs trees are up to date. (It's not Angus> easy to use TortoiseCVS from the command line.) It asks whether Angus> the Qt library has been compiled. (Qt/WinFree must be compiled Angus> from a cmd shell, not a mingw console.) It checks that Angus> qt-mt3.dll, libiconv-2.dll, mingw10.dll and clean_dvi.py exist. Angus> It compiles the dv2dt and dt2dv utilites. It compiles and Angus> installs the Aspell library. It compiles and installs LyX. It Angus> copies the dv2dt and dt2dv utilites, the .dlls and clean_dvi.py Angus> to the lyx package. It modifies the Resources/lyx/configure Angus> script to ensure that the generated .dvi file is usable. Looks good :) Why don't you compile qt as static? JMarc
Re: Keep CXXFLAGS from clobbering LyX required options (and vs.)
Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: >> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: > | Lars> This patch tries to make us kinder to the user that wants to set | Lars> his own compiler options. With this patch the user does not have | Lars> to add the options that we require for a correct build. > | Great! I can remove it from my TODO. > | Lars> If the flags (CXXFLAGS) is user supplied, the debug flag and the | Lars> optimizer flag (+ the warnings) is overrided by the user input. > | Lars> Comments? > | If it works, I like it. WFM. | BTW, why do you change the ordering of lyx_flags? To never start the string with a space, which would be the case on first set: var='$var hello' -> var == " hello" were as I want "hello". That is the only reason. -- Lgb
Re: Packaging of LyX/Win 1.3.6
Jean-Marc Lasgouttes wrote: > Angus> I've managed to write a script to automate the process of > Angus> producing a LyX/Win package. I describe below what it does; > Angus> have I missed anything? > > It would be great to have an installer. Does the installer actually create the package in the first place (ie, do the work of this script) or is it just a glorified unzip? > I do not know how to do that, though. Me neither. However googling on '"Windows installer" author' turns up some stuff. I see that Aspell uses InnoSetup, for example. http://www.jrsoftware.org/isinfo.php > Angus> (I propose not to package python, perl or a shell environment. > Angus> Instead I think we should tell people to go and get their own.) > > How big are these things? ftp://ftp.python.org/pub/www.python.org/ftp/python/2.4.1/python-2.4.1.msi 11.0MB http://downloads.activestate.com/ActivePerl/Windows/5.8/ActivePerl-5.8.6.811-MSWin32-x86-122208.msi 12.6MB http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download 14.8MB > I think it would be better to package just what we need, like Ruurd > did. This is much easier for users (unless the installer can grab > the files for us). My primary motivation has been that those who already use LyX/Win won't need to grab anything. Why download stuff needlessly? I've seen installers that tell people to go grab other bits and pieces. Presumably we'd add an aspell dictionary of your favourite language to this list. http://aspell.net/win32/ > Angus> The script uses the MinGW/MinSYS environment and compiler. It > Angus> asks whether the Qt and LyX cvs trees are up to date. (It's not > Angus> easy to use TortoiseCVS from the command line.) It asks whether > Angus> the Qt library has been compiled. (Qt/WinFree must be compiled > Angus> from a cmd shell, not a mingw console.) It checks that > Angus> qt-mt3.dll, libiconv-2.dll, mingw10.dll and clean_dvi.py exist. > Angus> It compiles the dv2dt and dt2dv utilites. It compiles and > Angus> installs the Aspell library. It compiles and installs LyX. It > Angus> copies the dv2dt and dt2dv utilites, the .dlls and clean_dvi.py > Angus> to the lyx package. It modifies the Resources/lyx/configure > Angus> script to ensure that the generated .dvi file is usable. > > Looks good :) Why don't you compile qt as static? The main reason is that Qt/WinFree changes almost everyday. I just replace the .dll and enjoy the improvements. I imagine that our users would do the same once LyX 1.3.6 is released. (We suggest that you replace qt-mt3.dll in your LyX 1.3.6 package with the version here as it squashes heaps of irritating little bugs...) -- Angus
Re: Should I commit my "zero traffic cursor" patch?
Lars Gullik Bjønnes wrote: > | (See attached.) I can't remember if any concensus was reached. The code > | is certainly conceptually cleaner than what we have now, even if it > | transpires that it doesn't actually reduce traffic that much. >> > | If nodody says "commit it, Angus", I'll just leave it to rot in my > | pending directory. > > I like it. I committed it. For reference here's the patch again created with $ cvs -q diff -Bbw src/frontends/qt2 > zero_traffic.diff -- AngusIndex: src/frontends/qt2/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v retrieving revision 1.780 diff -u -p -B -b -w -r1.780 ChangeLog --- src/frontends/qt2/ChangeLog 16 May 2005 09:14:17 - 1.780 +++ src/frontends/qt2/ChangeLog 19 May 2005 16:28:36 - @@ -1,3 +1,7 @@ +2005-05-19 Angus Leeming <[EMAIL PROTECTED]> + + * qscreen.[Ch]: cache and reuse pixmaps to show the flashing cursor. + 2005-05-13 Angus Leeming <[EMAIL PROTECTED]> * QBibtex.C (build_dialog): Index: src/frontends/qt2/qscreen.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/qscreen.C,v retrieving revision 1.28 diff -u -p -B -b -w -r1.28 qscreen.C --- src/frontends/qt2/qscreen.C 20 May 2004 09:36:28 - 1.28 +++ src/frontends/qt2/qscreen.C 19 May 2005 16:28:36 - @@ -14,12 +14,10 @@ #include "qscreen.h" #include "debug.h" -#include "LColor.h" +#include "lcolorcache.h" #include -using std::endl; - namespace { @@ -60,7 +58,7 @@ void QScreen::repaint() void QScreen::expose(int x, int y, int w, int h) { lyxerr[Debug::GUI] << "expose " << w << 'x' << h - << '+' << x << '+' << y << endl; + << '+' << x << '+' << y << std::endl; owner_.getContent()->update(x, y, w, h); } @@ -68,6 +66,10 @@ void QScreen::expose(int x, int y, int w void QScreen::showCursor(int x, int y, int h, Cursor_Shape shape) { + if (!qApp->focusWidget()) + return; + + // Cache the dimensions of the cursor. cursor_x_ = x; cursor_y_ = y; cursor_h_ = h; @@ -85,35 +87,63 @@ void QScreen::showCursor(int x, int y, i break; } - if (!nocursor_pixmap_.get() - || cursor_w_ != nocursor_pixmap_->width() - || cursor_h_ != nocursor_pixmap_->height()) { - nocursor_pixmap_.reset(new QPixmap(cursor_w_, cursor_h_)); + // We cache three pixmaps: + // 1 the rectangle of the original screen. + // 2 the vertical line of the cursor. + // 3 the horizontal line of the L-shaped cursor (if necessary). + + // Initialise storage for these pixmaps as necessary. + if (cursor_w_ != nocursor_pixmap_.width() || + cursor_h_ != nocursor_pixmap_.height()) { + nocursor_pixmap_.resize(cursor_w_, cursor_h_); + } + + QColor const & required_color = lcolorcache.get(LColor::cursor); + bool const cursor_color_changed = required_color != cursor_color_; + if (cursor_color_changed) + cursor_color_ = required_color; + + if (cursor_h_ != vcursor_pixmap_.height() || cursor_color_changed) { + if (cursor_h_ != vcursor_pixmap_.height()) + vcursor_pixmap_.resize(1, cursor_h_); + vcursor_pixmap_.fill(cursor_color_); } - if (!qApp->focusWidget()) - return; + switch (shape) { + case BAR_SHAPE: + break; + case REVERSED_L_SHAPE: + case L_SHAPE: + if (cursor_w_ != hcursor_pixmap_.width() || + cursor_color_changed) { + if (cursor_w_ != hcursor_pixmap_.width()) +hcursor_pixmap_.resize(cursor_w_, 1); + hcursor_pixmap_.fill(cursor_color_); + } + break; + } - // save old area - bitBlt(nocursor_pixmap_.get(), 0, 0, owner_.getPixmap(), + // Save the old area (no cursor). + bitBlt(_pixmap_, 0, 0, owner_.getPixmap(), cursor_x_, cursor_y_, cursor_w_, cursor_h_); - Painter & pain(owner_.getPainter()); - pain.start(); - pain.line(x, y, x, y + h - 1, LColor::cursor); + // Draw the new (vertical) cursor using the cached store. + bitBlt(owner_.getPixmap(), x, y, + _pixmap_, 0, 0, + vcursor_pixmap_.width(), vcursor_pixmap_.height()); + // Draw the new (horizontal) cursor if necessary. switch (shape) { case BAR_SHAPE: break; case REVERSED_L_SHAPE: case L_SHAPE: - pain.line(cursor_x_, y + h - 1, cursor_x_ + cursor_w_ - 1, -y + h - 1, LColor::cursor); + bitBlt(owner_.getPixmap(), cursor_x_, y + h - 1, + _pixmap_, 0, 0, + hcursor_pixmap_.width(), hcursor_pixmap_.height()); break; } - pain.end(); - owner_.getContent()->repaint( cursor_x_, cursor_y_, cursor_w_, cursor_h_); @@ -123,13 +153,12 @@ void QScreen::showCursor(int x, int y, i void QScreen::removeCursor() { // before first showCursor - if (!nocursor_pixmap_.get()) + if (nocursor_pixmap_.isNull()) return; bitBlt(owner_.getPixmap(), cursor_x_, cursor_y_, - nocursor_pixmap_.get(), 0, 0, cursor_w_, cursor_h_); + _pixmap_, 0, 0, cursor_w_, cursor_h_); - owner_.getContent()->repaint( - cursor_x_, cursor_y_, - cursor_w_, cursor_h_); +
Re: [PATCH] More text changes
Jean-Marc Lasgouttes wrote: Michael> Hello, some more text message changes. This patch (almost) Michael> finishes my cleanup. Michael> Please check and apply. This looks good to me. Anybody out there willing and able to apply the patch? I like clean working copies :-) Michael
Re: [PATCH] More text changes
Michael Schmitt wrote: > Anybody out there willing and able to apply the patch? I like clean > working copies :-) Done. Georg
Re: The Literate Programming error boxes?
Anyone have a look at this? It's been a while since I have actively done Literate Programming with LyX and I have need of this functionality again. What happened with the error boxes? Angus, do you know (or know who might know)? Thanks everyone! ---Kayvan On Wed, May 18, 2005 at 11:23:18AM -0700, Kayvan A. Sylvan wrote: > Has something happened to the error boxes recently? > > It used to be that I could hit "Build Program" and if there were > errors, then LyX (with the help of listerrors) would put error > boxes in the right place. > > Now, all I get is "There were errors" and I have to look through > the LaTeX log file.
Re: The Literate Programming error boxes?
Kayvan A. Sylvan wrote: Anyone have a look at this? It's been a while since I have actively done Literate Programming with LyX and I have need of this functionality again. What happened with the error boxes? I think that they died and were replaced by Alfredo's ErrorList. See src/frontends/controllers/ErrorList.C and ControlErrorList::goTo. In other words, you have a single dialog to help you navigate rather than a multitude of "error insets". Angus, do you know (or know who might know)? Why blame me? :) There seems to be lots of stuff that invokes showErrorList (grep showErrorList src/*.C) where showErrorList actually lauches the dialog: void BufferView::showErrorList(string const & action) const { if (getErrorList().size()) { string const title = bformat(_("LyX: %1$s errors (%2$s)"), action, buffer()->fileName()); owner()->getDialogs().show("errorlist", title); pimpl_->errorlist_.clear(); } } Does this help you track things down? Angus
Re: The Literate Programming error boxes?
On Thu, May 19, 2005 at 09:50:36PM +, Angus Leeming wrote: > Kayvan A. Sylvan wrote: > >Anyone have a look at this? It's been a while since I have actively > >done Literate Programming with LyX and I have need of this functionality > >again. > > > >What happened with the error boxes? > > I think that they died and were replaced by Alfredo's ErrorList. See > src/frontends/controllers/ErrorList.C and ControlErrorList::goTo. In > other words, you have a single dialog to help you navigate rather than > a multitude of "error insets". > > >Angus, do you know (or know who might know)? > > Why blame me? :) My friend, (you should always be wary when someone begins this way) ;-) My dear dear friend, I am not blaming you, I am merely acknowledging that you know far far more about the code base than I, and if you don't know, you might be able to point me to someone who does. :-) > Does this help you track things down? Sure. Now I know who to blame. ;-) ;-) Alfredo, can you take a quick look and see what needs fixing in the literate programming related code? ---Kayvan -- Kayvan A. Sylvan | Proud husband of | Father to my kids: Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena (8/8/89) http://sylvan.com/~kayvan | "crown of her husband" | Robin Gregory (2/28/92)
Bug in the 13x file browser
Some notes to self (and JMarc of course :) I've just spent an evening doing some real work with LyX, so I tried out the Windows version of LyX 1.3.x installed at C:\Program Files\LyX. As a result * we now have a new version of clean_dvi.py, * I've discovered that my intermediate dvi format must still have a .dvi extension (rather than, say, .dvi2) and * I've also discovered that C:\Program Files\LyX\Resources\lyx\configure *must* have unix-style line endings or common versions of sed (mine, for example :) get horribly confused by chkconfig.sed. There's nothing like trying things out for real, is there? I even managed to get some of that real work done, though not as much as I might have. A couple of bugs/potential problems still remain: Leaving the logic to check whether a "file name has spaces" in the file browser means that I can't change my bind file in the preferences dialog. (C:\Program Files\LyX\Resources\lyx\bind\emacs.bind) Also, I found that we are unable to launch any executables as C:\Program Files\LyX\bin\foo.exe because the executable cannot be quoted. Hence the new version of clean_dvi.py on the wiki. Yes, Windows is weird. In general, we should add LyX\bin to the PATH and simply invoke foo.exe. Not sure that this is a problem in practice (the PATH already contains the directory, but we may try and invoke stuff with an absolute path). Angus
Re: The Literate Programming error boxes?
Kayvan A. Sylvan wrote: Why blame me? :) My friend, (you should always be wary when someone begins this way) ;-) There speaks a wise man. My dear dear friend, I am not blaming you, I am merely acknowledging that you know far far more about the code base than I, and if you don't know, you might be able to point me to someone who does. :-) Does this help you track things down? Sure. Now I know who to blame. ;-) ;-) Alfredo, can you take a quick look and see what needs fixing in the literate programming related code? You might get a speedier response if you mailed him direct. abraunst AT lyx.org What happens if you use the minibuffer to launch the dialog? M-x dialog-show errorlist my_title Angus
Re: gnome frontend to the attic
Michael Schmitt wrote: I think nobody complained about moving the gnome frontend to the attic. Indeed. More importantly, I saw that John Spray would be OK if it was booted upstairs. If nobody continues to complain then I'll do so in the next few days. Angus
Re: QIndex
Michael Schmitt wrote: Hello again, there is a problem with QIndex. According to .../qt2/Dialogs.C, the class and its dialog are used for two things nowadays: Labels and indexes. For that reason, the tooltip in QIndexDialogBase.ui is not longer valid. I propose to remove it (along with the label ("Keyword")) from the ui file. You could be smart and add code to QIndexDialog.C to add the tooltip in QIndexDialog's constructor depending on the dialog type? You could also simplify the code in Dialogs.C by defining a Type enum rather than by passing all those strings. Eg: class QIndex { public: enum Type { Index, Label }; QIndex(Dialog & parent, Type type) : base_class(parent, type == Index ? _("Index Entry") : _("Label")), type_(type), label_(type == Index ? qt_("") : qt_("")) {} // Used by QIndexDialog.C's c-tor when setting tooltips, etc. Type type() const { return type_; } private: Type type_; QString const label_; }; IMHO we should also rename the class and its dialog to avoid confusion. Could somebody with some knowledge of the QT frontend and CVS access please do this? Surely, you have enough info to have a go yourself now? I am also wondering whether it is possible to merge QIndexDialog and QAskForTextDialog (or remove the latter)... Slowly, Michael, slowly :) Angus
Re: Bug report: Qt Citations & BibTeX
Juergen Spitzmueller wrote: Juergen Spitzmueller wrote: + // resort if filename only (because of missing path) + if (!withFullPath) + dialog_->fileList->sort(); This does not work (the vector itself has to be reordered). I send a better patch tomorrow. Here it is. It looks more complicated, but a lot of the stuff is getting the tex_helper functions up to date. Now the entries without path are sorted correctly and they are looking for their path when the user wants to view the file. OK? Jürgen I'm afraid I've got confused by which patch I should be looking at. I'm also afraid that I've broken it with my "file names with spaces" patch. If you have the energy to make the patch again, I'll try and find the energy to look at it carefully :) Angus
Re: math panel symbol
Uwe StÃhr wrote: Hello LyXers, what is the name of the xpm for the QT math panel symbol "Sets limits style"? Post a screen shot of the dialog you mean. Angus
Re: Qt immodule
Jose' Matos wrote: Incidentally, have you asked in the immodule list about this stuff? (Given that none of us "know anything about this stuff either".) Sure not, real men don't ask questions they jump the cliff. ;-) I have noticed that its mailing has been really quiet lately. I will ask there and I will hope they don't laugh me. :-) I'm curious. Did they help or did they laugh? :) Angus
Re: Lyx 1.4 usability problem when opening several documents
Alfredo Braunstein wrote: Alfredo> An alternative is to associate a bv with a buffer for ever, Alfredo> and only make the active bv visible, as opposed to having Alfredo> just one bv but changing the buffer of it. How difficult is it? Good question ;-) I'll try to have a look. Does this mean that you're planning to fix the problem, or should I try my band-aid solution? Angus
Re: lyx2lyx does not cope with spaces in path names
I think the email subject says it all. It seems that lyx2lyx must be fixed before LyX 1.4 is ready for the Windows platform. Michael could you open a new report on bugzilla for this issue? I plan to fix this issue this week and a bugilla helps not to forget it. :-) Michael, this should now be fixed. Please confirm. Angus