[PATCH] Re: graphics cache file path horkage

2003-05-30 Thread John Levon
On Fri, May 30, 2003 at 02:24:22AM +0100, John Levon wrote:

  I believe we should *always* store an absolute path at
  runtime. At save time, we can convert it to a relative path.

Fixed patch. It seems to work for me. It fixes the Save As bug.

Please please test.

john

p.s. sorry, no, I'm not taking maintainership of this code

Index: factory.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/factory.C,v
retrieving revision 1.29
diff -u -p -r1.29 factory.C
--- factory.C   22 May 2003 10:40:55 -  1.29
+++ factory.C   30 May 2003 02:15:38 -
@@ -211,8 +211,7 @@ Inset * createInset(FuncRequest const  
InsetGraphicsParams igp;
InsetGraphicsMailer::string2params(cmd.argument, igp);
InsetGraphics * inset = new InsetGraphics;
-   string const fpath = cmd.view()-buffer()-filePath();
-   inset-setParams(igp, fpath);
+   inset-setParams(igp);
return inset;
 
} else if (name == include) {
Index: insets/insetgraphics.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v
retrieving revision 1.176
diff -u -p -r1.176 insetgraphics.C
--- insets/insetgraphics.C  28 May 2003 23:09:14 -  1.176
+++ insets/insetgraphics.C  30 May 2003 02:15:44 -
@@ -182,7 +182,7 @@ void InsetGraphics::Cache::update(string
lyx::Assert(!file_with_path.empty());
 
string const path = OnlyPath(file_with_path);
-   loader.reset(file_with_path, parent_.params().as_grfxParams(path));
+   loader.reset(file_with_path, parent_.params().as_grfxParams());
 }
 
 
@@ -192,19 +192,20 @@ InsetGraphics::InsetGraphics()
 {}
 
 
-InsetGraphics::InsetGraphics(InsetGraphics const  ig,
-string const  filepath)
+#warning I have zero idea about the trackable()
+InsetGraphics::InsetGraphics(InsetGraphics const  ig)
: Inset(ig),
+ boost::signals::trackable(ig),
  graphic_label(uniqueID()),
  cache_(new Cache(*this))
 {
-   setParams(ig.params(), filepath);
+   setParams(ig.params());
 }
 
 
-Inset * InsetGraphics::clone(Buffer const  buffer) const
+Inset * InsetGraphics::clone(Buffer const ) const
 {
-   return new InsetGraphics(*this, buffer.filePath());
+   return new InsetGraphics(*this);
 }
 
 
@@ -222,8 +223,7 @@ dispatch_result InsetGraphics::localDisp
InsetGraphicsParams p;
InsetGraphicsMailer::string2params(cmd.argument, p);
if (!p.filename.empty()) {
-   string const filepath = cmd.view()-buffer()-filePath();
-   setParams(p, filepath);
+   setParams(p);
cmd.view()-updateInset(this);
}
return DISPATCHED;
@@ -327,18 +327,6 @@ BufferView * InsetGraphics::view() const
 void InsetGraphics::draw(BufferView * bv, LyXFont const  font,
 int baseline, float  x) const
 {
-   // MakeAbsPath returns params().filename unchanged if it absolute
-   // already.
-   string const file_with_path =
-   MakeAbsPath(params().filename, bv-buffer()-filePath());
-
-   // A 'paste' operation creates a new inset with the correct filepath,
-   // but then the 'old' inset stored in the 'copy' operation is actually
-   // added to the buffer.
-   // Thus, we should ensure that the filepath is correct.
-   if (file_with_path != cache_-loader.filename())
-   cache_-update(file_with_path);
-
cache_-view = bv-owner()-view();
int oasc = cache_-old_ascent;
 
@@ -408,10 +396,10 @@ Inset::EDITABLE InsetGraphics::editable(
 }
 
 
-void InsetGraphics::write(Buffer const *, ostream  os) const
+void InsetGraphics::write(Buffer const * buf, ostream  os) const
 {
os  Graphics\n;
-   params().Write(os);
+   params().Write(os, buf-filePath());
 }
 
 
@@ -420,15 +408,15 @@ void InsetGraphics::read(Buffer const * 
string const token = lex.getString();
 
if (token == Graphics)
-   readInsetGraphics(lex);
+   readInsetGraphics(lex, buf-filePath());
else
lyxerr[Debug::GRAPHICS]  Not a Graphics inset!\n;
 
-   cache_-update(MakeAbsPath(params().filename, buf-filePath()));
+   cache_-update(params().filename);
 }
 
 
-void InsetGraphics::readInsetGraphics(LyXLex  lex)
+void InsetGraphics::readInsetGraphics(LyXLex  lex, string const  bufpath)
 {
bool finished = false;
 
@@ -455,7 +443,7 @@ void InsetGraphics::readInsetGraphics(Ly
// TODO: Possibly open up a dialog?
}
else {
-   if (! params_.Read(lex, token))
+   if 

[PATCH] Re: graphics cache file path horkage

2003-05-30 Thread John Levon
On Fri, May 30, 2003 at 02:24:22AM +0100, John Levon wrote:

> > I believe we should *always* store an absolute path at
> > runtime. At save time, we can convert it to a relative path.

Fixed patch. It seems to work for me. It fixes the Save As bug.

Please please test.

john

p.s. sorry, no, I'm not taking maintainership of this code

Index: factory.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/factory.C,v
retrieving revision 1.29
diff -u -p -r1.29 factory.C
--- factory.C   22 May 2003 10:40:55 -  1.29
+++ factory.C   30 May 2003 02:15:38 -
@@ -211,8 +211,7 @@ Inset * createInset(FuncRequest const & 
InsetGraphicsParams igp;
InsetGraphicsMailer::string2params(cmd.argument, igp);
InsetGraphics * inset = new InsetGraphics;
-   string const fpath = cmd.view()->buffer()->filePath();
-   inset->setParams(igp, fpath);
+   inset->setParams(igp);
return inset;
 
} else if (name == "include") {
Index: insets/insetgraphics.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/insets/insetgraphics.C,v
retrieving revision 1.176
diff -u -p -r1.176 insetgraphics.C
--- insets/insetgraphics.C  28 May 2003 23:09:14 -  1.176
+++ insets/insetgraphics.C  30 May 2003 02:15:44 -
@@ -182,7 +182,7 @@ void InsetGraphics::Cache::update(string
lyx::Assert(!file_with_path.empty());
 
string const path = OnlyPath(file_with_path);
-   loader.reset(file_with_path, parent_.params().as_grfxParams(path));
+   loader.reset(file_with_path, parent_.params().as_grfxParams());
 }
 
 
@@ -192,19 +192,20 @@ InsetGraphics::InsetGraphics()
 {}
 
 
-InsetGraphics::InsetGraphics(InsetGraphics const & ig,
-string const & filepath)
+#warning I have zero idea about the trackable()
+InsetGraphics::InsetGraphics(InsetGraphics const & ig)
: Inset(ig),
+ boost::signals::trackable(ig),
  graphic_label(uniqueID()),
  cache_(new Cache(*this))
 {
-   setParams(ig.params(), filepath);
+   setParams(ig.params());
 }
 
 
-Inset * InsetGraphics::clone(Buffer const & buffer) const
+Inset * InsetGraphics::clone(Buffer const &) const
 {
-   return new InsetGraphics(*this, buffer.filePath());
+   return new InsetGraphics(*this);
 }
 
 
@@ -222,8 +223,7 @@ dispatch_result InsetGraphics::localDisp
InsetGraphicsParams p;
InsetGraphicsMailer::string2params(cmd.argument, p);
if (!p.filename.empty()) {
-   string const filepath = cmd.view()->buffer()->filePath();
-   setParams(p, filepath);
+   setParams(p);
cmd.view()->updateInset(this);
}
return DISPATCHED;
@@ -327,18 +327,6 @@ BufferView * InsetGraphics::view() const
 void InsetGraphics::draw(BufferView * bv, LyXFont const & font,
 int baseline, float & x) const
 {
-   // MakeAbsPath returns params().filename unchanged if it absolute
-   // already.
-   string const file_with_path =
-   MakeAbsPath(params().filename, bv->buffer()->filePath());
-
-   // A 'paste' operation creates a new inset with the correct filepath,
-   // but then the 'old' inset stored in the 'copy' operation is actually
-   // added to the buffer.
-   // Thus, we should ensure that the filepath is correct.
-   if (file_with_path != cache_->loader.filename())
-   cache_->update(file_with_path);
-
cache_->view = bv->owner()->view();
int oasc = cache_->old_ascent;
 
@@ -408,10 +396,10 @@ Inset::EDITABLE InsetGraphics::editable(
 }
 
 
-void InsetGraphics::write(Buffer const *, ostream & os) const
+void InsetGraphics::write(Buffer const * buf, ostream & os) const
 {
os << "Graphics\n";
-   params().Write(os);
+   params().Write(os, buf->filePath());
 }
 
 
@@ -420,15 +408,15 @@ void InsetGraphics::read(Buffer const * 
string const token = lex.getString();
 
if (token == "Graphics")
-   readInsetGraphics(lex);
+   readInsetGraphics(lex, buf->filePath());
else
lyxerr[Debug::GRAPHICS] << "Not a Graphics inset!\n";
 
-   cache_->update(MakeAbsPath(params().filename, buf->filePath()));
+   cache_->update(params().filename);
 }
 
 
-void InsetGraphics::readInsetGraphics(LyXLex & lex)
+void InsetGraphics::readInsetGraphics(LyXLex & lex, string const & bufpath)
 {
bool finished = false;
 
@@ -455,7 +443,7 @@ void InsetGraphics::readInsetGraphics(Ly
// TODO: Possibly open up a dialog?
}
else {
-   if (! 

Re: [PATCH] Re: Graphics: Viewing XPM and stray-EPS files ?!?!

2002-04-21 Thread Herbert Voss

R. Lahaye wrote:

 In addition, I have patched lib/configure.m4 further by adding
 more conversion-schemes for Grace. From Grace (agr) to EPS,
 PDF, PNG and JPEG (only if Grace itself and each of these output
 formats are available).
 
 Would that be of help?


when does LyX needs a conversion agr-jpg?

Herbert



-- 
http://www.lyx.org/help/




Re: [PATCH] Re: Graphics: Viewing XPM and stray-EPS files ?!?!

2002-04-21 Thread R. Lahaye

Herbert Voss wrote:
 
 R. Lahaye wrote:
 
  In addition, I have patched lib/configure.m4 further by adding
  more conversion-schemes for Grace. From Grace (agr) to EPS,
  PDF, PNG and JPEG (only if Grace itself and each of these output
  formats are available).
 
  Would that be of help?
 
 when does LyX needs a conversion agr-jpg?

Good question. I added it, because JPEG was there in Grace.
That should go then if not useful in LyX.
Are the other Grace conversions still convenient?

If so, then we don't need another patch for lib/configure.m4,
do we? Simply apply my latest patch and remove the two lines
that contain agr_to_jpg (lines 578 and 411).

Regards,
Rob.

PS: the patch also contains the conversion from XPM to EPS,
which is really necessary; otherwise xpm graphics cannot be
viewed or printed!



Re: [PATCH] Re: Graphics: Viewing XPM and stray-EPS files ?!?!

2002-04-21 Thread Herbert Voss

R. Lahaye wrote:

> In addition, I have patched lib/configure.m4 further by adding
> more conversion-schemes for Grace. From Grace (agr) to EPS,
> PDF, PNG and JPEG (only if Grace itself and each of these output
> formats are available).
> 
> Would that be of help?


when does LyX needs a conversion agr->jpg?

Herbert



-- 
http://www.lyx.org/help/




Re: [PATCH] Re: Graphics: Viewing XPM and stray-EPS files ?!?!

2002-04-21 Thread R. Lahaye

Herbert Voss wrote:
> 
> R. Lahaye wrote:
> 
> > In addition, I have patched lib/configure.m4 further by adding
> > more conversion-schemes for Grace. From Grace (agr) to EPS,
> > PDF, PNG and JPEG (only if Grace itself and each of these output
> > formats are available).
> >
> > Would that be of help?
> 
> when does LyX needs a conversion agr->jpg?

Good question. I added it, because JPEG was there in Grace.
That should go then if not useful in LyX.
Are the other Grace conversions still convenient?

If so, then we don't need another patch for lib/configure.m4,
do we? Simply apply my latest patch and remove the two lines
that contain "agr_to_jpg" (lines 578 and 411).

Regards,
Rob.

PS: the patch also contains the conversion from XPM to EPS,
which is really necessary; otherwise xpm graphics cannot be
viewed or printed!



Re: [PATCH] Re: Graphics: Viewing XPM and stray-EPS files ?!?!

2002-04-20 Thread R. Lahaye

R. Lahaye wrote:
 [Adding xpm to eps]
 
 Hi,
 
 I have modified lib/configure.m4 so that it also includes the conversion
 from XPM to EPS by default, at least for ImageMagick's convert:
 
 convert XPM:$$i EPS:$$o
 
 Do we also need a netpbm equivalent? Angus?
 
 This conversion is required, when loading XPM files and viewing/printing
 them to Postscript.
 
 Patch attached.

In addition, I have patched lib/configure.m4 further by adding
more conversion-schemes for Grace. From Grace (agr) to EPS,
PDF, PNG and JPEG (only if Grace itself and each of these output
formats are available).

Would that be of help?
If so, then do not apply previous patch, but only this one.
This one has all diffs with unpatched CVS.

Regards,
Rob.


configure_m4.diff.gz
Description: GNU Zip compressed data


Re: [PATCH] Re: Graphics: Viewing XPM and stray-EPS files ?!?!

2002-04-20 Thread R. Lahaye

R. Lahaye wrote:
> [Adding xpm to eps]
> 
> Hi,
> 
> I have modified lib/configure.m4 so that it also includes the conversion
> from XPM to EPS by default, at least for ImageMagick's convert:
> 
> convert XPM:$$i EPS:$$o
> 
> Do we also need a netpbm equivalent? Angus?
> 
> This conversion is required, when loading XPM files and viewing/printing
> them to Postscript.
> 
> Patch attached.

In addition, I have patched lib/configure.m4 further by adding
more conversion-schemes for Grace. From Grace (agr) to EPS,
PDF, PNG and JPEG (only if Grace itself and each of these output
formats are available).

Would that be of help?
If so, then do not apply previous patch, but only this one.
This one has all diffs with unpatched CVS.

Regards,
Rob.


configure_m4.diff.gz
Description: GNU Zip compressed data


[PATCH] Re: Graphics: Viewing XPM and stray-EPS files ?!?!

2002-04-17 Thread R. Lahaye


[Adding xpm to eps]

Hi,

I have modified lib/configure.m4 so that it also includes the conversion
from XPM to EPS by default, at least for ImageMagick's convert:

convert XPM:$$i EPS:$$o

Do we also need a netpbm equivalent? Angus?

This conversion is required, when loading XPM files and viewing/printing
them to Postscript.

Patch attached.

Rob.


XPMtoEPS.diff.gz
Description: GNU Zip compressed data


[PATCH] Re: Graphics: Viewing XPM and stray-EPS files ?!?!

2002-04-17 Thread R. Lahaye


[Adding xpm to eps]

Hi,

I have modified lib/configure.m4 so that it also includes the conversion
from XPM to EPS by default, at least for ImageMagick's convert:

convert XPM:$$i EPS:$$o

Do we also need a netpbm equivalent? Angus?

This conversion is required, when loading XPM files and viewing/printing
them to Postscript.

Patch attached.

Rob.


XPMtoEPS.diff.gz
Description: GNU Zip compressed data


[PATCH] Re: Graphics: file loading problems

2002-04-15 Thread R. Lahaye

Angus Leeming wrote:
 
 Bingo! xforms 0.88 has noimage  support. You're using the image loader I
 wrote based on the libXpm library. The relevant code is to be found in
 src/graphics/GraphicsImageXPM.C.
 
$Bingo^2$ !! Thanks for your hints and help.

Instead of
 
   dimension const * start_row = old_data;

we need

dimension const * start_row = old_data
+ image_.width() * (image_.height() - params.bb.yt);

Please apply attached patch!

Regards,
Rob.


graphics.diff.gz
Description: GNU Zip compressed data


Re: [PATCH] Re: Graphics: file loading problems

2002-04-15 Thread Angus Leeming

On Monday 15 April 2002 4:22 pm, R. Lahaye wrote:
 Angus Leeming wrote:
  Bingo! xforms 0.88 has noimage  support. You're using the image loader I
  wrote based on the libXpm library. The relevant code is to be found in
  src/graphics/GraphicsImageXPM.C.

 $Bingo^2$ !! Thanks for your hints and help.

 Instead of

dimension const * start_row = old_data;

 we need

 dimension const * start_row = old_data
 + image_.width() * (image_.height() -
 params.bb.yt);

dimension const * start_row = old_data + image_.width() * 
(image_.height() - params.bb.yt);

Excuse me a momement, but why is that:
(image_.height() - params.bb.yt)
not
params.bb.yb
?

Angus



Re: [PATCH] Re: Graphics: file loading problems

2002-04-15 Thread R. Lahaye

Angus Leeming wrote:
 
 On Monday 15 April 2002 4:22 pm, R. Lahaye wrote:
  Angus Leeming wrote:
   Bingo! xforms 0.88 has noimage  support. You're using the image loader I
   wrote based on the libXpm library. The relevant code is to be found in
   src/graphics/GraphicsImageXPM.C.
 
  $Bingo^2$ !! Thanks for your hints and help.
 
  Instead of
 
 dimension const * start_row = old_data;
 
  we need
 
  dimension const * start_row = old_data
  + image_.width() * (image_.height() -
  params.bb.yt);
 
 dimension const * start_row = old_data + image_.width() *
 (image_.height() - params.bb.yt);
 
 Excuse me a momement, but why is that:
 (image_.height() - params.bb.yt)
 not
 params.bb.yb
 ?

Ah, took me also some time to realize.
The picture is stored in memory from upper-left to lower-right
(see attachement).
Horizontally you still run from xl to xr, but vertically
you run from yt to yb, NOT reversed as you're thinking.
So you have to recalculate from the top, not the bottom.
The top is height - yt.

Does that make sense to you?

The patch works beautifully here!

Regards,
Rob.



 Angus

-- 
dr. R.J.W.E. Lahaye
Center for Ion-Surface Reaction 
Department of Chemistry
Pohang University of Science and Technology
San 31 Hyojadong, Namgu
790-784 Pohang, Kyungbuk
Republic of Korea

Tel : +82-54-279-2780
Fax : +82-54-279-8157
email: [EMAIL PROTECTED]



Re: [PATCH] Re: Graphics: file loading problems

2002-04-15 Thread Angus Leeming

On Monday 15 April 2002 5:37 pm, R. Lahaye wrote:
  Excuse me a momement, but why is that:
  (image_.height() - params.bb.yt)
  not
  params.bb.yb
  ?

 Ah, took me also some time to realize.
 The picture is stored in memory from upper-left to lower-right
 (see attachement).
 Horizontally you still run from xl to xr, but vertically
 you run from yt to yb, NOT reversed as you're thinking.
 So you have to recalculate from the top, not the bottom.
 The top is height - yt.

 Does that make sense to you?

Indeed. I probably knew this once upon a time, but my mind is like a seive 
and it's easier to question than to remember.

 The patch works beautifully here!

And here. I'll apply presently.
Angus


 Regards,
 Rob.

  Angus



[PATCH] Re: Graphics: file loading problems

2002-04-15 Thread R. Lahaye

Angus Leeming wrote:
> 
> Bingo! xforms 0.88 has noimage  support. You're using the image loader I
> wrote based on the libXpm library. The relevant code is to be found in
> src/graphics/GraphicsImageXPM.C.
 
$Bingo^2$ !! Thanks for your hints and help.

Instead of
 
   dimension const * start_row = old_data;

we need

dimension const * start_row = old_data
+ image_.width() * (image_.height() - params.bb.yt);

Please apply attached patch!

Regards,
Rob.


graphics.diff.gz
Description: GNU Zip compressed data


Re: [PATCH] Re: Graphics: file loading problems

2002-04-15 Thread Angus Leeming

On Monday 15 April 2002 4:22 pm, R. Lahaye wrote:
> Angus Leeming wrote:
> > Bingo! xforms 0.88 has noimage  support. You're using the image loader I
> > wrote based on the libXpm library. The relevant code is to be found in
> > src/graphics/GraphicsImageXPM.C.
>
> $Bingo^2$ !! Thanks for your hints and help.
>
> Instead of
>
>dimension const * start_row = old_data;
>
> we need
>
> dimension const * start_row = old_data
> + image_.width() * (image_.height() -
> params.bb.yt);

dimension const * start_row = old_data + image_.width() * 
(image_.height() - params.bb.yt);

Excuse me a momement, but why is that:
(image_.height() - params.bb.yt)
not
params.bb.yb
?

Angus



Re: [PATCH] Re: Graphics: file loading problems

2002-04-15 Thread R. Lahaye

Angus Leeming wrote:
> 
> On Monday 15 April 2002 4:22 pm, R. Lahaye wrote:
> > Angus Leeming wrote:
> > > Bingo! xforms 0.88 has noimage  support. You're using the image loader I
> > > wrote based on the libXpm library. The relevant code is to be found in
> > > src/graphics/GraphicsImageXPM.C.
> >
> > $Bingo^2$ !! Thanks for your hints and help.
> >
> > Instead of
> >
> >dimension const * start_row = old_data;
> >
> > we need
> >
> > dimension const * start_row = old_data
> > + image_.width() * (image_.height() -
> > params.bb.yt);
> 
> dimension const * start_row = old_data + image_.width() *
> (image_.height() - params.bb.yt);
> 
> Excuse me a momement, but why is that:
> (image_.height() - params.bb.yt)
> not
> params.bb.yb
> ?

Ah, took me also some time to realize.
The picture is stored in memory from upper-left to lower-right
(see attachement).
Horizontally you still run from xl to xr, but vertically
you run from yt to yb, NOT reversed as you're thinking.
So you have to recalculate from the top, not the bottom.
The top is "height - yt".

Does that make sense to you?

The patch works beautifully here!

Regards,
Rob.



> Angus

-- 
dr. R.J.W.E. Lahaye
Center for Ion-Surface Reaction 
Department of Chemistry
Pohang University of Science and Technology
San 31 Hyojadong, Namgu
790-784 Pohang, Kyungbuk
Republic of Korea

Tel : +82-54-279-2780
Fax : +82-54-279-8157
email: [EMAIL PROTECTED]



Re: [PATCH] Re: Graphics: file loading problems

2002-04-15 Thread Angus Leeming

On Monday 15 April 2002 5:37 pm, R. Lahaye wrote:
> > Excuse me a momement, but why is that:
> > (image_.height() - params.bb.yt)
> > not
> > params.bb.yb
> > ?
>
> Ah, took me also some time to realize.
> The picture is stored in memory from upper-left to lower-right
> (see attachement).
> Horizontally you still run from xl to xr, but vertically
> you run from yt to yb, NOT reversed as you're thinking.
> So you have to recalculate from the top, not the bottom.
> The top is "height - yt".
>
> Does that make sense to you?

Indeed. I probably knew this once upon a time, but my mind is like a seive 
and it's easier to question than to remember.
>
> The patch works beautifully here!

And here. I'll apply presently.
Angus

>
> Regards,
> Rob.
>
> > Angus



[PATCH] Re: Graphics: file loading problems

2002-04-12 Thread Herbert Voss

Angus Leeming wrote:


 I'm sure someone, somewhere, will tell us to use the std algorithms, rather 
 than roll our own loops, but the above (or something close to it) should work.
 
 Alternatively, why not just add agr to that string!


here is the alternative:


Herbert



-- 
http://www.lyx.org/help/


Index: src/frontends/controllers/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ChangeLog,v
retrieving revision 1.158
diff -u -r1.158 ChangeLog
--- src/frontends/controllers/ChangeLog 11 Apr 2002 17:40:44 -  1.158
+++ src/frontends/controllers/ChangeLog 12 Apr 2002 14:39:27 -
@@ -1,5 +1,9 @@
 2002-04-11  Herbert Voss  [EMAIL PROTECTED]
 
+   * ControlGraphics.C: expand browse-string to all available formats
+
+2002-04-11  Herbert Voss  [EMAIL PROTECTED]
+
* ControlGraphics.C: read BoundingBox also from non (e)ps files.
 
 2002-04-08  Adrien Rebollo  [EMAIL PROTECTED]
Index: src/frontends/controllers/ControlGraphics.C
===
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlGraphics.C,v
retrieving revision 1.32
diff -u -r1.32 ControlGraphics.C
--- src/frontends/controllers/ControlGraphics.C 11 Apr 2002 17:40:44 -  1.32
+++ src/frontends/controllers/ControlGraphics.C 12 Apr 2002 14:39:28 -
@@ -46,6 +46,18 @@
 using std::pair;
 using std::make_pair;
 using std::ifstream;
+
+namespace {
+
+// FIXME: currently we need the second '|' to prevent mis-interpretation!
+// All supported graphic formats with their file-extension and the
+// gzip-ext for zipped (e)ps-files.
+string const grfx_pattern = 
+   *.(agr|bmp|eps|epsi|fits|gif|jpg|obj|pdf|pbm|pgm|png|
+   ppm|ps|tif|tiff|xbm|xpm|xwd|gz)|; 
+
+}
+
  
 ControlGraphics::ControlGraphics(LyXView  lv, Dialogs  d)
: ControlInsetInsetGraphics, InsetGraphicsParams(lv, d)
@@ -90,8 +102,6 @@
 string const ControlGraphics::Browse(string const  in_name)
 {
string const title = _(Select graphics file);
-   // FIXME: currently we need the second '|' to prevent mis-interpretation
-   string const pattern = *.(ps|eps|png|jpeg|jpg|gif|gz)|;
 
// Does user clipart directory exist?
string clipdir = AddName (user_lyxdir, clipart);
@@ -103,7 +113,7 @@
pairstring, string dir2(_(Documents|#o#O), string(lyxrc.document_path));
// Show the file browser dialog
return browseRelFile(lv_, in_name, lv_.buffer()-filePath(),
-title, pattern, dir1, dir2);
+title, ::grfx_pattern, dir1, dir2);
 }
 
 



[PATCH] Re: Graphics: file loading problems

2002-04-12 Thread Herbert Voss

Angus Leeming wrote:


> I'm sure someone, somewhere, will tell us to use the std algorithms, rather 
> than roll our own loops, but the above (or something close to it) should work.
> 
> Alternatively, why not just add "agr" to that string!


here is the alternative:


Herbert



-- 
http://www.lyx.org/help/


Index: src/frontends/controllers/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ChangeLog,v
retrieving revision 1.158
diff -u -r1.158 ChangeLog
--- src/frontends/controllers/ChangeLog 11 Apr 2002 17:40:44 -  1.158
+++ src/frontends/controllers/ChangeLog 12 Apr 2002 14:39:27 -
@@ -1,5 +1,9 @@
 2002-04-11  Herbert Voss  <[EMAIL PROTECTED]>
 
+   * ControlGraphics.C: expand "browse-string" to all available formats
+
+2002-04-11  Herbert Voss  <[EMAIL PROTECTED]>
+
* ControlGraphics.C: read BoundingBox also from non (e)ps files.
 
 2002-04-08  Adrien Rebollo  <[EMAIL PROTECTED]>
Index: src/frontends/controllers/ControlGraphics.C
===
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlGraphics.C,v
retrieving revision 1.32
diff -u -r1.32 ControlGraphics.C
--- src/frontends/controllers/ControlGraphics.C 11 Apr 2002 17:40:44 -  1.32
+++ src/frontends/controllers/ControlGraphics.C 12 Apr 2002 14:39:28 -
@@ -46,6 +46,18 @@
 using std::pair;
 using std::make_pair;
 using std::ifstream;
+
+namespace {
+
+// FIXME: currently we need the second '|' to prevent mis-interpretation!
+// All supported graphic formats with their file-extension and the
+// gzip-ext for zipped (e)ps-files.
+string const grfx_pattern = 
+   "*.(agr|bmp|eps|epsi|fits|gif|jpg|obj|pdf|pbm|pgm|png|"
+   "ppm|ps|tif|tiff|xbm|xpm|xwd|gz)|"; 
+
+}
+
  
 ControlGraphics::ControlGraphics(LyXView & lv, Dialogs & d)
: ControlInset(lv, d)
@@ -90,8 +102,6 @@
 string const ControlGraphics::Browse(string const & in_name)
 {
string const title = _("Select graphics file");
-   // FIXME: currently we need the second '|' to prevent mis-interpretation
-   string const pattern = "*.(ps|eps|png|jpeg|jpg|gif|gz)|";
 
// Does user clipart directory exist?
string clipdir = AddName (user_lyxdir, "clipart");
@@ -103,7 +113,7 @@
pair dir2(_("Documents|#o#O"), string(lyxrc.document_path));
// Show the file browser dialog
return browseRelFile(_, in_name, lv_.buffer()->filePath(),
-title, pattern, dir1, dir2);
+title, ::grfx_pattern, dir1, dir2);
 }
 
 



Re: [PATCH] Re: Graphics: Get boundingbox from file for non-eps ?

2002-04-11 Thread Jean-Marc Lasgouttes

 Herbert == Herbert Voss [EMAIL PROTECTED] writes:

Herbert R. Lahaye wrote:
 Talking about conversions again: do you know why we have two Grace
 formats listed in Preferences-Conversion-Formats? There is an
 entry for GRACE and for agr. What is the difference between the
 two? Moreover, only agr is used in the Converters.


Herbert please apply

Will do it.

JMarc



[PATCH] Re: Graphics: Get boundingbox from file for non-eps ?

2002-04-11 Thread Herbert Voss

Angus Leeming wrote:


 
 Or call them raw_dimensions and return a pairuint, uint. Your call.


please apply.

Herbert


-- 
http://www.lyx.org/help/


Index: src/frontends/controllers/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ChangeLog,v
retrieving revision 1.157
diff -u -r1.157 ChangeLog
--- src/frontends/controllers/ChangeLog 9 Apr 2002 10:02:10 -   1.157
+++ src/frontends/controllers/ChangeLog 11 Apr 2002 14:05:53 -
@@ -1,3 +1,7 @@
+2002-04-11  Herbert Voss  [EMAIL PROTECTED]
+
+   * ControlGraphics.C: read BoundingBox also from non (e)ps files.
+
 2002-04-08  Adrien Rebollo  [EMAIL PROTECTED]
 
* ControlAboutlyx.C (getVersion): two _() forgotten
Index: src/frontends/controllers/ControlGraphics.C
===
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlGraphics.C,v
retrieving revision 1.31
diff -u -r1.31 ControlGraphics.C
--- src/frontends/controllers/ControlGraphics.C 8 Apr 2002 16:47:50 -   1.31
+++ src/frontends/controllers/ControlGraphics.C 11 Apr 2002 14:05:53 -
@@ -36,12 +38,14 @@
 #include support/FileInfo.h  // for FileInfo
 #include helper_funcs.h
 #include support/lstrings.h
-#include support/filetools.h // for AddName, zippedFile
+#include support/filetools.h
+#include support/path.h
 
 using std::pair;
 using std::make_pair;
 using std::ifstream;
-
+using std::endl;
+ 
 ControlGraphics::ControlGraphics(LyXView  lv, Dialogs  d)
: ControlInsetInsetGraphics, InsetGraphicsParams(lv, d)
 {
@@ -104,7 +108,17 @@
 
 string const ControlGraphics::readBB(string const  file)
 {
-   return readBB_from_PSFile(MakeAbsPath(file, lv_.buffer()-filePath()));
+   string const from = getExtFromContents(file);   
+   // check if we have a postscriptfile, than it's easy
+   if (contains(from, ps))
+   return readBB_from_PSFile(file);
+   
+   // we don't, so let's ask the inset.
+   // first make the right path
+   Path p(lv_.buffer()-filePath());
+   return (0 0  + 
+   tostr(inset()-raw_image_width()) + ' ' + 
+   tostr(inset()-raw_image_height()));
 }
 
 
 }
Index: src/graphics/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/ChangeLog,v
retrieving revision 1.48
diff -u -r1.48 ChangeLog
--- src/graphics/ChangeLog  8 Apr 2002 16:51:46 -   1.48
+++ src/graphics/ChangeLog  11 Apr 2002 14:05:55 -
@@ -1,3 +1,9 @@
+2002-04-10  Herbert Voss  [EMAIL PROTECTED]
+
+   * GraphicsCache.[Ch]:
+   * GraphicsCacheItem.[Ch]: add width/height functions from Angus
+   to read BB from non (e)ps files.
+
 2002-04-08  Angus Leeming  [EMAIL PROTECTED]
 
* GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
Index: src/graphics/GraphicsCache.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsCache.C,v
retrieving revision 1.22
diff -u -r1.22 GraphicsCache.C
--- src/graphics/GraphicsCache.C22 Mar 2002 16:37:51 -  1.22
+++ src/graphics/GraphicsCache.C11 Apr 2002 14:05:55 -
@@ -165,4 +165,25 @@
return cache-end();
 }
 
+
+unsigned int GCache::raw_width(string const  filename) const
+{
+   CacheType::const_iterator it = cache-find(filename);
+   if (it == cache-end())
+   return 0;
+
+   return it-second-raw_width();
+}
+
+
+unsigned int GCache::raw_height(string const  filename) const
+{
+   CacheType::const_iterator it = cache-find(filename);
+   if (it == cache-end())
+   return 0;
+
+   return it-second-raw_height();
+}
+
 } // namespace grfx
+
Index: src/graphics/GraphicsCache.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsCache.h,v
retrieving revision 1.16
diff -u -r1.16 GraphicsCache.h
--- src/graphics/GraphicsCache.h22 Mar 2002 16:37:51 -  1.16
+++ src/graphics/GraphicsCache.h11 Apr 2002 14:05:55 -
@@ -67,6 +67,10 @@
/// How far have we got in loading the image?
ImageStatus status(InsetGraphics const ) const;
 
+   // for getting the bb of non (e)ps files
+   unsigned int raw_width(string const  filename) const;
+   unsigned int raw_height(string const  filename) const;
+   
 private:
/** Make the c-tor private so we can control how many objects
 *  are instantiated.
Index: src/graphics/GraphicsCacheItem.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsCacheItem.C,v
retrieving revision 1.30
diff -u -r1.30 GraphicsCacheItem.C
--- src/graphics/GraphicsCacheItem.C26 Mar 2002 

Re: [PATCH] Re: Graphics: Get boundingbox from file for non-eps ?

2002-04-11 Thread Angus Leeming

On Thursday 11 April 2002 4:19 pm, Herbert Voss wrote:
 Angus Leeming wrote:
  Or call them raw_dimensions and return a pairuint, uint. Your call.

 please apply.

 Herbert

I've done so. Needless to say I tweaked it a little. I decided that the 
graphics dialog could access the graphics cache direct and not go through the 
inset.

Regards,
Angus



Re: [PATCH] Re: Graphics: Get boundingbox from file for non-eps ?

2002-04-11 Thread Herbert Voss

Angus Leeming wrote:

 I've done so. Needless to say I tweaked it a little. I decided that the 
 graphics dialog could access the graphics cache direct and not go through the 
 inset.


ok, good idea.


Angus, what is with the former graphics patch?

Herbert

-- 
http://www.lyx.org/help/




Re: [PATCH] Re: Graphics: Get boundingbox from file for non-eps ?

2002-04-11 Thread Angus Leeming

On Thursday 11 April 2002 7:54 pm, Herbert Voss wrote:
 Angus Leeming wrote:
  I've done so. Needless to say I tweaked it a little. I decided that the
  graphics dialog could access the graphics cache direct and not go through
  the inset.

 ok, good idea.


 Angus, what is with the former graphics patch?

 Herbert

I'm looking at it at this instant. I'll address my issues and commit it in 
the next 20 mins or so.

A



Re: [PATCH] Re: Graphics: Get boundingbox from file for non-eps ?

2002-04-11 Thread Herbert Voss

Angus Leeming wrote:

 
 I'm looking at it at this instant. I'll address my issues and commit it in 
 the next 20 mins or so.


ok

Angus, I forgot to ask for the sense of this message:

Received unhandled X11 event
Type: 0xd Target: 0x35f

happens, when applying a graphic from the gui.

Herbert



-- 
http://www.lyx.org/help/




Re: [PATCH] Re: Graphics: Get boundingbox from file for non-eps ?

2002-04-11 Thread Angus Leeming

On Thursday 11 April 2002 8:08 pm, Herbert Voss wrote:
 Angus Leeming wrote:
  I'm looking at it at this instant. I'll address my issues and commit it
  in the next 20 mins or so.

 ok

 Angus, I forgot to ask for the sense of this message:

 Received unhandled X11 event
 Type: 0xd Target: 0x35f

 happens, when applying a graphic from the gui.

 Herbert

I know little or nothing about such X11 messages. John Levon is the guru!

Angus



Re: [PATCH] Re: Graphics: Get boundingbox from file for non-eps ?

2002-04-11 Thread John Levon

On Thu, Apr 11, 2002 at 07:07:48PM +0100, Angus Leeming wrote:

  Received unhandled X11 event
  Type: 0xd Target: 0x35f
 
 I know little or nothing about such X11 messages. John Levon is the guru!

*cough*

Anyway, it's just the remnants of the BadWindow xforms bug, it looks
like.

It can be ignored. We shouldn't quieten it though, it is there to remind
us that this is an error condition

regards
john

-- 
I never understood what's so hard about picking a unique
 first and last name - and not going beyond the 6 character limit.
- Toon Moene



Re: [PATCH] Re: Graphics: "Get boundingbox from file" for non-eps ?

2002-04-11 Thread Jean-Marc Lasgouttes

> "Herbert" == Herbert Voss <[EMAIL PROTECTED]> writes:

Herbert> R. Lahaye wrote:
>> Talking about conversions again: do you know why we have two Grace
>> formats listed in Preferences->Conversion->Formats? There is an
>> entry for "GRACE" and for "agr". What is the difference between the
>> two? Moreover, only "agr" is used in the "Converters".


Herbert> please apply

Will do it.

JMarc



[PATCH] Re: Graphics: "Get boundingbox from file" for non-eps ?

2002-04-11 Thread Herbert Voss

Angus Leeming wrote:


> 
> Or call them raw_dimensions and return a pair. Your call.


please apply.

Herbert


-- 
http://www.lyx.org/help/


Index: src/frontends/controllers/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ChangeLog,v
retrieving revision 1.157
diff -u -r1.157 ChangeLog
--- src/frontends/controllers/ChangeLog 9 Apr 2002 10:02:10 -   1.157
+++ src/frontends/controllers/ChangeLog 11 Apr 2002 14:05:53 -
@@ -1,3 +1,7 @@
+2002-04-11  Herbert Voss  <[EMAIL PROTECTED]>
+
+   * ControlGraphics.C: read BoundingBox also from non (e)ps files.
+
 2002-04-08  Adrien Rebollo  <[EMAIL PROTECTED]>
 
* ControlAboutlyx.C (getVersion): two _() forgotten
Index: src/frontends/controllers/ControlGraphics.C
===
RCS file: 
/usr/local/lyx/cvsroot/lyx-devel/src/frontends/controllers/ControlGraphics.C,v
retrieving revision 1.31
diff -u -r1.31 ControlGraphics.C
--- src/frontends/controllers/ControlGraphics.C 8 Apr 2002 16:47:50 -   1.31
+++ src/frontends/controllers/ControlGraphics.C 11 Apr 2002 14:05:53 -
@@ -36,12 +38,14 @@
 #include "support/FileInfo.h"  // for FileInfo
 #include "helper_funcs.h"
 #include "support/lstrings.h"
-#include "support/filetools.h" // for AddName, zippedFile
+#include "support/filetools.h"
+#include "support/path.h"
 
 using std::pair;
 using std::make_pair;
 using std::ifstream;
-
+using std::endl;
+ 
 ControlGraphics::ControlGraphics(LyXView & lv, Dialogs & d)
: ControlInset(lv, d)
 {
@@ -104,7 +108,17 @@
 
 string const ControlGraphics::readBB(string const & file)
 {
-   return readBB_from_PSFile(MakeAbsPath(file, lv_.buffer()->filePath()));
+   string const from = getExtFromContents(file);   
+   // check if we have a postscriptfile, than it's easy
+   if (contains(from, "ps"))
+   return readBB_from_PSFile(file);
+   
+   // we don't, so let's ask the inset.
+   // first make the right path
+   Path p(lv_.buffer()->filePath());
+   return ("0 0 " + 
+   tostr(inset()->raw_image_width()) + ' ' + 
+   tostr(inset()->raw_image_height()));
 }
 
 
 }
Index: src/graphics/ChangeLog
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/ChangeLog,v
retrieving revision 1.48
diff -u -r1.48 ChangeLog
--- src/graphics/ChangeLog  8 Apr 2002 16:51:46 -   1.48
+++ src/graphics/ChangeLog  11 Apr 2002 14:05:55 -
@@ -1,3 +1,9 @@
+2002-04-10  Herbert Voss  <[EMAIL PROTECTED]>
+
+   * GraphicsCache.[Ch]:
+   * GraphicsCacheItem.[Ch]: add width/height functions from Angus
+   to read "BB" from non (e)ps files.
+
 2002-04-08  Angus Leeming  <[EMAIL PROTECTED]>
 
* GraphicsParams.C (c-tor): if clipping, then check the Bounding Box of
Index: src/graphics/GraphicsCache.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsCache.C,v
retrieving revision 1.22
diff -u -r1.22 GraphicsCache.C
--- src/graphics/GraphicsCache.C22 Mar 2002 16:37:51 -  1.22
+++ src/graphics/GraphicsCache.C11 Apr 2002 14:05:55 -
@@ -165,4 +165,25 @@
return cache->end();
 }
 
+
+unsigned int GCache::raw_width(string const & filename) const
+{
+   CacheType::const_iterator it = cache->find(filename);
+   if (it == cache->end())
+   return 0;
+
+   return it->second->raw_width();
+}
+
+
+unsigned int GCache::raw_height(string const & filename) const
+{
+   CacheType::const_iterator it = cache->find(filename);
+   if (it == cache->end())
+   return 0;
+
+   return it->second->raw_height();
+}
+
 } // namespace grfx
+
Index: src/graphics/GraphicsCache.h
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsCache.h,v
retrieving revision 1.16
diff -u -r1.16 GraphicsCache.h
--- src/graphics/GraphicsCache.h22 Mar 2002 16:37:51 -  1.16
+++ src/graphics/GraphicsCache.h11 Apr 2002 14:05:55 -
@@ -67,6 +67,10 @@
/// How far have we got in loading the image?
ImageStatus status(InsetGraphics const &) const;
 
+   // for getting the "bb" of non (e)ps files
+   unsigned int raw_width(string const & filename) const;
+   unsigned int raw_height(string const & filename) const;
+   
 private:
/** Make the c-tor private so we can control how many objects
 *  are instantiated.
Index: src/graphics/GraphicsCacheItem.C
===
RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/graphics/GraphicsCacheItem.C,v
retrieving revision 1.30
diff -u -r1.30 

Re: [PATCH] Re: Graphics: "Get boundingbox from file" for non-eps ?

2002-04-11 Thread Angus Leeming

On Thursday 11 April 2002 4:19 pm, Herbert Voss wrote:
> Angus Leeming wrote:
> > Or call them raw_dimensions and return a pair. Your call.
>
> please apply.
>
> Herbert

I've done so. Needless to say I tweaked it a little. I decided that the 
graphics dialog could access the graphics cache direct and not go through the 
inset.

Regards,
Angus



Re: [PATCH] Re: Graphics: "Get boundingbox from file" for non-eps ?

2002-04-11 Thread Herbert Voss

Angus Leeming wrote:

> I've done so. Needless to say I tweaked it a little. I decided that the 
> graphics dialog could access the graphics cache direct and not go through the 
> inset.


ok, good idea.


Angus, what is with the former graphics patch?

Herbert

-- 
http://www.lyx.org/help/




Re: [PATCH] Re: Graphics: "Get boundingbox from file" for non-eps ?

2002-04-11 Thread Angus Leeming

On Thursday 11 April 2002 7:54 pm, Herbert Voss wrote:
> Angus Leeming wrote:
> > I've done so. Needless to say I tweaked it a little. I decided that the
> > graphics dialog could access the graphics cache direct and not go through
> > the inset.
>
> ok, good idea.
>
>
> Angus, what is with the former graphics patch?
>
> Herbert

I'm looking at it at this instant. I'll address my issues and commit it in 
the next 20 mins or so.

A



Re: [PATCH] Re: Graphics: "Get boundingbox from file" for non-eps ?

2002-04-11 Thread Herbert Voss

Angus Leeming wrote:

> 
> I'm looking at it at this instant. I'll address my issues and commit it in 
> the next 20 mins or so.


ok

Angus, I forgot to ask for the sense of this message:

Received unhandled X11 event
Type: 0xd Target: 0x35f

happens, when applying a graphic from the gui.

Herbert



-- 
http://www.lyx.org/help/




Re: [PATCH] Re: Graphics: "Get boundingbox from file" for non-eps ?

2002-04-11 Thread Angus Leeming

On Thursday 11 April 2002 8:08 pm, Herbert Voss wrote:
> Angus Leeming wrote:
> > I'm looking at it at this instant. I'll address my issues and commit it
> > in the next 20 mins or so.
>
> ok
>
> Angus, I forgot to ask for the sense of this message:
>
> Received unhandled X11 event
> Type: 0xd Target: 0x35f
>
> happens, when applying a graphic from the gui.
>
> Herbert

I know little or nothing about such X11 messages. John Levon is the guru!

Angus



Re: [PATCH] Re: Graphics: "Get boundingbox from file" for non-eps ?

2002-04-11 Thread John Levon

On Thu, Apr 11, 2002 at 07:07:48PM +0100, Angus Leeming wrote:

> > Received unhandled X11 event
> > Type: 0xd Target: 0x35f
> 
> I know little or nothing about such X11 messages. John Levon is the guru!

*cough*

Anyway, it's just the remnants of the BadWindow xforms bug, it looks
like.

It can be ignored. We shouldn't quieten it though, it is there to remind
us that this is an error condition

regards
john

-- 
"I never understood what's so hard about picking a unique
 first and last name - and not going beyond the 6 character limit."
- Toon Moene



Re: [patch] Re: graphics

2002-02-15 Thread Jean-Marc Lasgouttes

 Herbert == Herbert Voss [EMAIL PROTECTED] writes:

Herbert Andre Poenitz wrote: [...]

 [new lyx file, insert graphics (doesn't matter whether it exists,
 'latex size' to 'custom' and '55%', click ok, click right on the
 picture. boom.]
Herbert [..]


Herbert there is a bug in UpdateWidgetsFromLength with this ?% units.
Herbert But this can't be the reason for your crash.

Actually, it is the reason, because the crash occurs when xforms tries
to write an error message.

JMarc



Re: [patch] Re: graphics

2002-02-15 Thread Jean-Marc Lasgouttes

> "Herbert" == Herbert Voss <[EMAIL PROTECTED]> writes:

Herbert> Andre Poenitz wrote: [...]

>> [new lyx file, insert graphics (doesn't matter whether it exists,
>> 'latex size' to 'custom' and '55%', click ok, click right on the
>> picture. boom.]
Herbert> [..]


Herbert> there is a bug in UpdateWidgetsFromLength with this ?% units.
Herbert> But this can't be the reason for your crash.

Actually, it is the reason, because the crash occurs when xforms tries
to write an error message.

JMarc



Re: [patch] Re: graphics

2002-02-14 Thread Angus Leeming

On Thursday 14 February 2002 5:21 pm, Herbert Voss wrote:
 Andre Poenitz wrote:
 [...]
 
  [new lyx file, insert graphics (doesn't matter whether it exists, 'latex
  size' to 'custom' and '55%',  click ok, click right on the picture. boom.]
 [..]
 
 
 there is a bug in UpdateWidgetsFromLength with this ?% units.
 But this can't be the reason for your crash.
 
 Herbert

Also applied.
A



Re: [patch] Re: graphics

2002-02-14 Thread Angus Leeming

On Thursday 14 February 2002 5:21 pm, Herbert Voss wrote:
> Andre Poenitz wrote:
> [...]
> 
> > [new lyx file, insert graphics (doesn't matter whether it exists, 'latex
> > size' to 'custom' and '55%',  click ok, click right on the picture. boom.]
> [..]
> 
> 
> there is a bug in UpdateWidgetsFromLength with this ?% units.
> But this can't be the reason for your crash.
> 
> Herbert

Also applied.
A