From: <mie...@us...> - 2007-08-11 17:42:35
|
Revision: 667 http://oorexx.svn.sourceforge.net/oorexx/?rev=667&view=rev Author: miesfeld Date: 2007-08-11 10:42:35 -0700 (Sat, 11 Aug 2007) Log Message: ----------- Fix for [ 1771885 ] FileNameDialog loadorsave The default for load or save is documented as load, ensure that is the default. Modified Paths: -------------- interpreter-3.x/trunk/platform/windows/oodialog/oodutils.cls interpreter-3.x/trunk/platform/windows/oodialog/oovother.c Modified: interpreter-3.x/trunk/platform/windows/oodialog/oodutils.cls =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/oodutils.cls 2007-08-10 13:32:25 UTC (rev 666) +++ interpreter-3.x/trunk/platform/windows/oodialog/oodutils.cls 2007-08-11 17:42:35 UTC (rev 667) @@ -120,23 +120,16 @@ return ret ::routine FileNameDialog public - use arg selfile, parentwnd, filter, load, title, defextension, amulti, sepchar + use arg selfile = "", parentwnd = 0, filter, load, title, defextension = "TXT", amulti, sepchar = ' ' installed = 0 if RxFuncQuery("GetFileNameWindow") \= 0 then do call Rxfuncadd "GetFileNameWindow", "oodialog", "GetFileNameWindow" installed = 1 end - if Arg(1,'o') = 1 then selfile = "" - if Arg(2,'o') = 1 then parentwnd = 0 - if Arg(4,'o') = 1 then load = 1 - else do - if load~translate = "SAVE" then load = 0 - else if load~translate = "LOAD" then load = 1 - end - if Arg(6,'o') = 1 then defextension = "TXT" - if Arg(7,'o') = 1 then amulti = 0 - if Arg(8,'o') = 1 then sepchar = ' ' - else if amulti~translate = "MULTI" then amulti = 1 + + if load == 0 | load~left(1)~translate = "S" then load = 0; else load = 1 + if load == 1 & amulti~translate = "MULTI" then amulti = 1; else amulti = 0 + if Arg() < 3 then ret = GetFileNameWindow(selfile, parentwnd) else ret = GetFileNameWindow(selfile, parentwnd, Arg(3), load, Arg(5), defextension, amulti, sepchar) if installed = 1 then call RxfuncDrop "GetFileNameWindow" Modified: interpreter-3.x/trunk/platform/windows/oodialog/oovother.c =================================================================== --- interpreter-3.x/trunk/platform/windows/oodialog/oovother.c 2007-08-10 13:32:25 UTC (rev 666) +++ interpreter-3.x/trunk/platform/windows/oodialog/oovother.c 2007-08-11 17:42:35 UTC (rev 667) @@ -241,7 +241,7 @@ } if (VALIDARG(2)) hWnd = (HWND) atol(argv[1].strptr); else hWnd = NULL; if (VALIDARG(3)) szFilter= argv[2].strptr; - if (VALIDARG(4)) load = IsYes(argv[3].strptr); + if (VALIDARG(4)) load = (argv[3].strptr[0] != '0'); if (VALIDARG(5)) title = argv[4].strptr; else { if (load) title = "Open a File"; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |