GTK/Gnome frontend elementary support

2000-07-14 Thread Marko Vendelin


Hi!

the attached patch together with additional files included into the
.tar.gz archive adds elementary support for GTK/Gnome frontend: configure
scripts, Gtk/Gnome initialization, Gnome event loop processing, and
Copyright dialog box implementation.

It should be easy to use this code on the platform with good STL string
implementation. In such case you need standard gtk, gnome, libsigc++ ,
gtk-- and gnome-- libraries.

On my platform (redhat linux 6.1, egcs 1.1.2) LyX uses LyX string class
instead of STL string. To use gtk-- and gnome-- with LyX I recompiled
these libraries after replacing "#include string" by "#include
"LString.h"" in the source files of the libraries. To make our life easier
I've written two small scripts that patch gtk-- and gnome-- libraries and
compile them. Please note that running these scripts is DANGEROUS since it
may change your source files. The following are instructions for getting
Gtk/Gnome frontend running in the platforms that lack good STL string
implementation (it worked on my platform):

* install Gtk, Gnome, and libsigc++

* download gtkmm-1.2.1.tar.gz and gnomemm-1.1.10.tar.gz from
  http://gtkmm.sourceforge.net/download.html (click "sourceforge download
  area" on this page)

* create a new directory and copy gtkmm-1.2.1.tar.gz,
  gnomemm-1.1.10.tar.gz, lyxgtk.sh, and str2lyxstr.sh
  to this directory (lyxgtk.sh and str2lyxstr.sh are attached to this
  e-mail)

* cd to this directory

* read and edit script lyxgtk.sh (set source and install directories)

* run script lyxgtk.sh

* include directory with installed new gtk and gnome libs to PATH and
  LD_LIBRARY_PATH as first directories (subdirs bin and lib,
  respectively).

* cd to lyx source directory

* run autogen.sh

* run configure with the following options:
--with-frontend=gtk --without-included-libsigc --disable-sigctest 
--with-gnomemm-config-path=NEW_GNOMEMM_LIB/lib/gnomemmConf.sh 
--disable-gtkmmtest

* run make

Please note, that compiled Gtk--/Gnome-- libraries are usable only with
LyX.

Finally, to make configure script working I had to disable
AC_LANG_CPLUSPLUS in configure.in (line 66). Otherwise gnome configuration
scripts were not working properly. It will be very nice if someone with
good knowledge of configure.in magic would take a look on this problem.

Regards,

Marko


#!/bin/bash

# This script is DANGEROUS! It replaces 
# "#include string" with "#include "LString.h"" in the files in 
# current directory (recursively!). This can change YOUR source files. 
# Use it at your own risk.

FILELISTCC=`rgrep -r -l "#include string" . | grep "\.cc"` 
FILELISTH=`rgrep -r -l "#include string" . | grep "\.h"` 
FILELISTGEN=`rgrep -r -l "#include string" . | grep "\.gen_"` 

for i in $FILELISTCC $FILELISTH $FILELISTGEN; do
cat $i | sed -e 's/#include string/#include "LString.h"/g'  .tmpfile
mv .tmpfile $i
done


#!/bin/bash

# This script is DANGEROUS! It uses script srt2lyxstr.sh to replace 
# "#include string" with "#include "LString.h"". This can change YOUR source files.
# Use it at your own risk.

# extracting GNOME-- and GTK--
tar zxvf gnomemm-1.1.10.tar.gz
tar zxvf gtkmm-1.2.1.tar.gz

# Please specify the directories with GTK--, GNOME--, LyX source, and the directory 
# to which new GTK--/GNOME-- libraries should be installed.
GTKMMDIR=/home/users/markov/cpp-files/lyx/lyx-gtk/gtkmm-1.2.1
GNOMEMMDIR=/home/users/markov/cpp-files/lyx/lyx-gtk/gnomemm-1.1.10
LIBINSTALLDIR=/home/users/markov/cpp-files/lyx/lyx-gtk/root
LYXDIR=/home/users/markov/cpp-files/lyx/lyx-devel

# Please note that script creates temporary directory $GTKMMDIR/../.tmpdir . 
# Change the script if this is not acceptable for you.

mkdir $LIBINSTALLDIR

export MAKE="make"

export CXXFLAGS="-DUSE_INCLUDED_STRING -I$LYXDIR/src"

CURRDIR=`pwd`
STR2LYXSTR=$CURRDIR/str2lyxstr.sh

# gtkmm

cd $GTKMMDIR
./configure --prefix=$LIBINSTALLDIR 
echo -e "all: \ninstall: \n"  gdk--/tests/Makefile
mv src/gtkmmproc ../.tmpdir
$STR2LYXSTR
mv ../.tmpdir src/gtkmmproc

make
make install

cd $CURRDIR

# gnomemm

export PATH=$LIBINSTALLDIR/bin:$PATH

cd $GNOMEMMDIR
./configure --prefix=$LIBINSTALLDIR --disable-gtkmmtest 

$STR2LYXSTR

