Re: [patch] qt4: toc tweak
Abdelrazak Younes wrote: > Please > don't wait too much time on this as you motivated me to do the mode/view > separation (see attached) ;-) Nice, but please don't tell me that you removed the slider now. Jürgen
Re: [PATCH] problem solved (was Re: [PATCH] buffer_func cleanup round 3 (was Re: crash)
Abdelrazak Younes wrote: > Question: does somebody know how to test if the current buffer has only > one paragraph? lastpit == 0 perhaps? Jürgen
Re: [patch] bug 2460: unbrake natbib
Lars Gullik Bjønnes wrote: > | Where else? > > At the very least the BufferView. I don't understand. I think it's a buffer property. Each buffer has its own bibfiles cache. And if we had (eventually) multiple views of the same buffer, then all views should share the same bibfiles cache. Jürgen
Re: [patch] qt4: toc tweak
Juergen Spitzmueller a écrit : Abdelrazak Younes wrote: Please don't wait too much time on this as you motivated me to do the mode/view separation (see attached) ;-) Nice, but please don't tell me that you removed the slider now. Not in the GUI but it is not implemented yet (but should be easy to do). I am now almost done with the model/view separation. It was quite a bit of work and I am pretty please with it. There remains a problem though (a big one): the TreeView does not show anything. I have read the documentaion many times, tried a lot of things but it does not work :-( But, the controller and the model work well. I am very sorry Juergen that you spend some times to fix the slider bug. But rest assure that it was not for nothing because now I know the correct logic ;-). Please find attached the patch. If you know about Qt4 model/view programming I would be thankful if you could take a look. Maybe Angus or Andre could help here also. Pretty please... Thanks in advance, Abdel. Index: src/frontends/controllers/ControlToc.C === --- src/frontends/controllers/ControlToc.C (revision 13684) +++ src/frontends/controllers/ControlToc.C (working copy) @@ -37,6 +37,12 @@ } +bool ControlToc::canOutline(string const & type) +{ + return type == "TOC"; +} + + void ControlToc::outline(toc::OutlineOp op) { std::ostringstream o; Index: src/frontends/controllers/ControlToc.h === --- src/frontends/controllers/ControlToc.h (revision 13684) +++ src/frontends/controllers/ControlToc.h (working copy) @@ -41,6 +41,9 @@ /// Apply the selected outlining operation void outline(toc::OutlineOp op); + + /// Test if outlining operation is possible + bool canOutline(std::string const & type); }; } // namespace frontend Index: src/frontends/qt4/Dialogs.C === --- src/frontends/qt4/Dialogs.C (revision 13687) +++ src/frontends/qt4/Dialogs.C (working copy) @@ -18,7 +18,6 @@ #include "ControlBranch.h" #include "ControlChanges.h" #include "ControlCharacter.h" -#include "ControlCitation.h" #include "ControlDocument.h" #include "ControlErrorList.h" #include "ControlERT.h" @@ -40,7 +39,6 @@ #include "ControlSpellchecker.h" #include "ControlTabular.h" #include "ControlTabularCreate.h" -#include "ControlToc.h" #include "ControlVSpace.h" #include "ControlWrap.h" @@ -83,6 +81,7 @@ #include "QTabularCreate.h" #include "QTexinfo.h" #include "QToc.h" +#include "QTocDialog.h" #include "q3url.h" #include "QVSpace.h" #include "QWrap.h" @@ -310,8 +309,9 @@ dialog->bc().bp(new OkApplyCancelReadOnlyPolicy); #endif } else if (name == "toc") { - dialog->setController(new ControlToc(*dialog)); - dialog->setView(new QToc(*dialog)); + QToc * qtoc = new QToc(*dialog); + dialog->setController(qtoc); + dialog->setView(new QTocDialog(*dialog, qtoc)); dialog->bc().bp(new OkCancelPolicy); } else if (name == "url") { dialog->setController(new ControlCommand(*dialog, name)); Index: src/frontends/qt4/Makefile.dialogs === --- src/frontends/qt4/Makefile.dialogs (revision 13687) +++ src/frontends/qt4/Makefile.dialogs (working copy) @@ -123,6 +123,7 @@ QTabularDialog.C QTabularDialog.h \ QTexinfoDialog.C QTexinfoDialog.h \ QThesaurusDialog.C QThesaurusDialog.h \ + TocModel.C TocModel.h \ QTocDialog.C QTocDialog.h \ QtView.C QtView.h \ QURLDialog.C QURLDialog.h \ Index: src/frontends/qt4/QToc.C === --- src/frontends/qt4/QToc.C(revision 13687) +++ src/frontends/qt4/QToc.C(working copy) @@ -12,7 +12,7 @@ #include #include "QToc.h" -#include "QTocDialog.h" +#include "TocModel.h" #include "Qt2BC.h" #include "qt_helpers.h" @@ -20,6 +20,8 @@ #include "controllers/ControlToc.h" +#include + using std::endl; using std::pair; @@ -29,69 +31,117 @@ namespace lyx { namespace frontend { -typedef QController > base_class; - QToc::QToc(Dialog & parent) - : base_class(parent, _("Table of Contents")) -{} + : ControlToc(parent) +{ + update(); +} -void QToc::build_dialog() +bool QToc::canOutline() { - dialog_.reset(new QTocDialog(this)); + vector const & types = getTypes(); + + BOOST_ASSERT(type_ >= 0 && type_ < (int) types.size()); + return ControlToc::canOutline(types[type_]); } -void QToc::update_contents() +QStandardItemModel * QToc::tocModel() { - dialog_->updateType(); - dialog_->updateToc(); + lyxerr[Debug::GUI] + << "QToc: type_ " << type_ +
Re: [PATCH] problem solved (was Re: [PATCH] buffer_func cleanup round 3 (was Re: crash)
Juergen Spitzmueller a écrit : Abdelrazak Younes wrote: Question: does somebody know how to test if the current buffer has only one paragraph? lastpit == 0 perhaps? I've tried that but I think this would be true for an inset with a single paragraph. Abdel.
[Patch] Toc Model/View Separation (was Re: [patch] qt4: toc tweak)
Abdelrazak Younes a écrit : Juergen Spitzmueller a écrit : Abdelrazak Younes wrote: Please don't wait too much time on this as you motivated me to do the mode/view separation (see attached) ;-) Nice, but please don't tell me that you removed the slider now. Not in the GUI but it is not implemented yet (but should be easy to do). I am now almost done with the model/view separation. It was quite a bit of work and I am pretty please with it. There remains a problem though (a big one): the TreeView does not show anything. I have read the documentaion many times, tried a lot of things but it does not work :-( But, the controller and the model work well. I am very sorry Juergen that you spend some times to fix the slider bug. But rest assure that it was not for nothing because now I know the correct logic ;-). Please find attached the patch. If you know about Qt4 model/view programming I would be thankful if you could take a look. Maybe Angus or Andre could help here also. Pretty please... The patch was not complete, here is an updated one. Abdel Index: src/frontends/controllers/ControlToc.C === --- src/frontends/controllers/ControlToc.C (revision 13684) +++ src/frontends/controllers/ControlToc.C (working copy) @@ -37,6 +37,12 @@ } +bool ControlToc::canOutline(string const & type) +{ + return type == "TOC"; +} + + void ControlToc::outline(toc::OutlineOp op) { std::ostringstream o; Index: src/frontends/controllers/ControlToc.h === --- src/frontends/controllers/ControlToc.h (revision 13684) +++ src/frontends/controllers/ControlToc.h (working copy) @@ -41,6 +41,9 @@ /// Apply the selected outlining operation void outline(toc::OutlineOp op); + + /// Test if outlining operation is possible + bool canOutline(std::string const & type); }; } // namespace frontend Index: src/frontends/qt4/Dialogs.C === --- src/frontends/qt4/Dialogs.C (revision 13687) +++ src/frontends/qt4/Dialogs.C (working copy) @@ -18,7 +18,6 @@ #include "ControlBranch.h" #include "ControlChanges.h" #include "ControlCharacter.h" -#include "ControlCitation.h" #include "ControlDocument.h" #include "ControlErrorList.h" #include "ControlERT.h" @@ -40,7 +39,6 @@ #include "ControlSpellchecker.h" #include "ControlTabular.h" #include "ControlTabularCreate.h" -#include "ControlToc.h" #include "ControlVSpace.h" #include "ControlWrap.h" @@ -83,6 +81,7 @@ #include "QTabularCreate.h" #include "QTexinfo.h" #include "QToc.h" +#include "QTocDialog.h" #include "q3url.h" #include "QVSpace.h" #include "QWrap.h" @@ -310,8 +309,9 @@ dialog->bc().bp(new OkApplyCancelReadOnlyPolicy); #endif } else if (name == "toc") { - dialog->setController(new ControlToc(*dialog)); - dialog->setView(new QToc(*dialog)); + QToc * qtoc = new QToc(*dialog); + dialog->setController(qtoc); + dialog->setView(new QTocDialog(*dialog, qtoc)); dialog->bc().bp(new OkCancelPolicy); } else if (name == "url") { dialog->setController(new ControlCommand(*dialog, name)); Index: src/frontends/qt4/Makefile.dialogs === --- src/frontends/qt4/Makefile.dialogs (revision 13687) +++ src/frontends/qt4/Makefile.dialogs (working copy) @@ -123,6 +123,7 @@ QTabularDialog.C QTabularDialog.h \ QTexinfoDialog.C QTexinfoDialog.h \ QThesaurusDialog.C QThesaurusDialog.h \ + TocModel.C TocModel.h \ QTocDialog.C QTocDialog.h \ QtView.C QtView.h \ QURLDialog.C QURLDialog.h \ Index: src/frontends/qt4/QToc.C === --- src/frontends/qt4/QToc.C(revision 13687) +++ src/frontends/qt4/QToc.C(working copy) @@ -12,7 +12,7 @@ #include #include "QToc.h" -#include "QTocDialog.h" +#include "TocModel.h" #include "Qt2BC.h" #include "qt_helpers.h" @@ -20,6 +20,8 @@ #include "controllers/ControlToc.h" +#include + using std::endl; using std::pair; @@ -29,69 +31,117 @@ namespace lyx { namespace frontend { -typedef QController > base_class; - QToc::QToc(Dialog & parent) - : base_class(parent, _("Table of Contents")) -{} + : ControlToc(parent) +{ + update(); +} -void QToc::build_dialog() +bool QToc::canOutline() { - dialog_.reset(new QTocDialog(this)); + vector const & types = getTypes(); + + BOOST_ASSERT(type_ >= 0 && type_ < (int) types.size()); + return ControlToc::canOutline(types[type_]); } -void QToc::update_contents() +QStandardItemModel * QToc::tocModel() { - dialog_->updateType(); - dialog_->updateToc(); + lyxerr[De
Re: [PATCH] problem solved (was Re: [PATCH] buffer_func cleanup round 3 (was Re: crash)
Abdelrazak Younes wrote: > > lastpit == 0 perhaps? > > I've tried that but I think this would be true for an inset with a > single paragraph. You could exclude those with LyXText::isMainText() I think. Jürgen
Re: [patch] qt4: toc tweak
Abdelrazak Younes wrote: > I am very sorry Juergen that you spend some times to fix the slider bug. > But rest assure that it was not for nothing because now I know the > correct logic ;-). No need to apologize. It's not the time I spent. I just find the slider useful, so I think it should not just disappear. Apart from that: great work. > Please find attached the patch. If you know about Qt4 model/view > programming I would be thankful if you could take a look. Maybe Angus or > Andre could help here also. Pretty please... I'm sorry, qt4 is a completely new universe to me. And I'm running a bit out of time at the moment, so I cannot invest much at the moment. Jürgen
Re: [patch] qt4: toc tweak
Juergen Spitzmueller a écrit : Abdelrazak Younes wrote: I am very sorry Juergen that you spend some times to fix the slider bug. But rest assure that it was not for nothing because now I know the correct logic ;-). No need to apologize. It's not the time I spent. I just find the slider useful, so I think it should not just disappear. I'll make sure it comes back then. Apart from that: great work. Thanks. Please find attached the patch. If you know about Qt4 model/view programming I would be thankful if you could take a look. Maybe Angus or Andre could help here also. Pretty please... I'm sorry, qt4 is a completely new universe to me. And I'm running a bit out of time at the moment, so I cannot invest much at the moment. I shouldn't either... I really have to stop this drug! :-) Abdel. Jürgen
Re: Is this cursor reset necessary?
Bo Peng wrote: > 1. Open a document, edit the first paragraph > 2. Scroll down a few pages, using mouse or page down key > 3. File->save > 4. Lyx will scroll back to the beginning of the document. Please try the attached patch. Jürgen Index: src/lyxfunc.C === --- src/lyxfunc.C (Revision 13689) +++ src/lyxfunc.C (Arbeitskopie) @@ -723,7 +723,8 @@ void LyXFunc::dispatch(FuncRequest const errorstat = false; dispatch_buffer.erase(); - bool update = false; + bool updateforce = false; + bool update = true; FuncStatus const flag = getStatus(cmd); if (!flag.enabled()) { @@ -815,10 +816,12 @@ void LyXFunc::dispatch(FuncRequest const owner->message(str + _(" done.")); } else writeAs(owner->buffer()); + update = false; break; case LFUN_WRITEAS: writeAs(owner->buffer(), argument); + update = false; break; case LFUN_MENURELOAD: { @@ -1433,7 +1436,7 @@ void LyXFunc::dispatch(FuncRequest const } // ideally, the update flag should be set by the insets, // but this is not possible currently - update = true; + updateforce = true; break; } @@ -1457,7 +1460,7 @@ void LyXFunc::dispatch(FuncRequest const it->dispatch(tmpcur, fr); } } - update = true; + updateforce = true; break; } @@ -1565,7 +1568,7 @@ void LyXFunc::dispatch(FuncRequest const bufferErrors(*buffer, el); view()->showErrorList(_("Class switch")); updateLabels(*buffer); - update = true; + updateforce = true; break; } @@ -1592,9 +1595,9 @@ void LyXFunc::dispatch(FuncRequest const default: { view()->cursor().dispatch(cmd); - update |= view()->cursor().result().update(); + updateforce |= view()->cursor().result().update(); if (!view()->cursor().result().dispatched()) -update |= view()->dispatch(cmd); +updateforce |= view()->dispatch(cmd); break; } } @@ -1603,9 +1606,9 @@ void LyXFunc::dispatch(FuncRequest const // Redraw screen unless explicitly told otherwise. // This also initializes the position cache for all insets // in (at least partially) visible top-level paragraphs. - if (update) + if (updateforce) view()->update(Update::FitCursor | Update::Force); - else + else if (update) view()->update(Update::FitCursor); // if we executed a mutating lfun, mark the buffer as dirty
Re: [patch] qt4: toc tweak
Abdelrazak Younes wrote: > > No need to apologize. It's not the time I spent. I just find the slider > > useful, so I think it should not just disappear. > > I'll make sure it comes back then. Thanks. That's great. > > I'm sorry, qt4 is a completely new universe to me. And I'm running a bit > > out of time at the moment, so I cannot invest much at the moment. > > I shouldn't either... I really have to stop this drug! :-) We're still at the beginning of the 1.5 cycle, so there's certainly no need to hurry. I'm sure I can be of more help once things cooled down a bit on my side. Jürgen
Re: error in enumerating subsection
Pol wrote: > In lyx 1.4.1, default article class, italian language, subsections and > subsubsections are weirdly enumerated by the phrase > "E' privo di senso" (meaning 'no sense'). > > That is obviously a gross mistake of the italian set up, that should be > fixed as soon as possible. If you start lyx from the console, are there any messages? Jürgen
Re: [Patch] Toc Model/View Separation (was Re: [patch] qt4: toc tweak)
Abdelrazak Younes <[EMAIL PROTECTED]> writes: | Index: src/frontends/qt4/QToc.C | === | --- src/frontends/qt4/QToc.C (revision 13687) | +++ src/frontends/qt4/QToc.C (working copy) | -void QToc::build_dialog() | +bool QToc::canOutline() | { | - dialog_.reset(new QTocDialog(this)); | + vector const & types = getTypes(); | + | + BOOST_ASSERT(type_ >= 0 && type_ < (int) types.size()); | + return ControlToc::canOutline(types[type_]); | } C-style cast. Use static_cast or int(...) instead please. and a couple of more places. -- Lgb
Re: [patch] bug 2460: unbrake natbib
Juergen Spitzmueller <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: | > | Where else? | > | > At the very least the BufferView. | | I don't understand. I think it's a buffer property. Each buffer has its own | bibfiles cache. And if we had (eventually) multiple views of the same buffer, | then all views should share the same bibfiles cache. The cache of bibfiles a buffer property? How? why? The buffer should not need to know anything about this. -- Lgb
Re: [patch] bug 2460: unbrake natbib
Lars Gullik Bjønnes wrote: > | I don't understand. I think it's a buffer property. Each buffer has its > | own bibfiles cache. And if we had (eventually) multiple views of the same > | buffer, then all views should share the same bibfiles cache. > > The cache of bibfiles a buffer property? How? why? Maybe I used the wrong expression. I mean (as I wrote): each buffer (not each buffer view) should have its own cache of bibfiles. Multiple buffer views of the same buffer should share the same cache of bibfiles. Jürgen
Re: [Patch] Toc Model/View Separation (was Re: [patch] qt4: toc tweak)
Lars Gullik Bjønnes a écrit : Abdelrazak Younes <[EMAIL PROTECTED]> writes: | Index: src/frontends/qt4/QToc.C | === | --- src/frontends/qt4/QToc.C (revision 13687) | +++ src/frontends/qt4/QToc.C (working copy) | -void QToc::build_dialog() | +bool QToc::canOutline() | { | - dialog_.reset(new QTocDialog(this)); | + vector const & types = getTypes(); | + | + BOOST_ASSERT(type_ >= 0 && type_ < (int) types.size()); | + return ControlToc::canOutline(types[type_]); | } C-style cast. Use static_cast or int(...) instead please. and a couple of more places. I know, as this is an assert and not working code I opted for the more legible form. But int() style is OK for me is that's OK for you. I'll change that. Abdel.
Re: Lyx 1.4.1 & windows - still no go
Am Samstag, 15. April 2006 23:55 schrieb Bo Peng: > BTW, what is the real difficulty in making the all-in-one installer > official? If only one or two of the bundled programs have license > issue, we can exclude them. Otherwise, all-in-one is the way to go! Read the list archives, there have been several discussions on this topic. The biggest problem apart from the license issues is that a maintainer is needed. Georg
Re: [patch] fix bug 1473: Implement phantom in math
Am Sonntag, 16. April 2006 00:02 schrieb Enrico Forestieri: > I think that your approach is the correct the one. The patch works, > but the dimension of "\bigl(" is a bit smaller of "(" on screen and > this seems odd. Perhaps a tuning is needed. Have a look at MathBigInset::increase(). What would you suggest? Does the size of the delimiters depend on the screen font zoom factor (it should)? > However, when I tried to load an existing .lyx file, I got a lot of > errors printed to the console and the equations were screwed up. This is strange. Can you destill this to a minimal example file and send it to me? Georg
Re: [patch] qt4: toc tweak
Juergen Spitzmueller a écrit : Abdelrazak Younes wrote: No need to apologize. It's not the time I spent. I just find the slider useful, so I think it should not just disappear. I'll make sure it comes back then. Thanks. That's great. You're welcome. But are you sure you don't want two arrow buttons instead? I'm sorry, qt4 is a completely new universe to me. And I'm running a bit out of time at the moment, so I cannot invest much at the moment. I shouldn't either... I really have to stop this drug! :-) We're still at the beginning of the 1.5 cycle, so there's certainly no need to hurry. I'm sure I can be of more help once things cooled down a bit on my side. Don't worry, there remains a lot of work to do on the UI side ;-). I am going to slow down as well. Abdel.
Re: [patch] fix bug 1473: Implement phantom in math
Am Sonntag, 16. April 2006 11:59 schrieb Lars Gullik Bjønnes: > Georg Baum <[EMAIL PROTECTED]> writes: > > | Am Samstag, 15. April 2006 10:22 schrieb Lars Gullik Bjønnes: > | > Eventually something must be done with this if .. if ... if list > | > > | > Using a map or an unordered_map seems like a solution, not right now > | > perhaps. > | > | I am not sure. What would you store in the map? The problem is that we > | sometimes need arguments to the inset constructors. > > You can store functions to run. And that would mean to create a function for each inset? I don't think it would be better than the if ... if chain. At least it would be a lot more to write. Georg
Re: [patch] qt4: toc tweak
Abdelrazak Younes wrote: > > Thanks. That's great. > > You're welcome. But are you sure you don't want two arrow buttons instead? A QSpinBox? Personally, I find the slider more convenient for this given task. Jürgen
Re: [patch] qt4: toc tweak
Juergen Spitzmueller a écrit : Abdelrazak Younes wrote: Thanks. That's great. You're welcome. But are you sure you don't want two arrow buttons instead? A QSpinBox? Personally, I find the slider more convenient for this given task. OK then. But I'll try to enlarge the slider button a bit to facilitate the grabbing. Abdel.
Windows Installer for LyX 1.4.1
Today I installed LyX 1.4.1 on my PC running under Windows XP Pro. I have a few comments to do on the Windows Installer: - language selection works properly inside the installer but only english LyX version is installed (tested with french and german; I am aware the language is asked twice in the installer), - the desktop link is not not associated with the LyX icon, - at the end of installation, the installer proposes to launch LyX but nothing happens when you click on the "Finish" button. Regards, Julien Brevier.
QWorkArea.C won't compile on Mac
In most recent svn (13689), QWorkArea.C won't compile, giving the following error (within a #ifdef Q_WS_MACX): QWorkArea.C: In function `OSErr handleOpenDocuments(const AERecord*, AERecord*, long int)': QWorkArea.C:176: error: `dispatch' undeclared (first use this function) Suggestions? Bennett
Re: [patch] Add support for cygwin-tetex to native win32 LyX
Am Samstag, 15. April 2006 19:47 schrieb Enrico Forestieri: > On Sat, Apr 15, 2006 at 06:54:56PM +0200, Georg Baum wrote: > I can't do that because it doesn't depend on cygwin or windows but > on miktex or tetex. If you use miktex SEP=';', if you use tetex SEP=':'. > I am attaching a revised patch taking into account your previous > counterexample, which now works. But I still don't like it. The attached patch steals code from mktexlsr (on which the original test was appareantly based). No need to reinvent the wheel. If it works for you I am going to commit that. This does still not support miktex with cygwin, but if you want that you should pass an additional argument to TeXFiles.sh which tells what TeX engine to use, based on the \cygwin_path_fix_needed configuration switch. > You are very right, but please admit that a ';' in a filename occurs > with a lower probability than a space in unix... Yes. Your test is nevertheless a hack, and because of things like this I wanted you to commit your stuff yourself. I am much less picky about things others put in, but I am not going to commit anything with what I do not agree 100%. Georg Index: lib/scripts/TeXFiles.sh === --- lib/scripts/TeXFiles.sh (Revision 13689) +++ lib/scripts/TeXFiles.sh (Arbeitskopie) @@ -41,15 +41,16 @@ types=$1 test -z "$types" && types="cls sty bst bib" # -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use ';' to separate -# directories in path lists whereas Unixes uses ':'. -# $SEP holds the right character to be used by the scripts. -# -#??? -# never used this one with windows and what happens with mac?? -#??? -# -if test -z "$COMSPEC" && test -z "$ComSpec"; then SEP=':'; else SEP=';'; fi +# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate +# directories in path lists whereas Unix uses `:'. Make an exception for +# Cygwin, which pretends to be UNIX. +# Create a variable that holds the right character to be used by the scripts. +DOSISH=no +case `uname -s` in + CYGWIN*|Cygwin*|cygwin*) ;; + *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi +esac +if test "$DOSISH" = "no"; then SEP=':'; else SEP=';';fi # # A copy of some stuff from mktex.opt, so we can run in the presence of
Re: QWorkArea.C won't compile on Mac
Am Montag, 17. April 2006 15:41 schrieb Bennett Helm: > In most recent svn (13689), QWorkArea.C won't compile, giving the > following error (within a #ifdef Q_WS_MACX): > > QWorkArea.C: In function `OSErr handleOpenDocuments(const AERecord*, > AERecord*, > long int)': > QWorkArea.C:176: error: `dispatch' undeclared (first use this function) > > Suggestions? Does wa_ptr->view().dispatch instead of wa_ptr->dispatch work? Georg
Re: QWorkArea.C won't compile on Mac
Am Montag, 17. April 2006 15:41 schrieb Bennett Helm: > Suggestions? Or maybe wa_ptr->view()->workAreaDispatch. I don't know which one should be used here. Georg
Re: QWorkArea.C won't compile on Mac
On Apr 17, 2006, at 9:55 AM, Georg Baum wrote: Am Montag, 17. April 2006 15:41 schrieb Bennett Helm: In most recent svn (13689), QWorkArea.C won't compile, giving the following error (within a #ifdef Q_WS_MACX): QWorkArea.C: In function `OSErr handleOpenDocuments(const AERecord*, AERecord*, long int)': QWorkArea.C:176: error: `dispatch' undeclared (first use this function) Suggestions? Does wa_ptr->view().dispatch instead of wa_ptr->dispatch work? Yes -- that does it. Thanks! Bennett
Re: [patch] fix bug 1473: Implement phantom in math
Georg Baum <[EMAIL PROTECTED]> writes: | Am Sonntag, 16. April 2006 11:59 schrieb Lars Gullik Bjønnes: | > Georg Baum <[EMAIL PROTECTED]> writes: | > | > | Am Samstag, 15. April 2006 10:22 schrieb Lars Gullik Bjønnes: | > | > Eventually something must be done with this if .. if ... if list | > | > | > | > Using a map or an unordered_map seems like a solution, not right now | > | > perhaps. | > | | > | I am not sure. What would you store in the map? The problem is that we | > | sometimes need arguments to the inset constructors. | > | > You can store functions to run. | | And that would mean to create a function for each inset? I don't think it | would be better than the if ... if chain. At least it would be a lot more | to write. It could be the same function with different arguments bound to it. -- Lgb
Re: QWorkArea.C won't compile on Mac
Bennett Helm <[EMAIL PROTECTED]> writes: | On Apr 17, 2006, at 9:55 AM, Georg Baum wrote: | | > Am Montag, 17. April 2006 15:41 schrieb Bennett Helm: | >> In most recent svn (13689), QWorkArea.C won't compile, giving the | >> following error (within a #ifdef Q_WS_MACX): | >> | >> QWorkArea.C: In function `OSErr handleOpenDocuments(const AERecord*, | >> AERecord*, | >> long int)': | >> QWorkArea.C:176: error: `dispatch' undeclared (first use this | >> function) | >> | >> Suggestions? | > | > Does | > | > wa_ptr->view().dispatch | > | > instead of | > | > wa_ptr->dispatch | > | > work? | | Yes -- that does it. Thanks! But it is wrong. workAreaDispatch is the dispatch function that should be called. -- Lgb
Re: QWorkArea.C won't compile on Mac
Georg Baum <[EMAIL PROTECTED]> writes: | Am Montag, 17. April 2006 15:41 schrieb Bennett Helm: | > Suggestions? | | Or maybe wa_ptr->view()->workAreaDispatch. I don't know which one should | be used here. workAreaDispatch. -- Lgb
Re: QWorkArea.C won't compile on Mac
On Apr 17, 2006, at 10:10 AM, Lars Gullik Bjønnes wrote: Bennett Helm <[EMAIL PROTECTED]> writes: | On Apr 17, 2006, at 9:55 AM, Georg Baum wrote: | | > Am Montag, 17. April 2006 15:41 schrieb Bennett Helm: | >> In most recent svn (13689), QWorkArea.C won't compile, giving the | >> following error (within a #ifdef Q_WS_MACX): | >> | >> QWorkArea.C: In function `OSErr handleOpenDocuments(const AERecord*, | >> AERecord*, | >> long int)': | >> QWorkArea.C:176: error: `dispatch' undeclared (first use this | >> function) | >> | >> Suggestions? | > | > Does | > | > wa_ptr->view().dispatch | > | > instead of | > | > wa_ptr->dispatch | > | > work? | | Yes -- that does it. Thanks! But it is wrong. workAreaDispatch is the dispatch function that should be called. Sorry, but you'll have to be more explicit for me. Using wa_ptr->workAreaDispatch( FuncRequest(LFUN_FILE_OPEN, fromqstr(s_arg))); does not compile; what do I need instead? Bennett
Re: QWorkArea.C won't compile on Mac
Bennett Helm <[EMAIL PROTECTED]> writes: | > But it is wrong. | > | > workAreaDispatch is the dispatch function that should be called. | | Sorry, but you'll have to be more explicit for me. Using | | wa_ptr->workAreaDispatch( | FuncRequest(LFUN_FILE_OPEN, | fromqstr(s_arg))); wa_ptr->view().workAreaDispatch(); is close. Just look at the other places in the same file where workAreaDispatch is used. -- Lgb
Re: Lyx 1.4.1 & windows - still no go
Enrico Forestieri wrote: On Sun, Apr 16, 2006 at 05:33:35PM -0400, Paul A. Rubin wrote: I wonder if this is a matter of how you filled in the preferences dialog. What works for me is this: 1. Install Enrico's lp.exe binary in the LyX bin directory. 2. In Tools->Preferences...->Outputs->Printer, set the printer name to 'lp' and leave the printer command 'dvips'. This should not be necessary. It should work simply reconfiguring LyX. I mean, you should have to touch nothing in preferences. Well, I'm confused (as usual). When I first installed your lp.exe, I reconfigured LyX, but printing did not work until I specified LP as the printer name. Yesterday I restarted LyX, and the printer name was again blank (I had apparently not saved my change). Printing did not work until I entered LP as the printer name (and saved it). So just now I started LyX, removed the printer name, saved, restarted, reconfigured, restarted (printer name still blank), and now printing works with the printer name blank. I can see where the configure script looks for lp.exe, and I can see it in the "local" copy of lyxrc.defaults. No idea why it didn't work before (other than to blame it on Windows, of course). /Paul
Re: Windows Installer for LyX 1.4.1
[EMAIL PROTECTED] wrote: Today I installed LyX 1.4.1 on my PC running under Windows XP Pro. I have a few comments to do on the Windows Installer: - language selection works properly inside the installer but only english LyX version is installed (tested with french and german; I am aware the language is asked twice in the installer), - the desktop link is not not associated with the LyX icon, - at the end of installation, the installer proposes to launch LyX but nothing happens when you click on the "Finish" button. Regards, Julien Brevier. I can confirm the second and third (didn't try the first). /Paul
Re: QWorkArea.C won't compile on Mac
On Apr 17, 2006, at 10:31 AM, Lars Gullik Bjønnes wrote: Bennett Helm <[EMAIL PROTECTED]> writes: | > But it is wrong. | > | > workAreaDispatch is the dispatch function that should be called. | | Sorry, but you'll have to be more explicit for me. Using | | wa_ptr->workAreaDispatch( | FuncRequest(LFUN_FILE_OPEN, | fromqstr(s_arg))); wa_ptr->view().workAreaDispatch(); is close. Just look at the other places in the same file where workAreaDispatch is used. Well, I had to go to QContentPane.C to find something similar. wa_ptr->view().view()->workAreaDispatch( FuncRequest(LFUN_FILE_OPEN, fromqstr(s_arg))); seems to work -- opening documents within LyX is fine. (Is this right?) Patch attached. Bennett mac-QWorkArea.diff Description: Binary data
Re: Lyx 1.4.1 & windows - still no go
On Mon, Apr 17, 2006 at 11:20:43AM -0400, Paul A. Rubin wrote: > Enrico Forestieri wrote: > > On Sun, Apr 16, 2006 at 05:33:35PM -0400, Paul A. Rubin wrote: > > > >> I wonder if this is a matter of how you filled in the preferences > >> dialog. What works for me is this: > >> > >> 1. Install Enrico's lp.exe binary in the LyX bin directory. > >> > >> 2. In Tools->Preferences...->Outputs->Printer, set the printer name to > >> 'lp' and leave the printer command 'dvips'. > > > > This should not be necessary. It should work simply reconfiguring LyX. > > I mean, you should have to touch nothing in preferences. > > > > Well, I'm confused (as usual). When I first installed your lp.exe, I > reconfigured LyX, but printing did not work until I specified LP as the > printer name. Yesterday I restarted LyX, and the printer name was again > blank (I had apparently not saved my change). Printing did not work > until I entered LP as the printer name (and saved it). So just now I > started LyX, removed the printer name, saved, restarted, reconfigured, > restarted (printer name still blank), and now printing works with the > printer name blank. > > I can see where the configure script looks for lp.exe, and I can see it > in the "local" copy of lyxrc.defaults. No idea why it didn't work > before (other than to blame it on Windows, of course). You're not alone about the confusion, I think. I can exactly predict what will happen on Unix, but Windows always escapes me ;-) I think that the chaos theory is most appropriate to explain things on Windows :( -- Enrico
Re: QWorkArea.C won't compile on Mac
Am Montag, 17. April 2006 18:31 schrieb Bennett Helm: > Well, I had to go to QContentPane.C to find something similar. > > wa_ptr->view().view()->workAreaDispatch( > FuncRequest(LFUN_FILE_OPEN, > fromqstr(s_arg))); > > seems to work -- opening documents within LyX is fine. (Is this right?) > > Patch attached. I put it in. Georg
[Updated Patch] Toc model/view separation (was Re: [patch] qt4: toc tweak)
Abdelrazak Younes a écrit : Juergen Spitzmueller a écrit : Abdelrazak Younes wrote: Please don't wait too much time on this as you motivated me to do the mode/view separation (see attached) ;-) Nice, but please don't tell me that you removed the slider now. Not in the GUI but it is not implemented yet (but should be easy to do). I am now almost done with the model/view separation. It was quite a bit of work and I am pretty please with it. There remains a problem though (a big one): the TreeView does not show anything. I have read the documentaion many times, tried a lot of things but it does not work :-( But, the controller and the model work well. Solved! :-) The toc model needs at least one manual column insertion (I though it was done automatically on rows insertion). As a side note, I've added "bool ControlToc::canOutline" to test if outline is possible. I'll probably commit this as the qt2 frontend will need it in order to avoid a crash when figure or table is selected. For the rest, here is a status: - slider depth: not yet implemented - navigating: only with mouse-click for now, the connection to the selectionModel doesn't work... - outline: still some crashes and tracking the moved paragraph is buggy. Any opinion against me committing this? Updated patch attached. Side question about paragraph ids for Lars: I wanted to use toc::TocItem::id_ but it is not stable after an outline operation. Is your new uid going to be stable for that Lars? I would like to use that instead of the paragraph text (toc::TocItem::str) which is not guaranteed to be unique). Side question about outline for Martin: The outline function takes no argument. It moves or transforms the section where the cursor is. I think it should instead take a pit or a uid so that we can use the outline feature without having any cursor. What do you think? Abdel. Index: src/frontends/controllers/ControlToc.C === --- src/frontends/controllers/ControlToc.C (revision 13684) +++ src/frontends/controllers/ControlToc.C (working copy) @@ -37,6 +37,12 @@ } +bool ControlToc::canOutline(string const & type) +{ + return type == "TOC"; +} + + void ControlToc::outline(toc::OutlineOp op) { std::ostringstream o; Index: src/frontends/controllers/ControlToc.h === --- src/frontends/controllers/ControlToc.h (revision 13684) +++ src/frontends/controllers/ControlToc.h (working copy) @@ -41,6 +41,9 @@ /// Apply the selected outlining operation void outline(toc::OutlineOp op); + + /// Test if outlining operation is possible + bool canOutline(std::string const & type); }; } // namespace frontend Index: src/frontends/qt4/Dialogs.C === --- src/frontends/qt4/Dialogs.C (revision 13687) +++ src/frontends/qt4/Dialogs.C (working copy) @@ -18,7 +18,6 @@ #include "ControlBranch.h" #include "ControlChanges.h" #include "ControlCharacter.h" -#include "ControlCitation.h" #include "ControlDocument.h" #include "ControlErrorList.h" #include "ControlERT.h" @@ -40,7 +39,6 @@ #include "ControlSpellchecker.h" #include "ControlTabular.h" #include "ControlTabularCreate.h" -#include "ControlToc.h" #include "ControlVSpace.h" #include "ControlWrap.h" @@ -83,6 +81,7 @@ #include "QTabularCreate.h" #include "QTexinfo.h" #include "QToc.h" +#include "QTocDialog.h" #include "q3url.h" #include "QVSpace.h" #include "QWrap.h" @@ -310,8 +309,9 @@ dialog->bc().bp(new OkApplyCancelReadOnlyPolicy); #endif } else if (name == "toc") { - dialog->setController(new ControlToc(*dialog)); - dialog->setView(new QToc(*dialog)); + QToc * qtoc = new QToc(*dialog); + dialog->setController(qtoc); + dialog->setView(new QTocDialog(*dialog, qtoc)); dialog->bc().bp(new OkCancelPolicy); } else if (name == "url") { dialog->setController(new ControlCommand(*dialog, name)); Index: src/frontends/qt4/Makefile.dialogs === --- src/frontends/qt4/Makefile.dialogs (revision 13687) +++ src/frontends/qt4/Makefile.dialogs (working copy) @@ -123,6 +123,7 @@ QTabularDialog.C QTabularDialog.h \ QTexinfoDialog.C QTexinfoDialog.h \ QThesaurusDialog.C QThesaurusDialog.h \ + TocModel.C TocModel.h \ QTocDialog.C QTocDialog.h \ QtView.C QtView.h \ QURLDialog.C QURLDialog.h \ Index: src/frontends/qt4/QToc.C === --- src/frontends/qt4/QToc.C(revision 13687) +++ src/frontends/qt4/QToc.C(working copy) @@ -12,7 +12,7 @@ #include #include "QToc.h" -#include "QTocDialog.h" +#include "TocModel.h" #i
Re: QWorkArea.C won't compile on Mac
Bennett Helm <[EMAIL PROTECTED]> writes: | On Apr 17, 2006, at 10:31 AM, Lars Gullik Bjønnes wrote: | > Bennett Helm <[EMAIL PROTECTED]> writes: | > | > | > But it is wrong. | > | > | > | > workAreaDispatch is the dispatch function that should be called. | > | | > | Sorry, but you'll have to be more explicit for me. Using | > | | > | wa_ptr->workAreaDispatch( | > | FuncRequest(LFUN_FILE_OPEN, | > | fromqstr(s_arg))); | > | > wa_ptr->view().workAreaDispatch(); | > | > is close. Just look at the other places in the same file where | > workAreaDispatch is used. | | Well, I had to go to QContentPane.C to find something similar. | | wa_ptr->view().view()->workAreaDispatch( | FuncRequest(LFUN_FILE_OPEN, | fromqstr(s_arg))); | | seems to work -- opening documents within LyX is fine. (Is this right?) Yes this is the right one. -- Lgb
Re: [patch] Add support for cygwin-tetex to native win32 LyX
On Mon, Apr 17, 2006 at 03:30:36PM +0200, Georg Baum wrote: > Am Samstag, 15. April 2006 19:47 schrieb Enrico Forestieri: > > On Sat, Apr 15, 2006 at 06:54:56PM +0200, Georg Baum wrote: > > I can't do that because it doesn't depend on cygwin or windows but > > on miktex or tetex. If you use miktex SEP=';', if you use tetex SEP=':'. > > I am attaching a revised patch taking into account your previous > > counterexample, which now works. > > But I still don't like it. The attached patch steals code from mktexlsr > (on which the original test was appareantly based). No need to reinvent > the wheel. > If it works for you I am going to commit that. > > This does still not support miktex with cygwin, but if you want that you > should pass an additional argument to TeXFiles.sh which tells what TeX > engine to use, based on the \cygwin_path_fix_needed configuration switch. No need for that. I think that you gave me the right idea. Please tell me if the attached patch is acceptable for you. > > You are very right, but please admit that a ';' in a filename occurs > > with a lower probability than a space in unix... > > Yes. Your test is nevertheless a hack, and because of things like this I > wanted you to commit your stuff yourself. I am much less picky about > things others put in, but I am not going to commit anything with what I > do not agree 100%. I understand that. Also, given that I tend to be "hackish", it is not a good idea giving me commit privileges. It seems that I need a watchdog ;-) -- Enrico Index: lib/scripts/TeXFiles.sh === --- lib/scripts/TeXFiles.sh (revision 13690) +++ lib/scripts/TeXFiles.sh (working copy) @@ -41,15 +41,20 @@ types=$1 test -z "$types" && types="cls sty bst bib" # -# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use ';' to separate -# directories in path lists whereas Unixes uses ':'. -# $SEP holds the right character to be used by the scripts. -# -#??? -# never used this one with windows and what happens with mac?? -#??? -# -if test -z "$COMSPEC" && test -z "$ComSpec"; then SEP=':'; else SEP=';'; fi +# MS-DOS and MS-Windows define $COMSPEC or $ComSpec and use `;' to separate +# directories in path lists whereas Unix uses `:'. Make an exception for +# Cygwin, where we could have either teTeX (using `:') or MikTeX (using `;'). +# Create a variable that holds the right character to be used by the scripts. +DOSISH=no +case `uname -s` in + CYGWIN*|Cygwin*|cygwin*) +# MikTeX's kpsewhich says "kpathsea emulation version x.x.x", whereas +# teTeX's simply "kpathsea version x.x.x". +KPATHSEA="`kpsewhich --version | sed 's/.*\(emulation\).*/\1/'`" +if test "$KPATHSEA" = "emulation"; then DOSISH=yes; fi ;; + *) if test -n "$COMSPEC" || test -n "$ComSpec"; then DOSISH=yes; fi +esac +if test "$DOSISH" = "no"; then SEP=':'; else SEP=';'; fi # # A copy of some stuff from mktex.opt, so we can run in the presence of
Re: [Abdelrazak Younes] [Patch] reduce linking time under windows (was Re: Question about C++ warning ...)
On Thu, Apr 13, 2006 at 10:28:59AM +0200, Jean-Marc Lasgouttes wrote: > > Hi Kayvan, > > Did you see this message? We need your input on why this special > cygwin code was needed... All I remember is that it was needed at one time for the QT/Cygwin code I compiled from CVS (and it was in the instructions or README file for building QT/Cygwin at kde-cygwin.sf.net). I think if Abdel and others think that we can do without it, I'm all for it. I can't compile LyX right now on any of my platforms, but I have not had the time to fix the problems. My automated daily builds on my Redhat FC4 system are getting those damnable linker errors or the python lyx2lyx module issue (see ftp://ftp.sylvan.com/pub/lyx/devel/log for the latest). My Cygwin machine can not build nowadays due to some compiler errors due to the recent QT changes. I probably need to refresh my Cygwin and follow the latest Cygwin/QT/LyX build directions so I can get my Cygwin/Windows builds up to the latest. So, in short, I have no objections since I can't build right now anyways! :-) If anyone has any suggestions to help me get my daily builds working again, please feel free to email me. I'm going to upgrade that machine to Redhat FC5 in the next week or so, after which I will try again. ---Kayvan > To: lyx-devel@lists.lyx.org > From: Abdelrazak Younes <[EMAIL PROTECTED]> > Subject: [Patch] reduce linking time under windows (was Re: Question about > C++ warning ...) > Date: Wed, 12 Apr 2006 21:23:49 +0200 > User-Agent: Thunderbird 1.5 (Windows/20051201) > In-Reply-To: <[EMAIL PROTECTED]> > Xref: fantomas.inria.fr lyx-devel:80738 > > Abdelrazak Younes a écrit : > >Enrico Forestieri a écrit : > >>On Wed, Apr 12, 2006 at 02:45:00PM +0200, Abdelrazak Younes wrote: > >>>Enrico Forestieri a écrit : > >>That's -Wl,--export-all-symbols and simply passes > >>--export-all-symbols > >>to the linker. It does no good and simply will increase your linking > >>time. I suggest that you get rid of it. > >>>[..] > I was not talking about the warnings, sorry for the confusion. > What I said only applies to the final link step. I observed that > with -Wl,--export-all-symbols, the linking time noticeably increases. > Removing that option shortens the linking time for me without any > side effect. > > This is a sed command you can use to modify configure in order to > avoid "-Wl,--export-all-symbols" in LDFLAGS: > > sed ' # Omit -Wl,--export-all-symbols in LDFLAGS > /LDFLAGS=\"\$LDFLAGS > \$WIN32_LD_EXPORT_ALL_SYMBOLS\"/s/LDFLAGS/true\t\#LDFLAGS/' \ > ./configure > ./configure-new > >>>Wouldn't it be better to integrate that fix in the m4 macros? If in > >>>there that is... > >> > >>Perhaps... But I am not going to propose that, as I have to save > >>energy for other battles... ;-) > > > >Well, if it can help the production of lyx dynamically linked with Qt3 > >that would be great because as it is now the linking time is close to > >unbearable. I'll try to test if there's any improvement. > > It seems to :-) > ar+ranlib libqt2 was done in 10 minutes and less than 400 Megs. > final exe linking took less than 10 minutes and less than 400 Megs > > But, I had to modify the finale linking command because for whatever > reason it tried to link with "/usr/lib/libiconv.dll.a" which of course > does not exists. Correcting that to d:/mingw/lib/iconv.lib did the > trick! I am sure this is due to this patch or to something else. > > The resulting qt3 executable seems to work as usual, I can see no > difference. No need to say that this is a _huge_ improvement! > > As cited below, Enrico tested on cygwin and cygwin/X11 that this patch > does not cause any problem. So I would like to ask Angus principally his > opinion on this. If Kayvan could also tell us his reason for putting > that at the first place, that would be great. > > Abdel. > > >>Then, I don't know if this flag is going to help when dynamically > >>linking Qt, as I must link statically to it. For sure it doesn't > >>help when dinamically linking the X11 libs or any other library > >>(I just finished successfully building an X11 version of LyX/Cygwin > >>without that option and dynamically linking to libAiksaurus, > >>libaspell, libiconv, libXrandr, libXcursor, libXft, libXrender, > >>libfontconfig, libfreetype, libexpat, libXext, libSM, libICE, > >>libX11: The gain in linking time is awesome). > Index: config/cygwin.m4 > === > --- config/cygwin.m4 (revision 13592) > +++ config/cygwin.m4 (working copy) > @@ -7,16 +7,6 @@ >cygwin* | mingw* | pw32* ) > # Export all symbols to Win32 DLL using MinGW 2.0 ld. > WIN32_LD_EXPORT_ALL_SYMBOLS='' > -AC_MSG_CHECKING([whether ld accepts --export-all-symbols]) > -if $LD --help 2>&1 | egrep 'export-all-symbols' > /dev/null; then > - WIN32_LD_EXPORT_ALL_SYMBOLS='-W
Re: [Abdelrazak Younes] [Patch] reduce linking time under windows (was Re: Question about C++ warning ...)
On Mon, Apr 17, 2006 at 11:42:21AM -0700, Kayvan A. Sylvan wrote: > On Thu, Apr 13, 2006 at 10:28:59AM +0200, Jean-Marc Lasgouttes wrote: > > > > Hi Kayvan, > > > > Did you see this message? We need your input on why this special > > cygwin code was needed... > > All I remember is that it was needed at one time for the QT/Cygwin code > I compiled from CVS (and it was in the instructions or README file for > building QT/Cygwin at kde-cygwin.sf.net). > > I think if Abdel and others think that we can do without it, I'm all > for it. I can't compile LyX right now on any of my platforms, but > I have not had the time to fix the problems. > > My automated daily builds on my Redhat FC4 system are getting > those damnable linker errors or the python lyx2lyx module issue > (see ftp://ftp.sylvan.com/pub/lyx/devel/log for the latest). > > My Cygwin machine can not build nowadays due to some compiler errors > due to the recent QT changes. Yes, there's a problem with threading support in the latest cygwin1.dll. > I probably need to refresh my Cygwin and follow the latest Cygwin/QT/LyX > build directions so I can get my Cygwin/Windows builds up to the latest. I recently enbarked on trying to compile LyX on Cygwin without using X11 and I think I succeeded quite well in it ;-) You can find directions at http://wiki.lyx.org/LyX/LyXOnCygwin and I would be glad to hear some comment as I have the impression to be alone in the Cygwin boat after the Windows hydrofoil one ;-) > So, in short, I have no objections since I can't build right now > anyways! :-) > > If anyone has any suggestions to help me get my daily builds working > again, please feel free to email me. I'm going to upgrade that machine > to Redhat FC5 in the next week or so, after which I will try again. As regards Cygwin, it seems that it suffices disabling threading in Qt, for the other platforms I don't know. I could be of some help only with Debian and Solaris. -- Enrico
Re: [patch] fix bug 1473: Implement phantom in math
Am Montag, 17. April 2006 18:24 schrieb Enrico Forestieri: > BTW, when changing the zoom factor by writing its value instead of > using the small arrows, the Apply button is not highlighted (this > occurs in both 1.4 and 1.5). So why don't you fix it? > When changing the zoom in 1.5 I also get the following written to the > console: > > LyX: Unknown tag `\use_session' [around line 180 of file ] > LyX: Unknown tag `true' [around line 181 of file ] > > It would also be nice having a report in the status line about the > size of the delimiter when the cursor is next to it. That is not possible with this approach, since the status line info is only obtained if the cursor is inside an inset. > However, even converting it to 1.4, I don't obtain correct results > loading it in 1.5. I also attach here a test file test-1.4.lyx and > the results I obtain with 1.4 (test-1.4.png) and 1.5 (test-1.5.png). The reason was a stupid mistake I made. Please try the attached, updated patch. I intend to commit this unless I get objections regarding the general approach. Georg Log: Make MathBigInset working * src/cursor.C (LCursor::plainInsert): combine the previous math atom with the new one to a MathBigInset if possible * src/mathed/math_biginset.[Ch] (MathBigInset::name): implement (MathBigInset::isBigInsetDelim): new, test whether a given token is a valid MathBigInset delimiter * src/mathed/math_biginset.C (MathBigInset::size): handle Big, Bigg and Biggg (MathBigInset::increase): ditto (MathBigInset::draw): fix deco drawing (MathBigInset::write): append space if necessary * src/mathed/math_factory.C (createMathInset): handle l->inset == "big" * src/mathed/math_parser.C (Token::asInput): return a token as input, stolen from tex2lyx (void Parser::parse1): Create a MathBigInset when needed * src/mathed/math_nestinset.C (MathNestInset::interpret): combine the previous math atom with the new character to a MathBigInset if possible * src/ParagraphParameters.C (findToken): move from here * src/support/lstrings.[Ch] (findToken): to here * lib/symbols: add MathBigInset symbols Index: src/cursor.C === --- src/cursor.C (Revision 13689) +++ src/cursor.C (Arbeitskopie) @@ -35,10 +35,12 @@ #include "insets/insettabular.h" #include "insets/insettext.h" +#include "mathed/math_biginset.h" #include "mathed/math_data.h" #include "mathed/math_inset.h" #include "mathed/math_scriptinset.h" #include "mathed/math_macrotable.h" +#include "mathed/math_parser.h" #include "support/limited_stack.h" @@ -650,6 +652,22 @@ void LCursor::markErase() void LCursor::plainInsert(MathAtom const & t) { + // Create a MathBigInset from cell()[pos() - 1] and t if possible + if (!empty() && pos() > 0 && cell()[pos() - 1]->asUnknownInset()) { + string const name = asString(t); + if (MathBigInset::isBigInsetDelim(name)) { + string prev = asString(cell()[pos() - 1]); + if (prev[0] == '\\') { +prev = prev.substr(1); +latexkeys const * l = in_word_set(prev); +if (l && l->inset == "big") { + cell()[pos() - 1] = + MathAtom(new MathBigInset(prev, name)); + return; +} + } + } + } cell().insert(pos(), t); ++pos(); } Index: src/mathed/math_biginset.h === --- src/mathed/math_biginset.h (Revision 13689) +++ src/mathed/math_biginset.h (Arbeitskopie) @@ -16,12 +16,14 @@ #include -/// Inset for \bigl & Co. +/// Inset for \\bigl & Co. class MathBigInset : public MathDimInset { public: /// MathBigInset(std::string const & name, std::string const & delim); /// + std::string name() const; + /// void metrics(MetricsInfo & mi, Dimension & dim) const; /// void draw(PainterInfo & pi, int x, int y) const; @@ -29,6 +31,8 @@ public: void write(WriteStream & os) const; /// void normalize(NormalStream & os) const; + /// + static bool isBigInsetDelim(std::string const &); private: virtual std::auto_ptr doClone() const; @@ -37,9 +41,9 @@ private: /// double increase() const; - /// \bigl or what? + /// \\bigl or what? std::string const name_; - /// ( or [ or Vert... + /// ( or [ or \\Vert... std::string const delim_; }; Index: src/mathed/math_factory.C === --- src/mathed/math_factory.C (Revision 13689) +++ src/mathed/math_factory.C (Arbeitskopie) @@ -276,6 +276,10 @@ MathAtom createMathInset(string const & return MathAtom(new MathFontOldInset(l)); if (inset == "matrix") return MathAtom(new MathAMSArrayInset(s)); + if (inset == "big") + // we can't create a MathBigInset, since the argument + // is missing. + return MathAtom(new MathUnknownInset(s)); return MathAtom(new Ma
Re: error in enumerating subsection
On Monday 17 April 2006 11:44, Juergen Spitzmueller wrote: > Pol wrote: > > In lyx 1.4.1, default article class, italian language, subsections and > > subsubsections are weirdly enumerated by the phrase > > "E' privo di senso" (meaning 'no sense'). > > > > That is obviously a gross mistake of the italian set up, that should be > > fixed as soon as possible. > > If you start lyx from the console, are there any messages? > - Started lyx from console - created new doc - added two lines: the first one marked as section, the second one as - subsection - everything is ok - switched to italian language - Console: Counter sezione does not exist. Counter sezione does not exist. We failed to find the layout 'Sezione' in the layout list. You MUST investigate! Standard Itemize Enumerate Description List Part Section Subsection Subsubsection Paragraph Subparagraph Part* Section* Subsection* Subsubsection* Paragraph* Subparagraph* Title Author Date Abstract Bibliography LyX-Code Address Right Address Quotation Quote Verse Caption Counter sottosezione does not exist. Changing Language! -- Paolo
Re: [Updated Patch] Toc model/view separation (was Re: [patch] qt4: toc tweak)
On Mon, Apr 17, 2006 at 07:54:04PM +0200, Abdelrazak Younes wrote: > Abdelrazak Younes a écrit : ... > Side question about outline for Martin: > > The outline function takes no argument. It moves or transforms the > section where the cursor is. I think it should instead take a pit or a > uid so that we can use the outline feature without having any cursor. > What do you think? Why would you want to do that? I could imagine moving multiple headers (instead of just one), but why would you want to change the doc in a place where your current cursor is not located? - Martin pgpDVRpcEMChg.pgp Description: PGP signature
Re: [Abdelrazak Younes] [Patch] reduce linking time under windows (was Re: Question about C++ warning ...)
"Kayvan A. Sylvan" <[EMAIL PROTECTED]> writes: | My automated daily builds on my Redhat FC4 system are getting | those damnable linker errors or the python lyx2lyx module issue | (see ftp://ftp.sylvan.com/pub/lyx/devel/log for the latest). Did you try compiling without the precompiled headers? -- Lgb
Re: [patch] fix bug 1473: Implement phantom in math
On Mon, Apr 17, 2006 at 08:57:54PM +0200, Georg Baum wrote: > Am Montag, 17. April 2006 18:24 schrieb Enrico Forestieri: > > BTW, when changing the zoom factor by writing its value instead of > > using the small arrows, the Apply button is not highlighted (this > > occurs in both 1.4 and 1.5). > > So why don't you fix it? if sense_of_humour > eps then Please, don't be unfair to me. Remember that I am a "casual user/devvie that come along with the occasional patch". else Because I am not able to? I learn fast, though. endif -- Enrico
Degrading math editing
Here is another bug, which may be hard to track down -- sorry, I don't know how to pin this down better... In math mode typing \equiv should give the equals sign with an extra line. When lyx first starts up, this works, but after **extensive** editing, this stops working, yielding nothing at all. Restarting lyx on the same file makes the bug go away, at least temporarily. Lyx-1.4.1, Debian Linux i386, qt3.3.4 frontend. Dave Raymond PS -- The earlier unexpected font change bug on resize seems to take a lot of editing to activate as well. Sounds like some particular operation which doesn't occur too often is stomping on memory. I'll try to narrow the possibilities more. PPS -- None of these problems occur with 1.3.7.
Re: Link failures in current lyx-svn
On Mon, 2006-04-10 at 14:09 -0700, Kayvan A. Sylvan wrote: > On Sun, Apr 09, 2006 at 10:25:25PM +0200, Lars Gullik Bjønnes wrote: > > John Levon <[EMAIL PROTECTED]> writes: > > > > | > > text.o(.bss+0x3):/usr/lib/gcc/x86_64-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_vector.h:352: > > | multiple definition of `(anonymous namespace)::_6' > > | > > Bidi.o(.bss+0x3):/usr/lib/gcc/x86_64-redhat-linux/4.0.2/../../../../include/c++/4.0.2/bits/stl_algobase.h:617: > > | first defined here > > | text.o(.bss+0x4):../boost/boost/shared_ptr.hpp:253: multiple definition > > | of `(anonymous namespace)::_5' > > | > > Bidi.o(.bss+0x4):/usr/lib/gcc/x86_64-redhat-linux/4.0.2/../../../../include/c++/4.0.2/ext/mt_allocator.h:386: > > | first defined here > > | > > | And plenty more on FC4. > > > > I don't get them. > > > > FC4 and FC5 works flawlessly for me. > > Just catching up with the mailing list... > > Aha!!! Someone else is seeing these now too! Yes, I see/saw them too. The remedy is more or less what Lars suggested: add the --disable-pch option to configure, run it, and make clean. The 'make clean' is essential here. Then the compile and link goes through without error. - Martin signature.asc Description: This is a digitally signed message part
Re: [patch] fix bug 1473: Implement phantom in math
On Mon, Apr 17, 2006 at 08:57:54PM +0200, Georg Baum wrote: > Am Montag, 17. April 2006 18:24 schrieb Enrico Forestieri: > > It would also be nice having a report in the status line about the > > size of the delimiter when the cursor is next to it. > > That is not possible with this approach, since the status line info is > only obtained if the cursor is inside an inset. Ok, I think one can live with that. > > However, even converting it to 1.4, I don't obtain correct results > > loading it in 1.5. I also attach here a test file test-1.4.lyx and > > the results I obtain with 1.4 (test-1.4.png) and 1.5 (test-1.5.png). > > The reason was a stupid mistake I made. Please try the attached, updated > patch. I intend to commit this unless I get objections regarding the > general approach. This patch works with both 1.4 and 1.5. However, there is a problem with brackets. Bigger "{" and "}" can be created on screen but the generated latex is wrong. For example one obtains "\Bigl {" and "\Bigr }" instead of the correct "\Bigl\{" and "\Bigr\}". Conversely, when loading a file containing "\Bigl\{", this is not rendered on screen. Please, try the attached LyX document. I created the first two brackets with an unpatched version of LyX and added the second couple with a patched one. Other constructs such as \bigl\Vert seem to work. Thank you for your efforts Georg, I wish I could be more helpful here. -- Enrico
Re: [patch] fix bug 1473: Implement phantom in math
On Tue, Apr 18, 2006 at 07:06:10AM +0200, Enrico Forestieri wrote: > Please, try the attached LyX document. I created the first two > brackets with an unpatched version of LyX and added the second couple > with a patched one. I forgot to attach the file. -- Enrico #LyX 1.4.1 created this file. For more info see http://www.lyx.org/ \lyxformat 245 \begin_document \begin_header \textclass article \language english \inputencoding auto \fontscheme default \graphics default \paperfontsize default \spacing single \papersize default \use_geometry false \use_amsmath 2 \cite_engine basic \use_bibtopic false \paperorientation portrait \secnumdepth 3 \tocdepth 3 \paragraph_separation indent \defskip medskip \quotes_language english \papercolumns 1 \papersides 1 \paperpagestyle default \tracking_changes false \output_changes true \end_header \begin_body \begin_layout Standard \begin_inset Formula \[ \Bigl\{\Bigr\}\Bigl {\Bigr }\] \end_inset \end_layout \end_body \end_document
Re: make rpmdist failure (1.5.0svn)
On Tue, Apr 11, 2006 at 01:38:05PM +0200, Georg Baum wrote: > Jose' Matos wrote: > > > Why does not show lyx2lyx_version.py.in in svn? > > > > in the lyx2lyx directory: > ... > > note that lyx2lyx_version.py.in is absent. > > It is not when I do the same here. Do a "make dist" then use the resulting tar-ball to try and make lyx, you will see the problem then. lyx2lyx_version does not make it into the tarball. -- Kayvan A. Sylvan | Proud husband of | Father to my kids: Sylvan Associates, Inc. | Laura Isabella Sylvan, | Katherine Yelena (8/8/89) http://sylvan.com/~kayvan | my beautiful Queen.| Robin Gregory (2/28/92)
Re: [Patch] Re: Undo/math debugging
On Thu, 2006-04-13 at 11:42 +0300, Martin Vermeer wrote: > * math_nestinset.C > (MathNestInset::doDispatch): replace recordUndo by recordUndoInset for > LFUN_DELETE, to fix undo behaviour Now it's in 1.4.x too - Martin signature.asc Description: This is a digitally signed message part