Re: [Ãpatch] RandomAccessList take 4
Hi Lars, Funny that you are doing the exact same changes as my original patch fixing the code to use std::distance and std::advance (in this case boost::next). You rejected my patch exactly because of this... I am not upset but you could have told me at the beginning instead of letting me wasting my time. Concerning the direct access if you want to continue this way, for sure, list::iterator must be replaced if you want speed. With direct access where it make sense, you would have gained much speed. Right now you still have a lot of direct access all over the code, are you going to fix that? Abdel. Lars Gullik Bjønnes a écrit : Ok, this is what I am going to commit. I am not really happy with the fact that RandomListIterator really is a std::list::iterator. I'd like it to be a real random_access_iterator. We should probably create our own. (And no; I don't agree that we should only work with offsets and indices, iterators are nice and we should use them.) This works for me.
Re: [Patch] raise/lower selected super/sub -scripts in math
On Mon, 2006-03-20 at 09:50 +0200, Martin Vermeer wrote: On Mon, 2006-03-20 at 09:41 +0200, Martin Vermeer wrote: On Mon, 2006-03-20 at 07:49 +0100, Juergen Spitzmueller wrote: Martin Vermeer wrote: This is a regression from 1.3. It should be possible, both with ^ _ keys and with the math panel (and directly with the commands math-superscript and math-subscript), to raise the selection to a superscript or lower it to a subscript. Works in 1.3.7. Does this fix bug 2345? No...should it? Looks completely unrelated to me. ... but the same trick works here too, see patch. Great intuition, thanks! Committed. * math_nestinset.C (MathNestInset::doDispatch): fix bug 2345: C-M on text in math gives an empty mbox - Martin signature.asc Description: This is a digitally signed message part
Re: Cygwin and Mingw incompatibility with -mms-bitfields gcc options
Enrico Forestieri a écrit : Abdelrazak Younes [EMAIL PROTECTED] writes: Success! I managed to compile everything (qt4) without MSYS. There two small problem though: 1) I have to use -sysdir option because the generated executable look for an inexistant directory: $ ./lyx-qt4 Unable to determine the system directory having searched d:/msys/home/yns/lyx/trunk/share/lyx-svn/ Try the '-sysdir' command line parameter or set the environment variable LYX_DIR_14x to the LyX system directory containing the file `chkconfig.ltx'. That also happened to me once, when I tried running LyX in place. However, after installation I had no problems. If I remember correctly, it was immediately after the switch from ...\Resources\lyx to ...\Resources so, perhaps this is the case with you, too. If not, see below. I don't see this problem anymore, so may be it was due to not updated configuration files. 2) I had to hack the source code in order to replace '/tmp' with 'c:/temp' because lyx tells me it cannot write the '/tmp' directory. Except for that I am happy to report that I cannot see any difference with the lyx I generated within MSYS. Except that the executable is smaller (12Mo instead of 19Mo) and that the compilation is faster. This may simply be due to the fact that mingw executables are to be stripped. I don't see any significant difference in size between a mingw and a cygwin LyX. Enrico, if you have any hint for the problems above... Well, if '/tmp' is present in the source code, this is a bug with a native LyX and you have no choice but replacing it with a proper path, probably protecting the change using an #ifdef. I have replace those 'tmp' with 'c:/temp' in the code: [EMAIL PROTECTED] /cygdrive/d/msys/home/yns/lyx/trunk/src $ grep '/tmp' *.[Ch] bufferlist.C: s = AddName(MakeAbsPath(/tmp/), buf-fileName()); lyxrc.C:tempdir_path = /tmp; [EMAIL PROTECTED] /cygdrive/d/msys/home/yns/lyx/trunk/src/support $ grep -r '/tmp' *.[Ch] filetools.C:if (!deflt.empty() deflt != /tmp) { filetools.C:return createTmpDir(/tmp, lyx_tmpdir); filetools.C:return createTmpDir(/tmp, lyx_tmpdir); package.C: return /tmp; package.h: * (Eg /tmp on *nix.) path.h: * Path p(/tmp/blah); path.h:// Path(/tmp); // wrong path.h:// Path p(/tmp); // right Could someone knowledgeable tell me how to fix this cleanly? The temp directory is accessible via the user settings. Why does lyx exits if it doesn't find it? It could instead switch to no-temp directory, couldn't it? But it may be a configuration problem. All cygwin tools use posix syntax by default, so care must be taken when generating Makefiles if they are meant for building a native version of LyX. For example, when invoking 'configure', you should use --prefix=C:/Programs/LyX instead of --prefix=/c/Programs/LyX, but it is safe using --with-extra-prefix=/c/MinGW. Yep I used 'c:/' like syntax. But the --with-extra-prefix never worked for me, with either c:/ or /c/ style. configure just stops telling that it cannot find 'c' directory even though it was there. Another problem can arise when a path is autogenerated by configure. There is some code in the configure script that turns 'C:/Programs/LyX' into '/c/Programs/LyX' (or '/cygdrive/c/Programs/LyX', depending on your settings), so I had to add the following to the sed command I use for modifying configure: # Set locale and data dir in mixed rather than posix format /^ *LYX_ABS_INSTALLED/s/\(^ *\)/\1ac_val=`cygpath -m \\$ac_val\`\n\1/ otherwise I get '/c/Programs/LyX/Resources/locale' hardcoded into the executable instead of 'C:/Programs/LyX/Resources/locale', and the net effect would be that setting LANG to some locale doesn't work. Thinking about it, perhaps this is the reason (hardcoded path) why Angus reports that setting LANG seems not working in mingw builds. Wouldn't it make sense to fix it in svn instead of doing manually the change? I am sure they would accept your patch. However, this is the only problem that I spotted. To be honest there was another one, but it was about the recognition of a multi-threaded Qt. For some reason the default test program used in configure: I have heard about this one from Michael Gerz IIRC. I am using Qt4 so oviously I don't have this problem :-) I think that's all. The native LyX I compile using cygwin is fully functional and until now I have seen no side effects. IMHO cygwin is a much better environment than MSYS and we should switch to that if we manage to fix those problems. Thanks for the help Enrico, Abdel.
[qt4 patch] Dual image/pixmap painting
Hello, I am going to commit this patch if no-one objects. Changelog: * qscreen.[Ch]: - Cursor handing is done on the server - *cursor are QPixmap - Use new drawScreen and copyScreen methods. * QWorkArea.[Ch]: - Pixel manipulation is done on the client - paint_device_ is a QImage - an intermediate Screen device is updated whenever expose is called - sreen_device_ is a QPixmap. This screen_device is the one that is painted on screen in QWorkArea::repaintEvent(). - new update, drawScreen and copyScreen methods. Abdel. Index: D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QLPainter.C === --- D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QLPainter.C(revision 13409) +++ D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QLPainter.C(working copy) @@ -39,22 +39,11 @@ } QLPainter::QLPainter(QWorkArea * qwa) - : Painter(), paint_check_(0), qwa_(qwa) + : Painter(), qwa_(qwa) { } -void QLPainter::start() -{ -} - -void QLPainter::end() -{ -// if (qp_-isActive()) -// qp_-end(); -} - - int QLPainter::paperWidth() const { return qwa_-viewport()-width(); @@ -66,29 +55,6 @@ return qwa_-viewport()-height(); } -/* -QPainter QLPainter::setPen(LColor_color c, - Painter::line_style ls, Painter::line_width lw) -{ - QPen pen = qp_-pen(); - - pen.setColor(lcolorcache.get(c)); - - switch (ls) { - case line_solid: pen.setStyle(Qt::SolidLine); break; - case line_onoffdash: pen.setStyle(Qt::DotLine); break; - } - - switch (lw) { - case line_thin: pen.setWidth(0); break; - case line_thick: pen.setWidth(3); break; - } - - qp_-setPen(pen); - - return *qp_; -} -*/ QPainter QLPainter::setQPainterPen(QPainter qp, LColor_color c, Painter::line_style ls, Painter::line_width lw) { @@ -113,7 +79,7 @@ void QLPainter::point(int x, int y, LColor_color c) { - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); setQPainterPen(qp, c).drawPoint(x, y); } @@ -123,7 +89,7 @@ line_style ls, line_width lw) { - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); setQPainterPen(qp, col, ls, lw).drawLine(x1, y1, x2, y2); } @@ -143,7 +109,7 @@ points[i].setY(yp[i]); } - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); setQPainterPen(qp, col, ls, lw).drawPolyline(points.get(), np); } @@ -153,18 +119,14 @@ line_style ls, line_width lw) { - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); setQPainterPen(qp, col, ls, lw).drawRect(x, y, w, h); } void QLPainter::fillRectangle(int x, int y, int w, int h, LColor_color col) { -// lyxerr[Debug::GRAPHICS] BOOST_CURRENT_FUNCTION -// \nx= x y= y w= w h= h -// LColor col endl; - - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); qp.fillRect(x, y, w, h, lcolorcache.get(col)); } @@ -180,7 +142,7 @@ points[i].setY(yp[i]); } - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); setQPainterPen(qp, col); qp.setBrush(lcolorcache.get(col)); qp.drawPolygon(points.get(), np); @@ -192,7 +154,7 @@ int a1, int a2, LColor_color col) { // LyX usings 1/64ths degree, Qt usings 1/16th - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); setQPainterPen(qp, col).drawArc(x, y, w, h, a1 / 4, a2 / 4); } @@ -205,7 +167,7 @@ fillRectangle(x, y, w, h, LColor::graphicsbg); - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); qp.drawImage(x, y, qlimage.qimage(), 0, 0, w, h); } @@ -234,7 +196,7 @@ QFontMetrics const qfontm = QFontMetrics(qfont); QFontMetrics const qsmallfontm = QFontMetrics(qsmallfont); - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); int tmpx = x; size_t ls = s.length(); for (size_t i = 0; i ls; ++i) { @@ -256,7 +218,7 @@ void QLPainter::text(int x, int y, char const * s, size_t ls, LyXFont const f) { - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); setQPainterPen(qp, f.realColor()); Encoding const * encoding = f.language()-encoding(); @@ -288,8 +250,14 @@ } /// draw a pixmap from the image cache -void QLPainter::pixmap(int x, int y, QPixmap const pixmap) +void QLPainter::drawPixmap(int x, int y, QPixmap const pixmap) { - QPainter qp(qwa_-pixmap()); + QPainter qp(qwa_-paintDevice()); qp.drawPixmap(x, y, pixmap); } + +void QLPainter::drawImage(int x, int y, QImage const image) +{ + QPainter qp(qwa_-paintDevice()); + qp.drawImage(x, y, image);
Re: Cygwin and Mingw incompatibility with -mms-bitfields gcc options
Replying to my self, sorry. After a make install, when executed for its installation directory, the /tmp problem vanished but not the '-sysdir' one: D:\program\lyx-svn\binlyx-svn.exe Unable to determine the system directory having searched D:/program/lyx-svn/share/lyx-svn/ Try the '-sysdir' command line parameter or set the environment variable LYX_DIR_14x to the LyX system director y containing the file `chkconfig.ltx'. So, while it would be nice to be able to execute from compilation directory it is not a major issue for now. Abdel. Abdelrazak Younes a écrit : Enrico Forestieri a écrit : Abdelrazak Younes [EMAIL PROTECTED] writes: Success! I managed to compile everything (qt4) without MSYS. There two small problem though: 1) I have to use -sysdir option because the generated executable look for an inexistant directory: $ ./lyx-qt4 Unable to determine the system directory having searched d:/msys/home/yns/lyx/trunk/share/lyx-svn/ Try the '-sysdir' command line parameter or set the environment variable LYX_DIR_14x to the LyX system directory containing the file `chkconfig.ltx'. That also happened to me once, when I tried running LyX in place. However, after installation I had no problems. If I remember correctly, it was immediately after the switch from ...\Resources\lyx to ...\Resources so, perhaps this is the case with you, too. If not, see below. I don't see this problem anymore, so may be it was due to not updated configuration files. 2) I had to hack the source code in order to replace '/tmp' with 'c:/temp' because lyx tells me it cannot write the '/tmp' directory. Except for that I am happy to report that I cannot see any difference with the lyx I generated within MSYS. Except that the executable is smaller (12Mo instead of 19Mo) and that the compilation is faster. This may simply be due to the fact that mingw executables are to be stripped. I don't see any significant difference in size between a mingw and a cygwin LyX. Enrico, if you have any hint for the problems above... Well, if '/tmp' is present in the source code, this is a bug with a native LyX and you have no choice but replacing it with a proper path, probably protecting the change using an #ifdef. I have replace those 'tmp' with 'c:/temp' in the code: [EMAIL PROTECTED] /cygdrive/d/msys/home/yns/lyx/trunk/src $ grep '/tmp' *.[Ch] bufferlist.C: s = AddName(MakeAbsPath(/tmp/), buf-fileName()); lyxrc.C:tempdir_path = /tmp; [EMAIL PROTECTED] /cygdrive/d/msys/home/yns/lyx/trunk/src/support $ grep -r '/tmp' *.[Ch] filetools.C:if (!deflt.empty() deflt != /tmp) { filetools.C:return createTmpDir(/tmp, lyx_tmpdir); filetools.C:return createTmpDir(/tmp, lyx_tmpdir); package.C: return /tmp; package.h: * (Eg /tmp on *nix.) path.h: * Path p(/tmp/blah); path.h:// Path(/tmp); // wrong path.h:// Path p(/tmp); // right Could someone knowledgeable tell me how to fix this cleanly? The temp directory is accessible via the user settings. Why does lyx exits if it doesn't find it? It could instead switch to no-temp directory, couldn't it? But it may be a configuration problem. All cygwin tools use posix syntax by default, so care must be taken when generating Makefiles if they are meant for building a native version of LyX. For example, when invoking 'configure', you should use --prefix=C:/Programs/LyX instead of --prefix=/c/Programs/LyX, but it is safe using --with-extra-prefix=/c/MinGW. Yep I used 'c:/' like syntax. But the --with-extra-prefix never worked for me, with either c:/ or /c/ style. configure just stops telling that it cannot find 'c' directory even though it was there. Another problem can arise when a path is autogenerated by configure. There is some code in the configure script that turns 'C:/Programs/LyX' into '/c/Programs/LyX' (or '/cygdrive/c/Programs/LyX', depending on your settings), so I had to add the following to the sed command I use for modifying configure: # Set locale and data dir in mixed rather than posix format /^ *LYX_ABS_INSTALLED/s/\(^ *\)/\1ac_val=`cygpath -m \\$ac_val\`\n\1/ otherwise I get '/c/Programs/LyX/Resources/locale' hardcoded into the executable instead of 'C:/Programs/LyX/Resources/locale', and the net effect would be that setting LANG to some locale doesn't work. Thinking about it, perhaps this is the reason (hardcoded path) why Angus reports that setting LANG seems not working in mingw builds. Wouldn't it make sense to fix it in svn instead of doing manually the change? I am sure they would accept your patch. However, this is the only problem that I spotted. To be honest there was another one, but it was about the recognition of a multi-threaded Qt. For some reason the default test program used in configure: I have heard about this one from Michael Gerz IIRC. I am using Qt4 so oviously I don't have this problem :-) I think that's all. The native LyX I
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
John == John Levon [EMAIL PROTECTED] writes: What about a combox with this list of databases (and maybe a browse button near the combox?) John You mean in the first dialog? That would make the dialog pretty John confusing IMO... You are right, this is what happens when trying to give ideas without looking at the document! I think one problem (also with the citation dialog) is that it is designed to add several entries whereas in most cases only one entry is needed. I am not sure however how we could make a dialog that is easy for the common case but still allows the special case of several entries. It could be something like a combox to choose one bib database with a small + on the right. When clicking on +, a second combox appears below the first (with a + at the right to add another one, and a - to delete an entry). JMarc
Re: Cygwin and Mingw incompatibility with -mms-bitfields gcc options
Replying again to myself... Abdelrazak Younes a écrit : Replying to my self, sorry. After a make install, when executed for its installation directory, the /tmp problem vanished but not the '-sysdir' one: D:\program\lyx-svn\binlyx-svn.exe Unable to determine the system directory having searched D:/program/lyx-svn/share/lyx-svn/ Try the '-sysdir' command line parameter or set the environment variable LYX_DIR_14x to the LyX system director y containing the file `chkconfig.ltx'. Actually the path D:/program/lyx-svn/share/lyx-svn/ should be correct, it's just that make install failed to copy the 'lyx-svn' directory for whatever reason: $ ls d:/program/lyx-svn/share locale Abdel.
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak IMHO, the bibtex dialog should be accessible from the Abdelrazak citation dialog. For the matter, I think everything Abdelrazak related to citation should be accessible through the Abdelrazak citation dialog. I do not think a global setting needs to be accessible from a local inset. It is confusing. Abdelrazak Question: Is it possible to make a reference to a bibtex Abdelrazak element as well as a local bibliography element in the Abdelrazak same document? I don't think so. Abdelrazak I think a simple, case-insensitive, search-as-type is more Abdelrazak than enough and more intuitive. A more powerful search Abdelrazak tool dialog could be opened in need of advanced search Abdelrazak (via Ctr+F and/or a search button). Yes. JMarc
Re: Cygwin and Mingw incompatibility with -mms-bitfields gcc options
Abdelrazak Younes wrote: I have replace those 'tmp' with 'c:/temp' in the code: [EMAIL PROTECTED] /cygdrive/d/msys/home/yns/lyx/trunk/src $ grep '/tmp' *.[Ch] bufferlist.C: s = AddName(MakeAbsPath(/tmp/), buf-fileName()); lyxrc.C:tempdir_path = /tmp; [EMAIL PROTECTED] /cygdrive/d/msys/home/yns/lyx/trunk/src/support $ grep -r '/tmp' *.[Ch] filetools.C:if (!deflt.empty() deflt != /tmp) { filetools.C:return createTmpDir(/tmp, lyx_tmpdir); filetools.C:return createTmpDir(/tmp, lyx_tmpdir); package.C: return /tmp; package.h: * (Eg /tmp on *nix.) path.h: * Path p(/tmp/blah); path.h:// Path(/tmp); // wrong path.h:// Path p(/tmp); // right Could someone knowledgeable tell me how to fix this cleanly? /tmp should never be hardcoded, if a temporary directory is needed then package().temp_dir() should be used. Can you please create a patch? The temp directory is accessible via the user settings. Why does lyx exits if it doesn't find it? It could instead switch to no-temp directory, couldn't it? No way. LyX 1.3 did that, and it can lead to overwritten files without warning. LyX needs a temp directory for working, and if you don't have one then something is seriously messed up. Georg
Re: [patch] bug 2322: New bibtex insets don't have style set to plain, it's empty.
Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes: Juergen http://bugzilla.lyx.org/show_bug.cgi?id=2322 As advertised, Juergen the last patch I have in my tree for 1.4.1. I like it. Please apply it to both branch and trunk (I did not test it, but I trust you did). JMarc
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
Jean-Marc Lasgouttes a écrit : Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak IMHO, the bibtex dialog should be accessible from the Abdelrazak citation dialog. For the matter, I think everything Abdelrazak related to citation should be accessible through the Abdelrazak citation dialog. I do not think a global setting needs to be accessible from a local inset. It is confusing. So should we put the handling of multiple bibtex database in the document settings dialog instead? Abdelrazak Question: Is it possible to make a reference to a bibtex Abdelrazak element as well as a local bibliography element in the Abdelrazak same document? I don't think so. IMHO, this is bad. Imagine you have a document with some bibliography elements already inside. If you want to refer to an element inside a bibtex database you have first to convert all your biblio elements first? Abdelrazak I think a simple, case-insensitive, search-as-type is more Abdelrazak than enough and more intuitive. A more powerful search Abdelrazak tool dialog could be opened in need of advanced search Abdelrazak (via Ctr+F and/or a search button). Yes. This is in my long-long todo list then. Maybe next Christmas :-) Abdel.
Re: [Patch] raise/lower selected super/sub -scripts in math
Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin Bit more polished version attached. This one goes in. Log Martin message: I don't see the patch. Also, looking at what got committed, I think you forgot to remove paste() from cursor.h. Finally, I do not like much the name safe_ (don't understand what this means). Combining with the fact that you did not document it, we get code difficult to understand. Apart from that, I'd be favourable to inclusion of this in 1.4.x once it is well tested. JMarc
Re: LyX/Win 1.4.1 pre1
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Lars Gullik Bjønnes wrote: Angus Leeming writes: | Changing subject for advertising reasons... Ok, where is the tar.gz? If this is only a Win test build of 1.4.xSVN then say so. Angus ??? I think you need to get some rest ;-P You could name it lyx-1.4.1-snap20060319 to differentiate it from pre versions which are formal releases of in tar.gz form. JMarc
Re: [Patch] raise/lower selected super/sub -scripts in math
Jean-Marc Lasgouttes wrote: Finally, I do not like much the name safe_ (don't understand what this means). Combining with the fact that you did not document it, we get code difficult to understand. I don't like the existence of safe_. It means blowing up memory usage a lot for formulas. Can't it be passed around as a function argument? Georg
RE: qt4: remove (2nd) add dialog in add bib tex ref dialog
It could be something like a combox to choose one bib database with a small + on the right. When clicking on +, a second combox appears below the first (with a + at the right to add another one, and a - to delete an entry). what is wrong with a simple dialog + an add... push button that pops up a filedialog? who cares if you need to traverse a couple of directories to find the bib file? the point here is that adding the bibtex ref is a one time affair (usually) and not a recurrent task when working on a document. i think that there is no point in being too smart here at the cost of loosing simplicity/transparency. at the moment: 1. insert-LIST/TOCBibtex Bib 2. click add.. 3. click browse 3. go to .bib location 4. click OK 5. select bibtex database in listbox 6. click Add 7. click OK or (but never for me though and i wonder how often for most users) 1. insert-LIST/TOCBibtex Bib 2. click add.. 3. select bibtex database in listbox 4. click Add 5. click OK plus the nuisance of extra dialogs with a simple add... button plus filedialog: 1. insert-LIST/TOCBibtex Bib 2. click add.. 3. go to .bib location 4. click OK 5. click OK simple solutions are so much better edwin
Re: Problem compiling Lyx 1.4. svn
Lars Gullik Bjønnes wrote: 1.5 actually. If you want the base for 1.4.x you have to get svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_1_4_X/ OK, I'll do it again with the right branch. There is a problem with some distributions releases of gcc. I think you have one of those. Is it a gcc 4.0.3 pre-release? Yes. I'm using an uptodate Debian Unstable. gcc -v tells 4.0.3 I've updated the computer yesterday and the gcc package was updated, so LyX was compiled with a compiler a little older. What version of gcc should I use ? And, if I install a different version of gcc, what should I moidify in the makefile to make the compilation process pick the right version ? Cheers, Charles -- http://www.kde-france.org
Re: [Patch] raise/lower selected super/sub -scripts in math
On Mon, 2006-03-20 at 10:39 +0100, Jean-Marc Lasgouttes wrote: Martin == Martin Vermeer [EMAIL PROTECTED] writes: Martin Bit more polished version attached. This one goes in. Log Martin message: I don't see the patch. Oops. Here it is. Also, looking at what got committed, I think you forgot to remove paste() from cursor.h. Grml... yes. Finally, I do not like much the name safe_ (don't understand what this means). Combining with the fact that you did not document it, we get code difficult to understand. Yes, I agree. I inherited the bad name. What would be a better name: save_selection_? Apart from that, I'd be favourable to inclusion of this in 1.4.x once it is well tested. - Martin Index: cursor.C === --- cursor.C (revision 13423) +++ cursor.C (revision 13424) @@ -379,15 +379,6 @@ } -// Don't use this routine. It is erroneous: LFUN_PASTE should be called with -// buffer number, not data to be inserted -- MV 26.02.2006 -void LCursor::paste(string const data) -{ - if (!data.empty()) - dispatch(FuncRequest(LFUN_PASTE, data)); -} - - void LCursor::resetAnchor() { anchor_ = *this; Index: mathed/math_nestinset.C === --- mathed/math_nestinset.C (revision 13423) +++ mathed/math_nestinset.C (revision 13424) @@ -712,6 +712,7 @@ // do superscript if LyX handles // deadkeys recordUndo(cur, Undo::ATOMIC); + safe_ = grabAndEraseSelection(cur); script(cur, true); } break; @@ -883,12 +884,10 @@ // math-insert only handles special math things like matrix. case LFUN_INSERT_MATH: { recordUndo(cur, Undo::ATOMIC); - MathArray ar; - asArray(cmd.argument, ar); - int cell(0); - if (cmd.argument == \\root) - cell = 1; - cur.niceInsert(cmd.argument); + if (cmd.argument == ^ || cmd.argument == _) { + interpret(cur, cmd.argument[0]); + } else + cur.niceInsert(cmd.argument); break; } @@ -1094,6 +1093,9 @@ bool MathNestInset::interpret(LCursor cur, char c) { //lyxerr interpret 2: ' c ' endl; + if (c == '^' || c == '_') + safe_ = grabAndEraseSelection(cur); + cur.clearTargetX(); // handle macroMode @@ -1246,7 +1248,6 @@ } cur.macroModeClose(); - string safe = grabAndEraseSelection(cur); if (asScriptInset() cur.idx() == 0) { // we are in a nucleus of a script inset, move to _our_ script MathScriptInset * inset = asScriptInset(); @@ -1277,9 +1278,9 @@ cur.idx() = 1; cur.pos() = 0; } - //lyxerr pasting 1: safe:\n safe endl; - cur.paste(safe); + //lyxerr inserting 1: safe:\n safe_ endl; + cur.niceInsert(safe_); cur.resetAnchor(); - //lyxerr pasting 2: safe:\n safe endl; + //lyxerr inserting 2: safe:\n safe_ endl; return true; } Index: mathed/math_nestinset.h === --- mathed/math_nestinset.h (revision 13423) +++ mathed/math_nestinset.h (revision 13424) @@ -128,6 +128,8 @@ cells_type cells_; /// if the inset is locked, it can't be entered with the cursor bool lock_; + /// + std::string safe_; }; #endif signature.asc Description: This is a digitally signed message part
Re: Cygwin and Mingw incompatibility with -mms-bitfields gcc options
Georg Baum a écrit : Abdelrazak Younes wrote: I have replace those 'tmp' with 'c:/temp' in the code: [EMAIL PROTECTED] /cygdrive/d/msys/home/yns/lyx/trunk/src $ grep '/tmp' *.[Ch] bufferlist.C: s = AddName(MakeAbsPath(/tmp/), buf-fileName()); lyxrc.C:tempdir_path = /tmp; [EMAIL PROTECTED] /cygdrive/d/msys/home/yns/lyx/trunk/src/support $ grep -r '/tmp' *.[Ch] filetools.C:if (!deflt.empty() deflt != /tmp) { filetools.C:return createTmpDir(/tmp, lyx_tmpdir); filetools.C:return createTmpDir(/tmp, lyx_tmpdir); package.C: return /tmp; package.h: * (Eg /tmp on *nix.) path.h: * Path p(/tmp/blah); path.h:// Path(/tmp); // wrong path.h:// Path p(/tmp); // right Could someone knowledgeable tell me how to fix this cleanly? /tmp should never be hardcoded, if a temporary directory is needed then package().temp_dir() should be used. Can you please create a patch? Attached. It compiles and works fine for me. The temp directory is accessible via the user settings. Why does lyx exits if it doesn't find it? It could instead switch to no-temp directory, couldn't it? No way. LyX 1.3 did that, and it can lead to overwritten files without warning. LyX needs a temp directory for working, and if you don't have one then something is seriously messed up. My patch fixes that anyway. I can now execute lyx from the compilation directory with the '-sysdir' option. But adding a '-t' option for specifying a temp directory would be great. Abdel. Index: D:/msys/home/yns/lyx/trunk/src/bufferlist.C === --- D:/msys/home/yns/lyx/trunk/src/bufferlist.C (revision 13409) +++ D:/msys/home/yns/lyx/trunk/src/bufferlist.C (working copy) @@ -333,7 +333,7 @@ // 3) In /tmp directory. // MakeAbsPath to prepend the current // drive letter on OS/2 - s = AddName(MakeAbsPath(/tmp/), buf-fileName()); + s = AddName(package().temp_dir(), buf-fileName()); s += .emergency; lyxerr ' ' s endl; if (buf-writeFile(s)) { Index: D:/msys/home/yns/lyx/trunk/src/client/client.C === --- D:/msys/home/yns/lyx/trunk/src/client/client.C (revision 13409) +++ D:/msys/home/yns/lyx/trunk/src/client/client.C (working copy) @@ -458,7 +458,7 @@ } -string mainTmp(/tmp); +string mainTmp(package().temp_dir()); int t(vectorchar * const arg) Index: D:/msys/home/yns/lyx/trunk/src/lyxrc.C === --- D:/msys/home/yns/lyx/trunk/src/lyxrc.C (revision 13409) +++ D:/msys/home/yns/lyx/trunk/src/lyxrc.C (working copy) @@ -39,6 +39,7 @@ #include support/lstrings.h #include support/os.h #include support/userinfo.h +#include support/package.h namespace os = lyx::support::os; @@ -209,7 +210,7 @@ print_paper_flag = -t; print_paper_dimension_flag = -T; document_path.erase(); - tempdir_path = /tmp; + tempdir_path = lyx::support::package().temp_dir(); view_dvi_paper_option.erase(); default_papersize = PAPER_DEFAULT; custom_export_format = ps; Index: D:/msys/home/yns/lyx/trunk/src/support/filetools.C === --- D:/msys/home/yns/lyx/trunk/src/support/filetools.C (revision 13409) +++ D:/msys/home/yns/lyx/trunk/src/support/filetools.C (working copy) @@ -405,7 +405,7 @@ string const createLyXTmpDir(string const deflt) { - if (!deflt.empty() deflt != /tmp) { + if (!deflt.empty() deflt != package().temp_dir()) { if (mkdir(deflt, 0777)) { #ifdef __EMX__ Path p(package().user_support()); @@ -417,7 +417,7 @@ return createTmpDir(deflt, lyx_tmpdir); } else { // some other error occured. - return createTmpDir(/tmp, lyx_tmpdir); + return createTmpDir(package().temp_dir(), lyx_tmpdir); } } else return deflt; @@ -425,7 +425,7 @@ #ifdef __EMX__ Path p(package().user_support()); #endif - return createTmpDir(/tmp, lyx_tmpdir); + return createTmpDir(package().temp_dir(), lyx_tmpdir); } }
Re: Cygwin and Mingw incompatibility with -mms-bitfields gcc options
Georg == Georg Baum [EMAIL PROTECTED] writes: bufferlist.C: s = AddName(MakeAbsPath(/tmp/), buf-fileName()); This one is wrong (should use package().temp_dir()), but not the problem you see. buf-lyxrc.C: tempdir_path = /tmp; It seems that this one is overwritten in LyX::init() anyway. Remove it. Georg /tmp should never be hardcoded, if a temporary directory is Georg needed then package().temp_dir() should be used. Can you please Georg create a patch? I think the problem is that LyX is compiled in a cygwin-that-is-not-really-cygwin mode, and it does not understand it. What are the preprocessor macros that say we are in cygwin -mnocygwin mode? This is what we have to test for. JMarc
Re: [patch] bug 2322: New bibtex insets don't have style set to plain, it's empty.
Jean-Marc Lasgouttes wrote: I like it. Please apply it to both branch and trunk (I did not test it, but I trust you did). Yes, I did. And John Spray did as well (on GTK). Jürgen
Re: [Patch] raise/lower selected super/sub -scripts in math
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Jean-Marc Lasgouttes wrote: Finally, I do not like much the name safe_ (don't understand what this means). Combining with the fact that you did not document it, we get code difficult to understand. Georg I don't like the existence of safe_. It means blowing up memory Georg usage a lot for formulas. Can't it be passed around as a Georg function argument? Good point. It should be a variable in the lyx::cap namespace. JMarc
Re: [Patch] raise/lower selected super/sub -scripts in math
On Mon, 2006-03-20 at 10:51 +0100, Georg Baum wrote: Jean-Marc Lasgouttes wrote: Finally, I do not like much the name safe_ (don't understand what this means). Combining with the fact that you did not document it, we get code difficult to understand. I don't like the existence of safe_. It means blowing up memory usage a lot for formulas. Can't it be passed around as a function argument? Probably, yes. I'll give it a try. - Martin signature.asc Description: This is a digitally signed message part
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak So should we put the handling of multiple bibtex database Abdelrazak in the document settings dialog instead? It would be correct in some sense, but the fact is that the place where you insert the bibtex database is the point where the biblio appears in the document. So the information is local. Abdelrazak IMHO, this is bad. Imagine you have a document with some Abdelrazak bibliography elements already inside. If you want to refer Abdelrazak to an element inside a bibtex database you have first to Abdelrazak convert all your biblio elements first? That is how it works. JMarc
Re: LyX/Win 1.4.1 pre1
Lars Gullik Bjønnes [EMAIL PROTECTED] writes: Angus Leeming [EMAIL PROTECTED] writes: | Lars Gullik Bjønnes wrote: | Angus Leeming writes: | | Changing subject for advertising reasons... | Ok, where is the tar.gz? | If this is only a Win test build of 1.4.xSVN then say so. | ??? I think you need to get some rest ;-P | The start of the original post: And now go read the subject. Maybe I'll just f**k off then? Really, I don't see why you're beating me up about something so trivial. And you lost all the messges from the original post when you changed the subject in the followup. Not here I didn't. The gmane web interface threads using the Reference mail header rather than Subject. knode does too. Regards, Angus
RE: qt4: remove (2nd) add dialog in add bib tex ref dialog
Leuven, E. wrote: what is wrong with a simple dialog + an add... push button that pops up a filedialog? who cares if you need to traverse a couple of directories to find the bib file? That is not the main problem IMHO. The main problem is that LyX is currently smart enough to find all .bib files that are available somewhere in the texmf tree. I certainly don't want to enter the full path to a .bib file that I put in my texmf tree in order to be accessible without path. Please consider this when making changes to the bibtex dialog. Georg
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
Georg Baum a écrit : Leuven, E. wrote: what is wrong with a simple dialog + an add... push button that pops up a filedialog? who cares if you need to traverse a couple of directories to find the bib file? That is not the main problem IMHO. The main problem is that LyX is currently smart enough to find all .bib files that are available somewhere in the texmf tree. I certainly don't want to enter the full path to a .bib file that I put in my texmf tree in order to be accessible without path. Please consider this when making changes to the bibtex dialog. An idea: Why not provide this list just below the delete button (or above a lowered Add button), there is enough place and you will have the best of both world. Abdel.
RE: RE: qt4: remove (2nd) add dialog in add bib tex ref dialog
That is not the main problem IMHO. The main problem is that LyX is currently smart enough to find all .bib files that are available somewhere in the texmf tree. I certainly don't want to enter the full path to a .bib file that I put in my texmf tree in order to be accessible without path. Please consider this when making changes to the bibtex dialog. i wonder how many users have the .bib file in the texmf tree in fact, i wonder how many users now what a texmf tree is. actually, *i* wouldn't know where to put it. i have it in a directory (bib) in my homedir, and (2 clicks away) i carry it around on my usb stick... atm i get the choice of the following bibtex databases: amsxport-options mrabbrev plbib test xampl i have no clue what they are, and am not sure i want to see them of course we can be smart (for how many people?), but there is a cost: a more complicated user interface which might even be perceived as confusing. edwin
Re: Cygwin and Mingw incompatibility with -mms-bitfields gcc options
Enrico Forestieri [EMAIL PROTECTED] writes: Using MSYS, I have built the libiconv package suggested by Michael and then gone on to build LyX using --with-included-gettext. configure finds libiconv and the build proceeds happily, but I find that the resulting .exe is unable to change the installed .po (.gmo) dynamically to the local locale. If I understood your message of some time ago correctly, you reported that your essentially-identical cygwin build was able to display a Polish LyX with native Windows LANG. When I read the libiconv/gettext build docs, it seems that the build process is essentially circular. First build gettext, then libiconv, then gettext again. (Or start with libiconv, then gettext, then libiconv again.) So, I suspect that my build doesn't work as advertised because my build is incomplete. Before I invest time and effort into trying out my theory, can you explain in more detail just what you did to get this stuff working? I suspect that this is an hardcoded path problem. The configure script sets LYX_ABS_INSTALLED_LOCALEDIR to the directory $prefix/Resources/locale and then this directory is hardcoded into the executable. So, if LyX is installed in a different place than the $prefix dir, it will be unable to find the files. Noo, there's nothing *wrong* with my build per se. All .po files (actually, the compiled .po files with .gmo extension I think) are found as expected. However, the Polish .po file is encoded using the ISO-? encoding whilst Poles using Windows will be using the CP-1251 encoding or somesuch. My understanding is that we can convert dynamically between the two so long as we have a gettext-aware libiconv (and a libiconv-aware gettext). I seem to remember you stating that this dynamic conversion worked for you using a Cygwin-built LyX. I was trying to find out a little bit more about your setup. Do you use the libiconv and gettext compiled by Cygwin, did you compile your own? Etc, etc... Regards, Angus
Re: [Patch] raise/lower selected super/sub -scripts in math
On Mon, 2006-03-20 at 12:03 +0200, Martin Vermeer wrote: On Mon, 2006-03-20 at 10:51 +0100, Georg Baum wrote: Jean-Marc Lasgouttes wrote: Finally, I do not like much the name safe_ (don't understand what this means). Combining with the fact that you did not document it, we get code difficult to understand. I don't like the existence of safe_. It means blowing up memory usage a lot for formulas. Can't it be passed around as a function argument? Probably, yes. I'll give it a try. That would be this one. Works for me. - Martin Index: cursor.h === --- cursor.h (revision 13408) +++ cursor.h (working copy) @@ -88,8 +88,6 @@ public: // std::string selectionAsString(bool label) const; /// - void paste(std::string const data); - /// std::string currentState(); /// auto-correct mode Index: mathed/math_nestinset.C === --- mathed/math_nestinset.C (revision 13425) +++ mathed/math_nestinset.C (working copy) @@ -712,8 +712,7 @@ void MathNestInset::doDispatch(LCursor // do superscript if LyX handles // deadkeys recordUndo(cur, Undo::ATOMIC); - safe_ = grabAndEraseSelection(cur); - script(cur, true); + script(cur, true, grabAndEraseSelection(cur)); } break; @@ -792,19 +791,19 @@ void MathNestInset::doDispatch(LCursor handleFont(cur, cmd.argument, textnormal); break; - case LFUN_MATH_MODE: + case LFUN_MATH_MODE: { #if 1 // ignore math-mode on when already in math mode if (currentMode() == InsetBase::MATH_MODE cmd.argument == on) break; cur.macroModeClose(); - safe_ = grabAndEraseSelection(cur); + string const save_selection = grabAndEraseSelection(cur); selClearOrDel(cur); //cur.plainInsert(MathAtom(new MathMBoxInset(cur.bv(; cur.plainInsert(MathAtom(new MathBoxInset(mbox))); cur.posLeft(); cur.pushLeft(*cur.nextInset()); - cur.niceInsert(safe_); + cur.niceInsert(save_selection); #else if (currentMode() == InsetBase::TEXT_MODE) { cur.niceInsert(MathAtom(new MathHullInset(simple))); @@ -815,6 +814,7 @@ void MathNestInset::doDispatch(LCursor } #endif break; + } case LFUN_MATH_SIZE: #if 0 @@ -1095,8 +1095,9 @@ void MathNestInset::lfunMouseRelease(LCu bool MathNestInset::interpret(LCursor cur, char c) { //lyxerr interpret 2: ' c ' endl; + string save_selection; if (c == '^' || c == '_') - safe_ = grabAndEraseSelection(cur); + save_selection = grabAndEraseSelection(cur); cur.clearTargetX(); @@ -1206,11 +1207,11 @@ bool MathNestInset::interpret(LCursor // These shouldn't work in text mode: if (currentMode() != MathInset::TEXT_MODE) { if (c == '_') { - script(cur, false); + script(cur, false, save_selection); return true; } if (c == '^') { - script(cur, true); + script(cur, true, save_selection); return true; } if (c == '~') { @@ -1237,7 +1238,8 @@ bool MathNestInset::interpret(LCursor } -bool MathNestInset::script(LCursor cur, bool up) +bool MathNestInset::script(LCursor cur, bool up, string const + save_selection) { // Hack to get \^ and \_ working lyxerr handling script: up: up endl; @@ -1280,9 +1282,9 @@ bool MathNestInset::script(LCursor cur cur.idx() = 1; cur.pos() = 0; } - //lyxerr inserting 1: safe:\n safe_ endl; - cur.niceInsert(safe_); + //lyxerr inserting selection 1:\n save_selection endl; + cur.niceInsert(save_selection); cur.resetAnchor(); - //lyxerr inserting 2: safe:\n safe_ endl; + //lyxerr inserting selection 2:\n save_selection endl; return true; } Index: mathed/math_nestinset.h === --- mathed/math_nestinset.h (revision 13424) +++ mathed/math_nestinset.h (working copy) @@ -110,7 +110,8 @@ protected: /// bool interpret(LCursor cur, char c); /// - bool script(LCursor cur, bool); + bool script(LCursor cur, bool, + std::string const save_selection = std::string()); private: @@ -128,8 +129,6 @@ protected: cells_type cells_; /// if the inset is locked, it can't be entered with the cursor bool lock_; - /// - std::string safe_; }; #endif signature.asc Description: This is a digitally signed message part
Re: Cygwin and Mingw incompatibility with -mms-bitfields gcc options
Jean-Marc Lasgouttes a écrit : Georg == Georg Baum [EMAIL PROTECTED] writes: bufferlist.C: s = AddName(MakeAbsPath(/tmp/), buf-fileName()); This one is wrong (should use package().temp_dir()), but not the problem you see. buf-lyxrc.C: tempdir_path = /tmp; It seems that this one is overwritten in LyX::init() anyway. Remove it. Should I update my patch with this and commit it? Georg /tmp should never be hardcoded, if a temporary directory is Georg needed then package().temp_dir() should be used. Can you please Georg create a patch? I think the problem is that LyX is compiled in a cygwin-that-is-not-really-cygwin mode, and it does not understand it. What are the preprocessor macros that say we are in cygwin -mnocygwin mode? This is what we have to test for. I think there are none in current svn, 'configure' configure for cygwin when executed from there. But it would be great if the same settings as (msys+mingw) were applied (directory structure, etc). Maybe a -with-mingw option? Abdel.
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
Leuven, E. wrote: what is wrong with a simple dialog + an add... push button that pops up a filedialog? who cares if you need to traverse a couple of directories to find the bib file? As Georg wrote, it is conceptually wrong, since LaTeX has a PATH for bibtex files. I admit that lots of people do not add their bibtex files there, but it should be possible nonetheless to select a file from there without entering the whole path. Think of a document that is used on different machines that have different TeX setups. Moreover, I'd like to educate the users to put their files in the path. And I want to have that list immediately, because I always put my bibfiles there. That's probably because I'm working with quite large bibtex files that are used over and over again in articles and books. But that's mainly what bibtex was designed for, wasn't it? Jürgen
qt4: some colors messed up in preferences dialog
Title: qt4: some colors messed up in preferences dialog colornames grey40 etc are not recognized by qt4 and end up black in the preferences dialog. i need the attached patch comments? edwin Index: QPrefsDialog.C === --- QPrefsDialog.C (revision 13423) +++ QPrefsDialog.C (working copy) @@ -44,6 +44,7 @@ #include gettext.h #include LColor.h +#include lcolorcache.h #include controllers/ControlPrefs.h @@ -168,9 +169,8 @@ || lc == LColor::ignore) continue; colors_.push_back(lc); - string const x11name(lcolor.getX11Name(lc)); string const guiname(lcolor.getGUIName(lc)); - QColorItem * ci(new QColorItem(QColor(toqstr(x11name)), + QColorItem * ci(new QColorItem(lcolorcache.get(lc), toqstr(guiname))); colorsModule-lyxObjectsLB-insertItem(ci); }
Re: [Patch] raise/lower selected super/sub -scripts in math
Martin Vermeer wrote: That would be this one. Works for me. I like it a lot more, but have no time to test right now. One minor nitpick: I would spell safe_selection, not save_selection. Georg
Re: qt4: some colors messed up in preferences dialog
Leuven, E. a écrit : colornames grey40 etc are not recognized by qt4 and end up black in the preferences dialog. i need the attached patch comments? This was in my todo list but you were faster ;-) Shall I commit this or do you have RW access now? Abdel edwin Index: QPrefsDialog.C === --- QPrefsDialog.C (revision 13423) +++ QPrefsDialog.C (working copy) @@ -44,6 +44,7 @@ #include gettext.h #include LColor.h +#include lcolorcache.h #include controllers/ControlPrefs.h @@ -168,9 +169,8 @@ || lc == LColor::ignore) continue; colors_.push_back(lc); - string const x11name(lcolor.getX11Name(lc)); string const guiname(lcolor.getGUIName(lc)); - QColorItem * ci(new QColorItem(QColor(toqstr(x11name)), + QColorItem * ci(new QColorItem(lcolorcache.get(lc), toqstr(guiname))); colorsModule-lyxObjectsLB-insertItem(ci); }
Re: LyX/Win 1.4.1 pre1
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Changing subject for advertising reasons... Ok, where is the tar.gz? If this is only a Win test build of 1.4.xSVN then say so. Angus ??? I think you need to get some rest ;-P You could name it lyx-1.4.1-snap20060319 to differentiate it from pre versions which are formal releases of in tar.gz form. Remind me again who suggested I run with this pre tag? http://article.gmane.org/gmane.editors.lyx.devel/55101 I'm kinda putting words in your mouth I knnow, but it does read to me like you're endorsing the idea. Anyway. Whatever. I find that the whole discussion is something of a storm in a tea cup. Sorry for feeling a bit bruised. Off to do some official work... Angus
RE: Re: qt4: some colors messed up in preferences dialog
Shall I commit this or do you have RW access now? i will give it a try edwin
Re: Cygwin and Mingw incompatibility with -mms-bitfields gcc options
Abdelrazak Younes wrote: Jean-Marc Lasgouttes a écrit : buf-lyxrc.C: tempdir_path = /tmp; It seems that this one is overwritten in LyX::init() anyway. Remove it. Should I update my patch with this and commit it? I think so, but you should leave out the changes in createLyXTmpDir(). (chicken and egg problem). The tests for /tmp in createLyXTmpDir() ensure that no attempt is made to create /tmp (if somebody specifies that as temporary directory). One could of course add C:\\TEMP there if that is needed, or maybe invent some more general test. What are the preprocessor macros that say we are in cygwin -mnocygwin mode? This is what we have to test for. I think there are none in current svn, 'configure' configure for cygwin when executed from there. But it would be great if the same settings as (msys+mingw) were applied (directory structure, etc). Maybe a -with-mingw option? I would prefer automatic detection. Are you sure that gcc does not have some define that is set with -mnocygwin? Georg
Re: [Patch] raise/lower selected super/sub -scripts in math
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Martin Vermeer wrote: That would be this one. Works for me. Georg I like it a lot more, but have no time to test right now. One Georg minor nitpick: I would spell safe_selection, not Georg save_selection. What is safe about it? JMarc
Re: [patch] bug 2322: New bibtex insets don't have style set to plain, it's empty.
Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes: Juergen Jean-Marc Lasgouttes wrote: I like it. Please apply it to both branch and trunk (I did not test it, but I trust you did). Juergen Yes, I did. And John Spray did as well (on GTK). Very goo. JMarc
Re: LyX/Win 1.4.1 pre1
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus I'm kinda putting words in your mouth I knnow, but it does read Angus to me like you're endorsing the idea. Yes, and I did not object to the name at the time. But I am able to recognize a valid objection when I see one... Angus Anyway. Whatever. I find that the whole discussion is something Angus of a storm in a tea cup. Sorry for feeling a bit bruised. You should make sure you do not keep your tea cup too close to yourself. If a storm happens to start in there, there is indeed a big risk of getting burnt ;) JMarc
Re: Cygwin and Mingw incompatibility with -mms-bitfields gcc options
Georg Baum a écrit : Abdelrazak Younes wrote: Jean-Marc Lasgouttes a écrit : buf-lyxrc.C: tempdir_path = /tmp; It seems that this one is overwritten in LyX::init() anyway. Remove it. Should I update my patch with this and commit it? I think so, but you should leave out the changes in createLyXTmpDir(). (chicken and egg problem). The tests for /tmp in createLyXTmpDir() ensure that no attempt is made to create /tmp (if somebody specifies that as temporary directory). One could of course add C:\\TEMP there if that is needed, or maybe invent some more general test. OK. New patch attached. /tmp works in windows when called from c/c++. It just create a tmp drive at the root of the current drive. In my case D:/tmp. So there's no problem here. What are the preprocessor macros that say we are in cygwin -mnocygwin mode? This is what we have to test for. I think there are none in current svn, 'configure' configure for cygwin when executed from there. But it would be great if the same settings as (msys+mingw) were applied (directory structure, etc). Maybe a -with-mingw option? I would prefer automatic detection. Are you sure that gcc does not have some define that is set with -mnocygwin? I have to confess that I am not using this option. I have just put mingw path before cygwin path in my environment (I don't have cygwin gcc installed). AFAIK this is exactly the same as the -mnocygwin option. Abdel. Index: D:/msys/home/yns/lyx/trunk/src/bufferlist.C === --- D:/msys/home/yns/lyx/trunk/src/bufferlist.C (revision 13409) +++ D:/msys/home/yns/lyx/trunk/src/bufferlist.C (working copy) @@ -333,7 +333,7 @@ // 3) In /tmp directory. // MakeAbsPath to prepend the current // drive letter on OS/2 - s = AddName(MakeAbsPath(/tmp/), buf-fileName()); + s = AddName(package().temp_dir(), buf-fileName()); s += .emergency; lyxerr ' ' s endl; if (buf-writeFile(s)) { Index: D:/msys/home/yns/lyx/trunk/src/client/client.C === --- D:/msys/home/yns/lyx/trunk/src/client/client.C (revision 13409) +++ D:/msys/home/yns/lyx/trunk/src/client/client.C (working copy) @@ -458,7 +458,7 @@ } -string mainTmp(/tmp); +string mainTmp(package().temp_dir()); int t(vectorchar * const arg) Index: D:/msys/home/yns/lyx/trunk/src/lyxrc.C === --- D:/msys/home/yns/lyx/trunk/src/lyxrc.C (revision 13409) +++ D:/msys/home/yns/lyx/trunk/src/lyxrc.C (working copy) @@ -209,7 +209,6 @@ print_paper_flag = -t; print_paper_dimension_flag = -T; document_path.erase(); - tempdir_path = /tmp; view_dvi_paper_option.erase(); default_papersize = PAPER_DEFAULT; custom_export_format = ps;
RE: qt4: remove (2nd) add dialog in add bib tex ref dialog
shortcut to the root directory of the bibtex bib tree in the filedialog + stripping of directories if the database is located there would solve some of these problems? edwin -Original Message- From: Juergen Spitzmueller [mailto:[EMAIL PROTECTED] Sent: Mon 20-Mar-06 11:39 To: lyx-devel@lists.lyx.org Subject: Re: qt4: remove (2nd) add dialog in add bib tex ref dialog Leuven, E. wrote: what is wrong with a simple dialog + an add... push button that pops up a filedialog? who cares if you need to traverse a couple of directories to find the bib file? As Georg wrote, it is conceptually wrong, since LaTeX has a PATH for bibtex files. I admit that lots of people do not add their bibtex files there, but it should be possible nonetheless to select a file from there without entering the whole path. Think of a document that is used on different machines that have different TeX setups. Moreover, I'd like to educate the users to put their files in the path. And I want to have that list immediately, because I always put my bibfiles there. That's probably because I'm working with quite large bibtex files that are used over and over again in articles and books. But that's mainly what bibtex was designed for, wasn't it? Jürgen
Re: LyX/Win 1.4.1 pre1
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Angus Anyway. Whatever. I find that the whole discussion is something Angus of a storm in a tea cup. Sorry for feeling a bit bruised. You should make sure you do not keep your tea cup too close to yourself. If a storm happens to start in there, there is indeed a big risk of getting burnt ;) Burnt and liquids just sounds wrong. You should use scalded. The OED defines scald as. v.tr. 1 burn (the skin etc.) with hot liquid of steam. n. 1 a burn etc. caused by scalding. Here endeth the lesson :) Angus
Re: [Patch] raise/lower selected super/sub -scripts in math
On Mon, 2006-03-20 at 11:37 +0100, Georg Baum wrote: Martin Vermeer wrote: That would be this one. Works for me. I like it a lot more, but have no time to test right now. One minor nitpick: I would spell safe_selection, not save_selection. I would not ;-) I like it a lot more... where does it still fall short? - Martin signature.asc Description: This is a digitally signed message part
Re: [patch] bug 2322: New bibtex insets don't have style set to plain, it's empty.
Jean-Marc == Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes: Juergen Jean-Marc Lasgouttes wrote: I like it. Please apply it to both branch and trunk (I did not test it, but I trust you did). Juergen Yes, I did. And John Spray did as well (on GTK). Jean-Marc Very goo. Hmm. Very good. JMarc
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
Leuven, E. a écrit : shortcut to the root directory of the bibtex bib tree in the filedialog + stripping of directories if the database is located there would solve some of these problems? This is a good compromise IMHO. And it would educate the user at where to put these bib file in the first place. Abdel.
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
Also sprach Leuven, E.: shortcut to the root directory of the bibtex bib tree in the filedialog + stripping of directories if the database is located there would solve some of these problems? No. I don't want to browse there. I want to select my files instantly. LaTeX provides the feature of searching the paths for me, and I want to use that. I have divided my bibliography into several small pieces (thematically). I have about 15 bib databases with ~4000 entries in my path. Usually, I don't chose one, but several of them for a document, depending on the topic. I don't want to browse through the dirs everytime. I really don't understand why you insist on remving a functionality, just because you don't need it personally. I never used browsing for bib files, but I would never vote for removing it. I think the best solution is probably, as Abdel recommended, to have two buttons instead of one in the bibtex dialog: Browse (through directory) and Select (from the bst file list). Jürgen
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
Abdelrazak Younes wrote: shortcut to the root directory of the bibtex bib tree in the filedialog + stripping of directories if the database is located there would solve some of these problems? This is a good compromise IMHO. And it would educate the user at where to put these bib file in the first place. but the good thing is that you can have several different directories in the path, at least a personal and a global one, but also (as I do) different ones for different topics. Jürgen
Re: LyX/Win 1.4.1 pre1
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Burnt and liquids just sounds wrong. You should use Angus scalded. I have to admit I have never seen this word. Do people really use it in normal discussion? Thanks for the lesson. JMarc
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
Juergen Spitzmueller a écrit : Abdelrazak Younes wrote: shortcut to the root directory of the bibtex bib tree in the filedialog + stripping of directories if the database is located there would solve some of these problems? This is a good compromise IMHO. And it would educate the user at where to put these bib file in the first place. but the good thing is that you can have several different directories in the path, at least a personal and a global one, but also (as I do) different ones for different topics. OK, I'll shut up. I obviously don't know what I am takking about :-) Abdel.
Re: qt4: some colors messed up in preferences dialog
Leuven, E. a écrit : Shall I commit this or do you have RW access now? i will give it a try Go ahead, it works great! Nice job for a two lines fix :-) Thanks, Abdel.
Re: LyX/Win 1.4.1 pre1
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Angus Burnt and liquids just sounds wrong. You should use Angus scalded. I have to admit I have never seen this word. Do people really use it in normal discussion? Yes. When it comes to burning and liquids, people really do say scald. Thanks for the lesson. No worries. My own language skills are so poor that it's a real pleasure to help improve those of others :) A.
Re: Question about Patch submission and commit
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Martin Vermeer wrote: svndiff='svn diff --diff-cmd /usr/bin/diff -x -up' alias grepfunc='egrep \(Index:\|^@@\)' Angus $ svndiff -r 13397 svndiff.txt $ sh svndiff.sh svndiff.txt It works pretty well, except that I need the following trivial patch to see the function name: @@ -28,7 +28,7 @@ /^@@/{ s/^@@[EMAIL PROTECTED]@@ *// # Strip the return type of the function. -s/[^ ]\{1,\} *// +s/[^ ]\{1,\} +// # Strip the argument list s/ *(.*// # Wrap the function name in parentheses and append a colon Is it just me? JMarc
Re: LyX/Mac bundle changes
Bennett == Bennett Helm [EMAIL PROTECTED] writes: Bennett (Note my question in the other thread Bennett http://www.mail-archive.com/ Bennett lyx-devel@lists.lyx.org/msg86805.html: should the source for Bennett this (as an XCode project) go into the LyX source? I'd be Bennett happier if others more knowledgeable than I reviewed it. ... Bennett Sorry if I shouldn't have created a new thread for this) Did I ever answer? I think the source would be better in the source, and that automatic building would be even better. You can maybe find someone knowledgeable enough to do it... JMarc
Re: Focus not returned to text after insert
Daniel == Daniel Watkins [EMAIL PROTECTED] writes: Daniel This is exactly what I just posted to lyx-users, but in the Daniel intended list this time. :p Daniel Using 1.4.0svn of a couple of days ago, whenever I try to Daniel insert anything that is on the first level of the Insert menu Daniel (i.e. 'Insert Footnote' as opposed to 'Insert Note ...') Daniel using the keyboard, focus is not returned to the text window Daniel after the item is inserted. For example, were I to use 'M-i f' Daniel to insert a footnote and then typed 'f', the File menu would Daniel be opened. Is that under windows? JMarc
Re: LyX/Win 1.4.1 pre1
On Monday 20 March 2006 11:13, Jean-Marc Lasgouttes wrote: I have to admit I have never seen this word. Do people really use it in normal discussion? Don't you have this word (or similar) in French? This comes from Latin, we have it in Portuguese. Something like this old saying: Scalded cat of cold water is afraid Thanks for the lesson. JMarc -- José Abílio
Re: [patch] fix bug 2380 (Pasting external material into table causes seg fault)
Georg Baum wrote: The patch has been tested by Simon, and it works. Is it OK for trunk and 1.4? I can confirm that it works. And I think it should go in 1.4.1. It's also a prerequisite for a patch I have to make pasteselection of tabulator-separated contents (e.g. from spreadsheets or a second LyX instance) from the clipboard to tabular work again. Jürgen
Re: Problems trying to implement preview selection.
John == John McCabe-Dansted [EMAIL PROTECTED] writes: John - If you open a new file, and then close it, John you will not return to the original file but to file #1. When John you have 18 documents open, manually returning to the file you John were working on is a nuisance. Is this one in bugzilla? It is a real nuisance and should be nearly trivial to fix. JMarc
Re: 1.4.0 repeatable crashes when scrolling
Jean-Marc Lasgouttes wrote: Rex == Rex Dieter [EMAIL PROTECTED] writes: Rex Neal Becker wrote: Jose' Matos wrote: On Thursday 09 March 2006 13:08, Neal Becker wrote: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=184508 Rex If anyone is curious, the report above includes a backtrace, with Rex many boost references: Does it depend on whether the images in the user guide are already loaded? How can I tell?
Re: Question about Patch submission and commit
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: It works pretty well, except that I need the following trivial patch to see the function name: -s/[^ ]\{1,\} *// +s/[^ ]\{1,\} +// Interesting. I take it you were matching too much stuff? If you're going to use +, then that may as well be written: s/[^ ]+ +// Angus
RE: Re: qt4: some colors messed up in preferences dialog
Go ahead, it works great! will do that tonight because i am behind a firewall btw, does anyone know whether there is a way to svn update from behind a firewall? Nice job for a two lines fix :-) took me a while to trace down though...
Re: qt4: some colors messed up in preferences dialog
Leuven, E. a écrit : Go ahead, it works great! will do that tonight because i am behind a firewall btw, does anyone know whether there is a way to svn update from behind a firewall? I had the same problem. Svn use https so if your firewall provide an https proxy you have to configure it. It worked for me. Nice job for a two lines fix :-) took me a while to trace down though... That's maybe the reason why I wasn't able to trace it down... Abdel.
[Qt4 bug] Branches dialog, small issue with alter color
Hello, There are a number of bugs that need to be fixed in the qt4 frontend. Inspired by Edwin recent bug fixing activity I thought it might be a good idea to report them in case someone wants to fix them. I would like to enter them in bugzilla also but there are no frontend-qt4 component there. How do I create one? Here is the first bug: When you click the Alter button on a added branch in Document Settings/Branches Dialog, clicking on the palette on the right to select a color won't work (selected color stays black). After selecting a color from the Basic Colors or the Custon colors (which works fine), the color selection from the palette will work correctly. The bug relies most surely in QBranches::on_colorPB_clicked() and more exactly on the QColorDialog call. Abdel.
Re: qt4: some colors messed up in preferences dialog
Abdelrazak Younes a écrit : Leuven, E. a écrit : btw, does anyone know whether there is a way to svn update from behind a firewall? I had the same problem. Svn use https so if your firewall provide an https proxy you have to configure it. It worked for me. And of course the ssh ports must be opened if you want to commit. Abdel.
RE: Re: qt4: some colors messed up in preferences dialog
no https proxy here, so i guess it will need to wait until tonight (if you don't beat me to it) thanks, edwin
Re: [Patch] raise/lower selected super/sub -scripts in math
Martin Vermeer wrote: On Mon, 2006-03-20 at 11:37 +0100, Georg Baum wrote: I like it a lot more, but have no time to test right now. One minor nitpick: I would spell safe_selection, not save_selection. I would not ;-) On further reflection you are right. It seems that repeated reading of safe where actually save was meant had some influence on my english skills :-( I like it a lot more... where does it still fall short? Does this sound as if it has flaws? That was not intended at all. Georg
Re: Problem compiling Lyx 1.4. svn
Charles de Miramon wrote: Answering my own questions ... What version of gcc should I use ? gcc 3.3 works And, if I install a different version of gcc, what should I moidify in the makefile to make the compilation process pick the right version ? Before make, type export CC=gcc-3.3 export CXX=g++-3.3 Cheers, Charles -- http://www.kde-france.org
Re: qt4: some colors messed up in preferences dialog
Leuven, E. wrote: colornames grey40 etc are not recognized by qt4 and end up black in the preferences dialog. i need the attached patch comments? Why does it work in qt2? It looks to me as if the same fix should also be needed for qt2. Georg
RE: Re: qt4: some colors messed up in preferences dialog
Why does it work in qt2? because color name handling apparently changed in qt4: A name from the list of colors defined in the list of SVG color keyword names provided by the World Wide Web Consortium; for example, steelblue or gainsboro. These color names work on all platforms. whereas in qt3 it reads: A name from the X color database (rgb.txt) (e.g. steelblue or gainsboro). These color names also work under Windows.
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
On Mon, Mar 20, 2006 at 12:12:06PM +0100, Juergen Spitzmueller wrote: I think the best solution is probably, as Abdel recommended, to have two buttons instead of one in the bibtex dialog: Browse (through directory) and Select (from the bst file list). It's too confusing. How about a multi-selection list box showing all the found bibtex's by default. A Browse... button would do the browsing: Databases * -- |*foo** /\ | Browse... | | bar || |*baz***|| ... . .... | \/ -- regards john
Re: qt4: some colors messed up in preferences dialog
Georg Baum a écrit : Leuven, E. wrote: colornames grey40 etc are not recognized by qt4 and end up black in the preferences dialog. i need the attached patch comments? Why does it work in qt2? It looks to me as if the same fix should also be needed for qt2. No, because Qt2/3 version of QColor did recognize X11 string names, while Qt4 doesn't. When passed a string, QColor want this: void QColor::setNamedColor ( const QString name ) Sets the RGB value of this QColor to name, which may be in one of these formats: #RGB (each of R, G, and B is a single hex digit) #RRGGBB #RRRGGGBBB # A name from the list of colors defined in the list of SVG color keyword names provided by the World Wide Web Consortium; for example, steelblue or gainsboro. These color names work on all platforms. transparent - representing the absence of a color. The color is invalid if name cannot be parsed. Abdel.
Re: 1.4.0 repeatable crashes when scrolling
Jean-Marc Lasgouttes wrote: Rex == Rex Dieter [EMAIL PROTECTED] writes: Rex Neal Becker wrote: Jose' Matos wrote: On Thursday 09 March 2006 13:08, Neal Becker wrote: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=184508 Rex If anyone is curious, the report above includes a backtrace, with Rex many boost references: Does it depend on whether the images in the user guide are already loaded? Dunno, I've been unable to reproduce, since I don't have any fc5 box available (yet). I'd suggest adding your question to the bugzilla report referenced. -- Rex
Re: [Qt4 bug] Branches dialog, small issue with alter color
On Mon, Mar 20, 2006 at 01:14:40PM +0100, Abdelrazak Younes wrote: There are a number of bugs that need to be fixed in the qt4 frontend. Inspired by Edwin recent bug fixing activity I thought it might be a good idea to report them in case someone wants to fix them. I would like to enter them in bugzilla also but there are no frontend-qt4 component there. How do I create one? Just ask. It's there now. john
RE: qt4: remove (2nd) add dialog in add bib tex ref dialog
How about a multi-selection list box showing all the found bibtex's by default. A Browse... button would do the browsing: so this gets rid of the 2nd dialog and shows in the list box the databases that are selected i like this much better (would checkboxes be clearer than highlighted items?)
Re: [Qt4 bug] Branches dialog, small issue with alter color
John Levon a écrit : On Mon, Mar 20, 2006 at 01:14:40PM +0100, Abdelrazak Younes wrote: There are a number of bugs that need to be fixed in the qt4 frontend. Inspired by Edwin recent bug fixing activity I thought it might be a good idea to report them in case someone wants to fix them. I would like to enter them in bugzilla also but there are no frontend-qt4 component there. How do I create one? Just ask. It's there now. Thanks, Abdel
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
John Levon a écrit : On Mon, Mar 20, 2006 at 12:12:06PM +0100, Juergen Spitzmueller wrote: I think the best solution is probably, as Abdel recommended, to have two buttons instead of one in the bibtex dialog: Browse (through directory) and Select (from the bst file list). It's too confusing. How about a multi-selection list box showing all the found bibtex's by default. A Browse... button would do the browsing: Hum that's exactly what I proposed ;-) Abdel.
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
On Mon, Mar 20, 2006 at 01:45:47PM +0100, Leuven, E. wrote: How about a multi-selection list box showing all the found bibtex's by default. A Browse... button would do the browsing: i like this much better (would checkboxes be clearer than highlighted items?) I don't think so no. Now we just have to deal with the much harder citation dialog :) regards john
Re: [Qt4 bug] Branches dialog, small issue with alter color
John Levon a écrit : On Mon, Mar 20, 2006 at 01:14:40PM +0100, Abdelrazak Younes wrote: There are a number of bugs that need to be fixed in the qt4 frontend. Inspired by Edwin recent bug fixing activity I thought it might be a good idea to report them in case someone wants to fix them. I would like to enter them in bugzilla also but there are no frontend-qt4 component there. How do I create one? Just ask. It's there now. We need also a 1.5.0svn version. And maybe also a 1.4.1svn? Abdel.
Re: 1.4.0 repeatable crashes when scrolling
Neal == Neal Becker [EMAIL PROTECTED] writes: Does it depend on whether the images in the user guide are already loaded? Neal How can I tell? If you scroll carefully enough to the images of the UserGudie and wait until they all rendered, can you still trigger the crash by scrolling around? This of course supposes that images are the problem (some comments in the bug report suggest that). JMarc
Re: Question about Patch submission and commit
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: It works pretty well, except that I need the following trivial patch to see the function name: -s/[^ ]\{1,\} *// +s/[^ ]\{1,\} +// Angus Interesting. I take it you were matching too much stuff? Yes. I attach the offending patch. Angus If you're going to use +, then that may as well be written: Angus s/[^ ]+ +// Indeed. JMarc Index: src/frontends/qt2/QWorkArea.C === --- src/frontends/qt2/QWorkArea.C (revision 13425) +++ src/frontends/qt2/QWorkArea.C (working copy) @@ -62,7 +62,8 @@ QWorkArea::QWorkArea(LyXView , int, int content_-show(); - content_-setBackgroundColor(lcolorcache.get(LColor::background)); + // It is said that this helps reduce flicker + content_-setBackgroundMode(NoBackground); QHBoxLayout * vl = new QHBoxLayout(this); vl-addWidget(content_, 5);
Re: Qt4 frontend
Martin Vermeer a écrit : On Fri, Mar 17, 2006 at 04:21:16PM +0200, Martin Vermeer wrote: On Fri, Mar 17, 2006 at 02:49:13PM +0100, Abdelrazak Younes wrote: ... Actually with your first patch, if you open a document, type Ctrl+end, then only half of of screen is redrawn :-) And if you open a new document (ctrl+n), the bottom part of the area is not drawn. Same with the second patch. The reason is that the grey areas that are correctly drawn in paintText, are never exposed. I know how to do it, it's easy... have to run now. Here is the fix for the end-of-document problem. Are you going to apply this patch to trunk Martin? It works fine here. Abdel.
Re: [Patch] raise/lower selected super/sub -scripts in math
On Mon, 2006-03-20 at 13:24 +0100, Georg Baum wrote: Martin Vermeer wrote: On Mon, 2006-03-20 at 11:37 +0100, Georg Baum wrote: I like it a lot more, but have no time to test right now. One minor nitpick: I would spell safe_selection, not save_selection. I would not ;-) On further reflection you are right. It seems that repeated reading of safe where actually save was meant had some influence on my english skills :-( I like it a lot more... where does it still fall short? Does this sound as if it has flaws? That was not intended at all. Just wanted to make sure no further changes were called for before committing... I will commit this then. - Martin signature.asc Description: This is a digitally signed message part
Re: 1.4.0 repeatable crashes when scrolling
On Monday 20 March 2006 8:16 am, Jean-Marc Lasgouttes wrote: Neal == Neal Becker [EMAIL PROTECTED] writes: Does it depend on whether the images in the user guide are already loaded? Neal How can I tell? If you scroll carefully enough to the images of the UserGudie and wait until they all rendered, can you still trigger the crash by scrolling around? This of course supposes that images are the problem (some comments in the bug report suggest that). Happens repeatably every time I get to section 4.3. Doesn't matter if I page down slowly.
Re: [Qt4 bug] Branches dialog, small issue with alter color
Abdelrazak Younes a écrit : Here is the first bug: When you click the Alter button on a added branch in Document Settings/Branches Dialog, clicking on the palette on the right to select a color won't work (selected color stays black). After selecting a color from the Basic Colors or the Custon colors (which works fine), the color selection from the palette will work correctly. The bug relies most surely in QBranches::on_colorPB_clicked() and more exactly on the QColorDialog call. And here is the fix. The problems lies in that the QColor() constructor produces an invalid color (RGB 0,0,0). I am going to commit that for qt4. This bug is also present in qt2 but I am not sure the same fix applies. I have chosen lightskyblue as the default color for a branch. Is it OK? Abdel. Index: D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QBranches.C === --- D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QBranches.C(revision 13409) +++ D:/msys/home/yns/lyx/trunk/src/frontends/qt4/QBranches.C(working copy) @@ -153,7 +153,7 @@ if (selItem != 0) sel_branch = selItem-text(0); if (!sel_branch.isEmpty()) { - QColor initial; + QColor initial(lightskyblue); string current_branch = fromqstr(sel_branch); Branch * branch = branchlist_.find(current_branch);
Re: [patch] fix bug 2380 (Pasting external material into table causes seg fault)
Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes: Juergen Georg Baum wrote: The patch has been tested by Simon, and it works. Is it OK for trunk and 1.4? Juergen I can confirm that it works. And I think it should go in Juergen 1.4.1. It's also a prerequisite for a patch I have to make Juergen pasteselection of tabulator-separated contents (e.g. from Juergen spreadsheets or a second LyX instance) from the clipboard to Juergen tabular work again. Hmm, considering that Georg's solution is not particularly pretty (not your fault Georg, it is due to the need for this viewcache), wouldn't the following trivial patch be simpler? Or is it really too trivial to be good? I understands it sprinkles more of this setViewCache badness, but at least it is something easy to spot and nuke when/if we find a better way. JMarc Index: src/insets/insettabular.C === --- src/insets/insettabular.C (revision 13424) +++ src/insets/insettabular.C (working copy) @@ -1937,6 +1937,7 @@ bool InsetTabular::insertAsciiString(Buf if (cell cells op len) { shared_ptrInsetText inset = loctab-getCellInset(cell); Paragraph par = inset-text_.getPar(0); + inset-setViewCache(bv); LyXFont const font = inset-text_.getFont(par, 0); inset-setText(buf.substr(op, len - op), font); }
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
John Levon wrote: It's too confusing. people would get used to it. How about a multi-selection list box showing all the found bibtex's by default. A Browse... button would do the browsing I hate to be a PITA, but I'm not convinced. Look, I have currently more than 100 bib files in that list (lots from the TeXLive distribution, and my own). Checking which one are selected would be difficult. There must be a solution where only the selected databases are visible (I would be fine with a show only selected toggle or somesuch). Jürgen
Re: LyX/Win 1.4.1 pre1
Jose' == Jose' Matos [EMAIL PROTECTED] writes: Jose' On Monday 20 March 2006 11:13, Jean-Marc Lasgouttes wrote: I have to admit I have never seen this word. Do people really use it in normal discussion? Jose' Don't you have this word (or similar) in French? Jose' This comes from Latin, we have it in Portuguese. Jose' Something like this old saying: Scalded cat of cold water is Jose' afraid Chat échaudé craint l'eau froide. I never realized that échaudé actually meant that, probably because nobody uses it in literal sense (except maybe in some specialized fields). JMarc
Re: 1.4.0 repeatable crashes when scrolling
Neal == Neal Becker [EMAIL PROTECTED] writes: Neal Happens repeatably every time I get to section 4.3. Doesn't Neal matter if I page down slowly. And do you get to see images without crashing in some cases? (other documents, whatever?) JMarc
Re: [Qt4 bug] Branches dialog, small issue with alter color
Abdelrazak == Abdelrazak Younes [EMAIL PROTECTED] writes: Abdelrazak We need also a 1.5.0svn version. And maybe also a Abdelrazak 1.4.1svn? We never introduce bugs in 1.4xsvn versions :) Or at least if this happens, they should be fixed quickly enough that there is no need to report a bug. JMarc
Re: 1.4.0 repeatable crashes when scrolling
On Monday 20 March 2006 8:42 am, Jean-Marc Lasgouttes wrote: Neal == Neal Becker [EMAIL PROTECTED] writes: Neal Happens repeatably every time I get to section 4.3. Doesn't Neal matter if I page down slowly. And do you get to see images without crashing in some cases? (other documents, whatever?) Yes. I had been writing a paper and had displayed images many times without crashing. After my paper progressed to a certain point it now always crashes. Not exactly sure what the last changes were, but I think it was adding more figures.
Re: [Qt4 bug] Branches dialog, small issue with alter color
Abdelrazak Younes a écrit : Abdelrazak Younes a écrit : Here is the first bug: When you click the Alter button on a added branch in Document Settings/Branches Dialog, clicking on the palette on the right to select a color won't work (selected color stays black). After selecting a color from the Basic Colors or the Custon colors (which works fine), the color selection from the palette will work correctly. The bug relies most surely in QBranches::on_colorPB_clicked() and more exactly on the QColorDialog call. And here is the fix. The problems lies in that the QColor() constructor produces an invalid color (RGB 0,0,0). I am going to commit that for qt4. This bug is also present in qt2 but I am not sure the same fix applies. I have chosen lightskyblue as the default color for a branch. Is it OK? Here is the fix to qt2, I will not commit this because I haven't tested it. Abdel. Index: D:/msys/home/yns/lyx/trunk/src/frontends/qt2/QDocumentDialog.C === --- D:/msys/home/yns/lyx/trunk/src/frontends/qt2/QDocumentDialog.C (revision 13409) +++ D:/msys/home/yns/lyx/trunk/src/frontends/qt2/QDocumentDialog.C (working copy) @@ -503,7 +503,7 @@ if (selItem != 0) sel_branch = selItem-text(0); if (sel_branch) { - QColor initial; + QColor initial(lightskyblue); string current_branch = fromqstr(sel_branch); Branch * branch = form_-branchlist_.find(current_branch);
Re: [patch] fix bug 2380 (Pasting external material into table causes seg fault)
Jean-Marc Lasgouttes wrote: Or is it really too trivial to be good? Seems to fix the crashes at least. Jürgen
Re: Question about Patch submission and commit
Jean-Marc Lasgouttes writes: It works pretty well, except that I need the following trivial patch to see the function name: -s/[^ ]\{1,\} *// +s/[^ ]\{1,\} +// Angus Interesting. I take it you were matching too much stuff? Yes. I attach the offending patch. Ahhh. I didn't think about constructors. Given that s/[^ ]+ +// is meant to remove the return type, I think that the best solution would be to be explicit: # If the function has a return type (ie, it's not a c-tor or d-tor) # then strip off this return type. # Below, r indicates the regex matching the return type # and n indicates the reges matching the function name. # rn s/[^ ]+ +\([^ ]+\) *(/\1(/ # Strip any leading whitespace from the function name. # This test will do nothing if the test above succeeded. # It will, however, strip whitespace from in front of a c-tor. s/^ *// Of course, if you're worried about the redundancy of the second test for functions that *do* have a return type, you could write the above as: s/[^ ]+ +\([^ ]+\) *(/\1(/ tcont s/^ *// : cont Regards, Angus
Re: [patch] fix bug 2380 (Pasting external material into table causes seg fault)
Juergen == Juergen Spitzmueller [EMAIL PROTECTED] writes: Juergen Jean-Marc Lasgouttes wrote: Or is it really too trivial to be good? Juergen Seems to fix the crashes at least. Is it enough for your other bug? JMarc
Re: Question about Patch submission and commit
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Of course, if you're worried about the redundancy of the second Angus test for functions that *do* have a return type, you could Angus write the above as: I am not worried about anything, as long as it works. Thanks. JMarc
Re: [patch] fix bug 2380 (Pasting external material into table causes seg fault)
Jean-Marc Lasgouttes wrote: Juergen Seems to fix the crashes at least. Is it enough for your other bug? I tested only wrt that bug (2394). I couldn't get LyX crashing with your fix applied. However, I didn't test other cases that might be relevant wrt to the original bug (2380). (I feared that LyX could still crash because you set the ViewCache inside insertAsciiString, which is not always used by pasteselection. But in fact, it doesn't) Jürgen
[another PATCH] Re: [PATCH] bug 2313: Save should be disabled for unchanged documents
John == John McCabe-Dansted [EMAIL PROTECTED] writes: Sure, the extra trouble only ever occur for power users. John Perhaps we could have a new minibuffer command save-unchanged John which would save the document even if it is unchanged. Such John power users could replace save with save-unchanged in their John .bind files etc. It is easiest to do an explicit change when needed. John If LyX locked files which were open in a still running LyX John process, that would have saved me some confusion. Yes, but I am sure this can cause a lot of confusion too... Anyway, I have an additional patch for this bug. Anyone disagrees? JMarc Index: src/ChangeLog === --- src/ChangeLog (revision 13424) +++ src/ChangeLog (working copy) @@ -1,3 +1,8 @@ +2006-03-20 Jean-Marc Lasgouttes [EMAIL PROTECTED] + + * lyxfunc.C (getStatus): always allow saving unnamed buffers (bug + 2313 cont'd). + 2006-03-16 Jürgen Spitzmüller [EMAIL PROTECTED] * text.C (delete): adjust cursor after backspace in change tracking Index: src/lyxfunc.C === --- src/lyxfunc.C (revision 13424) +++ src/lyxfunc.C (working copy) @@ -541,7 +541,8 @@ FuncStatus LyXFunc::getStatus(FuncReques } case LFUN_MENUWRITE: { - enable = !view()-buffer()-isClean(); + enable = view()-buffer()-isUnnamed() + || !view()-buffer()-isClean(); break; }
RE: qt4: remove (2nd) add dialog in add bib tex ref dialog
I hate to be a PITA, sure ;-) but I'm not convinced. Look, I have currently more than 100 bib files in that list (lots from the TeXLive distribution, and my own). and you care about all 100? sound like an exceptional situation Checking which one are selected would be difficult. There must be a solution where only the selected databases are visible (I would be fine with a show only selected toggle or somesuch). what about having *two* buttons on the 1st dialog 1. browse... 2. add from list where the first directly pops up a filedialog and the second the add dialog that we have now ?
Re: [Qt4 bug] Branches dialog, small issue with alter color
On Mon, Mar 20, 2006 at 01:55:21PM +0100, Abdelrazak Younes wrote: We need also a 1.5.0svn version. Done. john
Re: qt4: remove (2nd) add dialog in add bib tex ref dialog
On Mon, Mar 20, 2006 at 03:10:13PM +0100, Leuven, E. wrote: Checking which one are selected would be difficult. There must be a solution where only the selected databases are visible (I would be fine with a show only selected toggle or somesuch). what about having *two* buttons on the 1st dialog 1. browse... 2. add from list where the first directly pops up a filedialog and the second the add dialog that we have now This sounds worse than it is now... regards john