Errors building 1.4.0 (?)
I'm trying to build the CVS version for the first time. I used the page that google had cached from www.devel.lyx.org on getting LyX sources from CVS to get started. That page talks about building the development module but doesn't talk about what that is. The difference is that you run the autogen.sh script before doing the configure/make/make install dance. I did that. The build platform is FreeBSD 5.4-STABLE. That uses gcc 3.4.2. The configure args I used were --with-frontend=qt --with-qt-dir=/usr/X11R6 --with-aspell -with-extra-lib=/usr/opt/lib -with-extra-inc=/usr/opt/include. The FreeBSD ports tree builds version 1.3.5 with no patches. I used the option it had to build with qt and aspell, and it adds the -with-extra-* arguments to configure when it builds 1.3.5. Since I'm using the same qt installation, I figured copying them couldn't hurt. The compile exits with a slew of missig references to Qt objects. The command that generated them and the first of them looks like this: g++ -fno-exceptions -g -O -o lyx-qt main.o Bidi.o BufferView.o BufferView_pimpl.o Bullet.o Bran chList.o Chktex.o CutAndPaste.o DepTable.o FloatList.o Floating.o FontIterator.o FuncStatus.o I nsetList.o LColor.o LaTeX.o LaTeXFeatures.o LyXAction.o MenuBackend.o ParagraphParameters.o Pri nterParams.o Spacing.o Thesaurus.o ToolbarBackend.o author.o boost.o box.o buffer.o buffer_func s.o bufferlist.o bufferparams.o bufferview_funcs.o changes.o chset.o converter.o counters.o coo rdcache.o cursor.o cursor_slice.o debug.o dimension.o dociterator.o encoding.o errorlist.o expo rter.o gettext.o factory.o format.o funcrequest.o graph.o importer.o intl.o insetiterator.o kbm ap.o kbsequence.o language.o lastfiles.o lengthcommon.o lyx_cb.o lyx_main.o lyx_sty.o lyxfont.o lyxfind.o lyxfunc.o lyxgluelength.o lyxlayout.o lyxlength.o lyxlex.o lyxlex_pimpl.o lyxrc.o ly xrow.o lyxrow_funcs.o lyxserver.o lyxsocket.o lyxtextclass.o lyxtextclasslist.o lyxvc.o message s.o metricsinfo.o mover.o output.o outputparams.o output_docbook.o output_latex.o output_linuxd oc.o output_plaintext.o paragraph.o paragraph_funcs.o paragraph_pimpl.o pariterator.o ispell.o SpellBase.o rowpainter.o sgml.o tabular.o tex-accent.o tex-strings.o texrow.o text.o text2.o te xt3.o toc.o trans.o trans_mgr.o undo.o vc-backend.o version.o vspace.o mathed/.libs/libmathed. a insets/.libs/libinsets.a frontends/.libs/libfrontends.a frontends/qt2/.libs/libqt2.a -L/usr/X 11R6//lib frontends/controllers/.libs/libcontrollers.a graphics/.libs/libgraphics.a support/.li bs/libsupport.a ../boost/libs/regex/src/.libs/libboost_regex.a ../boost/libs/signals/src/.libs/ libboost_signals.a ../boost/libs/filesystem/src/.libs/libboost_filesystem.a ../intl/libintl.a - lSM -lICE -lm -L/usr/X11R6/lib -lX11 -lz frontends/qt2/.libs/libqt2.a(Alert_pimpl.o)(.text+0x150): In function `prompt_pimpl(std::string const, std::string const, int, int, std::string const, std::string const, std::string cons t)': /usr/X11R6//include/qapplication.h:451: undefined reference to `QApplication::focus_widget' Looking over this, it's a link command - except that I don't see a qt library being linked in. Grovelling through config.status finds: s,@QT_LIB@,,;t t, which sure looks like it didn't set the QT library properlty. I could probably figure this out myself - except it's 3am, and I've been fighting recalcitrant hardware all night. I'm going to sleep, then to work, and with luck and help from you all, I'll find a solution in my mailbox tomorrow evening. Thanks, mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.
Re: Errors building 1.4.0 (?)
Mike Meyer wrote: Looking over this, it's a link command - except that I don't see a qt library being linked in. Grovelling through config.status finds: s,@QT_LIB@,,;t t, which sure looks like it didn't set the QT library properlty. It looks like configure does not find the qt libary (but it seems to find the headers). This looks like a configure bug: It should stop with an error message if the library cannot be found. Could you please post the lines of config.log where it searches for the qt library? (around the message checking for Qt library name). Have you tried it without the --qt-dir switch? Georg
Re: byte compilation of lyx2lyx files
Angus Leeming [EMAIL PROTECTED] writes: | Lars Gullik Bjønnes wrote: | | Angus Leeming [EMAIL PROTECTED] writes: | | | Luis Rivera reports that make install is failing for him because he | | doesn't have python installed. Could someone sort this out please. | | Hmm... we kindo require python for building. | | We do? Where? Since when? It is in the kindo cathegory. -- Lgb
Re: byte compilation of lyx2lyx files
[EMAIL PROTECTED] (Lars Gullik Bjønnes) writes: | Angus Leeming [EMAIL PROTECTED] writes: | | | Lars Gullik Bjønnes wrote: | | | | Angus Leeming [EMAIL PROTECTED] writes: | | | | | Luis Rivera reports that make install is failing for him because he | | | doesn't have python installed. Could someone sort this out please. | | | | Hmm... we kindo require python for building. | | | | We do? Where? Since when? | | It is in the kindo cathegory. We should be able to handle the no-python case with some use of AM_CONDITIONAL([HAVE_PYTHON], [test $PYTHON != :]) just let lyx2lyx's Makefile.am not do anything unless HAVE_PYTHON is defined. -- Lgb
Re: large executable
Pol == Pol [EMAIL PROTECTED] writes: Pol Jean-Marc Lasgouttes wrote: that i am compiling lyx 1.4 Paolo The compiled lyx 1.4 executable from cvs, last april, was 4.2 Paolo megabytes; but in that case compilation had been accoplished on Paolo ordinary intel desktop workstation. That is the reason for Paolo suspecting something wrong, On what system are you compiling? Pol it is debian unstable with gcc 4.0.1-3 (corresponding to gcc Pol version 4.0.2 20050725 (prerelease), as resulting from ' gcc -v Pol ') and libqt3-mt-dev 3.3.4-3 what does size ./lyx day? Here (gcc 3.4.1) I get: fantomas: size src/lyx textdata bss dec hex filename 6083056 17680 35060 6135796 5d9ff4 src/lyx JMarc
Re: LyX 140 configure problem with awk
Bennett == Bennett Helm [EMAIL PROTECTED] writes: Bennett That seems to work for me. The important question is whether the information in lyx.pot is reasonable. You should see entries like: msgid \\arabic{enumi}. msgstr (what is important here is the double backslash). JMarc
Re: byte compilation of lyx2lyx files
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Luis Rivera reports that make install is failing for him Angus because he doesn't have python installed. Could someone sort Angus this out please. I need more details, could you point me to the relevant thread? Basically, this is supposed to work provided automake is recent enough. So, if I do not see the error message, there is nothing I can do. JMarc
Re: [PATCH] bug 1941: toolbars disabled after dialog action
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg I tried to understand where in the code that happens, but Georg failed. Could you please tell me the place where the main Georg window without focus prevents the icons from being enabled? In LyXFunc::getStatus, you will find: /* In LyX/Mac, when a dialog is open, the menus of the application can still be accessed without giving focus to the main window. In this case, we want to disable the menu entries that are buffer-related. */ Buffer * buf; if (cmd.origin == FuncRequest::UI !owner-hasFocus()) buf = 0; else buf = owner-buffer(); We do as if there was no buffer. This means that all not buffer-related functions are still active. My fix is to avoid updating toolbar/menubar for INTERNAL dispatches. Georg I don't think that this is the right fix. The problem is Georg qt-only, so it should be fixed in the qt frontend. It is not really qt-only. The same code would trigger for a Cocoa port, or a Gtk/osx. Georg I don't know if that currently happens, but I could imagine the Georg case where applying a dialog makes an lfun invalid. In this Georg case we certainly want that icon to be disabled, but that does Georg not work anymore with your fix. Indeed. Georg The right fix is IMHO to fix the focus problem. Why is it not Georg possible to give the focus to the main window after a dialog is Georg closed? This is what I tried first, actually: updating the tool/menu bars after the window has been hidden in Dialog::hide. It did not work, and I do not understand why. JMarc
Re: byte compilation of lyx2lyx files
Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes: Lars [EMAIL PROTECTED] (Lars Gullik Bjønnes) writes: | Angus Leeming Lars [EMAIL PROTECTED] writes: Lars | Lars | | Lars Gullik Bjønnes wrote: Lars | | Lars | | Angus Leeming [EMAIL PROTECTED] writes: Lars | | Lars | | | Luis Rivera reports that make install is failing for Lars him because he | | | doesn't have python installed. Could Lars someone sort this out please. Lars | | Lars | | Hmm... we kindo require python for building. Lars | | Lars | | We do? Where? Since when? Lars | Lars | It is in the kindo cathegory. Lars We should be able to handle the no-python case with some use of Actually, I do not see why it should not work when PYTHON=:. That's why I'd like to see the error first. JMarc
Re: byte compilation of lyx2lyx files
On Tuesday 13 September 2005 10:44, Jean-Marc Lasgouttes wrote: Actually, I do not see why it should not work when PYTHON=:. That's why I'd like to see the error first. I am puzzled as well. We made the support for python conditional, it should not fail if python is not present. JMarc -- José Abílio
Re: byte compilation of lyx2lyx files
Jean-Marc Lasgouttes wrote: Angus Luis Rivera reports that make install is failing for him Angus because he doesn't have python installed. Could someone sort Angus this out please. I need more details, could you point me to the relevant thread? Basically, this is supposed to work provided automake is recent enough. So, if I do not see the error message, there is nothing I can do. JMarc Luis didn't provide much information. Just the second paragraph here, IIRC: http://article.gmane.org/gmane.editors.lyx.devel:47931 I'll drop him a line. -- Angus
Re: byte compilation of lyx2lyx files
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Luis didn't provide much information. Just the second paragraph Angus here, IIRC: Angus http://article.gmane.org/gmane.editors.lyx.devel:47931 Yes, I saw that. Angus I'll drop him a line. Thanks. JMarc
Safer Win32 get_temp_path, os::internal_path
Jean-Marc, all, following our earlier discussion, I attach a little test code to show what I think we need to produce robust code on Windows. The attached code should compile on all flavours of Windows = Win95 and should behave gracefully on older versions for which GetLongPathName is just a stub. I propose to post this sample off to Luis Rivera and get him to try it out on Win95/Win98 but I'd of course welcome any sanity checks and comments from you first. Angus (the one of questionable moral character :-P) $ g++ -I$HOME/lyx/13x/boost -o trial trial.cpp $ ./trial Temp dir is C:/Documents and Settings/Angus/Local Settings/Temp/ #include boost/assert.hpp #include iostream #include string #include vector /* * MinGW's version of winver.h contains this comment: * * If you need Win32 API features newer the Win95 and WinNT then you must * define WINVER before including windows.h or any other method of including * the windef.h header. * * GetLongPathNameA requires WINVER == 0x0500. * * It doesn't matter if the Windows version is older than this because the * function will compile but will fail at run time. See * http://msdn.microsoft.com/library/en-us/mslu/winprog/microsoft_layer_for_unicode_apis_with_limited_support.asp */ # if defined(__MINGW32__) # define WINVER 0x0500 # endif #include windows.h using std::string; using std::vector; namespace { string const subst(string const a, string const oldstr, string const newstr) { BOOST_ASSERT(!oldstr.empty()); string lstr(a); string::size_type i = 0; string::size_type const olen = oldstr.length(); while ((i = lstr.find(oldstr, i)) != string::npos) { lstr.replace(i, olen, newstr); i += newstr.length(); // We need to be sure that we dont // use the same i over and over again. } return lstr; } namespace os { string const internal_path(string const p) { string const short_path = subst(p, \\, /); vectorchar long_path(PATH_MAX); DWORD result = GetLongPathName(short_path.c_str(), long_path[0], long_path.size()); if (result long_path.size()) { long_path.resize(result); result = GetLongPathName(short_path.c_str(), long_path[0], long_path.size()); BOOST_ASSERT(result = long_path.size()); } return (result == 0) ? short_path : long_path[0]; } } // namespace os string const get_temp_dir() { // Typical example: C:/TEMP/. char path[PATH_MAX]; DWORD const result = GetTempPath(PATH_MAX, path); BOOST_ASSERT(result 0 result = PATH_MAX); return os::internal_path(path); } } // namespace anon int main() { string const temp_dir = get_temp_dir(); std::cout Temp dir is temp_dir std::endl; return 0; }
Re: large executable
Jean-Marc Lasgouttes wrote: what does size ./lyx day? Here (gcc 3.4.1) I get: fantomas: size src/lyx textdata bss dec hex filename 6083056 17680 35060 6135796 5d9ff4 src/lyx % size /usr/local/bin/lyx textdata bss dec hex filename 11134899 394540 35332 11564771b076e3 /usr/local/bin/lyx -- Paolo
Re: gcc4 prevents some languages from working - still stuck :-(
Martin Vermeer wrote: On Wed, Aug 17, 2005 at 04:31:07PM +0100, Angus Leeming wrote: Martin Vermeer wrote: On Tue, 2005-08-16 at 12:59, Helge Hafting wrote: I noticed something very strange today. I could not get lyx-1.4cvs to display norwegian text at all. no_NO, no_NO.iso8859-1, no_NO.utf-8 all gave me english. This on a machine that uses gcc 4.01, another machine using gcc-3.3.6 works. Other languages, like nn_NO works. So, it is not a case of complete locale breakdown, and not a case of a completely broken no.po either. Any ideas? I was going to check if recent fixes had added strings I could translate, but this is driving me nuts. The no_NO locales works for other programs, such as ls. So I belive the distribution is correctly set up. Helge Hafting Does nb_NO work? Debugging this would be much, much easier if we changed gettext_init (lyx 1.3.x) in src/gettext.C to something like: void gettext_init(string const localedir) { char const * const btd = bindtextdomain(PACKAGE, localedir.c_str()); char const * const td = textdomain(PACKAGE); if (!btd || !td) { lyxerr Failed to initialize localedir localedir successfully\nbindtextdomain btd \ntextdomain td std::endl; } } An equivalent change to lyx 1.4 is also needed, IMO. This *is* a 1.4 issue. In 1.4, the relevant code is in src/messages.C. It's not pretty. This stuff was touched in Paris. 117 char const * works = setlocale(LC_MESSAGES, lang_.c_str()); add a printout here: if (!works) lyxerr Locale lang_ could not be set std::endl; I'll commit this as it is clearly needed. I am still stuck on this. I can't get no_NO to work for the no.po in cvs. There are no error messages (or any message different from when trying other working languages, like nn_NO). I simply get english when LANG=no_NO (or no_NO.iso8859-1). This seems to imply that something is wrong in the no.po file, but I have no idea what that could be. make no.gmo gives no error messages, the file is created, but Norwegian language just don't work. Helge Hafting
Re: gcc4 prevents some languages from working - still stuck :-(
On Tue, 2005-09-13 at 13:26 +0200, Helge Hafting wrote: ... I am still stuck on this. I can't get no_NO to work for the no.po in cvs. There are no error messages (or any message different from when trying other working languages, like nn_NO). I simply get english when LANG=no_NO (or no_NO.iso8859-1). This seems to imply that something is wrong in the no.po file, but I have no idea what that could be. make no.gmo gives no error messages, the file is created, but Norwegian language just don't work. Helge Hafting This is utterly weird. Did you create a bug in bugzilla for this? - Martin signature.asc Description: This is a digitally signed message part
Re: Safer Win32 get_temp_path, os::internal_path
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Jean-Marc, all, following our earlier discussion, I attach a Angus little test code to show what I think we need to produce robust Angus code on Windows. The attached code should compile on all Angus flavours of Windows = Win95 and should behave gracefully on Angus older versions for which GetLongPathName is just a stub. This looks good, if it works. Angus Angus (the one of questionable moral character :-P) To tell, the truth, I suspected it already, and was rather relieved not to have you in my house last July. I do not know what my neighbours would have thought. JMarc
Re: Errors building 1.4.0 (?)
In [EMAIL PROTECTED], Georg Baum [EMAIL PROTECTED] typed: Mike Meyer wrote: Looking over this, it's a link command - except that I don't see a qt library being linked in. Grovelling through config.status finds: s,@QT_LIB@,,;t t, which sure looks like it didn't set the QT library properlty. It looks like configure does not find the qt libary (but it seems to find the headers). This looks like a configure bug: It should stop with an error message if the library cannot be found. Could you please post the lines of config.log where it searches for the qt library? (around the message checking for Qt library name). Sure: configure:24202: checking for Qt library name configure:24247: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt-mt 5 /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_cleanup_pop' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_destroy' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_init' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_exit' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_cancel' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_testcancel' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_cleanup_push' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_getschedpolicy' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_setinheritsched' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_setstacksize' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_setschedparam' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_setdetachstate' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_cond_timedwait' configure:24253: $? = 1 configure: failed program was: [listing of failing program elided] configure:24247: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt-mt3 5 /usr/bin/ld: cannot find -lqt-mt3 configure:24253: $? = 1 configure: failed program was: [listing of failed program elded] configure:24247: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt3 5 /usr/bin/ld: cannot find -lqt3 configure:24253: $? = 1 configure: failed program was: [listing of failed program elded] configure:24247: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt2 5 /usr/bin/ld: cannot find -lqt2 configure:24253: $? = 1 configure: failed program was: [listing of failed program elded] configure:24247: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt 5 /usr/bin/ld: cannot find -lqt configure:24253: $? = 1 configure: failed program was: configure:24289: result: failed configure:24306: checking whether the Qt library is multi-threaded configure:24345: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 5 /var/tmp//cc4P8UEz.o(.text+0x118): In function `main': /home/mwm/external-src/lyx-devel/conftest.cc:51: undefined reference to `QApplication::QApplica tion(_XDisplay*, unsigned long, unsigned long)' /var/tmp//cc4P8UEz.o(.text+0x123):/home/mwm/external-src/lyx-devel/conftest.cc:52: undefined re ference to `QApplication::unlock(bool)' /var/tmp//cc4P8UEz.o(.text+0x136):/home/mwm/external-src/lyx-devel/conftest.cc:55: undefined re ference to `QApplication::~QApplication()' /var/tmp//cc4P8UEz.o(.text+0x14c):/home/mwm/external-src/lyx-devel/conftest.cc:55: undefined re ference to `QApplication::~QApplication()' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTV6QGList+0xc): undefined reference to `QGList::clear()' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTV6QGList+0x10):/usr/include/c++/3.4/bits/basic_string.h :257: undefined reference to `QGList::~QGList()' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTV6QGList+0x14):/usr/include/c++/3.4/bits/basic_string.h :532: undefined reference to `QGList::~QGList()' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTV6QGList+0x18):/usr/include/c++/3.4/bits/stl_algobase.h :151: undefined reference to `QPtrCollection::newItem(void*)' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTV6QGList+0x20):/usr/include/c++/3.4/bits/stl_algobase.h :156: undefined reference to `QGList::compareItems(void*, void*)' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTI6QGList+0x8):/usr/X11R6//include/qglist.h:152: undefin ed reference to
Re: Safer Win32 get_temp_path, os::internal_path
Jean-Marc Lasgouttes wrote: Angus Jean-Marc, all, following our earlier discussion, I attach a Angus little test code to show what I think we need to produce robust Angus code on Windows. The attached code should compile on all Angus flavours of Windows = Win95 and should behave gracefully on Angus older versions for which GetLongPathName is just a stub. This looks good, if it works. Well, it works for me. Time will tell if it works for Luis. Angus Angus (the one of questionable moral character :-P) To tell, the truth, I suspected it already, and was rather relieved not to have you in my house last July. I do not know what my neighbours would have thought. Funny. I had you down as bohémien rather than a member of the bourgeoisie. Anyway, wasn't it your parents' neighbours rather than your own? Angus (scandalous individual)
Re: Errors building 1.4.0 (?)
Mike Meyer wrote: I can tell you what went wrong with the first command: it needs the FreeBSDism -pthread to link with the threaded version of libc. That means we'll need to fix the configure script. Thanks for debugging! Can you test the attached (untested) patch? Don't forget to run autogen.sh. I also think that we should set FATAL=1 in qt.m4. That would give a sensible error message. It is nonsense to compile for qt when the resulting executable cannot be linked. Again, this worked without patching in 1.3.5. Strange. GeorgIndex: config/qt.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/qt.m4,v retrieving revision 1.15 diff -u -p -r1.15 qt.m4 --- config/qt.m4 17 Jul 2005 23:40:08 - 1.15 +++ config/qt.m4 13 Sep 2005 12:31:19 - @@ -114,6 +114,12 @@ AC_DEFUN([QT_CHECK_COMPILE], QT_TRY_LINK($libname) if test -n $qt_cv_libname; then break; + else +dnl on FreeBSD we need -pthread for threaded libs +QT_TRY_LINK($libname -pthread) +if test -n $qt_cv_libname; then + break; +fi fi done
Replacing SHGetFolderPath
As older flavours of Windows don't support SHGetFolderPath out of the box, Jean-Marc has suggested that we use the more cumbersome but also more portable SHGetSpecialFolderLocation. I propose the attached code as a replacement for the existing win32_folder_path in src/support/package.C. $ g++ -I$HOME/lyx/13x/boost -W -Wall -o get_folder get_folder.cpp $ ./get_folder.exe Document dir: C:\Documents and Settings\Angus\My Documents App data dir: C:\Documents and Settings\Angus\Application Data I'll post this off to Luis Rivera to check that it compiles/runs on his older machines. One thing that is side-stepped by the code at the moment is what should we do if string() is returned for either document dir or app data dir? Should we assert? Angus #include boost/assert.hpp #include iostream #include string # include windows.h # include shlobj.h // SHGetFolderPath using std::string; // Given a folder ID, returns the folder name (in unix-style format). // Eg CSIDL_PERSONAL - C:/Documents and Settings/USERNAME/My Documents string const win32_folder_path(int folder_id) { // Microsoft recommend the use of SHGetFolderPath to do // what we're attempting here, but SHGetFolderPath won't work // out of the box on older (Win98) flavours of Windows. // Either we distribute shfolder.dll (fully-redistributable part // of IE 4) and ensure that we link against it before we link // shell32.dll, or we use SHGetSpecialFolderLocation instead. LPITEMIDLIST id_list; if (SHGetSpecialFolderLocation(0, folder_id, id_list) != S_OK) return string(); char folder_path[PATH_MAX]; DWORD const result = SHGetPathFromIDList(id_list, folder_path); LPMALLOC allocator; if (SHGetMalloc(allocator) == S_OK) { allocator-Free(id_list); allocator-Release(); } return (result == TRUE) ? folder_path : string(); } int main() { std::cout Document dir: win32_folder_path(CSIDL_PERSONAL) \nApp data dir: win32_folder_path(CSIDL_APPDATA) std::endl; return 0; }
Re: Safer Win32 get_temp_path, os::internal_path
Angus == Angus Leeming [EMAIL PROTECTED] writes: To tell, the truth, I suspected it already, and was rather relieved not to have you in my house last July. I do not know what my neighbours would have thought. Angus Funny. I had you down as bohémien rather than a member of the Angus bourgeoisie. Well, I have some funny bourgeois in my mother's family. And I went mainly to private catholic schools. Angus Anyway, wasn't it your parents' neighbours rather than your Angus own? God forbid! I would not even have thought about inviting strangers in this case! We are now in our own appartment, so I only have to care about my reputation, which is nevertheless a lot, as you will undoubtlessly agree. JMarc
Re: LyX 140 configure problem with awk
On Sep 13, 2005, at 5:16 AM, Jean-Marc Lasgouttes wrote: The important question is whether the information in lyx.pot is reasonable. You should see entries like: msgid \\arabic{enumi}. msgstr (what is important here is the double backslash). I don't get \\arabic{enumi} in particular. I do get double backslashes in the following cases, all of which look reasonable: \\begin_header \\begin_document \\, \\: \\; \\quad \\qquad ... etc. in QMathDialog.C \\input \\include \\verbatiminput \\usepackage \\documentclass \\selectlanguage There aren't cases of single backslashes where it looks like doubles should be used instead. Is that what you need to know? Bennett
Re: Replacing SHGetFolderPath
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus As older flavours of Windows don't support SHGetFolderPath out Angus of the box, Jean-Marc has suggested that we use the more Angus cumbersome but also more portable SHGetSpecialFolderLocation. Angus I propose the attached code as a replacement for the existing Angus win32_folder_path in src/support/package.C. Looks good. Angus One thing that is side-stepped by the code at the moment is Angus what should we do if string() is returned for either document Angus dir or app data dir? Should we assert? If the app data dir is empty, we will eventually exit somewhere, I guess. As far as the document data dir is concerned, I am not sure this really matters. JMarc
Re: Safer Win32 get_temp_path, os::internal_path
Jean-Marc Lasgouttes wrote: Angus Anyway, wasn't it your parents' neighbours rather than your Angus own? God forbid! I would not even have thought about inviting strangers in this case! We are now in our own appartment, so I only have to care about my reputation, which is nevertheless a lot, as you will undoubtlessly agree. Oh, I don't know. I'm quite careless about the reputation of others, apparently, which is what got me into trouble on the lyx-users' list in the first place :-P -- Angus
Re: LyX 140 configure problem with awk
Bennett == Bennett Helm [EMAIL PROTECTED] writes: Bennett On Sep 13, 2005, at 5:16 AM, Jean-Marc Lasgouttes wrote: The important question is whether the information in lyx.pot is reasonable. You should see entries like: msgid \\arabic{enumi}. msgstr (what is important here is the double backslash). Bennett I don't get \\arabic{enumi} in particular. I do get double Bennett backslashes in the following cases, all of which look Bennett reasonable: Bennett There aren't cases of single backslashes where it looks like Bennett doubles should be used instead. Bennett Is that what you need to know? What I am interested in are entries related to LabelString in layout files, so my enumi example was not very well chosen. For example, numarticle.inc says Style Section LabelType Counter LabelCounter section LabelString \arabic{section} LabelStringAppendix \Alph{section} TocLevel 1 End so you should find the strings \\arabic{section} and \\Alph{section} in the .pot file. JMarc
Re: Replacing SHGetFolderPath
Jean-Marc Lasgouttes wrote: Angus As older flavours of Windows don't support SHGetFolderPath out Angus of the box, Jean-Marc has suggested that we use the more Angus cumbersome but also more portable SHGetSpecialFolderLocation. Angus I propose the attached code as a replacement for the existing Angus win32_folder_path in src/support/package.C. Looks good. One thing I note from the MSDN website is: = http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shgetmalloc.asp SHGetMalloc Function Not currently supported. Remarks This function should no longer be used. Use the CoTaskMemFree and CoTaskMemAlloc functions in its place. = I've just ignored this advice, but this blog article http://blogs.msdn.com/oldnewthing/archive/2004/07/05/173226.aspx suggests that all should be fine anyway (since I think that we link against ole32.dll) Ain't life on Windoze complicated! -- Angus
Re: LyX 140 configure problem with awk
On Sep 13, 2005, at 8:56 AM, Jean-Marc Lasgouttes wrote: What I am interested in are entries related to LabelString in layout files, so my enumi example was not very well chosen. Actually, it was my fault: I was stupidly looking at lyx.pot from the wrong build. For example, numarticle.inc says Style Section LabelType Counter LabelCounter section LabelString \arabic{section} LabelStringAppendix \Alph{section} TocLevel 1 End so you should find the strings \\arabic{section} and \\Alph{section} in the .pot file. Yes -- they're all there (at least every one I checked!). Bennett
Re: Replacing SHGetFolderPath
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus One thing I note from the MSDN website is: Angus = Angus http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shgetmalloc.asp Angus SHGetMalloc Function Angus Not currently supported. Angus Remarks This function should no longer be used. Use the Angus CoTaskMemFree and CoTaskMemAlloc functions in its place. Angus = Angus I've just ignored this advice, but this blog article Angus http://blogs.msdn.com/oldnewthing/archive/2004/07/05/173226.aspx Angus suggests that all should be fine anyway (since I think that we Angus link against ole32.dll) Indeed... JMarc
[PATCH] bug 2010: Entering/leaving text inset requires two cursor left/right keystrokes
The following patch fixes bug 2010: http://bugzilla.lyx.org/show_bug.cgi?id=2010 This was an unintended consequence of the work Juergen V. did to allow placing the cursor in front of a displayed inset. Please test. JMarc Index: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2277 diff -u -p -r1.2277 ChangeLog --- src/ChangeLog 10 Sep 2005 13:29:43 - 1.2277 +++ src/ChangeLog 13 Sep 2005 13:44:39 - @@ -1,3 +1,8 @@ +2005-09-13 Jean-Marc Lasgouttes [EMAIL PROTECTED] + + * text2.C (cursorEnd, cursorRight): do not set boundary to true at + end of paragraph. (bug 2010) + 2005-09-10 Georg Baum [EMAIL PROTECTED] * text.C (leftMargin): check for inInset == 0 Index: src/text2.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.627 diff -u -p -r1.627 text2.C --- src/text2.C 5 Sep 2005 06:50:42 - 1.627 +++ src/text2.C 13 Sep 2005 13:44:40 - @@ -498,12 +498,13 @@ void LyXText::cursorEnd(LCursor cur) // empty text, end-1 is no valid position return; bool boundary = false; - if (!cur.paragraph().isLineSeparator(end-1) - !cur.paragraph().isNewline(end-1)) - { - boundary = true; - } else if (end != cur.lastpos()) - --end; + if (end != cur.lastpos()) { + if (!cur.paragraph().isLineSeparator(end-1) + !cur.paragraph().isNewline(end-1)) + boundary = true; + else + --end; + } setCursor(cur, cur.pit(), end, true, boundary); } @@ -1021,6 +1022,7 @@ bool LyXText::cursorRight(LCursor cur) bool updateNeeded = false; if (!checkAndActivateInset(cur, true)) { if (cur.textRow().endpos() == (cur.pos() + 1) + !cur.lastpos() == (cur.pos() + 1) !cur.paragraph().isLineSeparator(cur.pos()) !cur.paragraph().isNewline(cur.pos())) {
Re: LyX 140 configure problem with awk
Bennett == Bennett Helm [EMAIL PROTECTED] writes: so you should find the strings \\arabic{section} and \\Alph{section} in the .pot file. Bennett Yes -- they're all there (at least every one I checked!). Very good. I'll apply the patch. JMarc
Re: [PATCH] bug 1941: toolbars disabled after dialog action
Jean-Marc Lasgouttes wrote: Georg == Georg Baum [EMAIL PROTECTED] writes: Georg I tried to understand where in the code that happens, but Georg failed. Could you please tell me the place where the main Georg window without focus prevents the icons from being enabled? In LyXFunc::getStatus, you will find: Thanks, now I see it (I was searching in frontends/qt2) It is not really qt-only. The same code would trigger for a Cocoa port, or a Gtk/osx. I see. Because XFormsView::hasFocus() and GView::hasFocus() are too stupid we don't see the bug there. Georg The right fix is IMHO to fix the focus problem. Why is it not Georg possible to give the focus to the main window after a dialog is Georg closed? This is what I tried first, actually: updating the tool/menu bars after the window has been hidden in Dialog::hide. It did not work, and I do not understand why. The problem is that the main window still has no focus when Dialog::hide is called. I tried to activate it with QMainWindow::setFocus() and QMainWindow::show(), but neither worked. I'll investigate further. Georg
Re: [PATCH] bug 1941: toolbars disabled after dialog action
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg The problem is that the main window still has no focus when Georg Dialog::hide is called. I tried to activate it with Georg QMainWindow::setFocus() and QMainWindow::show(), but neither Georg worked. I'll investigate further. Thanks. JMarc
Re: Errors building 1.4.0 (?)
Am Dienstag, 13. September 2005 14:30 schrieb John Levon: On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: It looks like configure does not find the qt libary (but it seems to find the headers). This looks like a configure bug: It should stop with an error message if the library cannot be found. IIRC Lars changed this. I now remember that, too. I also remember that I added error messages for moc and uic, so here comes the logical extension. Mike, could you please test whether configure aborts with this patch (and without the other one) if it cannot find the qt library? Georg Index: ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v retrieving revision 1.1023 diff -u -p -r1.1023 ChangeLog --- ChangeLog 18 Jul 2005 15:49:56 - 1.1023 +++ ChangeLog 13 Sep 2005 14:23:16 - @@ -1,3 +1,8 @@ +2005-09-13 Georg Baum [EMAIL PROTECTED] + + * configure.ac: error out if qt frontend is choosen but no qt library + was found + 2005-07-18 Lars Gullik Bjønnes [EMAIL PROTECTED] * configure.ac: version back to 1.4.0cvs Index: configure.ac === RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.58 diff -u -p -r1.58 configure.ac --- configure.ac 18 Jul 2005 15:49:57 - 1.58 +++ configure.ac 13 Sep 2005 14:23:16 - @@ -216,6 +219,9 @@ dnl qt build will fail without moc or ui fi if test -z $UIC; then LYX_ERROR([uic binary not found !]) + fi + if test -z $QT_LIB; then + LYX_ERROR([qt library not found !]) fi ;; *)
Re: Errors building 1.4.0 (?)
Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Am Dienstag, 13. September 2005 14:30 schrieb John Levon: On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: It looks like configure does not find the qt libary (but it seems to find the headers). This looks like a configure bug: It should stop with an error message if the library cannot be found. IIRC Lars changed this. Georg I now remember that, too. I also remember that I added error Georg messages for moc and uic, so here comes the logical extension. Georg Mike, could you please test whether configure aborts with this Georg patch (and without the other one) if it cannot find the qt Georg library? The patch looks good. Concerning the bug itself, could it be related to http://marc.theaimsgroup.com/?l=lyx-develm=112490112909207w=2 JMarc
Re: [PATCH] bug 2010: Entering/leaving text inset requires two cursor left/right keystrokes
Jean-Marc Lasgouttes wrote: The following patch fixes bug 2010: http://bugzilla.lyx.org/show_bug.cgi?id=2010 This was an unintended consequence of the work Juergen V. did to allow placing the cursor in front of a displayed inset. Please test. JMarc why not + cur.lastpos() != (cur.pos() + 1) ? @@ -1021,6 +1022,7 @@ bool LyXText::cursorRight(LCursor cur) bool updateNeeded = false; if (!checkAndActivateInset(cur, true)) { if (cur.textRow().endpos() == (cur.pos() + 1) + !cur.lastpos() == (cur.pos() + 1) !cur.paragraph().isLineSeparator(cur.pos()) !cur.paragraph().isNewline(cur.pos())) -- Angus
Re: [PATCH] bug 2010: Entering/leaving text inset requires two cursor left/right keystrokes
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus why not + cur.lastpos() != (cur.pos() + 1) ? Oops. I am not even sure that the test meant what I thought it meant. What about the following? JMarc Index: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2277 diff -u -p -r1.2277 ChangeLog --- src/ChangeLog 10 Sep 2005 13:29:43 - 1.2277 +++ src/ChangeLog 13 Sep 2005 14:56:01 - @@ -1,3 +1,8 @@ +2005-09-13 Jean-Marc Lasgouttes [EMAIL PROTECTED] + + * text2.C (cursorEnd, cursorRight): do not set boundary to true at + end of paragraph. (bug 2010) + 2005-09-10 Georg Baum [EMAIL PROTECTED] * text.C (leftMargin): check for inInset == 0 Index: src/text2.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.627 diff -u -p -r1.627 text2.C --- src/text2.C 5 Sep 2005 06:50:42 - 1.627 +++ src/text2.C 13 Sep 2005 14:56:01 - @@ -498,12 +498,13 @@ void LyXText::cursorEnd(LCursor cur) // empty text, end-1 is no valid position return; bool boundary = false; - if (!cur.paragraph().isLineSeparator(end-1) - !cur.paragraph().isNewline(end-1)) - { - boundary = true; - } else if (end != cur.lastpos()) - --end; + if (end != cur.lastpos()) { + if (!cur.paragraph().isLineSeparator(end-1) + !cur.paragraph().isNewline(end-1)) + boundary = true; + else + --end; + } setCursor(cur, cur.pit(), end, true, boundary); } @@ -1020,7 +1021,8 @@ bool LyXText::cursorRight(LCursor cur) if (cur.pos() != cur.lastpos()) { bool updateNeeded = false; if (!checkAndActivateInset(cur, true)) { - if (cur.textRow().endpos() == (cur.pos() + 1) + if (cur.textRow().endpos() == cur.pos() + 1 + cur.lastpos() != cur.pos() + 1 !cur.paragraph().isLineSeparator(cur.pos()) !cur.paragraph().isNewline(cur.pos())) {
[PATCH] bug 1926: Paragraph DocIterator::paragraph() by failing check inTexted() in file dociterator.C:144
This patch fixes the crash described in http://bugzilla.lyx.org/show_bug.cgi?id=1926 ``Start a new doc, and start a math formula. Enter it, and leaving the cursor inside the formula, start another new doc. Move back to the old doc via the View menu and: Assertion triggered in Paragraph DocIterator::paragraph() by failing check inTexted() in file dociterator.C:144'' Testing appreciated, although it seems trivially correct (I tried to use LFUN_GETLAYOUT but it (1) leaves the current math inset and (2) displays the result of the lfun in the minibuffer). JMarc Index: src/BufferView_pimpl.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v retrieving revision 1.594 diff -u -p -r1.594 BufferView_pimpl.C --- src/BufferView_pimpl.C 7 Sep 2005 10:00:17 - 1.594 +++ src/BufferView_pimpl.C 13 Sep 2005 15:21:25 - @@ -386,8 +386,20 @@ void BufferView::Pimpl::setBuffer(Buffer owner_-updateWindowTitle(); // This is done after the layout combox has been populated - if (buffer_) - owner_-setLayout(cursor_.paragraph().layout()-name()); + if (buffer_) { + size_t i = cursor_.depth() - 1; + // we know we'll eventually find a paragraph + while (true) { + CursorSlice const slice = cursor_[i]; + if (!slice.inset().inMathed()) { +LyXLayout_ptr const layout = slice.paragraph().layout(); +owner_-setLayout(layout-name()); +break; + } + BOOST_ASSERT(i0); + --i; + } + } if (buffer_ lyx::graphics::Previews::status() != LyXRC::PREVIEW_OFF) lyx::graphics::Previews::get().generateBufferPreviews(*buffer_); Index: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2277 diff -u -p -r1.2277 ChangeLog --- src/ChangeLog 10 Sep 2005 13:29:43 - 1.2277 +++ src/ChangeLog 13 Sep 2005 15:21:26 - @@ -1,3 +1,9 @@ +2005-09-13 Jean-Marc Lasgouttes [EMAIL PROTECTED] + + * BufferView_pimpl.C (setBuffer): when one wants to set the layout + combox, it is necessary to search for the topmost paragraph in the + cursor stack (bug 1926) + 2005-09-10 Georg Baum [EMAIL PROTECTED] * text.C (leftMargin): check for inInset == 0
Re: large executable
Pol [EMAIL PROTECTED] writes: | Jean-Marc Lasgouttes wrote: | what does size ./lyx day? Here (gcc 3.4.1) I get: | fantomas: size src/lyx | textdata bss dec hex filename | 6083056 17680 35060 6135796 5d9ff4 src/lyx | | | % size /usr/local/bin/lyx | textdata bss dec hex filename |11134899 394540 35332 11564771b076e3 /usr/local/bin/lyx Remind me on the platform again please.
Re: Errors building 1.4.0 (?)
John Levon [EMAIL PROTECTED] writes: | On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: | | It looks like configure does not find the qt libary (but it seems to find | the headers). This looks like a configure bug: It should stop with an error | message if the library cannot be found. | | IIRC Lars changed this. firm beliver in running to completion.
Re: bug in tex2lyx windows
Luis Rivera [EMAIL PROTECTED] writes: | Hello, | | I tried to run tex2lyx on win95/98, without success. The programs | crashed crying as follows: | | On win95 | | The TEX2LYX.EXE file is linked to missing export | KERNEL32.DLL:GetFileAttributesExA Can't we just declare that we do not support Win95? How old is XP now? 4 years?
Re: Errors building 1.4.0 (?)
Georg Baum [EMAIL PROTECTED] writes: | Am Dienstag, 13. September 2005 14:30 schrieb John Levon: | On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: | It looks like configure does not find the qt libary (but it seems to find | the headers). This looks like a configure bug: It should stop with an | error message if the library cannot be found. | | IIRC Lars changed this. | | I now remember that, too. I also remember that I added error messages for moc | and uic, so here comes the logical extension. | | Mike, could you please test whether configure aborts with this patch (and | without the other one) if it cannot find the qt library? I hate configures that aborts. IMHO it should run to completion and tell me about all important stuff that went wrong.
Re: [PATCH] bug 2010: Entering/leaving text inset requires two cursor left/right keystrokes
Jean-Marc Lasgouttes wrote: Angus why not + cur.lastpos() != (cur.pos() + 1) ? Oops. I am not even sure that the test meant what I thought it meant. What about the following? Isn't that semantically the same as: @@ -1020,7 +1021,8 @@ bool LyXText::cursorRight(LCursor cur) if (cur.pos() != cur.lastpos()) { bool updateNeeded = false; if (!checkAndActivateInset(cur, true)) { - if (cur.textRow().endpos() == (cur.pos() + 1) + if (cur.textRow().endpos() == cur.pos() + 1 + cur.textRow().endpos() != cur.lastpos() !cur.paragraph().isLineSeparator(cur.pos()) !cur.paragraph().isNewline(cur.pos())) Is that what you mean? Is it clearer? -- Angus
Re: request for help with CVS access to LyX sources
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: | Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes: | | Lars We should take the oppurtunito to move the devel www-site into | Lars the user one. So that we only have one... | | Do you want to keep the web sites separates from the user POV? Merging | them will be a lot of work. We can keep them separate from the users pov, but have them in the same cvs module, and in the same virtual host on the web server.
Re: Errors building 1.4.0 (?)
Lars Gullik Bjønnes wrote: John Levon writes: | On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: | | It looks like configure does not find the qt libary (but it seems to | find the headers). This looks like a configure bug: It should stop | with an error message if the library cannot be found. | | IIRC Lars changed this. firm beliver in running to completion. Can you run to completion but then not generate either the Makefiles or config.h? That would appear to be the best of both worlds. Ie LYX_ERROR sets a boolean flag that is queried before config.h, Makefiles are generated and the configure script exits then. -- Angus
Re: bug in tex2lyx windows
Lars Gullik Bjønnes wrote: Luis Rivera writes: | Hello, | | I tried to run tex2lyx on win95/98, without success. The programs | crashed crying as follows: | | On win95 | | The TEX2LYX.EXE file is linked to missing export | KERNEL32.DLL:GetFileAttributesExA Can't we just declare that we do not support Win95? Sure, but what do we gain by such a declaration. AFAICT, the only piece of code we need to change to support Win98 is the call to SHFetFolderPath. Thereafter, the only piece of code we need to change to support Win95 is the call to GetFileAttributesEx, GetLongPathName. Reviewing the existing code shows that it's unsafe anyway (no handling of errors), so a rewrite is needed anyway. How old is XP now? 4 years? I'm more interested in the intellectual challenge really :) -- Angus
Re: request for help with CVS access to LyX sources
Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes: Lars We can keep them separate from the users pov, but have them in Lars the same cvs module, and in the same virtual host on the web Lars server. That would be OK. JMarc
Re: Errors building 1.4.0 (?)
Lars == Lars Gullik Bjønnes [EMAIL PROTECTED] writes: Lars I hate configures that aborts. IMHO it should run to completion Lars and tell me about all important stuff that went wrong. Georg's patch calls LYX_ERROR, so it should be OK. JMarc
Re: [PATCH] bug 2010: Entering/leaving text inset requires two cursor left/right keystrokes
Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Jean-Marc Lasgouttes wrote: why not + cur.lastpos() != Angus (cur.pos() + 1) ? Oops. I am not even sure that the test meant what I thought it meant. What about the following? Angus Isn't that semantically the same as: Yes it is. Angus Is that what you mean? Is it clearer? Yes, slightly. JMarc Index: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2277 diff -u -p -r1.2277 ChangeLog --- src/ChangeLog 10 Sep 2005 13:29:43 - 1.2277 +++ src/ChangeLog 13 Sep 2005 16:32:14 - @@ -1,3 +1,8 @@ +2005-09-13 Jean-Marc Lasgouttes [EMAIL PROTECTED] + + * text2.C (cursorEnd, cursorRight): do not set boundary to true at + end of paragraph. (bug 2010) + 2005-09-10 Georg Baum [EMAIL PROTECTED] * text.C (leftMargin): check for inInset == 0 Index: src/text2.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.627 diff -u -p -r1.627 text2.C --- src/text2.C 5 Sep 2005 06:50:42 - 1.627 +++ src/text2.C 13 Sep 2005 16:32:14 - @@ -498,12 +498,13 @@ void LyXText::cursorEnd(LCursor cur) // empty text, end-1 is no valid position return; bool boundary = false; - if (!cur.paragraph().isLineSeparator(end-1) - !cur.paragraph().isNewline(end-1)) - { - boundary = true; - } else if (end != cur.lastpos()) - --end; + if (end != cur.lastpos()) { + if (!cur.paragraph().isLineSeparator(end-1) + !cur.paragraph().isNewline(end-1)) + boundary = true; + else + --end; + } setCursor(cur, cur.pit(), end, true, boundary); } @@ -1020,7 +1021,8 @@ bool LyXText::cursorRight(LCursor cur) if (cur.pos() != cur.lastpos()) { bool updateNeeded = false; if (!checkAndActivateInset(cur, true)) { - if (cur.textRow().endpos() == (cur.pos() + 1) + if (cur.textRow().endpos() == cur.pos() + 1 + cur.textRow().endpos() != cur.lastpos() !cur.paragraph().isLineSeparator(cur.pos()) !cur.paragraph().isNewline(cur.pos())) {
Re: large executable
Lars Gullik Bjønnes wrote: | | % size /usr/local/bin/lyx | textdata bss dec hex filename |11134899 394540 35332 11564771b076e3 /usr/local/bin/lyx Remind me on the platform again please. It is debian/unstable + tetex ver. 3.0 packages from the debian/experimental section, -- pol
Re: large executable
Lars Gullik Bjønnes wrote: | | % size /usr/local/bin/lyx | textdata bss dec hex filename |11134899 394540 35332 11564771b076e3 /usr/local/bin/lyx Remind me on the platform again please. It is debian/unstable + tetex ver. 3.0 packages from the debian/experimental section, -- pol
Re: large executable
Pol wrote: -- pol Pol, could you please change the default settings of your email client? Everytime I receive an email from you, Thunderbird asks me to confirm the reception :-( Michael
Re: Errors building 1.4.0 (?)
[Apologies to George, who's seeing this twice.] In [EMAIL PROTECTED], Bennett Helm [EMAIL PROTECTED] typed: On Sep 13, 2005, at 10:03 AM, Mike Meyer wrote: the configure script walks your $PATH looking for sgmltools and/or db2dvi to decide whether or not to configure docbook support. Fink probably put those in /sw/bin. If that's the case, you need to add /sw/bin the path used by LyX. On tiger (sorry, I'm a Mac newbie and haven't dealt with anything else) you edit ~/.MacOSX/environment.plist. There's a GUI plist editor available, but the file is just XML text, so you can use your favorite text editor on it as well. Actually, if all you want is to add /sw/bin to the path that LyX uses, you should do it from within LyX itself: LyX Preferences PATH PATH Prefix. (For LyX/Mac-1.3.6, the default settings already have /sw/bin there.) If you add something to the PATH setting in ~/.MacOSX/environment.plist, that will apply to *every* OS X application, which is probably overkill and potentially a security risk. Whether or not it's overkill depends on how many applications you have that want to use programs from fink (or, in my case, darwinports). I have a couple, so doing things this way is easier for me. I found this method while trying to figure out why LyX wasn't finding my darwinports software. That I didn't find the LyX Preferences PATH PATH Prefix methods suggests a doc bug. This appears to be a Mac issue - I don't find the PATH entries in preferences in 1.3.5 on my Unix box. Might just be my not having taken time to read the docs properly, though. mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.
Re: byte compilation of lyx2lyx files
Jean-Marc Lasgouttes [EMAIL PROTECTED] writes: Angus == Angus Leeming [EMAIL PROTECTED] writes: Angus Luis didn't provide much information. Just the second paragraph Angus here, IIRC: Angus http://article.gmane.org/gmane.editors.lyx.devel:47931 Yes, I saw that. Angus I'll drop him a line. Thanks. JMarc JMarc, You'll find the log below: This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by lyx configure 1.4.0pre1, which was generated by GNU Autoconf 2.56. Invocation command line was $ ../configure --disable-debug --enable-optimization --prefix=/home/unknown/lyx-1.4.0pre1/build-tex2lyx/LyX-1.4 --with-frontend=foo ## - ## ## Platform. ## ## - ## hostname = PC-0808 uname -m = i686 uname -r = 1.0.10(0.46/3/2) uname -s = MINGW32_98-4.10 uname -v = 2004-03-15 07:17 /usr/bin/uname -p = unknown /bin/uname -X = unknown /bin/arch = unknown /usr/bin/arch -k = unknown /usr/convex/getsysinfo = unknown hostinfo = unknown /bin/machine = unknown /usr/bin/oslevel = unknown /bin/universe = unknown PATH: . PATH: /usr/local/bin PATH: /mingw/bin PATH: /bin PATH: /c/CAR/TEXMF/MIKTEX/BIN PATH: /c/PERL/BIN/ PATH: /c/TEXMF/MIKTEX/BIN PATH: /c/WINDOWS PATH: /c/WINDOWS/COMMAND PATH: /c/EMTEX/BIN PATH: /c/TINYAPPS/UFO PATH: /c/PP/BIN/OS2 ## --- ## ## Core tests. ## ## --- ## configure:1584: checking whether to enable maintainer-specific portions of Makefiles configure:1593: result: no configure:1614: checking build system type configure:1632: result: i686-pc-mingw32 configure:1640: checking host system type configure:1654: result: i686-pc-mingw32 configure:1662: checking target system type configure:1676: result: i686-pc-mingw32 configure:1692: checking for install target ... configure:1711: result: lyx configure:1728: checking for a BSD-compatible install configure:1782: result: /bin/install -c configure:1793: checking whether build environment is sane configure:1836: result: yes configure:1869: checking for gawk configure:1885: found /bin/gawk configure:1895: result: gawk configure:1905: checking whether make sets $(MAKE) configure:1925: result: yes configure:2087: checking whether make sets $(MAKE) configure:2107: result: yes configure:2128: checking for a BSD-compatible install configure:2182: result: /bin/install -c configure:2200: checking for kpsewhich configure:2216: found /c/CAR/TEXMF/MIKTEX/BIN/kpsewhich configure:2227: result: kpsewhich configure:2245: checking for gm4 configure:2274: result: no configure:2245: checking for gnum4 configure:2274: result: no configure:2245: checking for m4 configure:2261: found /bin/m4 configure:2271: result: m4 configure:2315: checking for a Python interpreter with version = 1.5.2 configure:2334: python -c import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('1.5.2', '.')) + [0, 0, 0] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex 8) + minver[i] sys.exit(sys.hexversion minverhex) ../configure: python: command not found configure:2337: $? = 127 configure:2334: python2 -c import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('1.5.2', '.')) + [0, 0, 0] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex 8) + minver[i] sys.exit(sys.hexversion minverhex) ../configure: python2: command not found configure:2337: $? = 127 configure:2334: python2.2 -c import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('1.5.2', '.')) + [0, 0, 0] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex 8) + minver[i] sys.exit(sys.hexversion minverhex) ../configure: python2.2: command not found configure:2337: $? = 127 configure:2334: python2.1 -c import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('1.5.2', '.')) + [0, 0, 0] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex 8) + minver[i] sys.exit(sys.hexversion minverhex) ../configure: python2.1: command not found configure:2337: $? = 127 configure:2334: python2.0 -c import sys, string # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. minver = map(int, string.split('1.5.2', '.')) + [0, 0, 0] minverhex = 0 for i in xrange(0, 4): minverhex = (minverhex 8) + minver[i] sys.exit(sys.hexversion minverhex) ../configure: python2.0: command not found configure:2337: $? = 127 configure:2334: python1.6 -c import
Daily lyx builds are now set up on ftp.sylvan.com
Hi folks, I fixed up the FTP site now. The latest builds for Redhat Fedora Core 4 (x86_64) are at: ftp://ftp.sylvan.com/pub/lyx/devel/RHFC4 Best regards, ---Kayvan -- Kayvan A. Sylvan | Proud husband of | Father to my kids: Sylvan Associates, Inc. | Laura Isabella Sylvan | Katherine Yelena (8/8/89) http://sylvan.com/~kayvan | crown of her husband | Robin Gregory (2/28/92)
Re: Errors building 1.4.0 (?)
In [EMAIL PROTECTED], Georg Baum [EMAIL PROTECTED] typed: Am Dienstag, 13. September 2005 14:30 schrieb John Levon: On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: It looks like configure does not find the qt libary (but it seems to find the headers). This looks like a configure bug: It should stop with an error message if the library cannot be found. IIRC Lars changed this. I now remember that, too. I also remember that I added error messages for moc and uic, so here comes the logical extension. Mike, could you please test whether configure aborts with this patch (and without the other one) if it cannot find the qt library? Ok, I installed just this patch. After doing autogen.sh and configure, it ends with the line qt library not found. So you've fixed that bug. Now, I'll keep trying to build the thing. Thanks, mike Georg Index: ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v retrieving revision 1.1023 diff -u -p -r1.1023 ChangeLog --- ChangeLog 18 Jul 2005 15:49:56 - 1.1023 +++ ChangeLog 13 Sep 2005 14:23:16 - @@ -1,3 +1,8 @@ +2005-09-13 Georg Baum [EMAIL PROTECTED] + + * configure.ac: error out if qt frontend is choosen but no qt library + was found + 2005-07-18 Lars Gullik Bjønnes [EMAIL PROTECTED] * configure.ac: version back to 1.4.0cvs Index: configure.ac === RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.58 diff -u -p -r1.58 configure.ac --- configure.ac 18 Jul 2005 15:49:57 - 1.58 +++ configure.ac 13 Sep 2005 14:23:16 - @@ -216,6 +219,9 @@ dnl qt build will fail without moc or ui fi if test -z $UIC; then LYX_ERROR([uic binary not found !]) + fi + if test -z $QT_LIB; then + LYX_ERROR([qt library not found !]) fi ;; *) -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.
Re: Errors building 1.4.0 (?)
In [EMAIL PROTECTED], Jean-Marc Lasgouttes [EMAIL PROTECTED] typed: Georg == Georg Baum [EMAIL PROTECTED] writes: Georg Am Dienstag, 13. September 2005 14:30 schrieb John Levon: On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: It looks like configure does not find the qt libary (but it seems to find the headers). This looks like a configure bug: It should stop with an error message if the library cannot be found. IIRC Lars changed this. Georg I now remember that, too. I also remember that I added error Georg messages for moc and uic, so here comes the logical extension. Georg Mike, could you please test whether configure aborts with this Georg patch (and without the other one) if it cannot find the qt Georg library? The patch looks good. Concerning the bug itself, could it be related to http://marc.theaimsgroup.com/?l=lyx-develm=112490112909207w=2 Looks to be the same kind of problem. Both systems require magic flags at compile time to get to the threads versions of libraries, and the configure system isn't providing them. They are different flags, though. Since LyX checks for the non-threaded libraries, maybe the configure script should grow a --with-thread-flags option (or family of options), and only try the threads libraries if that (or one of them) is set? mike -- Mike Meyer [EMAIL PROTECTED] http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.
Re: large executable
Michael Gerz wrote: Pol, could you please change the default settings of your email client? Everytime I receive an email from you, Thunderbird asks me to confirm the reception :-( sorry, i have been trying to disable such feature, but it appears it is already off. On my account settings (mozilla 1.7), option when sending messages, always request a return receipt is unchecked. Any hints to fix that? thank you -- pol
Errors building 1.4.0 (?)
I'm trying to build the CVS version for the first time. I used the page that google had cached from www.devel.lyx.org on getting LyX sources from CVS to get started. That page talks about building "the development module" but doesn't talk about what that is. The difference is that you run the autogen.sh script before doing the configure/make/make install dance. I did that. The build platform is FreeBSD 5.4-STABLE. That uses gcc 3.4.2. The configure args I used were "--with-frontend=qt --with-qt-dir=/usr/X11R6 --with-aspell -with-extra-lib=/usr/opt/lib -with-extra-inc=/usr/opt/include". The FreeBSD ports tree builds version 1.3.5 with no patches. I used the option it had to build with qt and aspell, and it adds the -with-extra-* arguments to configure when it builds 1.3.5. Since I'm using the same qt installation, I figured copying them couldn't hurt. The compile exits with a slew of missig references to Qt objects. The command that generated them and the first of them looks like this: g++ -fno-exceptions -g -O -o lyx-qt main.o Bidi.o BufferView.o BufferView_pimpl.o Bullet.o Bran chList.o Chktex.o CutAndPaste.o DepTable.o FloatList.o Floating.o FontIterator.o FuncStatus.o I nsetList.o LColor.o LaTeX.o LaTeXFeatures.o LyXAction.o MenuBackend.o ParagraphParameters.o Pri nterParams.o Spacing.o Thesaurus.o ToolbarBackend.o author.o boost.o box.o buffer.o buffer_func s.o bufferlist.o bufferparams.o bufferview_funcs.o changes.o chset.o converter.o counters.o coo rdcache.o cursor.o cursor_slice.o debug.o dimension.o dociterator.o encoding.o errorlist.o expo rter.o gettext.o factory.o format.o funcrequest.o graph.o importer.o intl.o insetiterator.o kbm ap.o kbsequence.o language.o lastfiles.o lengthcommon.o lyx_cb.o lyx_main.o lyx_sty.o lyxfont.o lyxfind.o lyxfunc.o lyxgluelength.o lyxlayout.o lyxlength.o lyxlex.o lyxlex_pimpl.o lyxrc.o ly xrow.o lyxrow_funcs.o lyxserver.o lyxsocket.o lyxtextclass.o lyxtextclasslist.o lyxvc.o message s.o metricsinfo.o mover.o output.o outputparams.o output_docbook.o output_latex.o output_linuxd oc.o output_plaintext.o paragraph.o paragraph_funcs.o paragraph_pimpl.o pariterator.o ispell.o SpellBase.o rowpainter.o sgml.o tabular.o tex-accent.o tex-strings.o texrow.o text.o text2.o te xt3.o toc.o trans.o trans_mgr.o undo.o vc-backend.o version.o vspace.o mathed/.libs/libmathed. a insets/.libs/libinsets.a frontends/.libs/libfrontends.a frontends/qt2/.libs/libqt2.a -L/usr/X 11R6//lib frontends/controllers/.libs/libcontrollers.a graphics/.libs/libgraphics.a support/.li bs/libsupport.a ../boost/libs/regex/src/.libs/libboost_regex.a ../boost/libs/signals/src/.libs/ libboost_signals.a ../boost/libs/filesystem/src/.libs/libboost_filesystem.a ../intl/libintl.a - lSM -lICE -lm -L/usr/X11R6/lib -lX11 -lz frontends/qt2/.libs/libqt2.a(Alert_pimpl.o)(.text+0x150): In function `prompt_pimpl(std::string const&, std::string const&, int, int, std::string const&, std::string const&, std::string cons t&)': /usr/X11R6//include/qapplication.h:451: undefined reference to `QApplication::focus_widget' Looking over this, it's a link command - except that I don't see a qt library being linked in. Grovelling through config.status finds: "s,@QT_LIB@,,;t t", which sure looks like it didn't set the QT library properlty. I could probably figure this out myself - except it's 3am, and I've been fighting recalcitrant hardware all night. I'm going to sleep, then to work, and with luck and help from you all, I'll find a solution in my mailbox tomorrow evening. Thanks, http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information.
Re: Errors building 1.4.0 (?)
Mike Meyer wrote: > Looking over this, it's a link command - except that I don't see a qt > library being linked in. Grovelling through config.status finds: > "s,@QT_LIB@,,;t t", which sure looks like it didn't set the QT library > properlty. It looks like configure does not find the qt libary (but it seems to find the headers). This looks like a configure bug: It should stop with an error message if the library cannot be found. Could you please post the lines of config.log where it searches for the qt library? (around the message "checking for Qt library name"). Have you tried it without the --qt-dir switch? Georg
Re: byte compilation of lyx2lyx files
Angus Leeming <[EMAIL PROTECTED]> writes: | Lars Gullik Bjønnes wrote: | | > Angus Leeming <[EMAIL PROTECTED]> writes: | > | > | Luis Rivera reports that "make install" is failing for him because he | > | doesn't have python installed. Could someone sort this out please. | > | > Hmm... we kindo require python for building. | | We do? Where? Since when? It is in the "kindo" cathegory. -- Lgb
Re: byte compilation of lyx2lyx files
[EMAIL PROTECTED] (Lars Gullik Bjønnes) writes: | Angus Leeming <[EMAIL PROTECTED]> writes: | | | Lars Gullik Bjønnes wrote: | | | | > Angus Leeming <[EMAIL PROTECTED]> writes: | | > | | > | Luis Rivera reports that "make install" is failing for him because he | | > | doesn't have python installed. Could someone sort this out please. | | > | | > Hmm... we kindo require python for building. | | | | We do? Where? Since when? | | It is in the "kindo" cathegory. We should be able to handle the no-python case with some use of AM_CONDITIONAL([HAVE_PYTHON], [test "$PYTHON" != :]) just let lyx2lyx's Makefile.am not do anything unless HAVE_PYTHON is defined. -- Lgb
Re: large executable
> "Pol" == Pol <[EMAIL PROTECTED]> writes: Pol> Jean-Marc Lasgouttes wrote: >> that i am compiling lyx 1.4 Paolo> The compiled lyx 1.4 executable from cvs, last april, was 4.2 Paolo> megabytes; but in that case compilation had been accoplished on Paolo> ordinary intel desktop workstation. That is the reason for Paolo> suspecting something wrong, >> On what system are you compiling? >> Pol> it is debian unstable with gcc 4.0.1-3 (corresponding to gcc Pol> version 4.0.2 20050725 (prerelease), as resulting from ' gcc -v Pol> ') and libqt3-mt-dev 3.3.4-3 what does "size ./lyx" day? Here (gcc 3.4.1) I get: fantomas: size src/lyx textdata bss dec hex filename 6083056 17680 35060 6135796 5d9ff4 src/lyx JMarc
Re: LyX 140 configure problem with awk
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> That seems to work for me. The important question is whether the information in lyx.pot is reasonable. You should see entries like: msgid "\\arabic{enumi}." msgstr "" (what is important here is the double backslash). JMarc
Re: byte compilation of lyx2lyx files
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Luis Rivera reports that "make install" is failing for him Angus> because he doesn't have python installed. Could someone sort Angus> this out please. I need more details, could you point me to the relevant thread? Basically, this is supposed to work provided automake is recent enough. So, if I do not see the error message, there is nothing I can do. JMarc
Re: [PATCH] bug 1941: toolbars disabled after dialog action
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> I tried to understand where in the code that happens, but Georg> failed. Could you please tell me the place where the main Georg> window without focus prevents the icons from being enabled? In LyXFunc::getStatus, you will find: /* In LyX/Mac, when a dialog is open, the menus of the application can still be accessed without giving focus to the main window. In this case, we want to disable the menu entries that are buffer-related. */ Buffer * buf; if (cmd.origin == FuncRequest::UI && !owner->hasFocus()) buf = 0; else buf = owner->buffer(); We do as if there was no buffer. This means that all not buffer-related functions are still active. >> My fix is to avoid updating toolbar/menubar for INTERNAL >> dispatches. Georg> I don't think that this is the right fix. The problem is Georg> qt-only, so it should be fixed in the qt frontend. It is not really qt-only. The same code would trigger for a Cocoa port, or a Gtk/osx. Georg> I don't know if that currently happens, but I could imagine the Georg> case where applying a dialog makes an lfun invalid. In this Georg> case we certainly want that icon to be disabled, but that does Georg> not work anymore with your fix. Indeed. Georg> The right fix is IMHO to fix the focus problem. Why is it not Georg> possible to give the focus to the main window after a dialog is Georg> closed? This is what I tried first, actually: updating the tool/menu bars after the window has been hidden in Dialog::hide. It did not work, and I do not understand why. JMarc
Re: byte compilation of lyx2lyx files
> "Lars" == Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes: Lars> [EMAIL PROTECTED] (Lars Gullik Bjønnes) writes: | Angus Leeming Lars> <[EMAIL PROTECTED]> writes: Lars> | Lars> | | Lars Gullik Bjønnes wrote: Lars> | | Lars> | | > Angus Leeming <[EMAIL PROTECTED]> writes: Lars> | | > Lars> | | > | Luis Rivera reports that "make install" is failing for Lars> him because he | | > | doesn't have python installed. Could Lars> someone sort this out please. Lars> | | > Lars> | | > Hmm... we kindo require python for building. Lars> | | Lars> | | We do? Where? Since when? Lars> | Lars> | It is in the "kindo" cathegory. Lars> We should be able to handle the no-python case with some use of Actually, I do not see why it should not work when PYTHON=:. That's why I'd like to see the error first. JMarc
Re: byte compilation of lyx2lyx files
On Tuesday 13 September 2005 10:44, Jean-Marc Lasgouttes wrote: > Actually, I do not see why it should not work when PYTHON=:. That's > why I'd like to see the error first. I am puzzled as well. We made the support for python conditional, it should not fail if python is not present. > JMarc -- José Abílio
Re: byte compilation of lyx2lyx files
Jean-Marc Lasgouttes wrote: > Angus> Luis Rivera reports that "make install" is failing for him > Angus> because he doesn't have python installed. Could someone sort > Angus> this out please. > I need more details, could you point me to the relevant thread? > Basically, this is supposed to work provided automake is recent > enough. > So, if I do not see the error message, there is nothing I can do. > JMarc Luis didn't provide much information. Just the second paragraph here, IIRC: http://article.gmane.org/gmane.editors.lyx.devel:47931 I'll drop him a line. -- Angus
Re: byte compilation of lyx2lyx files
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Luis didn't provide much information. Just the second paragraph Angus> here, IIRC: Angus> http://article.gmane.org/gmane.editors.lyx.devel:47931 Yes, I saw that. Angus> I'll drop him a line. Thanks. JMarc
Safer Win32 get_temp_path, os::internal_path
Jean-Marc, all, following our earlier discussion, I attach a little test code to show what I think we need to produce robust code on Windows. The attached code should compile on all flavours of Windows >= Win95 and should behave gracefully on older versions for which GetLongPathName is just a stub. I propose to post this sample off to Luis Rivera and get him to try it out on Win95/Win98 but I'd of course welcome any sanity checks and comments from you first. Angus (the one of questionable moral character :-P) $ g++ -I$HOME/lyx/13x/boost -o trial trial.cpp $ ./trial Temp dir is C:/Documents and Settings/Angus/Local Settings/Temp/ #include #include #include #include /* * MinGW's version of winver.h contains this comment: * * If you need Win32 API features newer the Win95 and WinNT then you must * define WINVER before including windows.h or any other method of including * the windef.h header. * * GetLongPathNameA requires WINVER == 0x0500. * * It doesn't matter if the Windows version is older than this because the * function will compile but will fail at run time. See * http://msdn.microsoft.com/library/en-us/mslu/winprog/microsoft_layer_for_unicode_apis_with_limited_support.asp */ # if defined(__MINGW32__) # define WINVER 0x0500 # endif #include using std::string; using std::vector; namespace { string const subst(string const & a, string const & oldstr, string const & newstr) { BOOST_ASSERT(!oldstr.empty()); string lstr(a); string::size_type i = 0; string::size_type const olen = oldstr.length(); while ((i = lstr.find(oldstr, i)) != string::npos) { lstr.replace(i, olen, newstr); i += newstr.length(); // We need to be sure that we dont // use the same i over and over again. } return lstr; } namespace os { string const internal_path(string const ) { string const short_path = subst(p, "\\", "/"); vector long_path(PATH_MAX); DWORD result = GetLongPathName(short_path.c_str(), _path[0], long_path.size()); if (result > long_path.size()) { long_path.resize(result); result = GetLongPathName(short_path.c_str(), _path[0], long_path.size()); BOOST_ASSERT(result <= long_path.size()); } return (result == 0) ? short_path : _path[0]; } } // namespace os string const get_temp_dir() { // Typical example: C:/TEMP/. char path[PATH_MAX]; DWORD const result = GetTempPath(PATH_MAX, path); BOOST_ASSERT(result > 0 && result <= PATH_MAX); return os::internal_path(path); } } // namespace anon int main() { string const temp_dir = get_temp_dir(); std::cout << "Temp dir is " << temp_dir << std::endl; return 0; }
Re: large executable
Jean-Marc Lasgouttes wrote: what does "size ./lyx" day? Here (gcc 3.4.1) I get: fantomas: size src/lyx textdata bss dec hex filename 6083056 17680 35060 6135796 5d9ff4 src/lyx % size /usr/local/bin/lyx textdata bss dec hex filename 11134899 394540 35332 11564771b076e3 /usr/local/bin/lyx -- Paolo
Re: gcc4 prevents some languages from working - still stuck :-(
Martin Vermeer wrote: On Wed, Aug 17, 2005 at 04:31:07PM +0100, Angus Leeming wrote: Martin Vermeer wrote: On Tue, 2005-08-16 at 12:59, Helge Hafting wrote: I noticed something very strange today. I could not get lyx-1.4cvs to display norwegian text at all. no_NO, no_NO.iso8859-1, no_NO.utf-8 all gave me english. This on a machine that uses gcc 4.01, another machine using gcc-3.3.6 works. Other languages, like nn_NO works. So, it is not a case of complete locale breakdown, and not a case of a completely broken no.po either. Any ideas? I was going to check if recent fixes had added strings I could translate, but this is driving me nuts. The no_NO locales works for other programs, such as "ls". So I belive the distribution is correctly set up. Helge Hafting Does nb_NO work? Debugging this would be much, much easier if we changed gettext_init (lyx 1.3.x) in src/gettext.C to something like: void gettext_init(string const & localedir) { char const * const btd = bindtextdomain(PACKAGE, localedir.c_str()); char const * const td = textdomain(PACKAGE); if (!btd || !td) { lyxerr << "Failed to initialize localedir " << localedir << " successfully\nbindtextdomain " << btd << "\ntextdomain " << td << std::endl; } } An equivalent change to lyx 1.4 is also needed, IMO. This *is* a 1.4 issue. In 1.4, the relevant code is in src/messages.C. It's not pretty. This stuff was touched in Paris. 117 char const * works = setlocale(LC_MESSAGES, lang_.c_str()); add a printout here: if (!works) lyxerr << "Locale " << lang_ " << could not be set" << std::endl; I'll commit this as it is clearly needed. I am still stuck on this. I can't get no_NO to work for the no.po in cvs. There are no error messages (or any message different from when trying other working languages, like nn_NO). I simply get english when LANG=no_NO (or no_NO.iso8859-1). This seems to imply that something is wrong in the no.po file, but I have no idea what that could be. "make no.gmo" gives no error messages, the file is created, but Norwegian language just don't work. Helge Hafting
Re: gcc4 prevents some languages from working - still stuck :-(
On Tue, 2005-09-13 at 13:26 +0200, Helge Hafting wrote: ... > I am still stuck on this. I can't get no_NO to work for > the no.po in cvs. There are no error messages (or any message different > from when trying other working languages, like nn_NO). I simply > get english when LANG=no_NO (or no_NO.iso8859-1). > > This seems to imply that something is wrong in the no.po > file, but I have no idea what that could be. "make no.gmo" > gives no error messages, the file is created, but Norwegian > language just don't work. > > Helge Hafting This is utterly weird. Did you create a bug in bugzilla for this? - Martin signature.asc Description: This is a digitally signed message part
Re: Safer Win32 get_temp_path, os::internal_path
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> Jean-Marc, all, following our earlier discussion, I attach a Angus> little test code to show what I think we need to produce robust Angus> code on Windows. The attached code should compile on all Angus> flavours of Windows >= Win95 and should behave gracefully on Angus> older versions for which GetLongPathName is just a stub. This looks good, if it works. Angus> Angus (the one of questionable moral character :-P) To tell, the truth, I suspected it already, and was rather relieved not to have you in my house last July. I do not know what my neighbours would have thought. JMarc
Re: Errors building 1.4.0 (?)
In <[EMAIL PROTECTED]>, Georg Baum <[EMAIL PROTECTED]> typed: > Mike Meyer wrote: > > Looking over this, it's a link command - except that I don't see a qt > > library being linked in. Grovelling through config.status finds: > > "s,@QT_LIB@,,;t t", which sure looks like it didn't set the QT library > > properlty. > It looks like configure does not find the qt libary (but it seems to find > the headers). This looks like a configure bug: It should stop with an error > message if the library cannot be found. > Could you please post the lines of config.log where it searches for the qt > library? (around the message "checking for Qt library name"). Sure: configure:24202: checking for Qt library name configure:24247: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt-mt >&5 /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_cleanup_pop' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_destroy' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_init' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_exit' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_cancel' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_testcancel' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_cleanup_push' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_getschedpolicy' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_setinheritsched' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_setstacksize' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_setschedparam' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_attr_setdetachstate' /usr/X11R6//lib/libqt-mt.so: undefined reference to `pthread_cond_timedwait' configure:24253: $? = 1 configure: failed program was: [listing of failing program elided] configure:24247: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt-mt3 >&5 /usr/bin/ld: cannot find -lqt-mt3 configure:24253: $? = 1 configure: failed program was: [listing of failed program elded] configure:24247: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt3 >&5 /usr/bin/ld: cannot find -lqt3 configure:24253: $? = 1 configure: failed program was: [listing of failed program elded] configure:24247: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt2 >&5 /usr/bin/ld: cannot find -lqt2 configure:24253: $? = 1 configure: failed program was: [listing of failed program elded] configure:24247: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 -lqt >&5 /usr/bin/ld: cannot find -lqt configure:24253: $? = 1 configure: failed program was: configure:24289: result: failed configure:24306: checking whether the Qt library is multi-threaded configure:24345: g++ -o conftest -g -O -I/usr/X11R6//include -L/usr/X11R6//lib -I/usr/opt/include -Wextra -Wall-I/usr/X11R6/include conftest.cc -lSM -lICE -lc -lm -L/usr/X11R6/lib -lX11 >&5 /var/tmp//cc4P8UEz.o(.text+0x118): In function `main': /home/mwm/external-src/lyx-devel/conftest.cc:51: undefined reference to `QApplication::QApplica tion(_XDisplay*, unsigned long, unsigned long)' /var/tmp//cc4P8UEz.o(.text+0x123):/home/mwm/external-src/lyx-devel/conftest.cc:52: undefined re ference to `QApplication::unlock(bool)' /var/tmp//cc4P8UEz.o(.text+0x136):/home/mwm/external-src/lyx-devel/conftest.cc:55: undefined re ference to `QApplication::~QApplication()' /var/tmp//cc4P8UEz.o(.text+0x14c):/home/mwm/external-src/lyx-devel/conftest.cc:55: undefined re ference to `QApplication::~QApplication()' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTV6QGList+0xc): undefined reference to `QGList::clear()' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTV6QGList+0x10):/usr/include/c++/3.4/bits/basic_string.h :257: undefined reference to `QGList::~QGList()' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTV6QGList+0x14):/usr/include/c++/3.4/bits/basic_string.h :532: undefined reference to `QGList::~QGList()' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTV6QGList+0x18):/usr/include/c++/3.4/bits/stl_algobase.h :151: undefined reference to `QPtrCollection::newItem(void*)' /var/tmp//cc4P8UEz.o(.gnu.linkonce.r._ZTV6QGList+0x20):/usr/include/c++/3.4/bits/stl_algobase.h :156: undefined reference to `QGList::compareItems(void*, void*)'
Re: Safer Win32 get_temp_path, os::internal_path
Jean-Marc Lasgouttes wrote: Angus> Jean-Marc, all, following our earlier discussion, I attach a Angus> little test code to show what I think we need to produce robust Angus> code on Windows. The attached code should compile on all Angus> flavours of Windows >= Win95 and should behave gracefully on Angus> older versions for which GetLongPathName is just a stub. This looks good, if it works. Well, it works for me. Time will tell if it works for Luis. Angus> Angus (the one of questionable moral character :-P) To tell, the truth, I suspected it already, and was rather relieved not to have you in my house last July. I do not know what my neighbours would have thought. Funny. I had you down as bohémien rather than a member of the bourgeoisie. Anyway, wasn't it your parents' neighbours rather than your own? Angus (scandalous individual)
Re: Errors building 1.4.0 (?)
Mike Meyer wrote: > I can tell you what went wrong with the first command: it needs the > FreeBSDism "-pthread" to link with the threaded version of libc. That means we'll need to fix the configure script. Thanks for debugging! Can you test the attached (untested) patch? Don't forget to run autogen.sh. I also think that we should set FATAL=1 in qt.m4. That would give a sensible error message. It is nonsense to compile for qt when the resulting executable cannot be linked. > Again, this worked without patching in 1.3.5. Strange. GeorgIndex: config/qt.m4 === RCS file: /usr/local/lyx/cvsroot/lyx-devel/config/qt.m4,v retrieving revision 1.15 diff -u -p -r1.15 qt.m4 --- config/qt.m4 17 Jul 2005 23:40:08 - 1.15 +++ config/qt.m4 13 Sep 2005 12:31:19 - @@ -114,6 +114,12 @@ AC_DEFUN([QT_CHECK_COMPILE], QT_TRY_LINK($libname) if test -n "$qt_cv_libname"; then break; + else +dnl on FreeBSD we need -pthread for threaded libs +QT_TRY_LINK("$libname -pthread") +if test -n "$qt_cv_libname"; then + break; +fi fi done
Replacing SHGetFolderPath
As older flavours of Windows don't support SHGetFolderPath out of the box, Jean-Marc has suggested that we use the more cumbersome but also more portable SHGetSpecialFolderLocation. I propose the attached code as a replacement for the existing win32_folder_path in src/support/package.C. $ g++ -I$HOME/lyx/13x/boost -W -Wall -o get_folder get_folder.cpp $ ./get_folder.exe Document dir: C:\Documents and Settings\Angus\My Documents App data dir: C:\Documents and Settings\Angus\Application Data I'll post this off to Luis Rivera to check that it compiles/runs on his older machines. One thing that is side-stepped by the code at the moment is what should we do if string() is returned for either document dir or app data dir? Should we assert? Angus #include #include #include # include # include // SHGetFolderPath using std::string; // Given a folder ID, returns the folder name (in unix-style format). // Eg CSIDL_PERSONAL -> "C:/Documents and Settings/USERNAME/My Documents" string const win32_folder_path(int folder_id) { // Microsoft recommend the use of SHGetFolderPath to do // what we're attempting here, but SHGetFolderPath won't work // out of the box on older (Win98) flavours of Windows. // Either we distribute shfolder.dll (fully-redistributable part // of IE 4) and ensure that we link against it before we link // shell32.dll, or we use SHGetSpecialFolderLocation instead. LPITEMIDLIST id_list; if (SHGetSpecialFolderLocation(0, folder_id, _list) != S_OK) return string(); char folder_path[PATH_MAX]; DWORD const result = SHGetPathFromIDList(id_list, folder_path); LPMALLOC allocator; if (SHGetMalloc() == S_OK) { allocator->Free(id_list); allocator->Release(); } return (result == TRUE) ? folder_path : string(); } int main() { std::cout << "Document dir: " << win32_folder_path(CSIDL_PERSONAL) << "\nApp data dir: " << win32_folder_path(CSIDL_APPDATA) << std::endl; return 0; }
Re: Safer Win32 get_temp_path, os::internal_path
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: >> To tell, the truth, I suspected it already, and was rather relieved >> not to have you in my house last July. I do not know what my >> neighbours would have thought. Angus> Funny. I had you down as bohémien rather than a member of the Angus> bourgeoisie. Well, I have some funny bourgeois in my mother's family. And I went mainly to private catholic schools. Angus> Anyway, wasn't it your parents' neighbours rather than your Angus> own? God forbid! I would not even have thought about inviting strangers in this case! We are now in our own appartment, so I only have to care about my reputation, which is nevertheless a lot, as you will undoubtlessly agree. JMarc
Re: LyX 140 configure problem with awk
On Sep 13, 2005, at 5:16 AM, Jean-Marc Lasgouttes wrote: The important question is whether the information in lyx.pot is reasonable. You should see entries like: msgid "\\arabic{enumi}." msgstr "" (what is important here is the double backslash). I don't get \\arabic{enumi} in particular. I do get double backslashes in the following cases, all of which look reasonable: \\begin_header \\begin_document \\, \\: \\; \\quad \\qquad ... etc. in QMathDialog.C \\input \\include \\verbatiminput \\usepackage \\documentclass \\selectlanguage There aren't cases of single backslashes where it looks like doubles should be used instead. Is that what you need to know? Bennett
Re: Replacing SHGetFolderPath
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> As older flavours of Windows don't support SHGetFolderPath out Angus> of the box, Jean-Marc has suggested that we use the more Angus> cumbersome but also more portable SHGetSpecialFolderLocation. Angus> I propose the attached code as a replacement for the existing Angus> win32_folder_path in src/support/package.C. Looks good. Angus> One thing that is side-stepped by the code at the moment is Angus> what should we do if string() is returned for either document Angus> dir or app data dir? Should we assert? If the app data dir is empty, we will eventually exit somewhere, I guess. As far as the document data dir is concerned, I am not sure this really matters. JMarc
Re: Safer Win32 get_temp_path, os::internal_path
Jean-Marc Lasgouttes wrote: > Angus> Anyway, wasn't it your parents' neighbours rather than your > Angus> own? > God forbid! I would not even have thought about inviting strangers in > this case! We are now in our own appartment, so I only have to care > about my reputation, which is nevertheless a lot, as you will > undoubtlessly agree. Oh, I don't know. I'm quite careless about the reputation of others, apparently, which is what got me into trouble on the lyx-users' list in the first place :-P -- Angus
Re: LyX 140 configure problem with awk
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: Bennett> On Sep 13, 2005, at 5:16 AM, Jean-Marc Lasgouttes wrote: >> The important question is whether the information in lyx.pot is >> reasonable. You should see entries like: >> >> msgid "\\arabic{enumi}." msgstr "" >> >> (what is important here is the double backslash). Bennett> I don't get \\arabic{enumi} in particular. I do get double Bennett> backslashes in the following cases, all of which look Bennett> reasonable: Bennett> There aren't cases of single backslashes where it looks like Bennett> doubles should be used instead. Bennett> Is that what you need to know? What I am interested in are entries related to LabelString in layout files, so my enumi example was not very well chosen. For example, numarticle.inc says Style Section LabelType Counter LabelCounter section LabelString "\arabic{section}" LabelStringAppendix "\Alph{section}" TocLevel 1 End so you should find the strings "\\arabic{section}" and "\\Alph{section}" in the .pot file. JMarc
Re: Replacing SHGetFolderPath
Jean-Marc Lasgouttes wrote: > Angus> As older flavours of Windows don't support SHGetFolderPath out > Angus> of the box, Jean-Marc has suggested that we use the more > Angus> cumbersome but also more portable SHGetSpecialFolderLocation. > > Angus> I propose the attached code as a replacement for the existing > Angus> win32_folder_path in src/support/package.C. > > Looks good. One thing I note from the MSDN website is: = http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shgetmalloc.asp SHGetMalloc Function Not currently supported. Remarks This function should no longer be used. Use the CoTaskMemFree and CoTaskMemAlloc functions in its place. = I've just ignored this advice, but this blog article http://blogs.msdn.com/oldnewthing/archive/2004/07/05/173226.aspx suggests that all should be fine anyway (since I think that we link against ole32.dll) Ain't life on Windoze complicated! -- Angus
Re: LyX 140 configure problem with awk
On Sep 13, 2005, at 8:56 AM, Jean-Marc Lasgouttes wrote: What I am interested in are entries related to LabelString in layout files, so my enumi example was not very well chosen. Actually, it was my fault: I was stupidly looking at lyx.pot from the wrong build. For example, numarticle.inc says Style Section LabelType Counter LabelCounter section LabelString "\arabic{section}" LabelStringAppendix "\Alph{section}" TocLevel 1 End so you should find the strings "\\arabic{section}" and "\\Alph{section}" in the .pot file. Yes -- they're all there (at least every one I checked!). Bennett
Re: Replacing SHGetFolderPath
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> One thing I note from the MSDN website is: Angus> = Angus> http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/shgetmalloc.asp Angus> SHGetMalloc Function Angus> Not currently supported. Angus> Remarks This function should no longer be used. Use the Angus> CoTaskMemFree and CoTaskMemAlloc functions in its place. Angus> = Angus> I've just ignored this advice, but this blog article Angus> http://blogs.msdn.com/oldnewthing/archive/2004/07/05/173226.aspx Angus> suggests that all should be fine anyway (since I think that we Angus> link against ole32.dll) Indeed... JMarc
[PATCH] bug 2010: Entering/leaving text inset requires two cursor left/right keystrokes
The following patch fixes bug 2010: http://bugzilla.lyx.org/show_bug.cgi?id=2010 This was an unintended consequence of the work Juergen V. did to allow placing the cursor in front of a displayed inset. Please test. JMarc Index: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2277 diff -u -p -r1.2277 ChangeLog --- src/ChangeLog 10 Sep 2005 13:29:43 - 1.2277 +++ src/ChangeLog 13 Sep 2005 13:44:39 - @@ -1,3 +1,8 @@ +2005-09-13 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * text2.C (cursorEnd, cursorRight): do not set boundary to true at + end of paragraph. (bug 2010) + 2005-09-10 Georg Baum <[EMAIL PROTECTED]> * text.C (leftMargin): check for inInset == 0 Index: src/text2.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.627 diff -u -p -r1.627 text2.C --- src/text2.C 5 Sep 2005 06:50:42 - 1.627 +++ src/text2.C 13 Sep 2005 13:44:40 - @@ -498,12 +498,13 @@ void LyXText::cursorEnd(LCursor & cur) // empty text, end-1 is no valid position return; bool boundary = false; - if (!cur.paragraph().isLineSeparator(end-1) && - !cur.paragraph().isNewline(end-1)) - { - boundary = true; - } else if (end != cur.lastpos()) - --end; + if (end != cur.lastpos()) { + if (!cur.paragraph().isLineSeparator(end-1) + && !cur.paragraph().isNewline(end-1)) + boundary = true; + else + --end; + } setCursor(cur, cur.pit(), end, true, boundary); } @@ -1021,6 +1022,7 @@ bool LyXText::cursorRight(LCursor & cur) bool updateNeeded = false; if (!checkAndActivateInset(cur, true)) { if (cur.textRow().endpos() == (cur.pos() + 1) && + !cur.lastpos() == (cur.pos() + 1) && !cur.paragraph().isLineSeparator(cur.pos()) && !cur.paragraph().isNewline(cur.pos())) {
Re: LyX 140 configure problem with awk
> "Bennett" == Bennett Helm <[EMAIL PROTECTED]> writes: >> so you should find the strings "\\arabic{section}" and >> "\\Alph{section}" in the .pot file. Bennett> Yes -- they're all there (at least every one I checked!). Very good. I'll apply the patch. JMarc
Re: [PATCH] bug 1941: toolbars disabled after dialog action
Jean-Marc Lasgouttes wrote: >> "Georg" == Georg Baum >> <[EMAIL PROTECTED]> >> writes: > > Georg> I tried to understand where in the code that happens, but > Georg> failed. Could you please tell me the place where the main > Georg> window without focus prevents the icons from being enabled? > > In LyXFunc::getStatus, you will find: Thanks, now I see it (I was searching in frontends/qt2) > It is not really qt-only. The same code would trigger for a Cocoa > port, or a Gtk/osx. I see. Because XFormsView::hasFocus() and GView::hasFocus() are too stupid we don't see the bug there. > Georg> The right fix is IMHO to fix the focus problem. Why is it not > Georg> possible to give the focus to the main window after a dialog is > Georg> closed? > > This is what I tried first, actually: updating the tool/menu bars after > the window has been hidden in Dialog::hide. It did not work, and I do > not understand why. The problem is that the main window still has no focus when Dialog::hide is called. I tried to activate it with QMainWindow::setFocus() and QMainWindow::show(), but neither worked. I'll investigate further. Georg
Re: [PATCH] bug 1941: toolbars disabled after dialog action
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> The problem is that the main window still has no focus when Georg> Dialog::hide is called. I tried to activate it with Georg> QMainWindow::setFocus() and QMainWindow::show(), but neither Georg> worked. I'll investigate further. Thanks. JMarc
Re: Errors building 1.4.0 (?)
Am Dienstag, 13. September 2005 14:30 schrieb John Levon: > On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: > > It looks like configure does not find the qt libary (but it seems to find > > the headers). This looks like a configure bug: It should stop with an > > error message if the library cannot be found. > > IIRC Lars changed this. I now remember that, too. I also remember that I added error messages for moc and uic, so here comes the logical extension. Mike, could you please test whether configure aborts with this patch (and without the other one) if it cannot find the qt library? Georg Index: ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/ChangeLog,v retrieving revision 1.1023 diff -u -p -r1.1023 ChangeLog --- ChangeLog 18 Jul 2005 15:49:56 - 1.1023 +++ ChangeLog 13 Sep 2005 14:23:16 - @@ -1,3 +1,8 @@ +2005-09-13 Georg Baum <[EMAIL PROTECTED]> + + * configure.ac: error out if qt frontend is choosen but no qt library + was found + 2005-07-18 Lars Gullik Bjønnes <[EMAIL PROTECTED]> * configure.ac: version back to 1.4.0cvs Index: configure.ac === RCS file: /usr/local/lyx/cvsroot/lyx-devel/configure.ac,v retrieving revision 1.58 diff -u -p -r1.58 configure.ac --- configure.ac 18 Jul 2005 15:49:57 - 1.58 +++ configure.ac 13 Sep 2005 14:23:16 - @@ -216,6 +219,9 @@ dnl qt build will fail without moc or ui fi if test -z "$UIC"; then LYX_ERROR([uic binary not found !]) + fi + if test -z "$QT_LIB"; then + LYX_ERROR([qt library not found !]) fi ;; *)
Re: Errors building 1.4.0 (?)
> "Georg" == Georg Baum <[EMAIL PROTECTED]> writes: Georg> Am Dienstag, 13. September 2005 14:30 schrieb John Levon: >> On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: > It >> looks like configure does not find the qt libary (but it seems to >> find > the headers). This looks like a configure bug: It should >> stop with an > error message if the library cannot be found. >> >> IIRC Lars changed this. Georg> I now remember that, too. I also remember that I added error Georg> messages for moc and uic, so here comes the logical extension. Georg> Mike, could you please test whether configure aborts with this Georg> patch (and without the other one) if it cannot find the qt Georg> library? The patch looks good. Concerning the bug itself, could it be related to http://marc.theaimsgroup.com/?l=lyx-devel=112490112909207=2 JMarc
Re: [PATCH] bug 2010: Entering/leaving text inset requires two cursor left/right keystrokes
Jean-Marc Lasgouttes wrote: > The following patch fixes bug 2010: > http://bugzilla.lyx.org/show_bug.cgi?id=2010 > > This was an unintended consequence of the work Juergen V. did to allow > placing the cursor in front of a displayed inset. > > Please test. > > JMarc why not + cur.lastpos() != (cur.pos() + 1) && ? @@ -1021,6 +1022,7 @@ bool LyXText::cursorRight(LCursor & cur) bool updateNeeded = false; if (!checkAndActivateInset(cur, true)) { if (cur.textRow().endpos() == (cur.pos() + 1) && + !cur.lastpos() == (cur.pos() + 1) && !cur.paragraph().isLineSeparator(cur.pos()) && !cur.paragraph().isNewline(cur.pos())) -- Angus
Re: [PATCH] bug 2010: Entering/leaving text inset requires two cursor left/right keystrokes
> "Angus" == Angus Leeming <[EMAIL PROTECTED]> writes: Angus> why not + cur.lastpos() != (cur.pos() + 1) && ? Oops. I am not even sure that the test meant what I thought it meant. What about the following? JMarc Index: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2277 diff -u -p -r1.2277 ChangeLog --- src/ChangeLog 10 Sep 2005 13:29:43 - 1.2277 +++ src/ChangeLog 13 Sep 2005 14:56:01 - @@ -1,3 +1,8 @@ +2005-09-13 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * text2.C (cursorEnd, cursorRight): do not set boundary to true at + end of paragraph. (bug 2010) + 2005-09-10 Georg Baum <[EMAIL PROTECTED]> * text.C (leftMargin): check for inInset == 0 Index: src/text2.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/text2.C,v retrieving revision 1.627 diff -u -p -r1.627 text2.C --- src/text2.C 5 Sep 2005 06:50:42 - 1.627 +++ src/text2.C 13 Sep 2005 14:56:01 - @@ -498,12 +498,13 @@ void LyXText::cursorEnd(LCursor & cur) // empty text, end-1 is no valid position return; bool boundary = false; - if (!cur.paragraph().isLineSeparator(end-1) && - !cur.paragraph().isNewline(end-1)) - { - boundary = true; - } else if (end != cur.lastpos()) - --end; + if (end != cur.lastpos()) { + if (!cur.paragraph().isLineSeparator(end-1) + && !cur.paragraph().isNewline(end-1)) + boundary = true; + else + --end; + } setCursor(cur, cur.pit(), end, true, boundary); } @@ -1020,7 +1021,8 @@ bool LyXText::cursorRight(LCursor & cur) if (cur.pos() != cur.lastpos()) { bool updateNeeded = false; if (!checkAndActivateInset(cur, true)) { - if (cur.textRow().endpos() == (cur.pos() + 1) && + if (cur.textRow().endpos() == cur.pos() + 1 && + cur.lastpos() != cur.pos() + 1 && !cur.paragraph().isLineSeparator(cur.pos()) && !cur.paragraph().isNewline(cur.pos())) {
[PATCH] bug 1926: Paragraph& DocIterator::paragraph() by failing check "inTexted()" in file dociterator.C:144
This patch fixes the crash described in http://bugzilla.lyx.org/show_bug.cgi?id=1926 ``Start a new doc, and start a math formula. Enter it, and leaving the cursor inside the formula, start another new doc. Move back to the old doc via the View menu and: Assertion triggered in Paragraph& DocIterator::paragraph() by failing check "inTexted()" in file dociterator.C:144'' Testing appreciated, although it seems trivially correct (I tried to use LFUN_GETLAYOUT but it (1) leaves the current math inset and (2) displays the result of the lfun in the minibuffer). JMarc Index: src/BufferView_pimpl.C === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/BufferView_pimpl.C,v retrieving revision 1.594 diff -u -p -r1.594 BufferView_pimpl.C --- src/BufferView_pimpl.C 7 Sep 2005 10:00:17 - 1.594 +++ src/BufferView_pimpl.C 13 Sep 2005 15:21:25 - @@ -386,8 +386,20 @@ void BufferView::Pimpl::setBuffer(Buffer owner_->updateWindowTitle(); // This is done after the layout combox has been populated - if (buffer_) - owner_->setLayout(cursor_.paragraph().layout()->name()); + if (buffer_) { + size_t i = cursor_.depth() - 1; + // we know we'll eventually find a paragraph + while (true) { + CursorSlice const & slice = cursor_[i]; + if (!slice.inset().inMathed()) { +LyXLayout_ptr const layout = slice.paragraph().layout(); +owner_->setLayout(layout->name()); +break; + } + BOOST_ASSERT(i>0); + --i; + } + } if (buffer_ && lyx::graphics::Previews::status() != LyXRC::PREVIEW_OFF) lyx::graphics::Previews::get().generateBufferPreviews(*buffer_); Index: src/ChangeLog === RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/ChangeLog,v retrieving revision 1.2277 diff -u -p -r1.2277 ChangeLog --- src/ChangeLog 10 Sep 2005 13:29:43 - 1.2277 +++ src/ChangeLog 13 Sep 2005 15:21:26 - @@ -1,3 +1,9 @@ +2005-09-13 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * BufferView_pimpl.C (setBuffer): when one wants to set the layout + combox, it is necessary to search for the topmost paragraph in the + cursor stack (bug 1926) + 2005-09-10 Georg Baum <[EMAIL PROTECTED]> * text.C (leftMargin): check for inInset == 0
Re: large executable
Pol <[EMAIL PROTECTED]> writes: | Jean-Marc Lasgouttes wrote: | > what does "size ./lyx" day? Here (gcc 3.4.1) I get: | > fantomas: size src/lyx | >textdata bss dec hex filename | > 6083056 17680 35060 6135796 5d9ff4 src/lyx | > | | % size /usr/local/bin/lyx | textdata bss dec hex filename |11134899 394540 35332 11564771b076e3 /usr/local/bin/lyx Remind me on the platform again please.
Re: Errors building 1.4.0 (?)
John Levon <[EMAIL PROTECTED]> writes: | On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: | | > It looks like configure does not find the qt libary (but it seems to find | > the headers). This looks like a configure bug: It should stop with an error | > message if the library cannot be found. | | IIRC Lars changed this. firm beliver in running to completion.
Re: bug in tex2lyx windows
Luis Rivera <[EMAIL PROTECTED]> writes: | Hello, | | I tried to run tex2lyx on win95/98, without success. The programs | crashed crying as follows: | | On win95 | | The TEX2LYX.EXE file is linked to missing export | KERNEL32.DLL:GetFileAttributesExA Can't we just declare that we do not support Win95? How old is XP now? 4 years?
Re: Errors building 1.4.0 (?)
Georg Baum <[EMAIL PROTECTED]> writes: | Am Dienstag, 13. September 2005 14:30 schrieb John Levon: | > On Tue, Sep 13, 2005 at 09:24:07AM +0200, Georg Baum wrote: | > > It looks like configure does not find the qt libary (but it seems to find | > > the headers). This looks like a configure bug: It should stop with an | > > error message if the library cannot be found. | > | > IIRC Lars changed this. | | I now remember that, too. I also remember that I added error messages for moc | and uic, so here comes the logical extension. | | Mike, could you please test whether configure aborts with this patch (and | without the other one) if it cannot find the qt library? I hate configures that aborts. IMHO it should run to completion and tell me about all important stuff that went wrong.