From tosa%gifu.psc.edu@edu.psc.mailer Mon Jan  3 16:15:55 1994
Received: from castle.ed.ac.uk by aiai.ed.ac.uk; Mon, 3 Jan 94 16:15:48 GMT
Received: from mailer.psc.edu by castle.ed.ac.uk id aa27332; 3 Jan 94 16:11 GMT
Received: from gifu.psc.edu by mailer.psc.edu (5.65/Ultrix3.0-C 02/19/93 boone)
	id AA13382; Mon, 3 Jan 1994 11:11:50 -0500
Received: by gifu.psc.edu (4.1/Tosa-1.0)
	id AA04040; Mon, 3 Jan 94 11:13:45 EST
Date: Mon, 3 Jan 94 11:13:45 EST
From: Yasunari Tosa <tosa@edu.psc.gifu>
Message-Id: <9401031613.AA04040@gifu.psc.edu>
To: J.Smart@ed
In-Reply-To: <2445.9311231706@subnode.aiai.ed.ac.uk> (message from Julian Smart on Tue, 23 Nov 93 17:06:48 GMT)
Subject: Re: motif version of wxFileSelector
Content-Length: 1728
X-Lines: 65
Status: REO

Hi, Julian

This patch was left out from wxwin150i.  
                             ^^^^^^^^^
This is the diff so that people can do patch.

/home3/wxwin150i/src/x>diff wx_dialg.cc wx_dialg.cc.old
1093,1097d1092
<     if (default_path)
<       sprintf(wxBuffer,"%s/%s", default_path,wildcard);
<     else
<       sprintf(wxBuffer,"%s",wildcard);
< 
1099,1100c1094
<     XmTextSetString(filterWidget, wxBuffer);
<     XmFileSelectionDoSearch(fileSel, NULL);
---
>     XmTextSetString(filterWidget, wildcard);

Tosa

   Date: Tue, 23 Nov 93 17:06:48 GMT
   From: Julian Smart <jacs@aiai.edinburgh.ac.uk>
   Organisation: AI Applications Institute, University of Edinburgh.
   Phone: 031-650 2746
   Reply-To: J.Smart@edinburgh.ac.uk

   > Hi, 
   > 
   > I do the following way:
   > 
   >       char *input = wxFileSelector("Pick a choice","/usr/src/mine",
   > 				   "","","*",0,frame,-1,-1);
   > 
   > on Xview, the files I see are all those in /usr/src/mine.
   > on Motif, the files I see are those in the current directory.
   > (On Motif, I have to select filter and then I get to see those files.)
   > 
   > Can this be fixed ?

   Hi,

   I forgot to apply a patch contributed by a user (Patrick Albert).
   I _think_ this will fix it, though I haven't tested it.

   In wx_dialg.cc, search for if (wildcard) and replace the following
   block with:

     if (wildcard)
     {
       if (default_path)
	 sprintf(wxBuffer,"%s/%s",default_path,wildcard) ;
       else
	 sprintf(wxBuffer,"%s",wildcard) ;

       Widget filterWidget = XmFileSelectionBoxGetChild(fileSel, XmDIALOG_FILTER_TEXT);
       XmTextSetString(filterWidget, wxBuffer);
       XmFileSelectionDoSearch(fileSel,NULL) ;
     }


   Regards,

   Julian


