Re: [PATCH 1.4] Layout styles
Michael Schmitt wrote: Jean-Marc, I didn't have the time for thourough testing but I think the attached patch should be equivalent to the 1.3 patch. Michael, could you please put the following line in ~/.cvsrc? diff -upN that produces unified diffs (u) with function names (p) that are easier to read. It includes new files, too (N). Georg
Re: Performance oddity with X over ADSL
Martin Vermeer wrote: On Thu, 2005-04-28 at 06:46, Martin Vermeer wrote: On Wed, Apr 27, 2005 at 10:57:25PM +0100, Angus Leeming wrote: Martin Vermeer wrote: Is there an easy way to make the drawing more parsimonious? We used to have that and it was horribly complicated, and Andre cleaned it up, as I remember. Would it be worth pursuing in this case? Martin, does this patch fix the problem for you? It shoudl buffer the pixmap. -- Angus No Angus, it does not help. Character input remains syrupy precisely and only when there is a graphic within the display window. Are you sure you caught all the expensive drawing operations? Shouldn't you be using bitblt? I don't understand this stuff at all. This is double buffering, right? http://developer.kde.org/documentation/books/kde-2.0-development/ch09lev1sec2.html I don't see why that will help in this case. You're complaining that we're going up and down the ADSL line to retrieve an image when we should be using the cached pixmap on your local machine. I fail to see what we're doing wrong. Obviously. Furthermore, here directly at the machine, there is no difference in typing speed with or without a displayed graphics. (Closing the background xterm with all the debugging output does make a difference though :-) So, it really is an ADSL traffic problem, not a CPU time problem. I suppose there is still a full pixmap going to the server at every keypress. At what point in the code does this transfer happen? Can it be suppressed? - Martin -- Angus
Re: Performance oddity with X over ADSL
Angus Leeming wrote: Martin Vermeer wrote: On Thu, 2005-04-28 at 06:46, Martin Vermeer wrote: On Wed, Apr 27, 2005 at 10:57:25PM +0100, Angus Leeming wrote: Martin Vermeer wrote: Is there an easy way to make the drawing more parsimonious? We used to have that and it was horribly complicated, and Andre cleaned it up, as I remember. Would it be worth pursuing in this case? Martin, does this patch fix the problem for you? It shoudl buffer the pixmap. -- Angus No Angus, it does not help. Character input remains syrupy precisely and only when there is a graphic within the display window. Are you sure you caught all the expensive drawing operations? Shouldn't you be using bitblt? I don't understand this stuff at all. This is double buffering, right? http://developer.kde.org/documentation/books/kde-2.0-development/ch09lev1sec2.html I don't see why that will help in this case. You're complaining that we're going up and down the ADSL line to retrieve an image when we should be using the cached pixmap on your local machine. I fail to see what we're doing wrong. Obviously. I would guess the problem is the repaint operation itself. The Painter should not trigger the transfer of the pixmap at all when the user modifies the documents text content. Normally with an X event driven architecture you never draw to screen outside the XExposeEvent/XGraphicsExposeEvent events. You tell the X-Server the region which is updated by the appli- cation an the X-Server requests the repaint by the mentioned events. Regards, Stephan
Re: Performance oddity with X over ADSL
On Thu, Apr 28, 2005 at 09:07:42AM +0100, Angus Leeming wrote: Martin Vermeer wrote: This is double buffering, right? http://developer.kde.org/documentation/books/kde-2.0-development/ch09lev1sec2.html I don't see why that will help in this case. You're complaining that we're going up and down the ADSL line to retrieve an image when we should be using the cached pixmap on your local machine. Hmmm... yes, obviously there is graphics stuff going down the line at every character typed. Which as I understand, should not happen with your patch. I fail to see what we're doing wrong. Obviously. Same here. Furthermore, here directly at the machine, there is no difference in typing speed with or without a displayed graphics. (Closing the background xterm with all the debugging output does make a difference though :-) So, it really is an ADSL traffic problem, not a CPU time problem. I suppose there is still a full pixmap going to the server at every keypress. At what point in the code does this transfer happen? Can it be suppressed? - Martin -- Angus - Martin pgpLyzIcnVRLT.pgp Description: PGP signature
Re: Performance oddity with X over ADSL
Stephan Witt wrote: I don't see why that will help in this case. You're complaining that we're going up and down the ADSL line to retrieve an image when we should be using the cached pixmap on your local machine. I fail to see what we're doing wrong. Obviously. I would guess the problem is the repaint operation itself. The Painter should not trigger the transfer of the pixmap at all when the user modifies the documents text content. Normally with an X event driven architecture you never draw to screen outside the XExposeEvent/XGraphicsExposeEvent events. You tell the X-Server the region which is updated by the appli- cation an the X-Server requests the repaint by the mentioned events. Granted. I believe that the Qt frontend adheres to this model. I tried to use bitBlt as Martin suggested. No improvement AFAICS. See how it feels to you. -- Angus? src/frontends/qt2/qlimage.diff Index: src/frontends/qt2/QLPainter.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLPainter.C,v retrieving revision 1.35 diff -u -p -r1.35 QLPainter.C --- src/frontends/qt2/QLPainter.C 31 Jan 2005 15:26:39 - 1.35 +++ src/frontends/qt2/QLPainter.C 28 Apr 2005 08:38:56 - @@ -171,7 +171,7 @@ void QLPainter::image(int x, int y, int static_castlyx::graphics::QLImage const (i); fillRectangle(x, y, w, h, LColor::graphicsbg); - qp_-drawImage(x, y, qlimage.qimage(), 0, 0, w, h); + bitBlt (qp_-device(), x, y, qlimage.qimage(), 0, 0, w, h); }
Re: bug 1591
John Levon wrote: On Tue, Apr 26, 2005 at 08:11:43PM +0200, Georg Baum wrote: The problem is that (AFAIK) 1) implies that such documents won't compile at all anymore, and that is certainly not what Cengiz wanted. Why does it imply this? As far as I know the code we only have errorlists for real errors, not warnings. Could you please explain in more detail how that should be supposed to work if I am wrong? I don't see any code that prevents viewing the results of the compilation if the errorlist is not empty.. But it is only shown if there are errors (see e.g. Converters::runLaTeX). Let me rephrase: The concept of non-fatal warnings as opposed to fatal errors does not exist in the error handling machinery: Errors are only shown if something went wrong, if they are shown they are marked as Error, and there is no way to tell wether an error item is fatal or not. Rather than trying to workaround with the risk of producing ugly code and break something I'll try to drop the warning and produce real errors when the textclasses are indeed incompatible. Georg
Re: Performance oddity with X over ADSL
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Martin, does this patch fix the problem for you? It shoudl Angus buffer the pixmap. I am not sure I understand the patch: QLImage::QLImage(QLImage const other) : Image(other), original_(other.original_), - transformed_(other.original_) + transformed_(other.original_), + transformed_pixmap_(other.original_) Why is everything initialized from original_? Can't you just have QLImage use only Pixmaps? What may happen is that you create a new QPixmap everytime a copy is made, so it has to be downloaded. Isn't it possible to use something like + transformed_(other.transformed_), + transformed_pixmap_(other.transformed_pixmap_) JMarc
Re: [PATCH for 1.3.6] Fix translation for layout styles
Michael == Michael Schmitt [EMAIL PROTECTED] writes: Michael Sigh... I really don't understand why simple things can get Michael that complicated. Sometimes it seems easier to introduce a Michael new feature than to fix a few spaces. Indeed :) JMarc
Re: Performance oddity with X over ADSL
Jean-Marc Lasgouttes wrote: Angus Martin, does this patch fix the problem for you? It shoudl Angus buffer the pixmap. I am not sure I understand the patch: QLImage::QLImage(QLImage const other) : Image(other), original_(other.original_), - transformed_(other.original_) + transformed_(other.original_), + transformed_pixmap_(other.original_) Why is everything initialized from original_? No reason. Well spotted. Can't you just have QLImage use only Pixmaps? It makes the transformation stuff much more complicated. I think that the trick is to transform the QImage and to finally buffer the pixmap in setPixmap_impl. What may happen is that you create a new QPixmap everytime a copy is made, so it has to be downloaded. Isn't it possible to use something like + transformed_(other.transformed_), + transformed_pixmap_(other.transformed_pixmap_) It looks like this makes all the difference. Patch attached. With this I get similar performance down an ADSL line with and without visible images. -- AngusIndex: src/frontends/qt2/QLImage.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLImage.C,v retrieving revision 1.34 diff -u -p -r1.34 QLImage.C --- src/frontends/qt2/QLImage.C 6 Nov 2004 16:14:21 - 1.34 +++ src/frontends/qt2/QLImage.C 28 Apr 2005 09:20:21 - @@ -112,7 +112,8 @@ QLImage::QLImage() QLImage::QLImage(QLImage const other) : Image(other), original_(other.original_), - transformed_(other.original_) + transformed_(other.transformed_), + transformed_pixmap_(other.transformed_pixmap_) {} @@ -204,6 +205,7 @@ bool QLImage::setPixmap_impl(Params cons break; } + transformed_pixmap_ = transformed_; return true; } Index: src/frontends/qt2/QLImage.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLImage.h,v retrieving revision 1.10 diff -u -p -r1.10 QLImage.h --- src/frontends/qt2/QLImage.h 2 May 2004 12:45:26 - 1.10 +++ src/frontends/qt2/QLImage.h 28 Apr 2005 09:20:21 - @@ -30,7 +30,7 @@ public: static FormatList loadableFormats(); ~QLImage(); - QImage const qimage() const { return transformed_; } + QPixmap const qpixmap() const { return transformed_pixmap_; } private: /// Create a copy @@ -70,6 +70,8 @@ private: /// The transformed image for display. QImage transformed_; + /// Buffer the pixmap itself + QPixmap transformed_pixmap_; }; } // namespace graphics Index: src/frontends/qt2/QLPainter.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLPainter.C,v retrieving revision 1.35 diff -u -p -r1.35 QLPainter.C --- src/frontends/qt2/QLPainter.C 31 Jan 2005 15:26:39 - 1.35 +++ src/frontends/qt2/QLPainter.C 28 Apr 2005 09:20:21 - @@ -171,7 +171,7 @@ void QLPainter::image(int x, int y, int static_castlyx::graphics::QLImage const (i); fillRectangle(x, y, w, h, LColor::graphicsbg); - qp_-drawImage(x, y, qlimage.qimage(), 0, 0, w, h); + bitBlt(qp_-device(), x, y, qlimage.qpixmap(), 0, 0, w, h); }
Re: Performance oddity with X over ADSL
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus It looks like this makes all the difference. Patch attached. Angus With this I get similar performance down an ADSL line with and Angus without visible images. Excellent :) JMarc
Re: bug 1591
On Thu, Apr 28, 2005 at 11:06:37AM +0200, Georg Baum wrote: Let me rephrase: The concept of non-fatal warnings as opposed to fatal errors does not exist in the error handling machinery: Errors are only shown if something went wrong, if they are shown they are marked as Error, and there is no way to tell wether an error item is fatal or not. Indeed, but that's surely not difficult to change. Rather than trying to workaround with the risk of producing ugly code and How is it ugly? Just provide a new method to tell whether there's real errors in the list or just warnings. Note that we probably want that anyway along with the other stuff I mentioned. break something I'll try to drop the warning and produce real errors when the textclasses are indeed incompatible. OK, that's fine too for now I suppose. regards john
Re: Performance oddity with X over ADSL
On Thu, Apr 28, 2005 at 10:28:34AM +0100, Angus Leeming wrote: Jean-Marc Lasgouttes wrote: ... What may happen is that you create a new QPixmap everytime a copy is made, so it has to be downloaded. Isn't it possible to use something like + transformed_(other.transformed_), + transformed_pixmap_(other.transformed_pixmap_) It looks like this makes all the difference. Patch attached. With this I get similar performance down an ADSL line with and without visible images. -- Angus Thanks! This appears to do the job. - Martin pgpmOZl6Jzxuq.pgp Description: PGP signature
Fwd: LyX
-- Weitergeleitete Nachricht -- Hi, I am the developer of Kat ( http://www.kde-apps.org/content/show.php?content=22135 ) Kat uses a series of plugins to extract fulltext from files. I am collaborating with the KDE project KPDF and KOffice to build the plugins to manage their formats. I would like to ask you if you are interested in collaborating with us to produce a plugin for LyX, LateX and BibTeX. The plugin is a slightly modified kfile plugin, so it is really simple to produce it. The only thing it returns is fulltext of the file. Thanks Roberto ---
Re: Fwd: LyX
Dear Roberto, Hi, I am the developer of Kat ( http://www.kde-apps.org/content/show.php?content=22135 ) Kat uses a series of plugins to extract fulltext from files. I am collaborating with the KDE project KPDF and KOffice to build the plugins to manage their formats. I would like to ask you if you are interested in collaborating with us to produce a plugin for LyX, LateX and BibTeX. The plugin is a slightly modified kfile plugin, so it is really simple to produce it. The only thing it returns is fulltext of the file. LyX can already convert a .lyx document to ASCII format using the command line. You can use relyx and tex2lyx (in CVS) to convert a LaTeX document to .lyx format, so you should be able to do all of this with a simple shell script that just invokes these tools correctly. Regards, Asger Ottar Alstrup
Re: [PATCH 1.4] Layout styles
Michael == Michael Schmitt [EMAIL PROTECTED] writes: Michael Jean-Marc, I didn't have the time for thourough testing but I Michael think the attached patch should be equivalent to the 1.3 Michael patch. Looks good. I applied it. JMarc
Re: UI problem with custom bullet dialog
Martin Vermeer wrote: Transferring the correct custom bullet into the dialog buffer at the moment the user selects custom in one of the four bullet menus ought to fix both issues. It looks like one dialog is used for all four bullets, which makes sense. Helge Hafting Hmmm, this requires more knowledge of Qt and this dialogue that I have right now. Somebody have a look? I think that this does what you want. Please try it out. -- AngusIndex: src/frontends/qt2/BulletsModule.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/BulletsModule.C,v retrieving revision 1.24 diff -u -p -r1.24 BulletsModule.C --- src/frontends/qt2/BulletsModule.C 19 Aug 2004 06:30:43 - 1.24 +++ src/frontends/qt2/BulletsModule.C 28 Apr 2005 14:53:11 - @@ -28,9 +28,9 @@ using lyx::support::LibFileSearch; using std::string; - BulletsModule::BulletsModule(QWidget * parent, const char * name, WFlags fl) - : BulletsModuleBase(parent, name, fl), tmpbulletset(0) + : BulletsModuleBase(parent, name, fl), tmpbulletset(0), + bullet_pressed_(0) { for (int iter = 0; iter 4; ++iter) { bullets_[iter] = ITEMIZE_DEFAULTS[iter]; @@ -60,18 +60,25 @@ BulletsModule::BulletsModule(QWidget * p pm6-insertItem(ding4_); pm-insertItem(qt_(Standard), pm1, 0); - pm-insertItem(qt_(Maths), pm2, 1); - pm-insertItem(qt_(Dings 1), pm3, 2); - pm-insertItem(qt_(Dings 2), pm4, 3); - pm-insertItem(qt_(Dings 3), pm5, 4); - pm-insertItem(qt_(Dings 4), pm6, 5); + pm-insertItem(qt_(Maths),pm2, 1); + pm-insertItem(qt_(Dings 1), pm3, 2); + pm-insertItem(qt_(Dings 2), pm4, 3); + pm-insertItem(qt_(Dings 3), pm5, 4); + pm-insertItem(qt_(Dings 4), pm6, 5); pm-insertSeparator(); // FIXME: make this checkable pm-insertItem(qt_(Custom...), this, SLOT(setCustom()), 0, 6); + connect(bullet1PB, SIGNAL(pressed()), this, SLOT(clicked1())); bullet1PB-setPopup(pm); + + connect(bullet2PB, SIGNAL(pressed()), this, SLOT(clicked2())); bullet2PB-setPopup(pm); + + connect(bullet3PB, SIGNAL(pressed()), this, SLOT(clicked3())); bullet3PB-setPopup(pm); + + connect(bullet4PB, SIGNAL(pressed()), this, SLOT(clicked4())); bullet4PB-setPopup(pm); // insert pixmaps @@ -112,10 +119,10 @@ BulletsModule::BulletsModule(QWidget * p connect(ding4_, SIGNAL(selected(int, int)), this, SLOT(ding4(int, int))); - connect(bullet1PB, SIGNAL(pressed()), this, SLOT(pressed1())); - connect(bullet2PB, SIGNAL(pressed()), this, SLOT(pressed2())); - connect(bullet3PB, SIGNAL(pressed()), this, SLOT(pressed3())); - connect(bullet4PB, SIGNAL(pressed()), this, SLOT(pressed4())); + connect(bullet1PB, SIGNAL(pressed()), this, SLOT(selected1())); + connect(bullet2PB, SIGNAL(pressed()), this, SLOT(selected2())); + connect(bullet3PB, SIGNAL(pressed()), this, SLOT(selected3())); + connect(bullet4PB, SIGNAL(pressed()), this, SLOT(selected4())); connect(bulletsize1CO, SIGNAL(activated(int)), this, SLOT(updateSizes())); connect(bulletsize2CO, SIGNAL(activated(int)), this, SLOT(updateSizes())); connect(bulletsize3CO, SIGNAL(activated(int)), this, SLOT(updateSizes())); @@ -144,11 +151,37 @@ void BulletsModule::updateSizes() } +// These arrive before the menus are launched. +void BulletsModule::clicked1() +{ + bullet_pressed_ = bullets_[0]; +} + + +void BulletsModule::clicked2() +{ + bullet_pressed_ = bullets_[1]; +} + + +void BulletsModule::clicked3() +{ + bullet_pressed_ = bullets_[2]; +} + + +void BulletsModule::clicked4() +{ + bullet_pressed_ = bullets_[3]; +} + + // These arrive *after* the menus have done their work -void BulletsModule::pressed1() +void BulletsModule::selected1() { if (!tmpbulletset) return; + tmpbulletset = false; bullets_[0] = tmpbullet; setBullet(bullet1PB, bulletsize1CO, bullets_[0]); @@ -156,7 +189,7 @@ void BulletsModule::pressed1() } -void BulletsModule::pressed2() +void BulletsModule::selected2() { if (!tmpbulletset) return; @@ -167,7 +200,7 @@ void BulletsModule::pressed2() } -void BulletsModule::pressed3() +void BulletsModule::selected3() { if (!tmpbulletset) return; @@ -178,7 +211,7 @@ void BulletsModule::pressed3() } -void BulletsModule::pressed4() +void BulletsModule::selected4() { if (!tmpbulletset) return; @@ -247,7 +280,7 @@ void BulletsModule::setBullet(int level, } -Bullet const BulletsModule::getBullet(int level) +Bullet const BulletsModule::getBullet(int level) const { return bullets_[level]; } @@ -299,12 +332,15 @@ void BulletsModule::ding4(int row, int c void BulletsModule::setCustom() { - bool ok = FALSE; + QString const input = bullet_pressed_ ? + toqstr(bullet_pressed_-getText()) : QString::null; + + bool ok = false; QString text = QInputDialog::getText( qt_( Bullets ), qt_( Enter a custom bullet ), QLineEdit::Normal, - QString::null, ok, this ); + input, ok, this ); if (!ok) return; Index: src/frontends/qt2/BulletsModule.h
Re: UI problem with custom bullet dialog
On Thu, Apr 28, 2005 at 03:59:35PM +0100, Angus Leeming wrote: Martin Vermeer wrote: Transferring the correct custom bullet into the dialog buffer at the moment the user selects custom in one of the four bullet menus ought to fix both issues. It looks like one dialog is used for all four bullets, which makes sense. Helge Hafting Hmmm, this requires more knowledge of Qt and this dialogue that I have right now. Somebody have a look? I think that this does what you want. Please try it out. -- Angus Yes it works, and settings survive a save/load... and it shows the LaTeX codes for the existing bullets. Great! - Martin pgp0waomD3CpH.pgp Description: PGP signature
Re: UI problem with custom bullet dialog
Martin Vermeer wrote: Hmmm, this requires more knowledge of Qt and this dialogue that I have right now. Somebody have a look? I think that this does what you want. Please try it out. Yes it works, and settings survive a save/load... and it shows the LaTeX codes for the existing bullets. Great! Good-oh. Committed. -- Angus
Re: Problem with autosave of new unsaved document
Is this the only one of Helge's recent bug reports that hasn't been fixed yet? Angus Helge Hafting wrote: When lyx crashes, it does an autosave first so nothing is lost. When restarting lyx, i.e. lyx somefile.lyx I usually get the question about the autosaved file being newer, and if I want to use it. That is a very nice feature. Except if the crash happened to some new and yet not saved file. An emergency somefile.lyx.emergency is created, but lyx somefile.?lyx does not ask if I want to use the existing emergency file if somefile.lyx itself does not exist. All I get is the question wether I want to create a *new* file, and that makes me nervous. I believe this is much worse for people with less knowledge of computers, those probably don?'t figure out that they can rename the emergency file manually. It'd be really nice if lyx checked for an emergency save file even when no original exists, in order to avoid this problem. Ideally, lyx won't crash at all. But it is this fabulous stability that caused my way of working - just begin a new document and don't save at all for hours. Lyx won't ever loose my work anyway, not even the alpha-quality 1.4. :-) I sometimes have a document open for days, and save upon close. One gets used to stability. Helge Hafting
Re: configure help
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Angus Leeming wrote: AC_DEFINE(SPELL_ENGINE, [$lyx_spell_engine], [Define as ASPELL, PSPELL or ISPELL to specify the spell-checker.]) Angus I found it. AC_DEFINE_UNQUOTED. Angus The patch attached does what I/we want but I'm not sure if it's Angus optimal. Perhaps you'd care to have a look? After way too much time (this stuff takes long to get right), hare is my version of your patch. It has to be good since diffstat says 14 files changed, 218 insertions(+), 80 deletions(-) whereas yours says 15 files changed, 255 insertions(+), 50 deletions(-) ;) Of course I did not test aspell/pspell support, since I do not have them here. What still has to be done for spell stuff: create a new config/spell.m4 file and shove the [aip]spell checking code in there, along with a master LYX_CHECK_SPELLCHECKER macro. This is easy, but obscures the patch. Then [ap]spell.m4 can be removed, they are ridiculously small anyway. JMarc ? src/SpellBase.C Index: configure.ac === RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.47 diff -u -p -r1.47 configure.ac --- configure.ac 11 Mar 2005 10:49:09 - 1.47 +++ configure.ac 28 Apr 2005 15:45:59 - @@ -132,12 +132,6 @@ AC_LIBTOOL_WIN32_DLL #AM_PROG_LIBTOOL LYX_PROG_LIBTOOL -### Check if we want spell libraries, prefer new aspell -CHECK_WITH_ASPELL -if test $USING_ASPELL != yes; then - CHECK_WITH_PSPELL -fi - ### Check for some Cygwin-specific details. CHECK_WITH_CYGWIN @@ -290,6 +284,37 @@ dnl possible with the compiler which wil AC_LANG_PUSH(C) AC_CHECK_FUNCS(mkfifo mkstemp mktemp lstat readlink) AC_LANG_POP(C) + +### Check if we want spell libraries, prefer new aspell +CHECK_WITH_ASPELL +if $lyx_use_aspell ; then : ; else + CHECK_WITH_PSPELL + if $lyx_use_pspell ; then : ; else +lyx_use_ispell=true +AC_LANG_PUSH(C) +AC_CHECK_FUNCS(select dup2,, [lyx_use_ispell=false]) +AC_LANG_POP(C) +AC_MSG_CHECKING([whether to use ispell]) +if $lyx_use_ispell ; then + AC_MSG_RESULT(yes) + AC_DEFINE(USE_ISPELL, 1, [Define as 1 to use an external ispell process for spell-checking]) + lyx_flags=$lyx_flags use-ispell +else + AC_MSG_RESULT(no) +fi + fi +fi +AM_CONDITIONAL(USE_ASPELL, $lyx_use_aspell) +AM_CONDITIONAL(USE_PSPELL, $lyx_use_pspell) +AM_CONDITIONAL(USE_ISPELL, $lyx_use_ispell) + +lyx_client_subdir=true +AC_LANG_PUSH(C) +AC_CHECK_FUNCS(select socket,, [lyx_client_subdir=false]) +AM_CONDITIONAL(BUILD_CLIENT_SUBDIR, $lyx_client_subdir) + +AC_LANG_POP(C) + AC_FUNC_SELECT_ARGTYPES Index: config/aspell.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/aspell.m4,v retrieving revision 1.2 diff -u -p -r1.2 aspell.m4 --- config/aspell.m4 25 May 2004 14:42:08 - 1.2 +++ config/aspell.m4 28 Apr 2005 15:46:00 - @@ -4,27 +4,23 @@ AC_DEFUN([CHECK_WITH_ASPELL], [ -AC_ARG_WITH(aspell, - AC_HELP_STRING([--with-aspell],[use ASpell libraries]), - [ - case $withval in - y*) USING_ASPELL=yes;; - *) USING_ASPELL=no;; - esac - ], - [ - USING_ASPELL=yes - ]) +lyx_use_aspell=true +AC_ARG_WITH(aspell, AC_HELP_STRING([--with-aspell],[use ASpell libraries])) +test $with_aspell = no lyx_use_aspell=false -if test $USING_ASPELL = yes ; then - AC_CHECK_HEADERS(aspell.h aspell/aspell.h, USING_ASPELL=yes, USING_ASPELL=no) - AC_CHECK_LIB(aspell, new_aspell_config, LIBS=-laspell $LIBS; USING_ASPELL=yes, USING_ASPELL=no) +if $lyx_use_aspell ; then + AC_CHECK_HEADERS(aspell.h aspell/aspell.h, + [lyx_use_aspell=true; break;], + [lyx_use_aspell=false]) + AC_CHECK_LIB(aspell, new_aspell_config, LIBS=-laspell $LIBS, lyx_use_aspell=false) - if test $USING_ASPELL = yes; then + AC_MSG_CHECKING([whether to use aspell]) + if $lyx_use_aspell ; then + AC_MSG_RESULT(yes) AC_DEFINE(USE_ASPELL, 1, [Define as 1 to use the aspell library]) lyx_flags=$lyx_flags use-aspell + else + AC_MSG_RESULT(no) fi fi -AC_MSG_CHECKING([whether to use aspell]) -AC_MSG_RESULT($USING_ASPELL) ]) Index: config/pspell.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/pspell.m4,v retrieving revision 1.10 diff -u -p -r1.10 pspell.m4 --- config/pspell.m4 25 May 2004 14:42:09 - 1.10 +++ config/pspell.m4 28 Apr 2005 15:46:00 - @@ -3,27 +3,21 @@ AC_DEFUN([CHECK_WITH_PSPELL], [ -AC_ARG_WITH(pspell, - AC_HELP_STRING([--with-pspell],[use PSpell libraries]), - [ - case $withval in - y*) USING_PSPELL=yes;; - *) USING_PSPELL=no;; - esac - ], - [ - USING_PSPELL=yes - ]) +lyx_use_pspell=true +AC_ARG_WITH(pspell, AC_HELP_STRING([--with-pspell],[use PSpell libraries])) +test $with_pspell = no lyx_use_pspell=false -if test $USING_PSPELL = yes
[patch] qt longtable ui
As reported before, there is still a (qt only) problem with the longtable ui: the is empty checkbox cannot be disabled once it is checked. Judging from the xforms code I believe that some of the lfun handling in the qt tabular dialog is completely wrong. I think the attached patch is correct. However, since I never used longtabular myself, I'd appreciate some testing (I have tested a bit myself, and AFAICS it works now). Apart from that, there is still a weird problem: in (some of?) the qt dialogs (tabular, box at least), the disabled widgets are not greyed out when the dialog has been reopened. One action inside the dialog is needed. You can reproduce this e.g. with the longtable checkboxes, but also with the valign combo in the box dialog. Maybe also the flickering when you are toggling the longtabular checkboxes is related. I have no clue what's going on (it's not a problem of the dialog code itself). BTW I also managed to crash LyX several times related to tabular editing (I have no testcases yet). This is really still a weak part. Regards, Jürgen Index: QTabularDialog.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QTabularDialog.C,v retrieving revision 1.26 diff -u -r1.26 QTabularDialog.C --- QTabularDialog.C 26 Apr 2005 11:12:18 - 1.26 +++ QTabularDialog.C 28 Apr 2005 15:43:58 - @@ -214,7 +214,7 @@ if (headerBorderAboveCB-isChecked()) form_-controller().set(LyXTabular::SET_LTHEAD, dl_above); else - form_-controller().set(LyXTabular::UNSET_LTHEAD, ); + form_-controller().set(LyXTabular::UNSET_LTHEAD, dl_above); form_-changed(); } @@ -224,7 +224,7 @@ if (headerBorderBelowCB-isChecked()) form_-controller().set(LyXTabular::SET_LTHEAD, dl_below); else - form_-controller().set(LyXTabular::UNSET_LTHEAD, ); + form_-controller().set(LyXTabular::UNSET_LTHEAD, dl_below); form_-changed(); } @@ -234,7 +234,7 @@ if (firstheaderBorderAboveCB-isChecked()) form_-controller().set(LyXTabular::SET_LTFIRSTHEAD, dl_above); else - form_-controller().set(LyXTabular::UNSET_LTFIRSTHEAD, ); + form_-controller().set(LyXTabular::UNSET_LTFIRSTHEAD, dl_above); form_-changed(); } @@ -244,7 +244,7 @@ if (firstheaderBorderBelowCB-isChecked()) form_-controller().set(LyXTabular::SET_LTFIRSTHEAD, dl_below); else - form_-controller().set(LyXTabular::UNSET_LTFIRSTHEAD, ); + form_-controller().set(LyXTabular::UNSET_LTFIRSTHEAD, dl_below); form_-changed(); } @@ -267,10 +267,8 @@ bool enable(firstheaderNoContentsCB-isChecked()); if (enable) form_-controller().set(LyXTabular::SET_LTFIRSTHEAD, empty); - else { - ltFirstHeaderBorderBelow_clicked(); - ltFirstHeaderBorderAbove_clicked(); - } + else + form_-controller().set(LyXTabular::UNSET_LTFIRSTHEAD, empty); firstheaderStatusCB-setEnabled(!enable); firstheaderBorderAboveCB-setEnabled(!enable); firstheaderBorderBelowCB-setEnabled(!enable); @@ -297,7 +295,7 @@ if (footerBorderAboveCB-isChecked()) form_-controller().set(LyXTabular::SET_LTFOOT, dl_above); else - form_-controller().set(LyXTabular::UNSET_LTFOOT, ); + form_-controller().set(LyXTabular::UNSET_LTFOOT, dl_above); form_-changed(); } @@ -307,7 +305,7 @@ if (footerBorderBelowCB-isChecked()) form_-controller().set(LyXTabular::SET_LTFOOT, dl_below); else - form_-controller().set(LyXTabular::UNSET_LTFOOT, ); + form_-controller().set(LyXTabular::UNSET_LTFOOT, dl_below); form_-changed(); } @@ -330,7 +328,7 @@ if (lastfooterBorderAboveCB-isChecked()) form_-controller().set(LyXTabular::SET_LTLASTFOOT, dl_above); else - form_-controller().set(LyXTabular::UNSET_LTLASTFOOT, ); + form_-controller().set(LyXTabular::UNSET_LTLASTFOOT, dl_above); form_-changed(); } @@ -340,7 +338,7 @@ if (lastfooterBorderBelowCB-isChecked()) form_-controller().set(LyXTabular::SET_LTLASTFOOT, dl_below); else - form_-controller().set(LyXTabular::UNSET_LTLASTFOOT, ); + form_-controller().set(LyXTabular::UNSET_LTLASTFOOT, dl_below); form_-changed(); } @@ -350,10 +348,8 @@ bool enable(lastfooterNoContentsCB-isChecked()); if (enable) form_-controller().set(LyXTabular::SET_LTLASTFOOT, empty); - else { - ltLastFooterBorderBelow_clicked(); - ltLastFooterBorderAbove_clicked(); - } + else + form_-controller().set(LyXTabular::UNSET_LTLASTFOOT, empty); lastfooterStatusCB-setEnabled(!enable); lastfooterBorderAboveCB-setEnabled(!enable); lastfooterBorderBelowCB-setEnabled(!enable);
Re: configure help
Jean-Marc Lasgouttes wrote: Angus Angus Leeming wrote: AC_DEFINE(SPELL_ENGINE, [$lyx_spell_engine], [Define as ASPELL, PSPELL or ISPELL to specify the spell-checker.]) Angus I found it. AC_DEFINE_UNQUOTED. Angus The patch attached does what I/we want but I'm not sure if it's Angus optimal. Perhaps you'd care to have a look? After way too much time (this stuff takes long to get right), hare is my version of your patch. It has to be good since diffstat says 14 files changed, 218 insertions(+), 80 deletions(-) whereas yours says 15 files changed, 255 insertions(+), 50 deletions(-) ;) Of course I did not test aspell/pspell support, since I do not have them here. What still has to be done for spell stuff: create a new config/spell.m4 file and shove the [aip]spell checking code in there, along with a master LYX_CHECK_SPELLCHECKER macro. This is easy, but obscures the patch. Then [ap]spell.m4 can be removed, they are ridiculously small anyway. Many thanks, Jean-Marc. I thought that I was making life difficult for myself. It appears that I was :) One thing I noticed after I had posted my patch last night is that there's a change of semantic here (ControlSpellchecker.C). At the moment, the lyxrc variables are used to fall through to Ispell at run time. With the new configure stuff, they'll fall through to SpellBase. So, that leads to two questions. 1. Should the check for USE_ISPELL be dependent on USE_[AP]SPELL? 2. If it should (be dependent), then we should remove the lyxrc variables, no? -#ifdef USE_ASPELL +#if defined(USE_ASPELL) if (lyxrc.use_spell_lib) return new ASpell(bp, lang); -#endif -#ifdef USE_PSPELL +#elif defined(USE_PSPELL) if (lyxrc.use_spell_lib) return new PSpell(bp, lang); -#endif - +#elif defined(USE_ISPELL) lang = (lyxrc.isp_use_alt_lang) ? lyxrc.isp_alt_lang : bp.language-lang(); return new ISpell(bp, lang); +#else + return new SpellBase; +#endif More thoughts. * The ability to launch the spell checker dialog (setStatus?) should be dependent on one of USE_[API]SPELL being defined. Maybe we could make compilation of ControlSpellcheker.C and associated frontend views dependent on this as well, although that is probably overkill. * The [aspell,ispell,hspell] combox in the preferences dialog should be activated only if USE_ISPELL is defined. Angus
Re: configure help
Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Jean-Marc After way too much time (this stuff takes long to get Jean-Marc right), here is my version of your patch. It has to be good Jean-Marc since diffstat says Jean-Marc 14 files changed, 218 insertions(+), 80 deletions(-) Jean-Marc whereas yours says Jean-Marc 15 files changed, 255 insertions(+), 50 deletions(-) OK, I forgot SpellBase.C (which is the same as in your patch). Now, it becomes 15 files changed, 267 insertions(+), 80 deletions(-) Talk about interesting stats... JMarc Index: configure.ac === RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.47 diff -u -p -r1.47 configure.ac --- configure.ac 11 Mar 2005 10:49:09 - 1.47 +++ configure.ac 28 Apr 2005 16:14:27 - @@ -132,12 +132,6 @@ AC_LIBTOOL_WIN32_DLL #AM_PROG_LIBTOOL LYX_PROG_LIBTOOL -### Check if we want spell libraries, prefer new aspell -CHECK_WITH_ASPELL -if test $USING_ASPELL != yes; then - CHECK_WITH_PSPELL -fi - ### Check for some Cygwin-specific details. CHECK_WITH_CYGWIN @@ -290,6 +284,37 @@ dnl possible with the compiler which wil AC_LANG_PUSH(C) AC_CHECK_FUNCS(mkfifo mkstemp mktemp lstat readlink) AC_LANG_POP(C) + +### Check if we want spell libraries, prefer new aspell +CHECK_WITH_ASPELL +if $lyx_use_aspell ; then : ; else + CHECK_WITH_PSPELL + if $lyx_use_pspell ; then : ; else +lyx_use_ispell=true +AC_LANG_PUSH(C) +AC_CHECK_FUNCS(select dup2,, [lyx_use_ispell=false]) +AC_LANG_POP(C) +AC_MSG_CHECKING([whether to use ispell]) +if $lyx_use_ispell ; then + AC_MSG_RESULT(yes) + AC_DEFINE(USE_ISPELL, 1, [Define as 1 to use an external ispell process for spell-checking]) + lyx_flags=$lyx_flags use-ispell +else + AC_MSG_RESULT(no) +fi + fi +fi +AM_CONDITIONAL(USE_ASPELL, $lyx_use_aspell) +AM_CONDITIONAL(USE_PSPELL, $lyx_use_pspell) +AM_CONDITIONAL(USE_ISPELL, $lyx_use_ispell) + +lyx_client_subdir=true +AC_LANG_PUSH(C) +AC_CHECK_FUNCS(select socket,, [lyx_client_subdir=false]) +AM_CONDITIONAL(BUILD_CLIENT_SUBDIR, $lyx_client_subdir) + +AC_LANG_POP(C) + AC_FUNC_SELECT_ARGTYPES Index: config/aspell.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/aspell.m4,v retrieving revision 1.2 diff -u -p -r1.2 aspell.m4 --- config/aspell.m4 25 May 2004 14:42:08 - 1.2 +++ config/aspell.m4 28 Apr 2005 16:14:28 - @@ -4,27 +4,23 @@ AC_DEFUN([CHECK_WITH_ASPELL], [ -AC_ARG_WITH(aspell, - AC_HELP_STRING([--with-aspell],[use ASpell libraries]), - [ - case $withval in - y*) USING_ASPELL=yes;; - *) USING_ASPELL=no;; - esac - ], - [ - USING_ASPELL=yes - ]) +lyx_use_aspell=true +AC_ARG_WITH(aspell, AC_HELP_STRING([--with-aspell],[use ASpell libraries])) +test $with_aspell = no lyx_use_aspell=false -if test $USING_ASPELL = yes ; then - AC_CHECK_HEADERS(aspell.h aspell/aspell.h, USING_ASPELL=yes, USING_ASPELL=no) - AC_CHECK_LIB(aspell, new_aspell_config, LIBS=-laspell $LIBS; USING_ASPELL=yes, USING_ASPELL=no) +if $lyx_use_aspell ; then + AC_CHECK_HEADERS(aspell.h aspell/aspell.h, + [lyx_use_aspell=true; break;], + [lyx_use_aspell=false]) + AC_CHECK_LIB(aspell, new_aspell_config, LIBS=-laspell $LIBS, lyx_use_aspell=false) - if test $USING_ASPELL = yes; then + AC_MSG_CHECKING([whether to use aspell]) + if $lyx_use_aspell ; then + AC_MSG_RESULT(yes) AC_DEFINE(USE_ASPELL, 1, [Define as 1 to use the aspell library]) lyx_flags=$lyx_flags use-aspell + else + AC_MSG_RESULT(no) fi fi -AC_MSG_CHECKING([whether to use aspell]) -AC_MSG_RESULT($USING_ASPELL) ]) Index: config/pspell.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/pspell.m4,v retrieving revision 1.10 diff -u -p -r1.10 pspell.m4 --- config/pspell.m4 25 May 2004 14:42:09 - 1.10 +++ config/pspell.m4 28 Apr 2005 16:14:28 - @@ -3,27 +3,21 @@ AC_DEFUN([CHECK_WITH_PSPELL], [ -AC_ARG_WITH(pspell, - AC_HELP_STRING([--with-pspell],[use PSpell libraries]), - [ - case $withval in - y*) USING_PSPELL=yes;; - *) USING_PSPELL=no;; - esac - ], - [ - USING_PSPELL=yes - ]) +lyx_use_pspell=true +AC_ARG_WITH(pspell, AC_HELP_STRING([--with-pspell],[use PSpell libraries])) +test $with_pspell = no lyx_use_pspell=false -if test $USING_PSPELL = yes ; then - AC_CHECK_HEADERS(pspell/pspell.h, USING_PSPELL=yes, USING_PSPELL=no) - AC_CHECK_LIB(pspell, main, LIBS=-lpspell $LIBS; USING_PSPELL=yes, USING_PSPELL=no) +if $lyx_use_pspell ; then + AC_CHECK_HEADERS(pspell/pspell.h,, lyx_use_pspell=false) + AC_CHECK_LIB(pspell, main, LIBS=-lpspell $LIBS, lyx_use_pspell=false) - if test $USING_PSPELL = yes; then + AC_MSG_CHECKING([whether to use pspell]) + if $lyx_use_pspell ; then +
Re: configure help
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus One thing I noticed after I had posted my patch last night is Angus that there's a change of semantic here (ControlSpellchecker.C). Angus At the moment, the lyxrc variables are used to fall through to Angus Ispell at run time. With the new configure stuff, they'll fall Angus through to SpellBase. I just noticed this variable :) I really can't read. Angus So, that leads to two questions. 1. Should the check for Angus USE_ISPELL be dependent on USE_[AP]SPELL? Yes. It is just a matter of removing a few else's. I guess the variable can still be useful. Angus * The ability to launch the spell checker dialog (setStatus?) Angus should be dependent on one of USE_[API]SPELL being defined. Yes. Angus Maybe we could make compilation of ControlSpellcheker.C and Angus associated frontend views dependent on this as well, although Angus that is probably overkill. I think it is overkill for now. Angus * The [aspell,ispell,hspell] combox in the preferences dialog Angus should be activated only if USE_ISPELL is defined. Yes. JMarc
Re: Problem with autosave of new unsaved document
On Thu, Apr 28, 2005 at 04:45:53PM +0100, Angus Leeming wrote: Is this the only one of Helge's recent bug reports that hasn't been fixed yet? Angus I think so. It must be frustrating not to be able to report any serious bugs anymore, judging by this one... - Martin pgprJnTi3LL1k.pgp Description: PGP signature
Re: [patch] qt longtable ui
On Thu, Apr 28, 2005 at 06:02:02PM +0200, Juergen Spitzmueller wrote: BTW I also managed to crash LyX several times related to tabular editing (I have no testcases yet). This is really still a weak part. Yes I remember happening that too. Never well defined sequence that I could remember. - Martin pgpZPIQy6yaGo.pgp Description: PGP signature
Re: Problem with autosave of new unsaved document
On Thursday 28 April 2005 17:30, Martin Vermeer wrote: On Thu, Apr 28, 2005 at 04:45:53PM +0100, Angus Leeming wrote: Is this the only one of Helge's recent bug reports that hasn't been fixed yet? Angus I think so. It must be frustrating not to be able to report any serious bugs anymore, judging by this one... I can trigger ASSERTS in coordcache most all the time with some of my old docs... Angus
Re: Problem with autosave of new unsaved document
On Thu, Apr 28, 2005 at 05:38:08PM +0100, Angus Leeming wrote: On Thursday 28 April 2005 17:30, Martin Vermeer wrote: On Thu, Apr 28, 2005 at 04:45:53PM +0100, Angus Leeming wrote: Is this the only one of Helge's recent bug reports that hasn't been fixed yet? Angus I think so. It must be frustrating not to be able to report any serious bugs anymore, judging by this one... I can trigger ASSERTS in coordcache most all the time with some of my old docs... Angus Better start producing minimal test cases then... - Martin pgpHSFoZkjLR9.pgp Description: PGP signature
Re: Performance oddity with X over ADSL
On Thu, Apr 28, 2005 at 10:28:34AM +0100, Angus Leeming wrote: ... What may happen is that you create a new QPixmap everytime a copy is made, so it has to be downloaded. Isn't it possible to use something like + transformed_(other.transformed_), + transformed_pixmap_(other.transformed_pixmap_) It looks like this makes all the difference. Patch attached. With this I get similar performance down an ADSL line with and without visible images. -- Angus Just a wild idea: LyX is still producing incoming ADSL traffic at 0.5 kB/s while doing nothing, just containing a new doc and blinking the cursor. Shouldn't the server be able to do that all on its own? The relevant code appears to be showCursor/removeCursor in qscreen.C. I like my network connection quiet so I can spot unusual activity: call me paranoid. When not doing anything, it's only ntp querying a time server every so many seconds. I like it that way, like Helsinki traffic, not Cairo :-) - Martin pgphdQAX1l8Kd.pgp Description: PGP signature
Re: Performance oddity with X over ADSL
Martin Vermeer wrote: Just a wild idea: LyX is still producing incoming ADSL traffic at 0.5 kB/s while doing nothing, just containing a new doc and blinking the cursor. Shouldn't the server be able to do that all on its own? The relevant code appears to be showCursor/removeCursor in qscreen.C. I'm sure that we can fix this using the same caching ideas. Remind me after the w/e. -- Angus
Re: Problem with autosave of new unsaved document
Martin Vermeer wrote: I think so. It must be frustrating not to be able to report any serious bugs anymore, judging by this one... There's still some fun available on bugzilla. Jürgen
Re: Problem with autosave of new unsaved document
On Thu, Apr 28, 2005 at 07:27:22PM +0200, Juergen Spitzmueller wrote: Martin Vermeer wrote: I think so. It must be frustrating not to be able to report any serious bugs anymore, judging by this one... There's still some fun available on bugzilla. Jürgen Gimme a number, any number... - Martin pgpEKX3wtadBk.pgp Description: PGP signature
Re: [PATCH 1.4] Layout styles
Georg Baum wrote: could you please put the following line in ~/.cvsrc? diff -upN that produces unified diffs (u) with function names (p) that are easier to read. It includes new files, too (N). Hi Georg, I know that unified diffs are better. However, for this type of patch the traditional format was much more readable. But I promise to use unified diffs again in the future! Michael
[PATCH 1.4] Layout style
Jean-Marc, have you edited Makefile.in.in by hand? It seems that two lines were duplicated. See attached patch. Michael ? patch-1.4 Index: ChangeLog === RCS file: /cvs/lyx/lyx-devel/po/ChangeLog,v retrieving revision 1.199 diff -u -p -r1.199 ChangeLog --- ChangeLog 2005/04/28 13:07:51 1.199 +++ ChangeLog 2005/04/28 18:05:20 @@ -1,5 +1,9 @@ 2005-04-28 Michael Schmitt [EMAIL PROTECTED] + * Makefile.in.in: remove duplicated lines + +2005-04-28 Michael Schmitt [EMAIL PROTECTED] + * Makefile.in.in (layouts_l10n.pot): replace underscores with spaces in Style definition; strip quotes * de.po: Index: Makefile.in.in === RCS file: /cvs/lyx/lyx-devel/po/Makefile.in.in,v retrieving revision 1.48 diff -u -p -r1.48 Makefile.in.in --- Makefile.in.in 2005/04/28 13:07:51 1.48 +++ Makefile.in.in 2005/04/28 18:05:21 @@ -438,8 +438,6 @@ layouts_l10n.pot: $(top_srcdir)/lib/layo sub(/Style /, , line); \ gsub(/\/, , line); \ gsub(/_/, , line); \ - gsub(/\/, , line); \ - gsub(/_/, , line); \ printf(#: %s:%d\nmsgid \%s\\nmsgstr \\\n\n, \ fixupfilename(), FNR, line); \ } \
Wrong symbol displayed for third level bullet list
Bullet lists in three levels are rare. Today I needed one, and noticed the following symbols: lev. screen output 1* round bullet 2- - 3@ * 4cdotcdot I didn't at first notice the wrong * at level 1, as lyx used to just show a * for all bulleted lists. The @ at level 3 was more noticeable. The output was fine though. I used qt, and I have not changed any of the bullet symbols in this document. Helge Hafting
Re: Wrong symbol displayed for third level bullet list
On Thu, Apr 28, 2005 at 09:15:38PM +0200, Helge Hafting wrote: Bullet lists in three levels are rare. Today I needed one, and noticed the following symbols: lev. screen output 1* round bullet 2- - 3@ * 4cdotcdot I didn't at first notice the wrong * at level 1, as lyx used to just show a * for all bulleted lists. The @ at level 3 was more noticeable. The output was fine though. I used qt, and I have not changed any of the bullet symbols in this document. Helge Hafting This better? - Martin Index: buffer_funcs.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer_funcs.C,v retrieving revision 1.26 diff -u -p -r1.26 buffer_funcs.C --- buffer_funcs.C 26 Apr 2005 11:12:09 - 1.26 +++ buffer_funcs.C 28 Apr 2005 19:39:54 - @@ -395,13 +395,13 @@ void setCounter(Buffer const buf, ParI string itemlabel; switch (par.itemdepth) { case 0: - itemlabel = *; + itemlabel = o; break; case 1: itemlabel = -; break; case 2: - itemlabel = @; + itemlabel = *; break; case 3: itemlabel = ; pgpZjwFcHGMSz.pgp Description: PGP signature
Re: Problem with autosave of new unsaved document
Martin Vermeer wrote: There's still some fun available on bugzilla. Gimme a number, any number... Ok, if you shout so loud ;-), I have one: http://bugzilla.lyx.org/show_bug.cgi?id=1435 It's my favourite bug. If you have fun fiddling around with mathed, here comes my personal bug list: bug 905 bug 952 bug 1159 bug 1327 bug 1343 bug 1344 bug 1346 bug 1369 bug 1370 bug 1379 bug 1380 bug 1381 bug 1384 bug 1386 bug 1391 bug 1392 bug 1393 bug 1394 bug 1395 bug 1400 bug 1402 bug 1408 bug 1409 bug 1411 bug 1424 bug 1425 bug 1429 bug 1431 bug 1432 bug 1435 bug 1452 bug 1453 bug 1458 bug 1467 bug 1468 bug 1494 bug 1495 bug 1496 bug 1497 bug 1504 bug 1505 bug 1519 bug 1520 bug 1521 bug 1528 bug 1536 bug 1537 bug 1550 bug 1560 bug 1563 bug 1565 bug 1595 bug 1599 bug 1608 bug 1632 bug 1633 bug 1653 bug 1654 bug 1655 bug 1681 bug 1682 bug 1699 bug 1738 bug 1746 bug 1747 bug 1751 bug 1754 bug 1870 OK, just joking, fixing bug 1435 would be enough. thanks and regards Uwe
Re: UI problem with custom bullet dialog
On Thu, Apr 28, 2005 at 03:59:35PM +0100, Angus Leeming wrote: I think that this does what you want. Please try it out. Great stuff! Helge Hafting
Re: Performance oddity with X over ADSL
On Thu, Apr 28, 2005 at 10:28:34AM +0100, Angus Leeming wrote: It looks like this makes all the difference. Patch attached. With this I get similar performance down an ADSL line with and without visible images. This is great! I don't see the delays anymore, I even get smooth scrolling through the region with the graphich. :-) Lyx 1.4 is now fine for work via ADSL. Now, if I could say the same about xfig . . . Helge Hafting
Re: [patch] qt longtable ui
On Thu, Apr 28, 2005 at 06:02:02PM +0200, Juergen Spitzmueller wrote: As reported before, there is still a (qt only) problem with the longtable ui: the is empty checkbox cannot be disabled once it is checked. Judging from the xforms code I believe that some of the lfun handling in the qt tabular dialog is completely wrong. I think the attached patch is correct. I tested it, and now I could uncheck every box in the longtable dialog. However, since I never used longtabular myself, I'd appreciate some testing (I have tested a bit myself, and AFAICS it works now). Apart from that, there is still a weird problem: in (some of?) the qt dialogs (tabular, box at least), the disabled widgets are not greyed out when the dialog has been reopened. One action inside the dialog is needed. You can reproduce this e.g. with the longtable checkboxes, but also with the valign combo in the box dialog. Maybe also the flickering when you are toggling the longtabular checkboxes is related. I have no clue what's going on (it's not a problem of the dialog code itself). I noticed this. Only cosmetic :-) BTW I also managed to crash LyX several times related to tabular editing (I have no testcases yet). This is really still a weak part. I've had the occational table crash, but nothing trivially reproducible other than cases I already reported. After strange table crashes I usually find that the operation did succeed when the emergency savefile is recovered. Perhaps the document itself is ok but something else isn't? Helge Hafting
Re: Wrong symbol displayed for third level bullet list
On Thu, Apr 28, 2005 at 10:41:31PM +0300, Martin Vermeer wrote: On Thu, Apr 28, 2005 at 09:15:38PM +0200, Helge Hafting wrote: Bullet lists in three levels are rare. Today I needed one, and noticed the following symbols: lev. screen output 1* round bullet 2- - 3@ * 4cdotcdot I didn't at first notice the wrong * at level 1, as lyx used to just show a * for all bulleted lists. The @ at level 3 was more noticeable. The output was fine though. I used qt, and I have not changed any of the bullet symbols in this document. Helge Hafting This better? It helps - but the letter o for the first level bullet? How about using the \bullet math symbol? It looks much better and there is already code for showing it, both in formulas and on the math panel. Slightly more correct, and much better to look at. First level bullets are seen a lot. Helge Hafting
Bug report: Assertion fails when clicking on vertical space inset
Test case: 1. Open new document 2. Insert = Special Formatting = Vertical Space 3. Press OK in dialog 3. Click on inset (near the arrow) Console output (a bit verbose, isn't it?): void BufferView::Pimpl::update(bool, bool)[fitcursor = 0, forceupdate = 1] buffer: 0 void BufferView::Pimpl::update(bool, bool)[fitcursor = 0, forceupdate = 1] buffer: 0 void BufferView::Pimpl::update(bool, bool)[fitcursor = 0, forceupdate = 1] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 66 void BufferView::Pimpl::update(bool, bool)[fitcursor = 1, forceupdate = 0] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 66 void BufferView::Pimpl::update(bool, bool)[fitcursor = 1, forceupdate = 0] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 66 virtual void InsetText::doDispatch(LCursor, FuncRequest) [ cmd.action = 235] *** LyXText::dispatch: cmd: action: 235 arg: 'vspace defskip' x: 0 y: 0 recordUndo: cur: inset: 0x1fba0a4 idx: 0 par: 0 pos: 0 recordUndo: pos: 0 void BufferView::Pimpl::update(bool, bool)[fitcursor = 1, forceupdate = 1] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 72 void BufferView::Pimpl::update(bool, bool)[fitcursor = 1, forceupdate = 0] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 72 bool BufferView::Pimpl::workAreaDispatch(const FuncRequest)[ cmd0 action: 215 arg: '' x: 319 y: 42] LyXText::getPitNearY: y: 42 cache size: 1 examining: pit: 0 y: 40 found best y: 40 for pit: 0 LyXText::getPitNearY: y: 42 cache size: 1 examining: pit: 0 y: 40 found best y: 40 for pit: 0 checkInsetHit: x: 319 y: 42 pit: 0 examining inset 0x1a52e50 xo: 316...336 yo: 29...51 Hit inset: 0x1a52e50 inset 0x1a52e50 hit at x: 319 y: 42 InsetBase: editXY x:319 y: 42 bool BufferView::Pimpl::workAreaDispatch(const FuncRequest) * hit inset at tip: 0x1a52e50 bool BufferView::Pimpl::workAreaDispatch(const FuncRequest) * created temp cursor: cursor:| anchor: inset: 0x1fba0a4 idx: 0 par: 0 pos: 0 | --- selection: 0 x_target: 319 void BufferView::Pimpl::update(bool, bool)[fitcursor = 1, forceupdate = 1] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 72 Assertion triggered in FuncStatus LyXFunc::getStatus(const FuncRequest) const by failing check success in file lyxfunc.C:475
Re: Bug report: Assertion fails when clicking on vertical space inset
On Thu, Apr 28, 2005 at 11:47:46PM +0200, Michael Schmitt wrote: Test case: 1. Open new document 2. Insert = Special Formatting = Vertical Space 3. Press OK in dialog 3. Click on inset (near the arrow) Console output (a bit verbose, isn't it?): ;-) Assertion triggered in FuncStatus LyXFunc::getStatus(const FuncRequest) const by failing check success in file lyxfunc.C:475 That's what you get when an inset such as insetvspace has a doDispatch but no matching getStatus... Just add one. Surely this is not the only one. - Martin pgp3oK0q4J8bc.pgp Description: PGP signature
Re: [PATCH 1.4] Layout styles
Michael Schmitt wrote: > Jean-Marc, > > I didn't have the time for thourough testing but I think the attached > patch should be equivalent to the 1.3 patch. Michael, could you please put the following line in ~/.cvsrc? diff -upN that produces unified diffs (u) with function names (p) that are easier to read. It includes new files, too (N). Georg
Re: Performance oddity with X over ADSL
Martin Vermeer wrote: > On Thu, 2005-04-28 at 06:46, Martin Vermeer wrote: >> On Wed, Apr 27, 2005 at 10:57:25PM +0100, Angus Leeming wrote: >> > Martin Vermeer wrote: >> >> > > Is there an easy way to make the drawing more parsimonious? We used >> > > to have that and it was horribly complicated, and Andre cleaned it >> > > up, as I remember. Would it be worth pursuing in this case? >> > >> > Martin, does this patch fix the problem for you? It shoudl buffer the >> > pixmap. >> > >> > -- >> > Angus >> >> No Angus, it does not help. Character input remains syrupy precisely and >> only when there is a graphic within the display window. >> >> Are you sure you caught all the expensive drawing operations? Shouldn't >> you be using bitblt? I don't understand this stuff at all. This is double buffering, right? http://developer.kde.org/documentation/books/kde-2.0-development/ch09lev1sec2.html I don't see why that will help in this case. You're complaining that we're going up and down the ADSL line to retrieve an image when we should be using the cached pixmap on your local machine. I fail to see what we're doing wrong. Obviously. > Furthermore, here directly at the machine, there is no difference in > typing speed with or without a displayed graphics. (Closing the > background xterm with all the debugging output does make a difference > though :-) > > So, it really is an ADSL traffic problem, not a CPU time problem. I > suppose there is still a full pixmap going to the server at every > keypress. At what point in the code does this transfer happen? Can it be > suppressed? > > - Martin -- Angus
Re: Performance oddity with X over ADSL
Angus Leeming wrote: Martin Vermeer wrote: On Thu, 2005-04-28 at 06:46, Martin Vermeer wrote: On Wed, Apr 27, 2005 at 10:57:25PM +0100, Angus Leeming wrote: Martin Vermeer wrote: Is there an easy way to make the drawing more parsimonious? We used to have that and it was horribly complicated, and Andre cleaned it up, as I remember. Would it be worth pursuing in this case? Martin, does this patch fix the problem for you? It shoudl buffer the pixmap. -- Angus No Angus, it does not help. Character input remains syrupy precisely and only when there is a graphic within the display window. Are you sure you caught all the expensive drawing operations? Shouldn't you be using bitblt? I don't understand this stuff at all. This is double buffering, right? http://developer.kde.org/documentation/books/kde-2.0-development/ch09lev1sec2.html I don't see why that will help in this case. You're complaining that we're going up and down the ADSL line to retrieve an image when we should be using the cached pixmap on your local machine. I fail to see what we're doing wrong. Obviously. I would guess the problem is the repaint operation itself. The "Painter" should not trigger the transfer of the pixmap at all when the user modifies the documents text content. Normally with an X event driven architecture you never draw to screen outside the XExposeEvent/XGraphicsExposeEvent events. You tell the X-Server the region which is updated by the appli- cation an the X-Server requests the repaint by the mentioned events. Regards, Stephan
Re: Performance oddity with X over ADSL
On Thu, Apr 28, 2005 at 09:07:42AM +0100, Angus Leeming wrote: > Martin Vermeer wrote: > This is double buffering, right? > http://developer.kde.org/documentation/books/kde-2.0-development/ch09lev1sec2.html > > I don't see why that will help in this case. You're complaining that we're > going up and down the ADSL line to retrieve an image when we should be > using the cached pixmap on your local machine. Hmmm... yes, obviously there is graphics stuff going down the line at every character typed. Which as I understand, should not happen with your patch. > I fail to see what we're doing wrong. Obviously. Same here. > > Furthermore, here directly at the machine, there is no difference in > > typing speed with or without a displayed graphics. (Closing the > > background xterm with all the debugging output does make a difference > > though :-) > > > > So, it really is an ADSL traffic problem, not a CPU time problem. I > > suppose there is still a full pixmap going to the server at every > > keypress. At what point in the code does this transfer happen? Can it be > > suppressed? > > > > - Martin > > -- > Angus - Martin pgpLyzIcnVRLT.pgp Description: PGP signature
Re: Performance oddity with X over ADSL
Stephan Witt wrote: >> I don't see why that will help in this case. You're complaining that >> we're going up and down the ADSL line to retrieve an image when we >> should be using the cached pixmap on your local machine. >> >> I fail to see what we're doing wrong. Obviously. >> > > I would guess the problem is the repaint operation itself. > The "Painter" should not trigger the transfer of the pixmap > at all when the user modifies the documents text content. > > Normally with an X event driven architecture you never draw to > screen outside the XExposeEvent/XGraphicsExposeEvent events. > You tell the X-Server the region which is updated by the appli- > cation an the X-Server requests the repaint by the mentioned > events. Granted. I believe that the Qt frontend adheres to this model. I tried to use bitBlt as Martin suggested. No improvement AFAICS. See how it feels to you. -- Angus? src/frontends/qt2/qlimage.diff Index: src/frontends/qt2/QLPainter.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLPainter.C,v retrieving revision 1.35 diff -u -p -r1.35 QLPainter.C --- src/frontends/qt2/QLPainter.C 31 Jan 2005 15:26:39 - 1.35 +++ src/frontends/qt2/QLPainter.C 28 Apr 2005 08:38:56 - @@ -171,7 +171,7 @@ void QLPainter::image(int x, int y, int static_cast(i); fillRectangle(x, y, w, h, LColor::graphicsbg); - qp_->drawImage(x, y, qlimage.qimage(), 0, 0, w, h); + bitBlt (qp_->device(), x, y, (), 0, 0, w, h); }
Re: bug 1591
John Levon wrote: > On Tue, Apr 26, 2005 at 08:11:43PM +0200, Georg Baum wrote: > >> >> The problem is that (AFAIK) 1) implies that such documents won't >> >> compile at all anymore, and that is certainly not what Cengiz wanted. >> > >> > Why does it imply this? >> >> As far as I know the code we only have errorlists for real errors, not >> warnings. Could you please explain in more detail how that should be >> supposed to work if I am wrong? > > I don't see any code that prevents viewing the results of the > compilation if the errorlist is not empty.. But it is only shown if there are errors (see e.g. Converters::runLaTeX). Let me rephrase: The concept of non-fatal warnings as opposed to fatal errors does not exist in the error handling machinery: Errors are only shown if something went wrong, if they are shown they are marked as "Error", and there is no way to tell wether an error item is fatal or not. Rather than trying to workaround with the risk of producing ugly code and break something I'll try to drop the warning and produce real errors when the textclasses are indeed incompatible. Georg
Re: Performance oddity with X over ADSL
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Martin, does this patch fix the problem for you? It shoudl Angus> buffer the pixmap. I am not sure I understand the patch: QLImage::QLImage(QLImage const & other) : Image(other), original_(other.original_), - transformed_(other.original_) + transformed_(other.original_), + transformed_pixmap_(other.original_) Why is everything initialized from original_? Can't you just have QLImage use only Pixmaps? What may happen is that you create a new QPixmap everytime a copy is made, so it has to be downloaded. Isn't it possible to use something like + transformed_(other.transformed_), + transformed_pixmap_(other.transformed_pixmap_) JMarc
Re: [PATCH for 1.3.6] Fix translation for layout styles
> "Michael" == Michael Schmitt <[EMAIL PROTECTED]> writes: Michael> Sigh... I really don't understand why simple things can get Michael> that complicated. Sometimes it seems easier to introduce a Michael> new feature than to fix a few spaces. Indeed :) JMarc
Re: Performance oddity with X over ADSL
Jean-Marc Lasgouttes wrote: > Angus> Martin, does this patch fix the problem for you? It shoudl > Angus> buffer the pixmap. > > I am not sure I understand the patch: > > QLImage::QLImage(QLImage const & other) > : Image(other), original_(other.original_), > - transformed_(other.original_) > + transformed_(other.original_), > + transformed_pixmap_(other.original_) > > Why is everything initialized from original_? No reason. Well spotted. > Can't you just have QLImage use only Pixmaps? It makes the transformation stuff much more complicated. I think that the trick is to transform the QImage and to finally buffer the pixmap in setPixmap_impl. > What may happen is that you create a new QPixmap everytime a copy is > made, so it has to be downloaded. Isn't it possible to use something > like > + transformed_(other.transformed_), > + transformed_pixmap_(other.transformed_pixmap_) It looks like this makes all the difference. Patch attached. With this I get similar performance down an ADSL line with and without visible images. -- AngusIndex: src/frontends/qt2/QLImage.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLImage.C,v retrieving revision 1.34 diff -u -p -r1.34 QLImage.C --- src/frontends/qt2/QLImage.C 6 Nov 2004 16:14:21 - 1.34 +++ src/frontends/qt2/QLImage.C 28 Apr 2005 09:20:21 - @@ -112,7 +112,8 @@ QLImage::QLImage() QLImage::QLImage(QLImage const & other) : Image(other), original_(other.original_), - transformed_(other.original_) + transformed_(other.transformed_), + transformed_pixmap_(other.transformed_pixmap_) {} @@ -204,6 +205,7 @@ bool QLImage::setPixmap_impl(Params cons break; } + transformed_pixmap_ = transformed_; return true; } Index: src/frontends/qt2/QLImage.h === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLImage.h,v retrieving revision 1.10 diff -u -p -r1.10 QLImage.h --- src/frontends/qt2/QLImage.h 2 May 2004 12:45:26 - 1.10 +++ src/frontends/qt2/QLImage.h 28 Apr 2005 09:20:21 - @@ -30,7 +30,7 @@ public: static FormatList loadableFormats(); ~QLImage(); - QImage const & qimage() const { return transformed_; } + QPixmap const & qpixmap() const { return transformed_pixmap_; } private: /// Create a copy @@ -70,6 +70,8 @@ private: /// The transformed image for display. QImage transformed_; + /// Buffer the pixmap itself + QPixmap transformed_pixmap_; }; } // namespace graphics Index: src/frontends/qt2/QLPainter.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QLPainter.C,v retrieving revision 1.35 diff -u -p -r1.35 QLPainter.C --- src/frontends/qt2/QLPainter.C 31 Jan 2005 15:26:39 - 1.35 +++ src/frontends/qt2/QLPainter.C 28 Apr 2005 09:20:21 - @@ -171,7 +171,7 @@ void QLPainter::image(int x, int y, int static_cast(i); fillRectangle(x, y, w, h, LColor::graphicsbg); - qp_->drawImage(x, y, qlimage.qimage(), 0, 0, w, h); + bitBlt(qp_->device(), x, y, (), 0, 0, w, h); }
Re: Performance oddity with X over ADSL
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> It looks like this makes all the difference. Patch attached. Angus> With this I get similar performance down an ADSL line with and Angus> without visible images. Excellent :) JMarc
Re: bug 1591
On Thu, Apr 28, 2005 at 11:06:37AM +0200, Georg Baum wrote: > Let me rephrase: The concept of non-fatal warnings as opposed to fatal > errors does not exist in the error handling machinery: Errors are only > shown if something went wrong, if they are shown they are marked as > "Error", and there is no way to tell wether an error item is fatal or not. Indeed, but that's surely not difficult to change. > Rather than trying to workaround with the risk of producing ugly code and How is it ugly? Just provide a new method to tell whether there's real errors in the list or just warnings. Note that we probably want that anyway along with the other stuff I mentioned. > break something I'll try to drop the warning and produce real errors when > the textclasses are indeed incompatible. OK, that's fine too for now I suppose. regards john
Re: Performance oddity with X over ADSL
On Thu, Apr 28, 2005 at 10:28:34AM +0100, Angus Leeming wrote: > Jean-Marc Lasgouttes wrote: ... > > What may happen is that you create a new QPixmap everytime a copy is > > made, so it has to be downloaded. Isn't it possible to use something > > like > > + transformed_(other.transformed_), > > + transformed_pixmap_(other.transformed_pixmap_) > > It looks like this makes all the difference. Patch attached. With this I > get similar performance down an ADSL line with and without visible images. > > -- > Angus Thanks! This appears to do the job. - Martin pgpmOZl6Jzxuq.pgp Description: PGP signature
Fwd: LyX
-- Weitergeleitete Nachricht -- Hi, I am the developer of Kat ( http://www.kde-apps.org/content/show.php?content=22135 ) Kat uses a series of plugins to extract fulltext from files. I am collaborating with the KDE project KPDF and KOffice to build the plugins to manage their formats. I would like to ask you if you are interested in collaborating with us to produce a plugin for LyX, LateX and BibTeX. The plugin is a slightly modified kfile plugin, so it is really simple to produce it. The only thing it returns is fulltext of the file. Thanks Roberto ---
Re: Fwd: LyX
Dear Roberto, > Hi, I am the developer of Kat > ( http://www.kde-apps.org/content/show.php?content=22135 ) > > Kat uses a series of plugins to extract fulltext from files. > I am collaborating with the KDE project KPDF and KOffice to build > the plugins to manage their formats. > > I would like to ask you if you are interested in collaborating with us to > produce a plugin for LyX, LateX and BibTeX. > The plugin is a slightly modified kfile plugin, so it is really simple to > produce it. The only thing it returns is fulltext of the file. LyX can already convert a .lyx document to ASCII format using the command line. You can use relyx and tex2lyx (in CVS) to convert a LaTeX document to .lyx format, so you should be able to do all of this with a simple shell script that just invokes these tools correctly. Regards, Asger Ottar Alstrup
Re: [PATCH 1.4] Layout styles
> "Michael" == Michael Schmitt <[EMAIL PROTECTED]> writes: Michael> Jean-Marc, I didn't have the time for thourough testing but I Michael> think the attached patch should be equivalent to the 1.3 Michael> patch. Looks good. I applied it. JMarc
Re: UI problem with custom bullet dialog
Martin Vermeer wrote: >> Transferring the correct custom bullet into the dialog buffer >> at the moment the user selects "custom" in one of the four >> bullet menus ought to fix both issues. It looks like one dialog >> is used for all four bullets, which makes sense. >> >> Helge Hafting > > Hmmm, this requires more knowledge of Qt and this dialogue that I have > right now. > > Somebody have a look? I think that this does what you want. Please try it out. -- AngusIndex: src/frontends/qt2/BulletsModule.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/BulletsModule.C,v retrieving revision 1.24 diff -u -p -r1.24 BulletsModule.C --- src/frontends/qt2/BulletsModule.C 19 Aug 2004 06:30:43 - 1.24 +++ src/frontends/qt2/BulletsModule.C 28 Apr 2005 14:53:11 - @@ -28,9 +28,9 @@ using lyx::support::LibFileSearch; using std::string; - BulletsModule::BulletsModule(QWidget * parent, const char * name, WFlags fl) - : BulletsModuleBase(parent, name, fl), tmpbulletset(0) + : BulletsModuleBase(parent, name, fl), tmpbulletset(0), + bullet_pressed_(0) { for (int iter = 0; iter < 4; ++iter) { bullets_[iter] = ITEMIZE_DEFAULTS[iter]; @@ -60,18 +60,25 @@ BulletsModule::BulletsModule(QWidget * p pm6->insertItem(ding4_); pm->insertItem(qt_(""), pm1, 0); - pm->insertItem(qt_(""), pm2, 1); - pm->insertItem(qt_("Dings &1"), pm3, 2); - pm->insertItem(qt_("Dings &2"), pm4, 3); - pm->insertItem(qt_("Dings &3"), pm5, 4); - pm->insertItem(qt_("Dings &4"), pm6, 5); + pm->insertItem(qt_(""),pm2, 1); + pm->insertItem(qt_("Dings &1"), pm3, 2); + pm->insertItem(qt_("Dings &2"), pm4, 3); + pm->insertItem(qt_("Dings &3"), pm5, 4); + pm->insertItem(qt_("Dings &4"), pm6, 5); pm->insertSeparator(); // FIXME: make this checkable pm->insertItem(qt_(""), this, SLOT(setCustom()), 0, 6); + connect(bullet1PB, SIGNAL(pressed()), this, SLOT(clicked1())); bullet1PB->setPopup(pm); + + connect(bullet2PB, SIGNAL(pressed()), this, SLOT(clicked2())); bullet2PB->setPopup(pm); + + connect(bullet3PB, SIGNAL(pressed()), this, SLOT(clicked3())); bullet3PB->setPopup(pm); + + connect(bullet4PB, SIGNAL(pressed()), this, SLOT(clicked4())); bullet4PB->setPopup(pm); // insert pixmaps @@ -112,10 +119,10 @@ BulletsModule::BulletsModule(QWidget * p connect(ding4_, SIGNAL(selected(int, int)), this, SLOT(ding4(int, int))); - connect(bullet1PB, SIGNAL(pressed()), this, SLOT(pressed1())); - connect(bullet2PB, SIGNAL(pressed()), this, SLOT(pressed2())); - connect(bullet3PB, SIGNAL(pressed()), this, SLOT(pressed3())); - connect(bullet4PB, SIGNAL(pressed()), this, SLOT(pressed4())); + connect(bullet1PB, SIGNAL(pressed()), this, SLOT(selected1())); + connect(bullet2PB, SIGNAL(pressed()), this, SLOT(selected2())); + connect(bullet3PB, SIGNAL(pressed()), this, SLOT(selected3())); + connect(bullet4PB, SIGNAL(pressed()), this, SLOT(selected4())); connect(bulletsize1CO, SIGNAL(activated(int)), this, SLOT(updateSizes())); connect(bulletsize2CO, SIGNAL(activated(int)), this, SLOT(updateSizes())); connect(bulletsize3CO, SIGNAL(activated(int)), this, SLOT(updateSizes())); @@ -144,11 +151,37 @@ void BulletsModule::updateSizes() } +// These arrive before the menus are launched. +void BulletsModule::clicked1() +{ + bullet_pressed_ = _[0]; +} + + +void BulletsModule::clicked2() +{ + bullet_pressed_ = _[1]; +} + + +void BulletsModule::clicked3() +{ + bullet_pressed_ = _[2]; +} + + +void BulletsModule::clicked4() +{ + bullet_pressed_ = _[3]; +} + + // These arrive *after* the menus have done their work -void BulletsModule::pressed1() +void BulletsModule::selected1() { if (!tmpbulletset) return; + tmpbulletset = false; bullets_[0] = tmpbullet; setBullet(bullet1PB, bulletsize1CO, bullets_[0]); @@ -156,7 +189,7 @@ void BulletsModule::pressed1() } -void BulletsModule::pressed2() +void BulletsModule::selected2() { if (!tmpbulletset) return; @@ -167,7 +200,7 @@ void BulletsModule::pressed2() } -void BulletsModule::pressed3() +void BulletsModule::selected3() { if (!tmpbulletset) return; @@ -178,7 +211,7 @@ void BulletsModule::pressed3() } -void BulletsModule::pressed4() +void BulletsModule::selected4() { if (!tmpbulletset) return; @@ -247,7 +280,7 @@ void BulletsModule::setBullet(int level, } -Bullet const BulletsModule::getBullet(int level) +Bullet const & BulletsModule::getBullet(int level) const { return bullets_[level]; } @@ -299,12 +332,15 @@ void BulletsModule::ding4(int row, int c void BulletsModule::setCustom() { - bool ok = FALSE; + QString const input = bullet_pressed_ ? + toqstr(bullet_pressed_->getText()) : QString::null; + + bool ok = false; QString text = QInputDialog::getText( qt_( "Bullets" ), qt_( "Enter a custom bullet" ), QLineEdit::Normal, - QString::null, , this ); + input, , this ); if (!ok) return; Index: src/frontends/qt2/BulletsModule.h
Re: UI problem with custom bullet dialog
On Thu, Apr 28, 2005 at 03:59:35PM +0100, Angus Leeming wrote: > Martin Vermeer wrote: > >> Transferring the correct custom bullet into the dialog buffer > >> at the moment the user selects "custom" in one of the four > >> bullet menus ought to fix both issues. It looks like one dialog > >> is used for all four bullets, which makes sense. > >> > >> Helge Hafting > > > > Hmmm, this requires more knowledge of Qt and this dialogue that I have > > right now. > > > > Somebody have a look? > > I think that this does what you want. Please try it out. > > -- > Angus Yes it works, and settings survive a save/load... and it shows the LaTeX codes for the existing bullets. Great! - Martin pgp0waomD3CpH.pgp Description: PGP signature
Re: UI problem with custom bullet dialog
Martin Vermeer wrote: >> > Hmmm, this requires more knowledge of Qt and this dialogue that I have >> > right now. >> > >> > Somebody have a look? >> >> I think that this does what you want. Please try it out. > Yes it works, and settings survive a save/load... and it shows the LaTeX > codes for the existing bullets. Great! Good-oh. Committed. -- Angus
Re: Problem with autosave of new unsaved document
Is this the only one of Helge's recent bug reports that hasn't been fixed yet? Angus Helge Hafting wrote: > When lyx crashes, it does an autosave first so nothing is lost. > When restarting lyx, i.e. "lyx somefile.lyx" I usually get the > question about the autosaved file being newer, and if I want to > use it. That is a very nice feature. > > Except if the crash happened to some new and yet not saved file. > An emergency "somefile.lyx.emergency" is created, but > "lyx somefile.?lyx" does not ask if I want to use the > existing emergency file if "somefile.lyx" itself does not exist. > All I get is the question wether I want to create a *new* file, > and that makes me nervous. I believe this is much worse for people > with less knowledge of computers, those probably don?'t figure > out that they can rename the emergency file manually. > > It'd be really nice if lyx checked for an emergency save file > even when no "original" exists, in order to avoid this problem. > Ideally, lyx won't crash at all. But it is this fabulous stability > that caused my way of working - just begin a new document > and don't save at all for hours. Lyx won't ever loose my work anyway, > not even the alpha-quality 1.4. :-) I sometimes have a document open > for days, and save upon close. One gets used to stability. > > Helge Hafting
Re: configure help
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Angus Leeming wrote: >> AC_DEFINE(SPELL_ENGINE, [$lyx_spell_engine], [Define as "ASPELL", >> "PSPELL" or "ISPELL" to specify the spell-checker.]) Angus> I found it. AC_DEFINE_UNQUOTED. Angus> The patch attached does what I/we want but I'm not sure if it's Angus> optimal. Perhaps you'd care to have a look? After way too much time (this stuff takes long to get right), hare is my version of your patch. It has to be good since diffstat says 14 files changed, 218 insertions(+), 80 deletions(-) whereas yours says 15 files changed, 255 insertions(+), 50 deletions(-) ;) Of course I did not test aspell/pspell support, since I do not have them here. What still has to be done for spell stuff: create a new config/spell.m4 file and shove the [aip]spell checking code in there, along with a master LYX_CHECK_SPELLCHECKER macro. This is easy, but obscures the patch. Then [ap]spell.m4 can be removed, they are ridiculously small anyway. JMarc ? src/SpellBase.C Index: configure.ac === RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.47 diff -u -p -r1.47 configure.ac --- configure.ac 11 Mar 2005 10:49:09 - 1.47 +++ configure.ac 28 Apr 2005 15:45:59 - @@ -132,12 +132,6 @@ AC_LIBTOOL_WIN32_DLL #AM_PROG_LIBTOOL LYX_PROG_LIBTOOL -### Check if we want spell libraries, prefer new aspell -CHECK_WITH_ASPELL -if test "$USING_ASPELL" != "yes"; then - CHECK_WITH_PSPELL -fi - ### Check for some Cygwin-specific details. CHECK_WITH_CYGWIN @@ -290,6 +284,37 @@ dnl possible with the compiler which wil AC_LANG_PUSH(C) AC_CHECK_FUNCS(mkfifo mkstemp mktemp lstat readlink) AC_LANG_POP(C) + +### Check if we want spell libraries, prefer new aspell +CHECK_WITH_ASPELL +if $lyx_use_aspell ; then : ; else + CHECK_WITH_PSPELL + if $lyx_use_pspell ; then : ; else +lyx_use_ispell=true +AC_LANG_PUSH(C) +AC_CHECK_FUNCS(select dup2,, [lyx_use_ispell=false]) +AC_LANG_POP(C) +AC_MSG_CHECKING([whether to use ispell]) +if $lyx_use_ispell ; then + AC_MSG_RESULT(yes) + AC_DEFINE(USE_ISPELL, 1, [Define as 1 to use an external ispell process for spell-checking]) + lyx_flags="$lyx_flags use-ispell" +else + AC_MSG_RESULT(no) +fi + fi +fi +AM_CONDITIONAL(USE_ASPELL, $lyx_use_aspell) +AM_CONDITIONAL(USE_PSPELL, $lyx_use_pspell) +AM_CONDITIONAL(USE_ISPELL, $lyx_use_ispell) + +lyx_client_subdir=true +AC_LANG_PUSH(C) +AC_CHECK_FUNCS(select socket,, [lyx_client_subdir=false]) +AM_CONDITIONAL(BUILD_CLIENT_SUBDIR, $lyx_client_subdir) + +AC_LANG_POP(C) + AC_FUNC_SELECT_ARGTYPES Index: config/aspell.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/aspell.m4,v retrieving revision 1.2 diff -u -p -r1.2 aspell.m4 --- config/aspell.m4 25 May 2004 14:42:08 - 1.2 +++ config/aspell.m4 28 Apr 2005 15:46:00 - @@ -4,27 +4,23 @@ AC_DEFUN([CHECK_WITH_ASPELL], [ -AC_ARG_WITH(aspell, - AC_HELP_STRING([--with-aspell],[use ASpell libraries]), - [ - case "$withval" in - y*) USING_ASPELL="yes";; - *) USING_ASPELL="no";; - esac - ], - [ - USING_ASPELL="yes" - ]) +lyx_use_aspell=true +AC_ARG_WITH(aspell, AC_HELP_STRING([--with-aspell],[use ASpell libraries])) +test "$with_aspell" = "no" && lyx_use_aspell=false -if test "$USING_ASPELL" = "yes" ; then - AC_CHECK_HEADERS(aspell.h aspell/aspell.h, USING_ASPELL="yes", USING_ASPELL="no") - AC_CHECK_LIB(aspell, new_aspell_config, LIBS="-laspell $LIBS"; USING_ASPELL="yes", USING_ASPELL="no") +if $lyx_use_aspell ; then + AC_CHECK_HEADERS(aspell.h aspell/aspell.h, + [lyx_use_aspell=true; break;], + [lyx_use_aspell=false]) + AC_CHECK_LIB(aspell, new_aspell_config, LIBS="-laspell $LIBS", lyx_use_aspell=false) - if test "$USING_ASPELL" = "yes"; then + AC_MSG_CHECKING([whether to use aspell]) + if $lyx_use_aspell ; then + AC_MSG_RESULT(yes) AC_DEFINE(USE_ASPELL, 1, [Define as 1 to use the aspell library]) lyx_flags="$lyx_flags use-aspell" + else + AC_MSG_RESULT(no) fi fi -AC_MSG_CHECKING([whether to use aspell]) -AC_MSG_RESULT($USING_ASPELL) ]) Index: config/pspell.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/pspell.m4,v retrieving revision 1.10 diff -u -p -r1.10 pspell.m4 --- config/pspell.m4 25 May 2004 14:42:09 - 1.10 +++ config/pspell.m4 28 Apr 2005 15:46:00 - @@ -3,27 +3,21 @@ AC_DEFUN([CHECK_WITH_PSPELL], [ -AC_ARG_WITH(pspell, - AC_HELP_STRING([--with-pspell],[use PSpell libraries]), - [ - case "$withval" in - y*) USING_PSPELL="yes";; - *) USING_PSPELL="no";; - esac - ], - [ - USING_PSPELL="yes" - ]) +lyx_use_pspell=true +AC_ARG_WITH(pspell, AC_HELP_STRING([--with-pspell],[use PSpell libraries])) +test
[patch] qt longtable ui
As reported before, there is still a (qt only) problem with the longtable ui: the "is empty" checkbox cannot be disabled once it is checked. Judging from the xforms code I believe that some of the lfun handling in the qt tabular dialog is completely wrong. I think the attached patch is correct. However, since I never used longtabular myself, I'd appreciate some testing (I have tested a bit myself, and AFAICS it works now). Apart from that, there is still a weird problem: in (some of?) the qt dialogs (tabular, box at least), the disabled widgets are not greyed out when the dialog has been reopened. One action inside the dialog is needed. You can reproduce this e.g. with the longtable checkboxes, but also with the valign combo in the box dialog. Maybe also the "flickering" when you are toggling the longtabular checkboxes is related. I have no clue what's going on (it's not a problem of the dialog code itself). BTW I also managed to crash LyX several times related to tabular editing (I have no testcases yet). This is really still a weak part. Regards, Jürgen Index: QTabularDialog.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/QTabularDialog.C,v retrieving revision 1.26 diff -u -r1.26 QTabularDialog.C --- QTabularDialog.C 26 Apr 2005 11:12:18 - 1.26 +++ QTabularDialog.C 28 Apr 2005 15:43:58 - @@ -214,7 +214,7 @@ if (headerBorderAboveCB->isChecked()) form_->controller().set(LyXTabular::SET_LTHEAD, "dl_above"); else - form_->controller().set(LyXTabular::UNSET_LTHEAD, ""); + form_->controller().set(LyXTabular::UNSET_LTHEAD, "dl_above"); form_->changed(); } @@ -224,7 +224,7 @@ if (headerBorderBelowCB->isChecked()) form_->controller().set(LyXTabular::SET_LTHEAD, "dl_below"); else - form_->controller().set(LyXTabular::UNSET_LTHEAD, ""); + form_->controller().set(LyXTabular::UNSET_LTHEAD, "dl_below"); form_->changed(); } @@ -234,7 +234,7 @@ if (firstheaderBorderAboveCB->isChecked()) form_->controller().set(LyXTabular::SET_LTFIRSTHEAD, "dl_above"); else - form_->controller().set(LyXTabular::UNSET_LTFIRSTHEAD, ""); + form_->controller().set(LyXTabular::UNSET_LTFIRSTHEAD, "dl_above"); form_->changed(); } @@ -244,7 +244,7 @@ if (firstheaderBorderBelowCB->isChecked()) form_->controller().set(LyXTabular::SET_LTFIRSTHEAD, "dl_below"); else - form_->controller().set(LyXTabular::UNSET_LTFIRSTHEAD, ""); + form_->controller().set(LyXTabular::UNSET_LTFIRSTHEAD, "dl_below"); form_->changed(); } @@ -267,10 +267,8 @@ bool enable(firstheaderNoContentsCB->isChecked()); if (enable) form_->controller().set(LyXTabular::SET_LTFIRSTHEAD, "empty"); - else { - ltFirstHeaderBorderBelow_clicked(); - ltFirstHeaderBorderAbove_clicked(); - } + else + form_->controller().set(LyXTabular::UNSET_LTFIRSTHEAD, "empty"); firstheaderStatusCB->setEnabled(!enable); firstheaderBorderAboveCB->setEnabled(!enable); firstheaderBorderBelowCB->setEnabled(!enable); @@ -297,7 +295,7 @@ if (footerBorderAboveCB->isChecked()) form_->controller().set(LyXTabular::SET_LTFOOT, "dl_above"); else - form_->controller().set(LyXTabular::UNSET_LTFOOT, ""); + form_->controller().set(LyXTabular::UNSET_LTFOOT, "dl_above"); form_->changed(); } @@ -307,7 +305,7 @@ if (footerBorderBelowCB->isChecked()) form_->controller().set(LyXTabular::SET_LTFOOT, "dl_below"); else - form_->controller().set(LyXTabular::UNSET_LTFOOT, ""); + form_->controller().set(LyXTabular::UNSET_LTFOOT, "dl_below"); form_->changed(); } @@ -330,7 +328,7 @@ if (lastfooterBorderAboveCB->isChecked()) form_->controller().set(LyXTabular::SET_LTLASTFOOT, "dl_above"); else - form_->controller().set(LyXTabular::UNSET_LTLASTFOOT, ""); + form_->controller().set(LyXTabular::UNSET_LTLASTFOOT, "dl_above"); form_->changed(); } @@ -340,7 +338,7 @@ if (lastfooterBorderBelowCB->isChecked()) form_->controller().set(LyXTabular::SET_LTLASTFOOT, "dl_below"); else - form_->controller().set(LyXTabular::UNSET_LTLASTFOOT, ""); + form_->controller().set(LyXTabular::UNSET_LTLASTFOOT, "dl_below"); form_->changed(); } @@ -350,10 +348,8 @@ bool enable(lastfooterNoContentsCB->isChecked()); if (enable) form_->controller().set(LyXTabular::SET_LTLASTFOOT, "empty"); - else { - ltLastFooterBorderBelow_clicked(); - ltLastFooterBorderAbove_clicked(); - } + else + form_->controller().set(LyXTabular::UNSET_LTLASTFOOT, "empty"); lastfooterStatusCB->setEnabled(!enable); lastfooterBorderAboveCB->setEnabled(!enable); lastfooterBorderBelowCB->setEnabled(!enable);
Re: configure help
Jean-Marc Lasgouttes wrote: > Angus> Angus Leeming wrote: >>> AC_DEFINE(SPELL_ENGINE, [$lyx_spell_engine], [Define as "ASPELL", >>> "PSPELL" or "ISPELL" to specify the spell-checker.]) > > Angus> I found it. AC_DEFINE_UNQUOTED. > > Angus> The patch attached does what I/we want but I'm not sure if it's > Angus> optimal. Perhaps you'd care to have a look? > > After way too much time (this stuff takes long to get right), hare is > my version of your patch. It has to be good since diffstat says > 14 files changed, 218 insertions(+), 80 deletions(-) > whereas yours says > 15 files changed, 255 insertions(+), 50 deletions(-) > > ;) > > Of course I did not test aspell/pspell support, since I do not have > them here. > > What still has to be done for spell stuff: create a new > config/spell.m4 file and shove the [aip]spell checking code in there, > along with a master LYX_CHECK_SPELLCHECKER macro. This is easy, but > obscures the patch. Then [ap]spell.m4 can be removed, they are > ridiculously small anyway. Many thanks, Jean-Marc. I thought that I was making life difficult for myself. It appears that I was :) One thing I noticed after I had posted my patch last night is that there's a change of semantic here (ControlSpellchecker.C). At the moment, the lyxrc variables are used to fall through to Ispell at run time. With the new configure stuff, they'll fall through to SpellBase. So, that leads to two questions. 1. Should the check for USE_ISPELL be dependent on USE_[AP]SPELL? 2. If it should (be dependent), then we should remove the lyxrc variables, no? -#ifdef USE_ASPELL +#if defined(USE_ASPELL) if (lyxrc.use_spell_lib) return new ASpell(bp, lang); -#endif -#ifdef USE_PSPELL +#elif defined(USE_PSPELL) if (lyxrc.use_spell_lib) return new PSpell(bp, lang); -#endif - +#elif defined(USE_ISPELL) lang = (lyxrc.isp_use_alt_lang) ? lyxrc.isp_alt_lang : bp.language->lang(); return new ISpell(bp, lang); +#else + return new SpellBase; +#endif More thoughts. * The ability to launch the spell checker dialog (setStatus?) should be dependent on one of USE_[API]SPELL being defined. Maybe we could make compilation of ControlSpellcheker.C and associated frontend views dependent on this as well, although that is probably overkill. * The [aspell,ispell,hspell] combox in the preferences dialog should be activated only if USE_ISPELL is defined. Angus
Re: configure help
> "Jean-Marc" == Jean-Marc Lasgouttes <[EMAIL PROTECTED]> writes: Jean-Marc> After way too much time (this stuff takes long to get Jean-Marc> right), here is my version of your patch. It has to be good Jean-Marc> since diffstat says Jean-Marc> 14 files changed, 218 insertions(+), 80 deletions(-) Jean-Marc> whereas yours says Jean-Marc> 15 files changed, 255 insertions(+), 50 deletions(-) OK, I forgot SpellBase.C (which is the same as in your patch). Now, it becomes 15 files changed, 267 insertions(+), 80 deletions(-) Talk about interesting stats... JMarc Index: configure.ac === RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.47 diff -u -p -r1.47 configure.ac --- configure.ac 11 Mar 2005 10:49:09 - 1.47 +++ configure.ac 28 Apr 2005 16:14:27 - @@ -132,12 +132,6 @@ AC_LIBTOOL_WIN32_DLL #AM_PROG_LIBTOOL LYX_PROG_LIBTOOL -### Check if we want spell libraries, prefer new aspell -CHECK_WITH_ASPELL -if test "$USING_ASPELL" != "yes"; then - CHECK_WITH_PSPELL -fi - ### Check for some Cygwin-specific details. CHECK_WITH_CYGWIN @@ -290,6 +284,37 @@ dnl possible with the compiler which wil AC_LANG_PUSH(C) AC_CHECK_FUNCS(mkfifo mkstemp mktemp lstat readlink) AC_LANG_POP(C) + +### Check if we want spell libraries, prefer new aspell +CHECK_WITH_ASPELL +if $lyx_use_aspell ; then : ; else + CHECK_WITH_PSPELL + if $lyx_use_pspell ; then : ; else +lyx_use_ispell=true +AC_LANG_PUSH(C) +AC_CHECK_FUNCS(select dup2,, [lyx_use_ispell=false]) +AC_LANG_POP(C) +AC_MSG_CHECKING([whether to use ispell]) +if $lyx_use_ispell ; then + AC_MSG_RESULT(yes) + AC_DEFINE(USE_ISPELL, 1, [Define as 1 to use an external ispell process for spell-checking]) + lyx_flags="$lyx_flags use-ispell" +else + AC_MSG_RESULT(no) +fi + fi +fi +AM_CONDITIONAL(USE_ASPELL, $lyx_use_aspell) +AM_CONDITIONAL(USE_PSPELL, $lyx_use_pspell) +AM_CONDITIONAL(USE_ISPELL, $lyx_use_ispell) + +lyx_client_subdir=true +AC_LANG_PUSH(C) +AC_CHECK_FUNCS(select socket,, [lyx_client_subdir=false]) +AM_CONDITIONAL(BUILD_CLIENT_SUBDIR, $lyx_client_subdir) + +AC_LANG_POP(C) + AC_FUNC_SELECT_ARGTYPES Index: config/aspell.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/aspell.m4,v retrieving revision 1.2 diff -u -p -r1.2 aspell.m4 --- config/aspell.m4 25 May 2004 14:42:08 - 1.2 +++ config/aspell.m4 28 Apr 2005 16:14:28 - @@ -4,27 +4,23 @@ AC_DEFUN([CHECK_WITH_ASPELL], [ -AC_ARG_WITH(aspell, - AC_HELP_STRING([--with-aspell],[use ASpell libraries]), - [ - case "$withval" in - y*) USING_ASPELL="yes";; - *) USING_ASPELL="no";; - esac - ], - [ - USING_ASPELL="yes" - ]) +lyx_use_aspell=true +AC_ARG_WITH(aspell, AC_HELP_STRING([--with-aspell],[use ASpell libraries])) +test "$with_aspell" = "no" && lyx_use_aspell=false -if test "$USING_ASPELL" = "yes" ; then - AC_CHECK_HEADERS(aspell.h aspell/aspell.h, USING_ASPELL="yes", USING_ASPELL="no") - AC_CHECK_LIB(aspell, new_aspell_config, LIBS="-laspell $LIBS"; USING_ASPELL="yes", USING_ASPELL="no") +if $lyx_use_aspell ; then + AC_CHECK_HEADERS(aspell.h aspell/aspell.h, + [lyx_use_aspell=true; break;], + [lyx_use_aspell=false]) + AC_CHECK_LIB(aspell, new_aspell_config, LIBS="-laspell $LIBS", lyx_use_aspell=false) - if test "$USING_ASPELL" = "yes"; then + AC_MSG_CHECKING([whether to use aspell]) + if $lyx_use_aspell ; then + AC_MSG_RESULT(yes) AC_DEFINE(USE_ASPELL, 1, [Define as 1 to use the aspell library]) lyx_flags="$lyx_flags use-aspell" + else + AC_MSG_RESULT(no) fi fi -AC_MSG_CHECKING([whether to use aspell]) -AC_MSG_RESULT($USING_ASPELL) ]) Index: config/pspell.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/pspell.m4,v retrieving revision 1.10 diff -u -p -r1.10 pspell.m4 --- config/pspell.m4 25 May 2004 14:42:09 - 1.10 +++ config/pspell.m4 28 Apr 2005 16:14:28 - @@ -3,27 +3,21 @@ AC_DEFUN([CHECK_WITH_PSPELL], [ -AC_ARG_WITH(pspell, - AC_HELP_STRING([--with-pspell],[use PSpell libraries]), - [ - case "$withval" in - y*) USING_PSPELL="yes";; - *) USING_PSPELL="no";; - esac - ], - [ - USING_PSPELL="yes" - ]) +lyx_use_pspell=true +AC_ARG_WITH(pspell, AC_HELP_STRING([--with-pspell],[use PSpell libraries])) +test "$with_pspell" = "no" && lyx_use_pspell=false -if test "$USING_PSPELL" = "yes" ; then - AC_CHECK_HEADERS(pspell/pspell.h, USING_PSPELL="yes", USING_PSPELL="no") - AC_CHECK_LIB(pspell, main, LIBS="-lpspell $LIBS"; USING_PSPELL="yes", USING_PSPELL="no") +if $lyx_use_pspell ; then + AC_CHECK_HEADERS(pspell/pspell.h,, lyx_use_pspell=false) + AC_CHECK_LIB(pspell, main, LIBS="-lpspell $LIBS", lyx_use_pspell=false) - if test "$USING_PSPELL" = "yes";
Re: configure help
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> One thing I noticed after I had posted my patch last night is Angus> that there's a change of semantic here (ControlSpellchecker.C). Angus> At the moment, the lyxrc variables are used to fall through to Angus> Ispell at run time. With the new configure stuff, they'll fall Angus> through to SpellBase. I just noticed this variable :) I really can't read. Angus> So, that leads to two questions. 1. Should the check for Angus> USE_ISPELL be dependent on USE_[AP]SPELL? Yes. It is just a matter of removing a few else's. I guess the variable can still be useful. Angus> * The ability to launch the spell checker dialog (setStatus?) Angus> should be dependent on one of USE_[API]SPELL being defined. Yes. Angus> Maybe we could make compilation of ControlSpellcheker.C and Angus> associated frontend views dependent on this as well, although Angus> that is probably overkill. I think it is overkill for now. Angus> * The [aspell,ispell,hspell] combox in the preferences dialog Angus> should be activated only if USE_ISPELL is defined. Yes. JMarc
Re: Problem with autosave of new unsaved document
On Thu, Apr 28, 2005 at 04:45:53PM +0100, Angus Leeming wrote: > Is this the only one of Helge's recent bug reports that hasn't been fixed > yet? > > Angus I think so. It must be frustrating not to be able to report any serious bugs anymore, judging by this one... - Martin pgprJnTi3LL1k.pgp Description: PGP signature
Re: [patch] qt longtable ui
On Thu, Apr 28, 2005 at 06:02:02PM +0200, Juergen Spitzmueller wrote: > BTW I also managed to crash LyX several times related to tabular editing (I > have no testcases yet). This is really still a weak part. Yes I remember happening that too. Never well defined sequence that I could remember. - Martin pgpZPIQy6yaGo.pgp Description: PGP signature
Re: Problem with autosave of new unsaved document
On Thursday 28 April 2005 17:30, Martin Vermeer wrote: > On Thu, Apr 28, 2005 at 04:45:53PM +0100, Angus Leeming wrote: > > Is this the only one of Helge's recent bug reports that hasn't > > been fixed yet? > > > > Angus > > I think so. It must be frustrating not to be able to report any > serious bugs anymore, judging by this one... I can trigger ASSERTS in coordcache most all the time with some of my old docs... Angus
Re: Problem with autosave of new unsaved document
On Thu, Apr 28, 2005 at 05:38:08PM +0100, Angus Leeming wrote: > On Thursday 28 April 2005 17:30, Martin Vermeer wrote: > > On Thu, Apr 28, 2005 at 04:45:53PM +0100, Angus Leeming wrote: > > > Is this the only one of Helge's recent bug reports that hasn't > > > been fixed yet? > > > > > > Angus > > > > I think so. It must be frustrating not to be able to report any > > serious bugs anymore, judging by this one... > > I can trigger ASSERTS in coordcache most all the time with some of my > old docs... > > Angus Better start producing minimal test cases then... - Martin pgpHSFoZkjLR9.pgp Description: PGP signature
Re: Performance oddity with X over ADSL
On Thu, Apr 28, 2005 at 10:28:34AM +0100, Angus Leeming wrote: ... > > What may happen is that you create a new QPixmap everytime a copy is > > made, so it has to be downloaded. Isn't it possible to use something > > like > > + transformed_(other.transformed_), > > + transformed_pixmap_(other.transformed_pixmap_) > > It looks like this makes all the difference. Patch attached. With this I > get similar performance down an ADSL line with and without visible images. > > -- > Angus Just a wild idea: LyX is still producing incoming ADSL traffic at 0.5 kB/s while doing nothing, just containing a new doc and blinking the cursor. Shouldn't the server be able to do that all on its own? The relevant code appears to be showCursor/removeCursor in qscreen.C. I like my network connection quiet so I can spot unusual activity: call me paranoid. When not doing anything, it's only ntp querying a time server every so many seconds. I like it that way, like Helsinki traffic, not Cairo :-) - Martin pgphdQAX1l8Kd.pgp Description: PGP signature
Re: Performance oddity with X over ADSL
Martin Vermeer wrote: > Just a wild idea: LyX is still producing incoming ADSL traffic at > 0.5 kB/s while doing nothing, just containing a new doc and blinking the > cursor. Shouldn't the server be able to do that all on its own? > > The relevant code appears to be showCursor/removeCursor in qscreen.C. I'm sure that we can fix this using the same caching ideas. Remind me after the w/e. -- Angus
Re: Problem with autosave of new unsaved document
Martin Vermeer wrote: > I think so. It must be frustrating not to be able to report any serious > bugs anymore, judging by this one... There's still some fun available on bugzilla. Jürgen
Re: Problem with autosave of new unsaved document
On Thu, Apr 28, 2005 at 07:27:22PM +0200, Juergen Spitzmueller wrote: > Martin Vermeer wrote: > > I think so. It must be frustrating not to be able to report any serious > > bugs anymore, judging by this one... > > There's still some fun available on bugzilla. > > Jürgen Gimme a number, any number... - Martin pgpEKX3wtadBk.pgp Description: PGP signature
Re: [PATCH 1.4] Layout styles
Georg Baum wrote: could you please put the following line in ~/.cvsrc? diff -upN that produces unified diffs (u) with function names (p) that are easier to read. It includes new files, too (N). Hi Georg, I know that unified diffs are better. However, for this type of patch the traditional format was much more readable. But I promise to use unified diffs again in the future! Michael
[PATCH 1.4] Layout style
Jean-Marc, have you edited Makefile.in.in by hand? It seems that two lines were duplicated. See attached patch. Michael ? patch-1.4 Index: ChangeLog === RCS file: /cvs/lyx/lyx-devel/po/ChangeLog,v retrieving revision 1.199 diff -u -p -r1.199 ChangeLog --- ChangeLog 2005/04/28 13:07:51 1.199 +++ ChangeLog 2005/04/28 18:05:20 @@ -1,5 +1,9 @@ 2005-04-28 Michael Schmitt <[EMAIL PROTECTED]> + * Makefile.in.in: remove duplicated lines + +2005-04-28 Michael Schmitt <[EMAIL PROTECTED]> + * Makefile.in.in (layouts_l10n.pot): replace underscores with spaces in Style definition; strip quotes * de.po: Index: Makefile.in.in === RCS file: /cvs/lyx/lyx-devel/po/Makefile.in.in,v retrieving revision 1.48 diff -u -p -r1.48 Makefile.in.in --- Makefile.in.in 2005/04/28 13:07:51 1.48 +++ Makefile.in.in 2005/04/28 18:05:21 @@ -438,8 +438,6 @@ layouts_l10n.pot: $(top_srcdir)/lib/layo sub(/Style /, "", line); \ gsub(/\"/, "", line); \ gsub(/_/, " ", line); \ - gsub(/\"/, "", line); \ - gsub(/_/, " ", line); \ printf("#: %s:%d\nmsgid \"%s\"\nmsgstr \"\"\n\n", \ fixupfilename(), FNR, line); \ } \
Wrong symbol displayed for third level bullet list
Bullet lists in three levels are rare. Today I needed one, and noticed the following symbols: lev. screen output 1* round bullet 2- - 3@ * 4cdotcdot I didn't at first notice the wrong "*" at level 1, as lyx used to just show a "*" for all bulleted lists. The "@" at level 3 was more noticeable. The output was fine though. I used qt, and I have not changed any of the bullet symbols in this document. Helge Hafting
Re: Wrong symbol displayed for third level bullet list
On Thu, Apr 28, 2005 at 09:15:38PM +0200, Helge Hafting wrote: > Bullet lists in three levels are rare. Today I needed one, > and noticed the following symbols: > > lev. screen output > 1* round bullet > 2- - > 3@ * > 4cdotcdot > > > I didn't at first notice the wrong "*" at level 1, as lyx used to just > show a "*" for all bulleted lists. > > The "@" at level 3 was more noticeable. The output was fine though. > I used qt, and I have not changed any of the bullet symbols in > this document. > > Helge Hafting This better? - Martin Index: buffer_funcs.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/buffer_funcs.C,v retrieving revision 1.26 diff -u -p -r1.26 buffer_funcs.C --- buffer_funcs.C 26 Apr 2005 11:12:09 - 1.26 +++ buffer_funcs.C 28 Apr 2005 19:39:54 - @@ -395,13 +395,13 @@ void setCounter(Buffer const & buf, ParI string itemlabel; switch (par.itemdepth) { case 0: - itemlabel = "*"; + itemlabel = "o"; break; case 1: itemlabel = "-"; break; case 2: - itemlabel = "@"; + itemlabel = "*"; break; case 3: itemlabel = "ï"; pgpZjwFcHGMSz.pgp Description: PGP signature
Re: Problem with autosave of new unsaved document
Martin Vermeer wrote: >> There's still some fun available on bugzilla. > Gimme a number, any number... Ok, if you shout so loud ;-), I have one: http://bugzilla.lyx.org/show_bug.cgi?id=1435 It's my favourite bug. If you have fun fiddling around with mathed, here comes my personal bug list: bug 905 bug 952 bug 1159 bug 1327 bug 1343 bug 1344 bug 1346 bug 1369 bug 1370 bug 1379 bug 1380 bug 1381 bug 1384 bug 1386 bug 1391 bug 1392 bug 1393 bug 1394 bug 1395 bug 1400 bug 1402 bug 1408 bug 1409 bug 1411 bug 1424 bug 1425 bug 1429 bug 1431 bug 1432 bug 1435 bug 1452 bug 1453 bug 1458 bug 1467 bug 1468 bug 1494 bug 1495 bug 1496 bug 1497 bug 1504 bug 1505 bug 1519 bug 1520 bug 1521 bug 1528 bug 1536 bug 1537 bug 1550 bug 1560 bug 1563 bug 1565 bug 1595 bug 1599 bug 1608 bug 1632 bug 1633 bug 1653 bug 1654 bug 1655 bug 1681 bug 1682 bug 1699 bug 1738 bug 1746 bug 1747 bug 1751 bug 1754 bug 1870 OK, just joking, fixing bug 1435 would be enough. thanks and regards Uwe
Re: UI problem with custom bullet dialog
On Thu, Apr 28, 2005 at 03:59:35PM +0100, Angus Leeming wrote: > > I think that this does what you want. Please try it out. > Great stuff! Helge Hafting
Re: Performance oddity with X over ADSL
On Thu, Apr 28, 2005 at 10:28:34AM +0100, Angus Leeming wrote: > > It looks like this makes all the difference. Patch attached. With this I > get similar performance down an ADSL line with and without visible images. > This is great! I don't see the delays anymore, I even get smooth scrolling through the region with the graphich. :-) Lyx 1.4 is now fine for work via ADSL. Now, if I could say the same about xfig . . . Helge Hafting
Re: [patch] qt longtable ui
On Thu, Apr 28, 2005 at 06:02:02PM +0200, Juergen Spitzmueller wrote: > As reported before, there is still a (qt only) problem with the longtable ui: > the "is empty" checkbox cannot be disabled once it is checked. > Judging from the xforms code I believe that some of the lfun handling in the > qt tabular dialog is completely wrong. I think the attached patch is correct. > I tested it, and now I could uncheck every box in the longtable dialog. > However, since I never used longtabular myself, I'd appreciate some testing > (I > have tested a bit myself, and AFAICS it works now). > > Apart from that, there is still a weird problem: in (some of?) the qt dialogs > (tabular, box at least), the disabled widgets are not greyed out when the > dialog has been reopened. One action inside the dialog is needed. You can > reproduce this e.g. with the longtable checkboxes, but also with the valign > combo in the box dialog. Maybe also the "flickering" when you are toggling > the longtabular checkboxes is related. I have no clue what's going on (it's > not a problem of the dialog code itself). I noticed this. Only cosmetic :-) > > BTW I also managed to crash LyX several times related to tabular editing (I > have no testcases yet). This is really still a weak part. > I've had the occational table crash, but nothing trivially reproducible other than cases I already reported. After "strange" table crashes I usually find that the operation did succeed when the emergency savefile is recovered. Perhaps the document itself is ok but something else isn't? Helge Hafting
Re: Wrong symbol displayed for third level bullet list
On Thu, Apr 28, 2005 at 10:41:31PM +0300, Martin Vermeer wrote: > On Thu, Apr 28, 2005 at 09:15:38PM +0200, Helge Hafting wrote: > > Bullet lists in three levels are rare. Today I needed one, > > and noticed the following symbols: > > > > lev. screen output > > 1* round bullet > > 2- - > > 3@ * > > 4cdotcdot > > > > > > I didn't at first notice the wrong "*" at level 1, as lyx used to just > > show a "*" for all bulleted lists. > > > > The "@" at level 3 was more noticeable. The output was fine though. > > I used qt, and I have not changed any of the bullet symbols in > > this document. > > > > Helge Hafting > > This better? > It helps - but the letter "o" for the first level bullet? How about using the \bullet math symbol? It looks much better and there is already code for showing it, both in formulas and on the math panel. Slightly more correct, and much better to look at. First level bullets are seen a lot. Helge Hafting
Bug report: Assertion fails when clicking on vertical space inset
Test case: 1. Open new document 2. Insert => Special Formatting => Vertical Space 3. Press OK in dialog 3. Click on inset (near the arrow) Console output (a bit verbose, isn't it?): void BufferView::Pimpl::update(bool, bool)[fitcursor = 0, forceupdate = 1] buffer: 0 void BufferView::Pimpl::update(bool, bool)[fitcursor = 0, forceupdate = 1] buffer: 0 void BufferView::Pimpl::update(bool, bool)[fitcursor = 0, forceupdate = 1] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 66 void BufferView::Pimpl::update(bool, bool)[fitcursor = 1, forceupdate = 0] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 66 void BufferView::Pimpl::update(bool, bool)[fitcursor = 1, forceupdate = 0] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 66 virtual void InsetText::doDispatch(LCursor&, FuncRequest&) [ cmd.action = 235] *** LyXText::dispatch: cmd: action: 235 arg: 'vspace defskip' x: 0 y: 0 recordUndo: cur: inset: 0x1fba0a4 idx: 0 par: 0 pos: 0 recordUndo: pos: 0 void BufferView::Pimpl::update(bool, bool)[fitcursor = 1, forceupdate = 1] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 72 void BufferView::Pimpl::update(bool, bool)[fitcursor = 1, forceupdate = 0] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 72 bool BufferView::Pimpl::workAreaDispatch(const FuncRequest&)[ cmd0 action: 215 arg: '' x: 319 y: 42] LyXText::getPitNearY: y: 42 cache size: 1 examining: pit: 0 y: 40 found best y: 40 for pit: 0 LyXText::getPitNearY: y: 42 cache size: 1 examining: pit: 0 y: 40 found best y: 40 for pit: 0 checkInsetHit: x: 319 y: 42 pit: 0 examining inset 0x1a52e50 xo: 316...336 yo: 29...51 Hit inset: 0x1a52e50 inset 0x1a52e50 hit at x: 319 y: 42 InsetBase: editXY x:319 y: 42 bool BufferView::Pimpl::workAreaDispatch(const FuncRequest&) * hit inset at tip: 0x1a52e50 bool BufferView::Pimpl::workAreaDispatch(const FuncRequest&) * created temp cursor: cursor:| anchor: inset: 0x1fba0a4 idx: 0 par: 0 pos: 0 | --- selection: 0 x_target: 319 void BufferView::Pimpl::update(bool, bool)[fitcursor = 1, forceupdate = 1] buffer: 0x1f25b98 ViewMetricsInfo BufferView::Pimpl::metrics() npit: 1 pit1: 0 pit2: 0 ViewMetricsInfo BufferView::Pimpl::metrics() y1: 0 y2: 72 Assertion triggered in FuncStatus LyXFunc::getStatus(const FuncRequest&) const by failing check "success" in file lyxfunc.C:475
Re: Bug report: Assertion fails when clicking on vertical space inset
On Thu, Apr 28, 2005 at 11:47:46PM +0200, Michael Schmitt wrote: > Test case: > > 1. Open new document > 2. Insert => Special Formatting => Vertical Space > 3. Press OK in dialog > 3. Click on inset (near the arrow) > > Console output (a bit verbose, isn't it?): ;-) > Assertion triggered in FuncStatus LyXFunc::getStatus(const FuncRequest&) > const by failing check "success" in file lyxfunc.C:475 That's what you get when an inset such as insetvspace has a doDispatch but no matching getStatus... Just add one. Surely this is not the only one. - Martin pgp3oK0q4J8bc.pgp Description: PGP signature