Re: Scons-msvc project files

2006-06-02 Thread Bo Peng

Hi,

Attached please find a patch that generate the msvc project files. It
works like this

1. go to development/scons
 You *can not* do scons -f development/scons/SConstruct.

2. scons whateveroptions all
 This will build lyx, and generate project files

3. to test, remove build directory, open project file, and build. Note
that this build process actually calls scons to compile. For all the
libraries, I pass fast_start and rebuild option for fast processing.
For executable (like lyx), it will scan all files and compile.

The patch seems to work, but I have not tested it very much.
Bo
Index: development/scons/SConscript
===
--- development/scons/SConscript	(revision 13990)
+++ development/scons/SConscript	(working copy)
@@ -30,7 +30,7 @@
 build_po = 'po' in targets or 'install' in targets or 'all' in targets
 build_qt3 = (build_lyx and env['frontend'] == 'qt3') or 'qt3' in targets
 build_qt4 = (build_lyx and env['frontend'] == 'qt4') or 'qt4' in targets
-build_msvc_projects = env['USE_VC'] and 'msvc_projects' in targets
+build_msvc_projects = env['USE_VC']
 
 
 # now, if rebuild_targets is specified, do not rebuild some targets
@@ -91,31 +91,50 @@
 
   regex = boostenv.StaticLibrary(
 target = '$LOCALLIBPATH/included_boost_regex',
-source = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/regex/src'), pattern = '*.cpp',
-  build_dir = '$BUILDDIR/boost/regex/src')
+source = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/regex/src'), 
+  pattern = '*.cpp', build_dir = '$BUILDDIR/boost/regex/src')
   )
 
   print 'Processing files in boost/libs/signals/src...'
 
   signals = boostenv.StaticLibrary(
 target = '$LOCALLIBPATH/included_boost_signals',
-source = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/signals/src'), pattern = '*.cpp',
-  build_dir = '$BUILDDIR/boost/signals/src')
+source = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/signals/src'), 
+  pattern = '*.cpp', build_dir = '$BUILDDIR/boost/signals/src')
   )
 
   print 'Processing files in boost/libs/iostreams/src...'
 
   iostreams = boostenv.StaticLibrary(
 target = '$LOCALLIBPATH/included_boost_iostreams',
-source = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/iostreams/src'), pattern = '*.cpp',
-  build_dir = '$BUILDDIR/boost/iostreams/src')
+source = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/iostreams/src'), 
+  pattern = '*.cpp', build_dir = '$BUILDDIR/boost/iostreams/src')
   )
+
   Alias('boost', filesystem)
   Alias('boost', regex)
   Alias('boost', signals)
   Alias('boost', iostreams)
 
+  if build_msvc_projects:
+for lib in ['filesystem', 'regex', 'signals', 'iostreams']:
+  proj = boostenv.MSVSProject(
+target = '$MSVSPATH/boost_' + lib + env['MSVSPROJECTSUFFIX'],
+srcs = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/%s/src'%lib), 
+  pattern = '*.cpp', 
+  build_dir = boostenv.subst('$TOP_SRC_DIR/boost/libs/%s/src'%lib) ),
+incs = [boostenv.subst('$TOP_SRC_DIR/src/config.h')],
+localincs = globSource(dir = env.subst('$TOP_SRC_DIR/boost/libs/%s/src'%lib), 
+  pattern = '*.h', 
+  build_dir = env.subst('$TOP_SRC_DIR/boost/libs/%s/src'%lib) ),
+resources = [],
+buildtarget = 'boost',
+cmdargs = 'faststart=yes rebuild=boost',
+variant = 'Release'
+  )
+  Alias('boost', proj)
 
+
 if build_intl:
   # 
   # intl
@@ -160,6 +179,23 @@
   )
   Alias('intl', intl)
 
+  if build_msvc_projects:
+proj = intlenv.MSVSProject(
+  target = '$MSVSPATH/intl' + env['MSVSPROJECTSUFFIX'],
+  srcs = globSource(dir = env.subst('$TOP_SRC_DIR/intl'), pattern = '*.c',
+exclude = ['vasnprintf.c', 'printf-parse.c', 'printf-args.c', 'os2compat.c'],
+build_dir = intlenv.subst('$TOP_SRC_DIR/intl')),
+  incs = [intlenv.subst('$TOP_SRC_DIR/src/config.h')],
+localincs = globSource(dir = env.subst('$TOP_SRC_DIR/intl'), pattern = '*.h',
+exclude = ['vasnprintf.h', 'printf-parse.h', 'printf-args.h', 'os2compat.h'],
+build_dir = intlenv.subst('$TOP_SRC_DIR/intl')),
+  resources = [],
+  buildtarget = 'intl',
+  cmdargs = 'faststart=yes rebuild=intl',
+  variant = 'Release'
+)
+Alias('intl', proj)
+
 #
 # Now, src code under src/
 #
