# To subscribers of the xforms list from Angus Leeming <angus.leeming@btopenworld.com> :
On Wednesday 14 May 2003 2:58 pm, Jean-Marc Lasgouttes wrote:
> I forward a mail that was not send to the right address. Please try to
> keep Rob in cc: [rob what about subscribing to the list? it is very
> low volume anyway]
>
> It seems indeed that goodies use fl_goodies_atclose() as atclose
> handler, and that it is not really adequate. I am not sure what we
> should do about that? Do we want to close goodies from WM? Or can we
> tell the WM that these windows cannot be closed?
>
> JMarc
I see John Levon posted me a possible patch. Is this the same bug?
Angus
Index: lib/goodie_choice.c
===================================================================
RCS file: /cvsroot/xforms/xforms/lib/goodie_choice.c,v
retrieving revision 1.7
diff -u -p -r1.7 goodie_choice.c
--- lib/goodie_choice.c 24 Apr 2003 09:35:34 -0000 1.7
+++ lib/goodie_choice.c 14 May 2003 18:30:18 -0000
@@ -77,6 +77,24 @@ create_choice(void)
return fdui;
}
+void
+fl_hide_choice(void)
+{
+ if (fd_choice && fd_choice->form->visible)
+ {
+ if (default_choice <= 0 || default_choice > 3)
+ default_choice = 1;
+ fl_object_qenter(fd_choice->but[default_choice]);
+ }
+}
+
+int
+fl_choice_atclose(struct forms_ * unused, void * unused2)
+{
+ fl_hide_choice();
+ return 0;
+}
+
int
fl_show_choices(const char *msg, int numb,
const char *c1, const char *c2, const char *c3, int def)
@@ -145,6 +163,8 @@ fl_show_choices(const char *msg, int num
else
fl_set_form_hotspot(fd_choice->form, -1, -1);
+ fl_set_form_atclose(fd_choice->form, fl_choice_atclose, 0);
+
fl_show_form(fd_choice->form, FL_PLACE_HOTSPOT, FL_TRANSIENT,
fd_choice->form->label);
@@ -188,15 +208,4 @@ fl_set_choices_shortcut(const char *a, c
fd_choice->sc[1] = a;
fd_choice->sc[2] = b;
fd_choice->sc[3] = c;
-}
-
-void
-fl_hide_choice(void)
-{
- if (fd_choice && fd_choice->form->visible)
- {
- if (default_choice <= 0 || default_choice > 3)
- default_choice = 1;
- fl_object_qenter(fd_choice->but[default_choice]);
- }
}
_________________________________________________
To unsubscribe, send the message "unsubscribe" to
xforms-request@bob.usuhs.mil or see
http://bob.usuhs.mil/mailserv/xforms.html
XForms Home Page: http://world.std.com/~xforms
List Archive: http://bob.usuhs.mil/mailserv/list-archives/
Development: http://savannah.nongnu.org/files/?group=xforms
This archive was generated by hypermail 2b29 : Sun May 18 2003 - 16:29:15 EDT