Re: FVWM: GoodStuff

From: Charles Hines <>
Date: Mon, 12 Feb 1996 17:00:31 -0500

>>>>> "Kevin" == Kevin Werner <kwerner_at_holli.com> writes:

Kevin> Hi,

Howdy.

Kevin> I am pretty new to fvwm (and the list).

Welcome aboard.

Kevin> I have been using 1.? for a month or so on a Sparc20. My
Kevin> question is concerning the setup of GoodStuff. Is there a way
Kevin> to control where each button will appear in GoodStuff? It
Kevin> seems to be kind of random. I would like to simulate the
Kevin> cde/hp style button bar a little better. For example, is there
Kevin> a way to make 3 rows, of different sizes? I'd like to have a
Kevin> small row with buttons for screen lock, logout, etc.

Currently no way to do that. I do have a patch that might help, that
someone submitted long ago, but I don't think that it ever got
incorporated, although improvements like this for FvwmButtons are on
my 2.xx TO-DO list. I've included this patch below. No guarantees.

Kevin> Also, on a somewhat related issue. Is there a clock
Kevin> program that has a compact digital face? I am using
Kevin> the Openwindows clock (swallowed into GoodStuff), but
Kevin> it is a little to big.

How about the stock X11 xclock? It looks just fine in a
GoodStuff/FvwmButtons bar, I think.

Chuck

--------------->8 'goodstuff-1.24r.patch' cut here 8<---------------

Hi,
Here is the patch to modify GoodStuff.c
Usage: patch GoodStuff.c < diff

It was written for the GoodStuff packed with fvwm 1.24n,
but I think nothing much has changed

Now you can specifie the ButtonLines in your .fvwmrc
and they will appear as button in the expected order.
But be warned, if you write Nonsens you will get Nonsens back
(e.g.
*GoodStuffColumns 3
*GoodStuff(2x2) ....
*GoodStuff(2x2) ....
.... is wrong because you have defined two buttons which will be placed
in the same row now. But rows have only 3 colums NOT 4
hope you understand what I try to say ;-)

Rob ask me whether it will handle all possible combinations
of oversized buttons.
The answer is: I don know, but it should.

I use it for the following ButtonBar:

 _________ ______________
|_A__|_B__| or something like that: |_A__|_B__|_C__|
|_C__|_D__| |_D__|_E__|_F__|
| |_F__| | | | |
|_E__|_G__| | |_H__|_I__|
| |_I__| |_G__|_J_______|
|_H__|_J__| | | |
| |_L__| | |_L__|
|_K__|_M__| | | |
| | |_K_______|_M__|
| | | | |
|_N_______| | |_O__|
| | | | |
| | |_N_______|_P__|
|_O_______| | | |
| | | |_R__|
| | | | |
|_P_______| |_Q_______|_S__|

This is not tested, but it shoul work too:
 ________________________
|_A__| |_C__| |_E__|
|_F__| |_G__| |_H__|
|_I__|_B__|_J__|_D__|_K__|
|_L_______|_M_______|_N__|

The LETTERS show the order of the buttons you should define in
the .fwvmrc

If there's a configuration which won't work, please feel free to
send me your problem. But please keep in mind, that it's on your own
to define the button well_sized (They should fit always the defined
Rows or Colums) and Position (always the leftmost && topmost free
position - on the grid - is used for the next button)
(be sure that there is enough room!!)

If You use simple 1x1 buttons, this patch will not take in effect.


-----------------------------------CIAO SVEN-----------------------------------
palme_at_elphy.irz.hu-berlin.de |
     [palme_at_hadar.informatik.hu-berlin.de] |
049-030-20181-245 |
-------------------------------------------------------------------------------




And now .....
             THE DIFF

