Re: FVWM: Hiding Icon images and Icon text seperately

From: John Benninghoff <johnb_at_netscape.com>
Date: Tue, 20 Oct 1998 12:35:13 -0700

Richard Lister wrote:
>
> On Tue, 20 Oct 1998 08:33:33 -0700
> John Benninghoff <johnb_at_netscape.com>
> wrote concerning 'Re: FVWM: Hiding Icon images and Icon text seperately':
> > Richard Lister wrote:
> > >
> > >
> > > I used to do exactly this, by saying something like:
> > >
> > > Style "*" Icon none
> > >
> > > where "none" doesn't exist as a pixmap in your path.
> >
> > This works for most applications. Thanks. It still fails for Netscape
> > but I am looking into the X resource to modify to make it work.
>
> Aha! It's been a long time since I used this stuff (I use FvwmIconMan
> now), but I just dug back into some of my old code. The following patch
> should do the trick for you. Apply it to fvwm/icons.c, then say:
>
> Style "*" Icon NoPixmap

This didn't work but when I commented out the 2 functions above your diff
change, I got it to work.

johnb_at_barfly zsh: diff -u icons.c.orig icons.c
--- icons.c.orig Mon Aug 11 07:39:04 1997
+++ icons.c Tue Oct 20 11:09:48 1998
_at_@ -75,15 +75,26 @@
      (tmp_win->icon_p_height == 0)&&(tmp_win->icon_p_width == 0))
     GetXPMFile(tmp_win);

- /* Next, See if the app supplies its own icon window */
+ /* Next, See if the app supplies its own icon window
   if((tmp_win->icon_p_height == 0)&&(tmp_win->icon_p_width == 0)&&
      (tmp_win->wmhints) && (tmp_win->wmhints->flags & IconWindowHint))
     GetIconWindow(tmp_win);
+ */

- /* Finally, try to get icon bitmap from the application */
+ /* Finally, try to get icon bitmap from the application
   if((tmp_win->icon_p_height == 0)&&(tmp_win->icon_p_width == 0)&&
          (tmp_win->wmhints)&&(tmp_win->wmhints->flags & IconPixmapHint))
     GetIconBitmap(tmp_win);
+ */
+
+ /* Allow override of application icon using 'Icon NoPixmap' */
+ if ( (tmp_win->icon_bitmap_file != NULL) &&
+ !(strncasecmp(tmp_win->icon_bitmap_file, "NoPixmap", 8)) ) {
+ tmp_win->icon_p_height = 0;
+ tmp_win->icon_p_width = 64;
+ tmp_win->iconPixmap = None;
+ }
+

   /* figure out the icon window size */
   if (!(tmp_win->flags & NOICON_TITLE)||(tmp_win->icon_p_height == 0))

Commenting out GetIconBitmap(tmp_win) is what really did it, I think.

The icon text however is no longer trimmed regardless of the value of the width
parameter. Strange.

I'm going to investigate FvwmIconMan, since it nearly does what I am looking
for.
    
-- 
John Benninghoff
http://my.netscape.com/
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Tue Oct 20 1998 - 14:35:48 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:01 BST