Re: using png instead of gif in navigator

Word-2-CHM Converter

using png instead of gif in navigator


jokrug 08-11-2009, 1:36 AM
Hello!
I am using "Word-2-chm 2009 Pro, 2009.2.718.2187.
The generated chm files are used on Windows and on a Linux system (with kchmviewer).
Under Linux, the button graphics of the navigator (we use the msdn template) are not shown. This is, because our kchmviewer can not deal with gifs. Gif support was left out because of the limitted resources on our Linux machines.
Is there a way to make the navigator using up.png, left.png... instead of the respective gifs?

Re: using png instead of gif in navigator


David 08-11-2009, 8:16 AM
Currently you could modify the MSDN theme.
Replace the .gif to .png and convert again.

We will modify the MSDN theme to .png in the next update.

Re: using png instead of gif in navigator


jokrug 08-13-2009, 2:00 AM
The navigator seems to be generated by the function GetNavigator(Node).
Currently it uses the "left.gif", "up_d.gif" and "right.gif" from UserImages.
I cannot find an entry in any of the files from the MSDN theme, where I could change this behaviour.

By the way: the installer installed the gifs in UserImages with uppercase fist letters like "Up.gif". The function GetNavigator() creates tags like "img src="up.gif". This is no problem under Windows, but since Linux is case sensitive, it will never find the files.
Just a little adjusment for the small minority of Linux users Smile [:)]

Re: using png instead of gif in navigator


David 08-13-2009, 6:34 AM
Please modify the "MSDN Style.theme" in Themes\MSDN Style, add the code append to function InitTheme():
  this.prevImg1 = 'images/left.png';
  this.prevImg2 = 'images/left_d.png';
  this.nextImg1 = 'images/right.png';
  this.nextImg2 = 'images/right_d.png';
  this.upImg1   = 'images/up.png';
  this.upImg2   = 'images/up_d.png';

And then convert the *.gif to *.png (lowercase the filename as above).

Please try it by yourself at first. We will release the update which contains the modifies.

Re: using png instead of gif in navigator


jokrug 08-13-2009, 11:50 PM
I did it and it works perfekt.
The buttons show up and the navigator works even under linux.

Again, many thanks for the fast help.

Powered by Community Server, by Telligent Systems