--------------------------CUT HERE------------------------------------------
557c557
< int actual_buttons_used,first_avail_button,i,j,k;
---
>   int actual_buttons_used,first_avail_button,i,j,k,sb,tb;
657,684c657,723
<                       Buttons[first_avail_button].action =
<                         Buttons[i+j+k*num_columns].action;
<                       Buttons[first_avail_button].title =
<                         Buttons[i+j+k*num_columns].title;
<                       Buttons[first_avail_button].icon_file =
<                         Buttons[i+j+k*num_columns].icon_file;
<                       Buttons[first_avail_button].BWidth =
<                         Buttons[i+j+k*num_columns].BWidth;
<                       Buttons[first_avail_button].BHeight =
<                         Buttons[i+j+k*num_columns].BHeight;
<                       Buttons[first_avail_button].icon_w =
<                         Buttons[i+j+k*num_columns].icon_w;
<                       Buttons[first_avail_button].icon_h =
<                         Buttons[i+j+k*num_columns].icon_h;
<                       Buttons[first_avail_button].iconPixmap =
<                         Buttons[i+j+k*num_columns].iconPixmap;
<                       Buttons[first_avail_button].icon_maskPixmap =
<                         Buttons[i+j+k*num_columns].icon_maskPixmap;
<                       Buttons[first_avail_button].IconWin =
<                         Buttons[i+j+k*num_columns].IconWin;
<                       Buttons[first_avail_button].hints =
<                         Buttons[i+j+k*num_columns].hints;
<                       Buttons[first_avail_button].icon_depth =
<                         Buttons[i+j+k*num_columns].icon_depth;
<                       Buttons[first_avail_button].hangon =
<                         Buttons[i+j+k*num_columns].hangon;
<                       Buttons[first_avail_button].swallow =
<                         Buttons[i+j+k*num_columns].swallow;
---
>
> /* NO! I think you should shift the List to get the free space  */
> /* Shifting First_Avail-1 --> First_Avail :: downwards          */
> /* Attention: exclude the buttons allready freed  for the Bigs  */
> /* I don't know how to determine such a freed button.           */
> /* That's why I used this full WHILE-Codelines                  */
> /* tb := TARGET_BOTTON sb := SOURCE_BOTTON for shifting         */
> /* palme_at_elphy.irz.hu-berlin.de                                 */
>
>                         tb=first_avail_button;
>                         sb=tb-1;
>                         while(sb>=(i+j+k*num_columns))
>                         {
>                           while(
>                               (Buttons[sb].action == NULL) &&
>                               (Buttons[sb].title == NULL) &&
>                               (Buttons[sb].icon_file == NULL) &&
>                               (Buttons[sb].IconWin == None) &&
>                               (Buttons[sb].iconPixmap == None) &&
>                               (Buttons[sb].icon_maskPixmap == None) &&
>                               (Buttons[sb].icon_w == 0) &&
>                               (Buttons[sb].icon_h == 0) &&
>                               (Buttons[sb].icon_depth == 0) &&
>                               (Buttons[sb].swallow == 0) &&
>                               (Buttons[sb].module == 0) &&
>                               (Buttons[sb].hangon == NULL) &&
>                               (Buttons[sb].up == 1) &&
>                               (Buttons[sb].BWidth == 0) &&
>                               (Buttons[sb].BHeight == 0)
>                               ) sb--; /* ignore already freed SourceBotton */
>                         Buttons[tb].action            = Buttons[sb].action;
>                         Buttons[tb].title             = Buttons[sb].title;
>                         Buttons[tb].icon_file         = Buttons[sb].icon_file;
>                         Buttons[tb].BWidth            = Buttons[sb].BWidth;
>                         Buttons[tb].BHeight           = Buttons[sb].BHeight;
>                         Buttons[tb].icon_w            = Buttons[sb].icon_w;
>                         Buttons[tb].icon_h            = Buttons[sb].icon_h;
>                         Buttons[tb].iconPixmap        = Buttons[sb].iconPixmap;
>                         Buttons[tb].icon_maskPixmap   = Buttons[sb].icon_maskPixmap;
>                         Buttons[tb].IconWin           = Buttons[sb].IconWin;
>                         Buttons[tb].hints             = Buttons[sb].hints;
>                         Buttons[tb].icon_depth        = Buttons[sb].icon_depth;
>                         Buttons[tb].hangon            = Buttons[sb].hangon;
>                         Buttons[tb].swallow           = Buttons[sb].swallow;
>                           tb--;
>                           while(
>                               (Buttons[tb].action == NULL) &&
>                               (Buttons[tb].title == NULL) &&
>                               (Buttons[tb].icon_file == NULL) &&
>                               (Buttons[tb].IconWin == None) &&
>                               (Buttons[tb].iconPixmap == None) &&
>                               (Buttons[tb].icon_maskPixmap == None) &&
>                               (Buttons[tb].icon_w == 0) &&
>                               (Buttons[tb].icon_h == 0) &&
>                               (Buttons[tb].icon_depth == 0) &&
>                               (Buttons[tb].swallow == 0) &&
>                               (Buttons[tb].module == 0) &&
>                               (Buttons[tb].hangon == NULL) &&
>                               (Buttons[tb].up == 1) &&
>                               (Buttons[tb].BWidth == 0) &&
>                               (Buttons[tb].BHeight == 0)
>                               ) tb--; /* ignore Targed_Botton if this is a freed one */
>                           sb--;
>                         }
>
> /* No follows the Original Code which frees the current Botton */
>
705,706c744
<
<
---
>
--
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 Mon Feb 12 1996 - 16:05:31 GMT

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:37:58 BST