Subject: Colorsets tracker experiments.

From: Scott Smedley <[email-masked]>
Date: Wed, 11 Jun 2003 00:02:31 +1000

Hi Mikhael,

> > Should I expect to get an 'observation' if I dynamically change
> > config parameters? (using FvwmTalk or FvwmCommand) The dynamic values
> > are only propogated after I restart FvwmTabs.
> 
> There were some problems that are fixed now.

Ah, CVS version works as expected - thanks.

> Please try new Colorsets tracker. Making the colorset fg/bg work is not
> interesting. It would be nice if you can make colorset pixmaps work using
> Perl/Tk or X11::Protocol. Maybe you can create a Tk window that shows all
> available colorsets using rectangle of 48x48 and some text in it (like
> colorset number in brackets). I am waiting for your experiments. :)

Well my "experiments" are complete. I couldn't work out a way to do it
with just Tk so I ended up using Tk & X11::Protocol. Be warned though:
this is nasty code - its only purpose was to provide me with an intellectual
challenge! (or did you have a greater purpose in mind?)

SCoTT. :)

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 10 Jun 2003 21:48:08 +0000

> challenge! (or did you have a greater purpose in mind?)

This is nice. And it is not such nasty, I can understand it, no problems.
It seems Colorset tracker has a small problem in reporting the new
colorset data in the place where the old should be reported.

The purpose of such tool is clear. If you have a lot of colorsets, for
example fvwm-themes uses about 37, you want to see them all.

Some problems with the attached module:

* It doesn't sort colorsets, I added "sort { $a <=> $b }" to keys.
* It shows only 12 first colorsets for me, the scrollbar widget should be
  added. I should add "Style ShowColorsets ResizeHintOverride", otherwise
  Tk limits its windows to the screen size.
* It is a bit slow. Yes, it creates 148 colored rectangles in my case,
  surrounded by other widgets, but 14 sec even on my slow CPU is many.
* There is an error in line 49, dump() gets a wrong parameter.
* There is a problem with refresh, try to WindowShade the window.
* Only tiled pixmaps are supported. But here probably nothing can be done
  without implementing rendering for other pixmap types.

Actually I intended that one 3d-looking rectangle (that uses all fg, bg,
sh, hi, fgsh, pixmap) is shown for one colorset, but showing 6 rectangles
may be useful too.

Other than this, a great tool. :)

Regards,
Mikhael.
--
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: Mikhael Goikhman <[email-masked]>
Date: Tue, 10 Jun 2003 22:16:43 +0000

> example fvwm-themes uses about 37, you want to see them all.

Of course the main purpose of my request was to have an exapmle of
colorset usage in Perl. But if it is evolved into interactive tool to
change colorsets using a dialog box, it would be nice to have too.

As for the tool that shows colorsets just like they should look, here is
an FvwmButtons configuration. Save the attached file and execute:

  FvwmButtons Dummy /real/path/to/FvwmButtons-ShowColorsets

Regards,
Mikhael.

---

From: Scott Smedley <[email-masked]>
Date: Fri, 20 Jun 2003 17:00:56 +1000

Hi Mikhael,

> This is nice. And it is not such nasty, I can understand it, no problems.

You must be a seasoned Perl/Tk hacker ... like me! :)

Attached is a second (still buggy, but much improved) attempt.

>   Tk limits its windows to the screen size.

This version only shows 1 colorset & allows you to cycle through
them all. This eliminates these problems.

>   surrounded by other widgets, but 14 sec even on my slow CPU is many.

SCoTTie has dual AMD1900 so he doesn't notice things like that. :)
This version should have much improved performance.

> * There is a problem with refresh, try to WindowShade the window.

Yes, I haven't worked out why this happens yet.

Enjoy!

SCoTT. :)