@@ -176,11 +212,28 @@
 
   supports = env.StaticLibrary(
 target = '$LOCALLIBPATH/supports',
-source =  globSource(dir = env.subst('$TOP_SRC_DIR/src/support'), pattern = env['LYX_EXT'], 
+source = globSource(dir = env.subst('$TOP_SRC_DIR/src/support'), pattern = env['LYX_EXT'], 
   exclude = ['os_win32.C', 'os_unix.C', 'os_cygwin.C', 'atexit.c'],
   include = ['package.C'], build_dir = '$BUILDDIR/common/support')
   )
   Alias('supports', supports)
+  
+  if build_msvc_projects:
+proj = env.MSVSProject(
+  target = '$MSVSPATH/supports' + env['MSVSPROJECTS

Re: qt4 - config/qt.m4

2006-06-02 Thread Lars Gullik Bjønnes
Georg Baum <[EMAIL PROTECTED]> writes:

| Am Donnerstag, 1. Juni 2006 12:10 schrieb Jean-Marc Lasgouttes:
| > > "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:
| > 
| > Georg> I think it would be possible, but not easier than tweaking
| > Georg> qt.m4. 
| > 
| > Getting rid of AC_PATH_EXTRA (just keep it for xforms) would be nice...
| 
| That is not used in qt.m4. Could you explain what you mean?
| 
| > Georg> And I can understand Lars' desire to use configure without
| > Georg> flags, but I don't think we need to do that for all possible
| > Georg> configurations, only the mainstream ones.
| > 
| > Agreed. We should not hardcode this stuff.
| 
| Here comes the next try. Changes:
| - Search also moc4 and uic4
| - Check version of moc and uic
| - use pkg-config if available and no qt dir was given
| 
| Lars, does it work for you? Can it go in?

You are aware of the pgk.m4 packages?
It can be used for pkg-config queries. Is it usable for us?
(Already used by gtk I think?)

-- 
Lgb



Re: qt4 - config/qt.m4

2006-06-02 Thread Georg Baum
Am Donnerstag, 1. Juni 2006 12:10 schrieb Jean-Marc Lasgouttes:
> > "Georg" == Georg Baum <[EMAIL PROTECTED]> writes:
> 
> Georg> I think it would be possible, but not easier than tweaking
> Georg> qt.m4. 
> 
> Getting rid of AC_PATH_EXTRA (just keep it for xforms) would be nice...

That is not used in qt.m4. Could you explain what you mean?

> Georg> And I can understand Lars' desire to use configure without
> Georg> flags, but I don't think we need to do that for all possible
> Georg> configurations, only the mainstream ones.
> 
> Agreed. We should not hardcode this stuff.

Here comes the next try. Changes:
- Search also moc4 and uic4
- Check version of moc and uic
- use pkg-config if available and no qt dir was given

Lars, does it work for you? Can it go in?


Georg
Index: config/qt.m4
===
--- config/qt.m4	(Revision 13983)
+++ config/qt.m4	(Arbeitskopie)
@@ -328,7 +328,15 @@ AC_DEFUN([QT4_FIND_PATH],
 dnl Find the uic compiler on the path or in qt_cv_dir
 AC_DEFUN([QT_FIND_UIC4],
 [
-	QT4_FIND_PATH(uic, ac_uic4, $qt4_cv_dir/bin)
+	QT4_FIND_PATH(uic4, ac_uic4, $qt4_cv_dir/bin)
+	if test -z "$ac_uic4"; then
+		QT4_FIND_PATH(uic, ac_uic4, $qt4_cv_dir/bin)
+	fi
+
+	dnl test the version
+	if test -n "$ac_uic4" && ! "$ac_uic4" -version 2>&1 | grep "Qt user interface compiler 4" >/dev/null; then
+		ac_uic4=""
+	fi
 
 	if test -z "$ac_uic4" -a "$FATAL" = 1; then
 		AC_MSG_ERROR([uic 4 binary not found in \$PATH or $qt4_cv_dir/bin !])
@@ -338,7 +346,15 @@ AC_DEFUN([QT_FIND_UIC4],
 dnl Find the right moc in path/qt_cv_dir
 AC_DEFUN([QT_FIND_MOC4],
 [
-	QT4_FIND_PATH(moc, ac_moc4, $qt4_cv_dir/bin)
+	QT4_FIND_PATH(moc4, ac_moc4, $qt4_cv_dir/bin)
+	if test -z "$ac_moc4"; then
+		QT4_FIND_PATH(moc, ac_moc4, $qt4_cv_dir/bin)
+	fi
+
+	dnl test the version
+	if test -n "$ac_moc4" && ! "$ac_moc4" -v 2>&1 | grep "Qt 4" >/dev/null; then
+		ac_moc4=""
+	fi
 
 	if test -z "$ac_moc4"  -a "$FATAL" = 1; then
 		AC_MSG_ERROR([moc 4 binary not found in \$PATH or $qt4_cv_dir/bin !])
@@ -449,16 +465,26 @@ AC_DEFUN([QT4_DO_IT_ALL],
 	dnl derive inc/lib if needed
 	if test -n "$qt4_cv_dir"; then
 		if test -z "$qt4_cv_includes"; then
-			qt4_cv_includes=$qt4_cv_dir/include
+			qt4_cv_includes="$qt4_cv_dir/include"
 		fi
 		if test -z "$qt4_cv_libraries"; then
-			qt4_cv_libraries=$qt4_cv_dir/lib
+			qt4_cv_libraries="$qt4_cv_dir/lib"
 		fi
 	fi
 
 	dnl flags for compilation
 	QT4_INCLUDES=
 	QT4_LDFLAGS=
+	dnl try pkg-config if we don't know the qt dir
+	if test -z "$qt4_cv_includes" -o -z "$qt4_cv_libraries"; then
+		if test -z "$PKG_CONFIG"; then
+			AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+		fi
+		if test -n "$PKG_CONFIG"; then
+			PKG_CHECK_MODULES(QT4, QtCore QtGui)
+			QT4_INCLUDES="$QT4_CFLAGS"
+		fi
+	fi
 	if test -n "$qt4_cv_includes"; then
 		QT4_INCLUDES="-I$qt4_cv_includes"
 		for i in Qt QtCore QtGui; do
@@ -480,12 +506,12 @@ AC_DEFUN([QT4_DO_IT_ALL],
 
 	if test -z "$MOC4"; then
 		QT_FIND_MOC4
-		MOC4=$ac_moc4
+		MOC4="$ac_moc4"
 	fi
 	AC_SUBST(MOC4)
 	if test -z "$UIC4"; then
 		QT_FIND_UIC4
-		UIC4=$ac_uic4
+		UIC4="$ac_uic4"
 	fi
 	AC_SUBST(UIC4)
 


Re: Conformant web pages once more

2006-06-02 Thread Angus Leeming
Lars Gullik Bjønnes <[EMAIL PROTECTED]> writes:
> | This page: http://community.nethosted.co.uk/post_9972.html
> | explains why our web pages aren't validating with the W3C validator at the
> | moment and how to fix it.

> Better now?

Certainly.

http://validator.w3.org/check?uri=http://www.lyx.org/
This Page Is Valid XHTML 1.1!

Angus





Re: Conformant web pages once more

2006-06-02 Thread Lars Gullik Bjønnes
Angus Leeming <[EMAIL PROTECTED]> writes:

| This page: http://community.nethosted.co.uk/post_9972.html
| 
| explains why our web pages aren't validating with the W3C validator at the
| moment and how to fix it.

Better now?

-- 
Lgb



Crash in 1.4.2svn with graphics changed in background

2006-06-02 Thread Jose' Matos
Hi,
I am running 1.4.2svn over gdb. I am using Fedora Core 5 up to date.

I noticed that everytime I redo some graphic displayed in lyx, lyx 
crashes. 
This means that lyx should be opened and should have rendered the graphic 
before.

The backtrace is the following:
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208854832 (LWP 11161)]
call_notification (this=0xbf849640, [EMAIL PROTECTED]) 
at ../../../../boost/boost/detail/shared_count.hpp:124
124 ++use_count_;
(gdb) bt
#0  call_notification (this=0xbf849640, [EMAIL PROTECTED]) 
at ../../../../boost/boost/detail/shared_count.hpp:124
#1  0x08078014 in boost::signal0, int, 
std::less, boost::function > 
>::operator() (this=0x8dd8860)
at ../../boost/boost/signals/signal_template.hpp:335
#2  0x084c2d1f in lyx::graphics::Loader::Impl::statusChanged (this=0x8dd8840) 
at GraphicsLoader.C:262
#3  0x084c2d98 in 
boost::detail::function::void_function_obj_invoker0, 
boost::_bi::list1 > >, 
void>::invoke (function_obj_ptr={obj_ptr = 0x90ff920, const_obj_ptr = 
0x90ff920, func_ptr = 0x90ff920, data = " "}) 
at ../../boost/boost/bind/mem_fn_template.hpp:45
#4  0x08077d1d in boost::function0 >::operator() 
(this=0x9006a34) at ../../boost/boost/function/function_template.hpp:581
#5  0x08077d64 in 
boost::operator++::caller > >, 
boost::signals::detail::named_slot_map_iterator>, 
boost::signals::detail::unusable, boost::single_pass_traversal_tag, 
boost::signals::detail::unusable const&, int> ([EMAIL PROTECTED]) 
at ../../boost/boost/signals/signal_template.hpp:119
#6  0x080784cd in boost::signal0, int, 
std::less, boost::function > 
>::operator() (this=0x90fb400) at ../../boost/boost/last_value.hpp:43
#7  0x084b8022 in lyx::graphics::CacheItem::Impl::setStatus (this=0x90fb3d0, 
new_status=lyx::graphics::Converting) at GraphicsCacheItem.C:256
#8  0x084b8bcb in lyx::graphics::CacheItem::Impl::convertToDisplayFormat 
(this=0x90fb3d0) at GraphicsCacheItem.C:378
#9  0x084b9a9e in lyx::graphics::CacheItem::Impl::startLoading 
(this=0x90fb3d0) at GraphicsCacheItem.C:218
#10 0x084b9bbc in 
boost::detail::function::void_function_obj_invoker0, 
boost::_bi::list1 > >, 
void>::invoke (function_obj_ptr={obj_ptr = 0x90fb718, const_obj_ptr = 
0x90fb718, func_ptr = 0x90fb718, data = "\030"}) 
at ../../boost/boost/bind/mem_fn_template.hpp:45
#11 0x08077d1d in boost::function0 >::operator() 
(this=0x90fb814) at ../../boost/boost/function/function_template.hpp:581
#12 0x08077d64 in 
boost::operator++::caller > >, 
boost::signals::detail::named_slot_map_iterator>, 
boost::signals::detail::unusable, boost::single_pass_traversal_tag, 
boost::signals::detail::unusable const&, int> ([EMAIL PROTECTED]) 
at ../../boost/boost/signals/signal_template.hpp:119
#13 0x080784cd in boost::signal0, int, 
std::less, boost::function > 
>::operator() (this=0x90fb468) at ../../boost/boost/last_value.hpp:43
#14 0x084d2e13 in lyx::support::FileMonitor::Impl::monitorFile 
(this=0x90fb438) at FileMonitor.C:180
#15 0x084d2ebc in 
boost::detail::function::void_function_obj_invoker0, 
boost::_bi::list1 > >, 
void>::invoke (function_obj_ptr={obj_ptr = 0x90fb5b8, const_obj_ptr = 
0x90fb5b8, func_ptr = 0x90fb5b8, data = ""}) 
at ../../boost/boost/bind/mem_fn_template.hpp:45
#16 0x08077d1d in boost::function0 >::operator() 
(this=0x90fb69c) at ../../boost/boost/function/function_template.hpp:581
#17 0x08077d64 in 
boost::operator++::caller > >, 
boost::signals::detail::named_slot_map_iterator>, 
boost::signals::detail::unusable, boost::single_pass_traversal_tag, 
boost::signals::detail::unusable const&, int> ([EMAIL PROTECTED]) 
at ../../boost/boost/signals/signal_template.hpp:119
#18 0x080784cd in boost::signal0, int, 
std::less, boost::function > 
>::operator() (this=0x90fb448) at ../../boost/boost/last_value.hpp:43
#19 0x083097b1 in Timeout::emit (this=0x90fb448) at Timeout.C:51
#20 0x08314982 in qtTimeout::timerEvent (this=0x90fb508) 
at ../../../src/frontends/Timeout.h:72
#21 0x03cfa1e2 in QObject::event () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#22 0x03c91cfb in QApplication::internalNotify () 
from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#23 0x03c93339 in QApplication::notify () 
from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#24 0x03c85c1c in QEventLoop::activateTimers () 
from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#25 0x03c38b8f in QEventLoop::processEvents () 
from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#26 0x03cab3f5 in QEventLoop::enterLoop () 
from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#27 0x03cab29e in QEventLoop::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#28 0x03c9193f in QApplication::exec () from /usr/lib/qt-3.3/lib/libqt-mt.so.3
#29 0x08379f22 in lyx_gui::start ([EMAIL PROTECTED], [EMAIL PROTECTED]) at 
lyx_gui.C:248
#30 0x081448e3 in LyX::priv_exec (this=0x8e058f8, [EMAIL PROTECTED], 
argv=0xbf84a324) at lyx_main.C:280
#31 0x08144e9a in LyX::exec ([EMAIL PROTECTED], argv=0xbf84a324) at 
lyx_main.C:143
#32 0x08061ff8 in main (argc=1, argv=0x8b14ec83) at main.C:47

Conformant web pages once more

2006-06-02 Thread Angus Leeming
This page: http://community.nethosted.co.uk/post_9972.html

explains why our web pages aren't validating with the W3C validator at the
moment and how to fix it.

Could someone change the DOCTYPE declaration to:

http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>

Regards,
Angus



Re: [Patch] Qt4 cursor handling simplification

2006-06-02 Thread Edwin Leuven

Abdelrazak Younes wrote:

Edwin Leuven wrote:

other changes i see:

1. before the patch selecting with the mouse down was ill behaved 
because after reaching the end of the document the cursor would move 
to the beginning etc


2. tabbing now works in tables (move to next cell) and didn't before


I have some difficulties to understand why my patch would solve these 
two problems. Don't you have some local changes that would explain that 
and what you describe below?


i will investigate...


Re: Question about QWorkarea and usefulness of wa_ptr

2006-06-02 Thread Georg Baum
Abdelrazak Younes wrote:

> AFAIS, wa_ptr is equivalent to "this" and is not used anywhere else.

It is used in lyxX11EventFilter and checkAppleEventForMissingParams (only in
OS X). Figuring out the reason why it is needed there is left as an
exercise for the reader.

> So, can I remove it?

No. But it could be put in an OS X ifdef. Looks like I become the "No"-sayer
here.


Georg






Re: Question about QWorkarea and usefulness of wa_ptr

2006-06-02 Thread Angus Leeming

Abdelrazak Younes wrote:

AFAIS, wa_ptr is equivalent to "this" and is not used anywhere else.
So, can I remove it?


Sure. Feel free to experiment.

Angus



Re: New Windows Installer

2006-06-02 Thread Angus Leeming

Angus Leeming wrote:

Angus Leeming wrote:

Joost Verburg wrote:

A new installer for Aspell 0.6 data and dictionaries has been uploaded:
http://wiki.lyx.org/uploads/Windows/Installer/aspell6-wininstaller-src.tar.gz 
The next version of the LyX installer will bundle this new Aspell 
installer and make use of the new features.

Angus, can you run the script again?



It's running as I write.


Ok, Joost. All dictionaries are now uploaded and available through 
http://wiki.lyx.org/Windows/Aspell6.


In addition to these dictionary installers, aussie.lyx.org also contains 
these files in the same directory:


/home/lyx/www/pmwiki/uploads/Windows/Aspell6
-rw-rw-r--  1 leeming wiki  294 Mar 17 02:53 table.sh
-rw-rw-r--  1 leeming wiki 5879 Mar 17 23:49 aspell_data.nsi
-rwxrwxr-x  1 leeming wiki   122162 Mar 17 02:38 AspellData-0.60.4.exe

table.sh was used to create the table of dictionary links on 
http://wiki.lyx.org/Windows/Aspell6


The other two files survive from an earlier play with this stuff.

Regards,
Angus



Question about QWorkarea and usefulness of wa_ptr

2006-06-02 Thread Abdelrazak Younes

Hello,

In the qt4 frontend, I would like to get rid of this wa_ptr that seems 
do to do nothing at all in the Qt4 port. At least it doesn't do anything 
in windows and X11. On Mac there is this special code in QWorkArea 
constructor:


#ifdef Q_WS_MACX
wa_ptr = this;
#endif

Other than that this pointer is affected there also:

void QWorkArea::haveSelection(bool own) const
{
/// \todo ask X11 and MAC devels why this wa_ptr is useful.
wa_ptr = const_cast(this);
...

AFAIS, wa_ptr is equivalent to "this" and is not used anywhere else.

So, can I remove it?

Abdel.





Re: New Windows Installer

2006-06-02 Thread Jean-Marc Lasgouttes
>>>>> "Joost" == Joost Verburg <[EMAIL PROTECTED]> writes:

Joost> Build 20060602 is available and has been uploaded to incoming.
Joost> Can you move the files again JMarc?

Done:

lftp [EMAIL PROTECTED]:/home/ftp/pub/lyx/pre> dir lyx-142svn-20060602.exe*
-rw-r--r--1 507  2002  8856899 Jun 02 15:05 lyx-142svn-20060602.exe
-rw-r--r--1 507  2002 60141963 Jun 02 15:06 
lyx-142svn-20060602.exe-bundle.exe


JMarc


Re: [Patch] Qt4 cursor handling simplification

2006-06-02 Thread Abdelrazak Younes

Edwin Leuven wrote:

other changes i see:

1. before the patch selecting with the mouse down was ill behaved 
because after reaching the end of the document the cursor would move to 
the beginning etc


2. tabbing now works in tables (move to next cell) and didn't before


I have some difficulties to understand why my patch would solve these 
two problems. Don't you have some local changes that would explain that 
and what you describe below?


selecting with the mousing and letting it scroll down results in the 
messages below. behavior is good though (no anomalies):


can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
q: inset: 0x1eade68 idx: 6 par: 0 pos: 0


Abdel.



Re: scons-msvc adventure

2006-06-02 Thread Bo Peng

I agree with Angus that, even if this glob think is easier to maintain
than the explicit file listing, it's easy to have some temporary .C
files in there. So I would say that this is error prone.

That said, it is just a matter of education... if I know that I should
not put temporary files in there then I will not.


I agree as well, but there are always tradeoffs.

1. Listing filenames once is OK, but multiple times? No. I will need
to put filenames in the MSVCproject function, and I am not in
particular fond of putting filelist globally (namely a huge block of
filenames at the beginning of SConscript. ).

2. It is a bit too early to say that but this will allow me to apply
the scons system to lyx1.4 with minimal changes.

3. Side affects are usually easy to avoid. For example, you can copy
the old copy to file.old, not file_old.C.

Anyway, it is easy to switch back. Let us first focus on the
MSVCproject issue, if msvc compiles all right.

Bo


Re: scons-msvc adventure

2006-06-02 Thread Bo Peng

I got this error:

Warning: Can not locate any spell checker
Checking for the number of args for mkdir... one
Checking for arg types for select... yes
IOError: [Errno 2] No such file or directory: '.\\src\\config.h':
  File "C:\sandbox\lyx\lyx-devel\development\scons\SConstruct", line 1067:
utils.endConfigH(TOP_SRC_DIR)
  File "C:\sandbox\lyx\lyx-devel\development\scons\scons_utils.py", line 138:
writeToFile(os.path.join(top_src_dir, config_h), config_content +
  File "C:\sandbox\lyx\lyx-devel\development\scons\scons_utils.py", line 26:
file = open(filename, 'w')


That is strange.  .\\src\\config.h seems to be the right path for
config.h if you are running from the top level directory. What will
happen if you manually run the following?

python
open(os.path.join('.', 'src', 'config.h'), 'w')

Bo


Re: scons-msvc adventure

2006-06-02 Thread Bo Peng

| Anyway, many people prefer to list source files explicitly. If you are
| one of them, you still get a chance to persuade me.

Not all files in a folder is part of a build.
(not even all source files...)



I know, that is why I have to have include and exclude options for the
globSource function.

Bo


Re: [Patch] Qt4 cursor handling simplification

2006-06-02 Thread Abdelrazak Younes

Edwin Leuven wrote:
selecting with the mousing and letting it scroll down results in the 
messages below. behavior is good though (no anomalies):


can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
q: inset: 0x1eade68 idx: 6 par: 0 pos: 0



I don't see that here. Looking at the relevant code in "cursor_slice.C", 
I can't see how it could be related to my patch. Any idea someone?


Abdel.



Re: [Patch] Qt4 cursor handling simplification

2006-06-02 Thread Abdelrazak Younes

Edwin Leuven wrote:

Abdelrazak Younes wrote:
And furthermore it get rid of a bug that I noticed sometimes with 
cursor drawing. Namely that the trace of the former cursor remains 
after you move it.


other changes i see:

1. before the patch selecting with the mouse down was ill behaved 
because after reaching the end of the document the cursor would move to 
the beginning etc


2. tabbing now works in tables (move to next cell) and didn't before


This wasn't really intended but that's a nice side effect! :-)

It is not that useful but it is cleaner code wise. Since the beginning 
of my qt4 port I wondered why we needed to save the "no cursor" region 
and restore it. With this patch I finally got rid of it by drawing the 
cursor after the work-area and only if it is needed.


selecting with the mousing and letting it scroll down results in the 
messages below. behavior is good though (no anomalies):


can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
q: inset: 0x1eade68 idx: 6 par: 0 pos: 0


I don't know what this is about. Will check... thanks!

Abdel.



Re: [Patch] Qt4 cursor handling simplification

2006-06-02 Thread Abdelrazak Younes

Angus Leeming wrote:

Abdelrazak Younes wrote:
It is not that useful but it is cleaner code wise. Since the beginning 
of my qt4 port I wondered why we needed to save the "no cursor" region 
and restore it. With this patch I finally got rid of it by drawing the 
cursor after the work-area and only if it is needed.


Mmmm, forgive my ignorance, but are you now redrawing the workarea on 
every cursor blink? Or do you continue to draw only a cursor-sized 
rectangle?


The paintEvent only redraws what region it is told to redraw. So, now, 
if there's nothing to redraw, nothing will be redrawn. This hasn't 
changed with my path. So if the core doesn't ask for redrawing (via the 
expose() command) only the cursor-sized rectangle will be redrawn.


Abdel.



Re: New Windows Installer

2006-06-02 Thread Joost Verburg
Build 20060602 is available and has been uploaded to incoming. Can you 
move the files again JMarc?


Everything related the Aspell should now work fine. Dictionary 
installation will also become easier once the script Angus is running 
finished (just a single click to accept the license).


The uninstaller has a new option to remove the users directory and will 
also remove the registry keys correctly.


Joost


Re: [Patch] Qt4 cursor handling simplification

2006-06-02 Thread Angus Leeming

Abdelrazak Younes wrote:
It is not that useful but it is cleaner code wise. Since the beginning 
of my qt4 port I wondered why we needed to save the "no cursor" region 
and restore it. With this patch I finally got rid of it by drawing the 
cursor after the work-area and only if it is needed.


Mmmm, forgive my ignorance, but are you now redrawing the workarea on every 
cursor blink? Or do you continue to draw only a cursor-sized rectangle?


Angus



Re: [Patch] Qt4 cursor handling simplification

2006-06-02 Thread Edwin Leuven

Abdelrazak Younes wrote:
And furthermore it get rid of a bug that I noticed sometimes with cursor 
drawing. Namely that the trace of the former cursor remains after you 
move it.


other changes i see:

1. before the patch selecting with the mouse down was ill behaved 
because after reaching the end of the document the cursor would move to 
the beginning etc


2. tabbing now works in tables (move to next cell) and didn't before

It is not that useful but it is cleaner code wise. Since the beginning 
of my qt4 port I wondered why we needed to save the "no cursor" region 
and restore it. With this patch I finally got rid of it by drawing the 
cursor after the work-area and only if it is needed.


selecting with the mousing and letting it scroll down results in the 
messages below. behavior is good though (no anomalies):


can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
q: inset: 0x1eade68 idx: 6 par: 0 pos: 0
can't compare cursor and anchor in different insets
p: inset: 0x1eade68 idx: 6 par: 0 pos: 0
q: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
q: inset: 0x1eade68 idx: 6 par: 0 pos: 0
can't compare cursor and anchor in different insets
p: inset: 0x1eade68 idx: 6 par: 0 pos: 0
q: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
q: inset: 0x1eade68 idx: 6 par: 0 pos: 0
can't compare cursor and anchor in different insets
p: inset: 0x1eade68 idx: 6 par: 0 pos: 0
q: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
q: inset: 0x1eade68 idx: 6 par: 0 pos: 0
can't compare cursor and anchor in different insets
p: inset: 0x1eade68 idx: 6 par: 0 pos: 0
q: inset: 0x1e96d20 idx: 5 par: 0 pos: 1
can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 11 par: 0 pos: 6
q: inset: 0x1eade68 idx: 3 par: 0 pos: 4
can't compare cursor and anchor in different insets
p: inset: 0x1eade68 idx: 3 par: 0 pos: 4
q: inset: 0x1e96d20 idx: 11 par: 0 pos: 6
can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 11 par: 0 pos: 6
q: inset: 0x1eade68 idx: 3 par: 0 pos: 4
can't compare cursor and anchor in different insets
p: inset: 0x1eade68 idx: 3 par: 0 pos: 4
q: inset: 0x1e96d20 idx: 11 par: 0 pos: 6
can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 11 par: 0 pos: 6
q: inset: 0x1eade68 idx: 3 par: 0 pos: 4
can't compare cursor and anchor in different insets
p: inset: 0x1eade68 idx: 3 par: 0 pos: 4
q: inset: 0x1e96d20 idx: 11 par: 0 pos: 6
can't compare cursor and anchor in different insets
p: inset: 0x1e96d20 idx: 11 par: 0 pos: 6
q: inset: 0x1eade68 idx: 3 par: 0 pos: 4
can't compare cursor and anchor in different insets
p: inset: 0x1eade68 idx: 3 par: 0 pos: 4
q: inset: 0x1e96d20 idx: 11 par: 0 pos: 6




Re: [Patch] Qt4 cursor handling simplification

2006-06-02 Thread Abdelrazak Younes

Jean-Marc Lasgouttes wrote:

"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:


Abdelrazak> Abdelrazak Younes wrote:

Hello,

I would like to put this in but I touched a tiny bit the other
frontends. Any objection?


Abdelrazak> As there is none, I am going to commit.

Since you are complaining:


Am I complaining?


what do you gain by doing that? Speed?


A tiny bit.


Simplicity?


A great bit :-)
And furthermore it get rid of a bug that I noticed sometimes with cursor 
drawing. Namely that the trace of the former cursor remains after you 
move it.



If it is really useful, we should do that for all
frontends.


It is not that useful but it is cleaner code wise. Since the beginning 
of my qt4 port I wondered why we needed to save the "no cursor" region 
and restore it. With this patch I finally got rid of it by drawing the 
cursor after the work-area and only if it is needed.



Actually, I have never been sure of what LyXScreen does.


IMHO it is useless. I really don't see the advantage of distinguishing 
the Screen from the Work-area. AFAIS, except for the cursor and expose() 
handling, the only use of the LyXScreen is to pass workArea(). So there 
is a lot of workArea() call everywhere in the code that is useless.
As my patch proves it, the expose() and cursor handling can be delegated 
directly to the workArea.


Abdel.



Re: New Windows Installer

2006-06-02 Thread Angus Leeming

Angus Leeming wrote:

Joost Verburg wrote:

A new installer for Aspell 0.6 data and dictionaries has been uploaded:
http://wiki.lyx.org/uploads/Windows/Installer/aspell6-wininstaller-src.tar.gz 
The next version of the LyX installer will bundle this new Aspell 
installer and make use of the new features.

Angus, can you run the script again?



It's running as I write.


Hi, Joost.

compilation of the NSIS installer of the german dictionary fails with:

!insertmacro MUI_PAGE_LICENSE
LicenceData: empty license file "de\Copyright"
Error in macro MUI_PAGE_LICENSE on macroline 21
Error in script "aspell_dict.nsi" on line 74 --- aborting creation process
Failed to run NSIS

Sure enough, de\Copyright is empty. I replaced it with a Generic GPL 
version 2 or later license statement and all appears to be progressing 
nicely again.


Perhaps you'll drop Kevin Atkinson a line about the missing file?

Angus



Re: [Patch] Qt4 cursor handling simplification

2006-06-02 Thread Jean-Marc Lasgouttes
> "Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> Abdelrazak Younes wrote:
>> Hello,
>> 
>> I would like to put this in but I touched a tiny bit the other
>> frontends. Any objection?

Abdelrazak> As there is none, I am going to commit.

Since you are complaining: what do you gain by doing that? Speed?
Simplicity? If it is really useful, we should do that for all
frontends.

Actually, I have never been sure of what LyXScreen does.

JMarc


Re: MANIFEST PROBLEM SOLVED!!! (was Re: scons-msvc adventure)

2006-06-02 Thread younes . a
Quoting Bo Peng <[EMAIL PROTECTED]>:

> > No AFAIK, this is a MSVC2005 feature.
> > > I am
> > > worried about the existence of QtXXX.dll.manifest. qt-mt.dll.manifest
> > > for all the Q../Free qt3/qt4 compiled with msvc2003/2005.
> > mscv2003 will not generate a manifest, I guess.
>
> You mean if I used my old 2003 cd, I would be free of these trouble
> (and be happier)?

You will be happier but think about all the people who cannot buy msvc2003. Or
is there a free version also?

> It is not a good news that I have to handle msvc2003/2005 differently.

Yes.

> Has anyone tested msvc2003? Otherwise, the vc patch will be delayed
> since I will have to test msvc2003 myself.

Why don't we just focus on msvc2005?

Abdel.


Re: scons-msvc adventure

2006-06-02 Thread Abdelrazak Younes

Bo Peng wrote:

Please test the attached patch. msvc2005 works here, with intl support.

There is one BIG change. namely, I am trying to use the glob module to
find source files, instead of listing all filenames. The performance
penalty should not be noticable. This change will allow me to add
source files to the msvcproject function easier, and it should allow
me to build lyx1.4.x with minimal changes to the scons system.

Anyway, many people prefer to list source files explicitly. If you are
one of them, you still get a chance to persuade me.


I agree with Angus that, even if this glob think is easier to maintain 
than the explicit file listing, it's easy to have some temporary .C 
files in there. So I would say that this is error prone.


That said, it is just a matter of education... if I know that I should 
not put temporary files in there then I will not.


Abdel.



Re: Scons-msvc project files

2006-06-02 Thread Abdelrazak Younes

Peter Kümmel wrote:

Bo Peng wrote:

Hi, Peter, Abdel,

Please think a bit about what to include in the msvc project file(s).
A huge all-files-in project does not sound too clever.

Bo




Here i have a solution (.sln) with 10 (no itnl atm) projects:
the nine libraries (4 boost,  support, controllers)
and one project for the program.


I agree with Peter. Separating the files per directory is a good idea. 
It should be one project per static library... The same libraries as we 
have currently with scons.


Abdel.



Re: [Patch] Qt4 cursor handling simplification

2006-06-02 Thread Abdelrazak Younes

Abdelrazak Younes wrote:

Hello,

I would like to put this in but I touched a tiny bit the other 
frontends. Any objection?


As there is none, I am going to commit.

Thanks,
Abdel.



Re: scons-msvc adventure

2006-06-02 Thread Angus Leeming

Bo Peng wrote:

Please test the attached patch. msvc2005 works here, with intl support.

There is one BIG change. namely, I am trying to use the glob module to
find source files, instead of listing all filenames. The performance
penalty should not be noticable. This change will allow me to add
source files to the msvcproject function easier, and it should allow
me to build lyx1.4.x with minimal changes to the scons system.

Anyway, many people prefer to list source files explicitly. If you are
one of them, you still get a chance to persuade me.


glob may make your life easier now, but in the long run it will make the 
project more maintainable if you list files explicitly.


Think what happens if I'm hacking the sources and have multiple foo_try1.C, 
foo_try2.C, ... files lying around.


Angus



Re: LyX150Experimental Updated!

2006-06-02 Thread Angus Leeming

Peter Kümmel wrote:

Have you dropped the os/2 file from the source list?

+source = globSource(dir = env.subst('$TOP_SRC_DIR/intl'), pattern = '*.c',
+  exclude = ['vasnprintf.c', 'printf-parse.c', 'printf-args.c', 
'os2compat.c'],
+  build_dir = '$BUILDDIR/intl')


Very funky :)

However, I think it would ease the maintenance burden if you listed the 
files you wanted to compile explicitly.


Angus



Re: New Windows Installer

2006-06-02 Thread Angus Leeming

Joost Verburg wrote:

A new installer for Aspell 0.6 data and dictionaries has been uploaded:
http://wiki.lyx.org/uploads/Windows/Installer/aspell6-wininstaller-src.tar.gz 
The next version of the LyX installer will bundle this new Aspell 
installer and make use of the new features.



Angus, can you run the script again?


It's running as I write.

Angus



Re: scons-msvc adventure

2006-06-02 Thread Peter Kümmel
Peter Kümmel wrote:
> Bo Peng wrote:
>> Please test the attached patch. msvc2005 works here, with intl support.
> 
> Great! On XP with correctly generated manifest files?
> 
> I'll test it.

I got this error:

Warning: Can not locate any spell checker
Checking for the number of args for mkdir... one
Checking for arg types for select... yes
IOError: [Errno 2] No such file or directory: '.\\src\\config.h':
  File "C:\sandbox\lyx\lyx-devel\development\scons\SConstruct", line 1067:
utils.endConfigH(TOP_SRC_DIR)
  File "C:\sandbox\lyx\lyx-devel\development\scons\scons_utils.py", line 138:
writeToFile(os.path.join(top_src_dir, config_h), config_content +
  File "C:\sandbox\lyx\lyx-devel\development\scons\scons_utils.py", line 26:
file = open(filename, 'w')


Re: LyX150Experimental Updated!

2006-06-02 Thread Peter Kümmel
Peter Kümmel wrote:

> Have you dropped the os/2 file from the source list?

+source = globSource(dir = env.subst('$TOP_SRC_DIR/intl'), pattern = '*.c',
+  exclude = ['vasnprintf.c', 'printf-parse.c', 'printf-args.c', 
'os2compat.c'],
+  build_dir = '$BUILDDIR/intl')



Re: long standing annoyance with tables

2006-06-02 Thread Edwin Leuven

Lars Gullik Bjønnes wrote:

Note that I am not against this change, I just want us to be aware of
implications and have well founded reasons for the change.

That said, IMHO we should make the behaviour in LyX as close as
possible to what you get from using the LaTeX styles/classes manually.
So if LaTeX does not use borders by default, neither should we.


in latex a tabular comes without lines. they are added using \hline (or 
variations on this)


moreover, i think that it unlikely that people want the lines as we set 
them now and my guess is that most people do what paul does. i do that 
as well and i know that those around me who use lyx do the same. (have 
you ever seen a table formatted like that in a publication?)


i am sure that the current line configuration wasn't the result of 
careful study of common user behavior but more a historical accident


although i agree that having some table styles with a user configuration 
would be nice, it is not high on my todo list (well behaved copy/paste 
comes before that for example)


in the meantime i think that it is cleaner and friendler to the user to 
insert a blank table






Re: scons-msvc adventure

2006-06-02 Thread Lars Gullik Bjønnes
"Bo Peng" <[EMAIL PROTECTED]> writes:

| Please test the attached patch. msvc2005 works here, with intl support.
| 
| There is one BIG change. namely, I am trying to use the glob module to
| find source files, instead of listing all filenames. The performance
| penalty should not be noticable. This change will allow me to add
| source files to the msvcproject function easier, and it should allow
| me to build lyx1.4.x with minimal changes to the scons system.
| 
| Anyway, many people prefer to list source files explicitly. If you are
| one of them, you still get a chance to persuade me.

Not all files in a folder is part of a build.
(not even all source files...)

-- 
Lgb



Re: long standing annoyance with tables

2006-06-02 Thread Lars Gullik Bjønnes
"Paul A. Rubin" <[EMAIL PROTECTED]> writes:

| Lars Gullik Bjønnes wrote:
| > Edwin Leuven <[EMAIL PROTECTED]> writes:
| > | is that it gets inserted with silly lines
| > Why are they silly?
| 
| I think it's generally considered bad form to have many horizontal
| lines, or *any* vertical lines, in a table.  I confess that the first
| thing I do after inserting a table is to block the whole thing and
| delete the borders, then typically add just a horizontal line under
| the headings row.  So I for one would be happier if tables were born
| naked as babies.

Note that I am not against this change, I just want us to be aware of
implications and have well founded reasons for the change.

That said, IMHO we should make the behaviour in LyX as close as
possible to what you get from using the LaTeX styles/classes manually.
So if LaTeX does not use borders by default, neither should we.

| >  | the attached patch gets rid of them
| > Doesn't this change default behaviour that we have had for a very
| > long
| > time?
| 
| Yes, although it's default behavior of the interface rather than
| default behavior of the compilation process, if that makes sense.
| (Put another way, it will not affect any existing documents.)
| 
| However, perhaps there should be a preference option whether new
| tables are generated with/without lines (say, a check box in the table
| insertion dialog and maybe something that says "remember this choice")?

Something like a user settable default tabular style?

-- 
Lgb



Re: long standing annoyance with tables

2006-06-02 Thread Jose' Matos
On Friday 02 June 2006 07:10, Edwin Leuven wrote:
> Lars Gullik Bjønnes wrote:
> > Edwin Leuven <[EMAIL PROTECTED]> writes:
> > | is that it gets inserted with silly lines
> >
> > Why are they silly?
>
> i think that nobody uses line formatting like this. like paul the first
> thing i do after inserting a table is selecting the whole thing and
> unset all the lines. my guess is that 99.9% of people do this...

  And where did you get those statistics?
  I would not complain if instead you implemented some type of system as Paul 
suggested. Come on, it can not be too difficult. Friday in progress, in case 
you wonder...

  Tables need a lot more work.

> > | the attached patch gets rid of them
> >
> > Doesn't this change default behaviour that we have had for a very long
> > time?
>
> yeah, call it progress...

  You call progress to a system where you can not even colapse two rows in the 
same column?

> > | can i commit? please?!
> >
> > whining does not help.
>
> damn

  Good try.

-- 
José Abílio


Re: lyx-1.3.7 & Fedora core 5

2006-06-02 Thread Jose' Matos
On Thursday 01 June 2006 21:53, Martin Vermeer wrote:
>
> I remember that you had to log out and in again after installing qt for
> the first time.

  I would expect only to be necessary to start a new shell where those 
environment variables will be read.

  Garst did you succeed compiling 1.3.7?

> - Martin

-- 
José Abílio


Re: tabular crash

2006-06-02 Thread Juergen Spitzmueller
Martin Vermeer wrote:
> Hmmm. Could this again be one of those "cursor remains hanging in
> mid-air" things?
>
> You replace a word (say, 5 characters) by an inset, i.e. a single
> "character". The cell length is reduced by 4. Should the cursor.pos() be
> reset?

This sounds at least like a sensible possibility.

> Does it happen for other insets besides charstyle?

I tried that but couldn't get a crash yet. In fact, I also cannot get it to 
crash with charstyles always. Some preconditions are needed, which I can't 
put my finger on yet. Of course, it always crashes in the paper I'm currently 
working on ...

Jürgen


Re: scons-msvc adventure

2006-06-02 Thread Peter Kümmel
Bo Peng wrote:
> Please test the attached patch. msvc2005 works here, with intl support.

Great! On XP with correctly generated manifest files?

I'll test it.


> There is one BIG change. namely, I am trying to use the glob module to
> find source files, instead of listing all filenames. The performance
> penalty should not be noticable. This change will allow me to add
> source files to the msvcproject function easier, and it should allow
> me to build lyx1.4.x with minimal changes to the scons system.
> 
> Anyway, many people prefer to list source files explicitly. If you are
> one of them, you still get a chance to persuade me.
> 
> Cheers,
> Bo



Re: LyX150Experimental Updated!

2006-06-02 Thread Peter Kümmel
Bo Peng wrote:
>> Done.
> 
> Great. Then you will see intl support in scons/msvc.
> 
>> config.h:
>>
>> #if defined(MAKE_INTL_LIB) && defined(_MSC_VER)
>> #define __attribute__(x)
>> #define inline
>> #define uintmax_t UINT_MAX
>> #endif
> 
> I think I was missing the define inline one.
> 
> Cheers,
> Bo
> 
> 

inline it's maybe at the wrong place, or it's not supported
by msvc /TC. Hope it doesn't slow down too much,
but if it only affects some of the ui, then it's
maybe not a problem.

Have you dropped the os/2 file from the source list?

Peter


Re: Scons-msvc project files

2006-06-02 Thread Peter Kümmel
Bo Peng wrote:
> Hi, Peter, Abdel,
> 
> Please think a bit about what to include in the msvc project file(s).
> A huge all-files-in project does not sound too clever.
> 
> Bo
> 
> 

Here i have a solution (.sln) with 10 (no itnl atm) projects:
the nine libraries (4 boost,  support, controllers)
and one project for the program.

Peter