Re: [As-users] Winlist icon-only option hack

Sasha Vasko (sasha@aftercode.net)
Thu, 07 Sep 2006 11:44:53 -0500


Ok, I've put somewhat better version of this into CVS, so now feature is 
officialy in. The only difference is that option is UseName 5, not 4, as 
4 was used for something else already. Also I needed to add some code to 
properly scale icons if ScaleToTextHeight is used. And I kept 
parenthesis in. Is it ok?

Thanks for your work - it showed me exactly where change had to be done, 
so saved me some time.

Sasha Vasko


Jim Turner wrote:
> Well, I guess I have too much time on my hands (between contracts :), so 
> I took a brief stab at implementing this feature myself and seem to have 
> it working (at least in my case).  Don't laugh, I am a Perl pgmr, 
> haven't done any C in years, but here goes:  (Latest WinList.c from 
> v2.2.2):  The new option value is "*WinListUseName 4".  This causes the 
> display text to be set to "".  The other options (0-3) should still work 
> as before.  Only drawback I've found so far is that there probably needs 
> to be a new style for "iconified" windows, since I removed the 
> parenthesis from the text as well and now there is nothing indicating 
> that a given window is iconified.
> 
> 
> 1012c1012,1028
> <     char *name = get_window_name(wd, Config->UseName, &encoding );
> ---
>  >     /* char *name = get_window_name(wd, Config->UseName, &encoding );
>  >         JWT: CHGD PREV. TO NEXT 14 TO GET TEXT-LESS WINLIST W/ 
> UseName=4 */
>  >     char *name;
>  >     char *showname;
>  >     int usename = Config->UseName;
>  >     if (Config->UseName == 4)
>  >     {
>  >         usename = 0;
>  >         name = get_window_name(wd, usename, &encoding );
>  >         showname = "";
>  >     }
>  >     else
>  >     {
>  >         name = get_window_name(wd, usename, &encoding );
>  >         showname = name;
>  >     }
>  >    
> 1082c1098
> <             sprintf(iconic_name, "(%s)", name );
> ---
>  >             sprintf(iconic_name, (Config->UseName == 4 ? "%s" : 
> "(%s)"), showname );
> 1086c1102
> <             add_astbar_label( tbar, 1, 1, 0, align, h_spacing, 
> v_spacing, name, encoding);
> ---
>  >             add_astbar_label( tbar, 1, 1, 0, align, h_spacing, 
> v_spacing, showname, encoding);
> 
> 
> For best effect, I modified my winlist file as follows:
> *WinListUseName 4
> *WinListIconSize 48x48
> *WinListIconAlign  left
> *WinListAlign  left
> ####*WinListMinSize         10000    #will be truncated to thescreen size
> ####*WinListMinSize         100    #will be truncated to thescreen size
> ####*WinListMaxWidth 1376
> 
> and turned on balloons.
> 
> Enjoy!
> 
> JP
> 
> ------------------------------------------------------------------------
> Get your email and more, right on the new Yahoo.com 
> <http://us.rd.yahoo.com/evt=42973/*http://www.yahoo.com/preview>
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> As-users mailing list
> As-users@afterstep.org
> http://mail.afterstep.org/mailman/listinfo/as-users

_______________________________________________
As-users mailing list
As-users@afterstep.org
http://mail.afterstep.org/mailman/listinfo/as-users