make
make install
cp src/gnomemmConf.sh $LIBINSTALLDIR/lib

cd $CURRDIR



 gnome-add.tar.gz
 gnome-patch.gz


Re: LyX versus window manager

2000-07-14 Thread R. Lahaye

Angus Leeming wrote:
 I think Rob Lahaye deserves a prize for persistence! He has managed to
 successfully isolate a bug that is triggered by resizing an xforms dialog when
 the window manager is set up to show the window's properties while resizing.

Thank you. Well, I'll probably go for the gold medal now by telling you:

I've just uploaded  compiled the latest CVS and found the following:

DISABLE that WM feature and do a FAST resize.
If you do that fast enough (well, I believe that's what it is) then
you'll
see the scroll bar or status bar disappear, depending on whether you
resize
horizontally or vertically. You have to resize to a SMALLER size in
order to
let the scrollbar/statusbar disappear.

In KDE and Xfce I even don't need a document loaded for that!
But mwm only shows this bug when it also has to resize
the text of a loaded document; but it does happen in mwm as well.

Is there a competition going on in XForms between resizing the
contents of the window and displaying the margins (scrollbar
and statusbar) ?

So dis/enabling "show the window's contents while resizing"
doesn't seem to be an issue anymore.

---

Good news on the citation-ref window: my earlier reported bug on
resizing that window has gone with the latest CVS compilation.


You guys are doing great work!!!

Regards,

Rob.



Re: LyX versus window manager

2000-07-14 Thread Angus Leeming

Rob  I think Rob Lahaye deserves a prize for persistence! He has managed to
Rob  successfully isolate a bug that is triggered by resizing an xforms dialog when
Rob  the window manager is set up to show the window's properties while resizing.

Rob Thank you. Well, I'll probably go for the gold medal now by telling you:
Rob I've just uploaded  compiled the latest CVS and found the following:

Rob DISABLE that WM feature and do a FAST resize.
Rob If you do that fast enough (well, I believe that's what it is) then
Rob you'll see the scroll bar or status bar disappear, depending on
Rob whether you resize horizontally or vertically. You have to resize to
Rob a SMALLER size in order to let the scrollbar/statusbar disappear.

This bug is independent of your discovery. I seem to remember reading that it
was introduced recently by (Lars???) playing with the main window's scrollbars.
The good news is that this means it's squashable. One day!

Rob Good news on the citation-ref window: my earlier reported bug on
Rob resizing that window has gone with the latest CVS compilation.

;-) That's because you discovered how to circumvent the problem!

Have a good weekend.
Angus



GTK/Gnome frontend elementary support

2000-07-14 Thread Marko Vendelin


Hi!

the attached patch together with additional files included into the
.tar.gz archive adds elementary support for GTK/Gnome frontend: configure
scripts, Gtk/Gnome initialization, Gnome event loop processing, and
Copyright dialog box implementation.

It should be easy to use this code on the platform with good STL string
implementation. In such case you need standard gtk, gnome, libsigc++ ,
gtk-- and gnome-- libraries.

On my platform (redhat linux 6.1, egcs 1.1.2) LyX uses LyX string class
instead of STL string. To use gtk-- and gnome-- with LyX I recompiled
these libraries after replacing "#include " by "#include
"LString.h"" in the source files of the libraries. To make our life easier
I've written two small scripts that patch gtk-- and gnome-- libraries and
compile them. Please note that running these scripts is DANGEROUS since it
may change your source files. The following are instructions for getting
Gtk/Gnome frontend running in the platforms that lack good STL string
implementation (it worked on my platform):

* install Gtk, Gnome, and libsigc++

* download gtkmm-1.2.1.tar.gz and gnomemm-1.1.10.tar.gz from
  http://gtkmm.sourceforge.net/download.html (click "sourceforge download
  area" on this page)

* create a new directory and copy gtkmm-1.2.1.tar.gz,
  gnomemm-1.1.10.tar.gz, lyxgtk.sh, and str2lyxstr.sh
  to this directory (lyxgtk.sh and str2lyxstr.sh are attached to this
  e-mail)

* cd to this directory

* read and edit script lyxgtk.sh (set source and install directories)

* run script lyxgtk.sh

* include directory with installed new gtk and gnome libs to PATH and
  LD_LIBRARY_PATH as first directories (subdirs bin and lib,
  respectively).

* cd to lyx source directory

* run autogen.sh

* run configure with the following options:
--with-frontend=gtk --without-included-libsigc --disable-sigctest 
--with-gnomemm-config-path=NEW_GNOMEMM_LIB/lib/gnomemmConf.sh 
--disable-gtkmmtest

* run make

Please note, that compiled Gtk--/Gnome-- libraries are usable only with
LyX.

Finally, to make configure script working I had to disable
AC_LANG_CPLUSPLUS in configure.in (line 66). Otherwise gnome configuration
scripts were not working properly. It will be very nice if someone with
good knowledge of configure.in magic would take a look on this problem.

Regards,

Marko


#!/bin/bash

# This script is DANGEROUS! It replaces 
# "#include " with "#include "LString.h"" in the files in 
# current directory (recursively!). This can change YOUR source files. 
# Use it at your own risk.

FILELISTCC=`rgrep -r -l "#include " . | grep "\.cc"` 
FILELISTH=`rgrep -r -l "#include " . | grep "\.h"` 
FILELISTGEN=`rgrep -r -l "#include " . | grep "\.gen_"` 

for i in $FILELISTCC $FILELISTH $FILELISTGEN; do
cat $i | sed -e 's/#include /#include "LString.h"/g' > .tmpfile
mv .tmpfile $i
done


#!/bin/bash

# This script is DANGEROUS! It uses script srt2lyxstr.sh to replace 
# "#include " with "#include "LString.h"". This can change YOUR source files.
# Use it at your own risk.

# extracting GNOME-- and GTK--
tar zxvf gnomemm-1.1.10.tar.gz
tar zxvf gtkmm-1.2.1.tar.gz

# Please specify the directories with GTK--, GNOME--, LyX source, and the directory 
# to which new GTK--/GNOME-- libraries should be installed.
GTKMMDIR=/home/users/markov/cpp-files/lyx/lyx-gtk/gtkmm-1.2.1
GNOMEMMDIR=/home/users/markov/cpp-files/lyx/lyx-gtk/gnomemm-1.1.10
LIBINSTALLDIR=/home/users/markov/cpp-files/lyx/lyx-gtk/root
LYXDIR=/home/users/markov/cpp-files/lyx/lyx-devel

# Please note that script creates temporary directory $GTKMMDIR/../.tmpdir . 
# Change the script if this is not acceptable for you.

mkdir $LIBINSTALLDIR

export MAKE="make"

export CXXFLAGS="-DUSE_INCLUDED_STRING -I$LYXDIR/src"

CURRDIR=`pwd`
STR2LYXSTR=$CURRDIR/str2lyxstr.sh

# gtkmm

cd $GTKMMDIR
./configure --prefix=$LIBINSTALLDIR 
echo -e "all: \ninstall: \n" > gdk--/tests/Makefile
mv src/gtkmmproc ../.tmpdir
$STR2LYXSTR
mv ../.tmpdir src/gtkmmproc

make
make install

cd $CURRDIR

# gnomemm

export PATH=$LIBINSTALLDIR/bin:$PATH

cd $GNOMEMMDIR
./configure --prefix=$LIBINSTALLDIR --disable-gtkmmtest 

$STR2LYXSTR

make
make install
cp src/gnomemmConf.sh $LIBINSTALLDIR/lib

cd $CURRDIR



 gnome-add.tar.gz
 gnome-patch.gz


Re: LyX versus window manager

2000-07-14 Thread R. Lahaye

Angus Leeming wrote:
> I think Rob Lahaye deserves a prize for persistence! He has managed to
> successfully isolate a bug that is triggered by resizing an xforms dialog when
> the window manager is set up to show the window's properties while resizing.

Thank you. Well, I'll probably go for the gold medal now by telling you:

I've just uploaded & compiled the latest CVS and found the following:

DISABLE that WM feature and do a FAST resize.
If you do that fast enough (well, I believe that's what it is) then
you'll
see the scroll bar or status bar disappear, depending on whether you
resize
horizontally or vertically. You have to resize to a SMALLER size in
order to
let the scrollbar/statusbar disappear.

In KDE and Xfce I even don't need a document loaded for that!
But mwm only shows this bug when it also has to resize
the text of a loaded document; but it does happen in mwm as well.

Is there a competition going on in XForms between resizing the
contents of the window and displaying the margins (scrollbar
and statusbar) ?

So dis/enabling "show the window's contents while resizing"
doesn't seem to be an issue anymore.

---

Good news on the citation-ref window: my earlier reported bug on
resizing that window has gone with the latest CVS compilation.


You guys are doing great work!!!

Regards,

Rob.



Re: LyX versus window manager

2000-07-14 Thread Angus Leeming

Rob> > I think Rob Lahaye deserves a prize for persistence! He has managed to
Rob> > successfully isolate a bug that is triggered by resizing an xforms dialog when
Rob> > the window manager is set up to show the window's properties while resizing.

Rob> Thank you. Well, I'll probably go for the gold medal now by telling you:
Rob> I've just uploaded & compiled the latest CVS and found the following:

Rob> DISABLE that WM feature and do a FAST resize.
Rob> If you do that fast enough (well, I believe that's what it is) then
Rob> you'll see the scroll bar or status bar disappear, depending on
Rob> whether you resize horizontally or vertically. You have to resize to
Rob> a SMALLER size in order to let the scrollbar/statusbar disappear.

This bug is independent of your discovery. I seem to remember reading that it
was introduced recently by (Lars???) playing with the main window's scrollbars.
The good news is that this means it's squashable. One day!

Rob> Good news on the citation-ref window: my earlier reported bug on
Rob> resizing that window has gone with the latest CVS compilation.

;-) That's because you discovered how to circumvent the problem!

Have a good weekend.
Angus