On 20 Mar 2002 15:49:43 -0500, Victor Eijkhout wrote:
>
> I'm trying to add/delete desktops dynamically.
>
> This is a form for adding a desktop:
> DestroyModuleConfig AddDesk: *
> *AddDesk: WarpPointer
> *AddDesk: Line left
> *AddDesk: Text "Add new desktop:"
> *AddDesk: Line expand
> *AddDesk: Input deskname 20 ""
> *AddDesk: Button quit "OK" ^M
> *AddDesk: Command Exec cd $HOME/.fvwm ; \
> echo *FvwmPager: Label $d \"$(deskname)\" >> page_labels ; \
> sort_labels ; count_desks
> *AddDesk: Command restart_pager
> *AddDesk: Button quit "Cancel"
>
> It calls two shell scripts to keep the labels sorted, and to update
> the number of desks in the Module FvwmPager command, which is also in
> a separate file.
>
> Restarting the pager goes like this:
>
> DestroyFunc restart_pager
> AddToFunc restart_pager
> + "I" KillModule FvwmPager
> + "I" DestroyModuleConfig FvwmPager
> + "I" Read $[HOME]/.fvwm/pager_start
> + "I" Read $[HOME]/.fvwm/pager_style
> + "I" Read $[HOME]/.fvwm/page_labels
>
> The problem is that the pager gets killed and restarted, but it
> doesn't have its proper size. It shows up without the extra desk,
> even though the configuration files that are supposed to get read do
> show the right number.
>
> The weird thing is that if I again issue the restart_pager command
>
> DestroyMenu desktops
> AddToMenu desktops "Desktop" Title
> + "Add new desk" AddNewDesk
> + "Name this desk" NameThisDesk
> + "Remove this desk" RemoveThisDesk
> + "Restart pager" restart_pager
>
> the new size does become effective. I've tried all sorts of things
> and I don't understand what's happening here.
You did not provide your pager_start and pager_style files plus
sort_labels and count_desks scripts, so I may only guess what they do.
Try a more correct Read order (yes, path to files is not needed here):
DestroyFunc restart_pager
AddToFunc restart_pager
+ I KillModule FvwmPager
+ I DestroyModuleConfig FvwmPager
+ I Read pager_style
+ I Read page_labels
+ I Read pager_start
Regards,
Mikhael.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_fvwm.org.
To report problems, send mail to fvwm-owner_at_fvwm.org.
Received on Wed Mar 20 2002 - 15:19:38 GMT