Subject: XPM #ifdef missing?

From: "Nils Lohner" <[email-masked]>
Date: Sun, 14 Jan 2001 20:39:35 +0100

I get these errors when I don't have XPM compiled in... can/should they 
be #ifdef'ed out (or the entire call to scanForPixmap) when compiling 
without XPM?

[FVWM.0][scanForPixmap]: <<WARNING>> Couldn't find pixmap mini-news.xpm

Thanks,
Nils.

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Sun, 14 Jan 2001 22:07:16 +0100

> [FVWM.0][scanForPixmap]: <<WARNING>> Couldn't find pixmap mini-news.xpm

No.  If you don't compile with XPM support, then you should not
use xpm icons in your config file.  Of course you will get an
error message then.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Nils Lohner <[email-masked]>
Date: Wed, 17 Jan 2001 14:29:28 +0100

>use xpm icons in your config file.  Of course you will get an

I disagree: it means that I can't have one configuration that runs on a 
minimal compile vs a fully featured compile.  This is annoying, since 
every feature thats disabled or unavailable requires a custom RC file 
by this logic.
  If XPMs are not compiled in, the scanForPixmap
90 routine seems useless, so I'd argue that it shouldn't even be 
called.  Else the warning should be that XPM support is not compiled 
in, otherwise it's misleading since the pixmap definitely exists in 
that location.  If I hadn't known that I didn't have the support 
compiled in that message would have wasted me a lot of time looking for 
why the paths were wrong in the config files.

Thanks,
Nils.

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 17 Jan 2001 15:06:03 +0100

> why the paths were wrong in the config files.

Sorry, we can't throw an XPM specific error message without XPM
support, can we?  The code does not even try to load the icon file
as an xpm if XPM is not compiled in.  Checking for the .xpm is not
really a solution because it's not mandatory.

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, email: [email-masked]
LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen
fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Nils Lohner <[email-masked]>
Date: Wed, 17 Jan 2001 15:24:45 +0100

In message <[email-masked]>, Dominik Vogt writes:
>>   If XPMs are not compiled in, the scanForPixmap()
>>  routine seems useless, so I'd argue that it shouldn't even be 

How about simply
"[FVWM.0][scanForPixmap]: <<WARNING>> XPM support is not compiled into 
fvwm2!"  ??

That would solve the problems:
- the warning now points you tot the real problem instead of into 
lala-land
- no code is modified or compiled differently, except the error message
- you still get an error for having the .xpms in yout startup files

I'd still prefer that the routine not be called if XPM support isn't 
compiled in (since it doesn't appear to be useful if there's no XPM 
support), but if you don't agree with that, I think that at least the 
warning should be to the point.

Thanks,
Nils.

---

From: Dan Espen <[email-masked]>
Date: Wed, 17 Jan 2001 09:22:03 -0500

> really a solution because it's not mandatory.

I agree with Nils, it would be nice if the same config files worked on
any version of fvwm regardless of how it was  compiled.  Of course the
config files do  work, except they generate lots  of  messages.  Right
now our built in menu is devoid of icons partly because XPM support is
optional, partly because the icons are optional too.

But, I also agree with Dominik.

Isn't part of the issue, when you compile without XPM support, fvwm still
supports bitmaps.  So really when you see the message:

fvwm is reporting that it can't find a pixmap or a bitmap.
Normal UNIX behavior is to ignore the .xpm extension.  You can still
have a bitmap with the .xpm extension.  (We have some here, due to user
ignorance.)

--
Dan Espen
444 Hoes Lane  Room RRC 1C-214           E-mail: [email-masked]
Piscataway, NJ 08854                     Phone: (732) 699-5570
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Wed, 17 Jan 2001 15:38:20 +0100

> "[FVWM.0][scanForPixmap]: <<WARNING>> XPM support is not compiled into 

Well, and if your .bm file was damaged you would get the message

  fvwm2!"

Which isn't helpful either.

> warning should be to the point.

The routine is called for monochrome bitmap files even if XPM
support is not compiled in.

Bye

Dominik ^_^  ^_^

---

From: Nils Lohner <[email-masked]>
Date: Wed, 17 Jan 2001 15:46:26 +0100

>Which isn't helpful either.
...
>support is not compiled in.

Ah.  That changes things :)  The original message though is:
[FVWM.0][scanForPixmap]: <<WARNING>> Couldn't find pixmap mini-news.xpm

Can this message be improved to tell the user that 
- it also looked for a .bm (or is this just if no extension is given in 
the style?)
- both .xpm and .bm files were not found
- XPM support is not compiled in, since a .xpm is expressly requested 
there

I just think the actions of fvwm need to match up better with the 
warnings somehow.  As for how, I'll leave up to teh people who know the 
code better.

Thanks,
Nils.

---

From: Tim Phipps <[email-masked]>
Date: Wed, 17 Jan 2001 14:46:07 +0000

> [FVWM.0][scanForPixmap]: <<WARNING>> XPM support is not compiled into fvwm2!

How about <<WARNING>> Couldn't load image from mini-news.xpm

Cheers,
Tim.