From: SourceForge.net <no...@so...> - 2008-09-16 20:12:07
|
Patches item #2016003, was opened at 2008-07-11 14:39 Message generated for change (Comment added) made by tobbeswe You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373087&aid=2016003&group_id=22049 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Plugin Group: None Status: Closed Resolution: Accepted Priority: 5 Private: No Submitted By: Tobbe (tobbeswe) Assigned to: Amir Szekely (kichik) Summary: nsDialogs: Initial folder for SelectFileDialog Initial Comment: I've written a small patch for nsDialogs that enables one to specify the initial folder that will be used in a SelectFileDialog dialog. The second parameter used to be a variable that would get the path to the file. Now this variable can also be used to specify the initial folder by setting it to the folder to use before calling SelectFileDialog. This is very similar to how Windows does it with its Open/Save dialogs. Patch can be viewed here: http://paste2.org/followup/43756 ---------------------------------------------------------------------- >Comment By: Tobbe (tobbeswe) Date: 2008-09-16 22:12 Message: Ahh, I was compiling it as C++ while you are compiling it as C89. (It would have compiled as C99.) Good catch using INVALID_FILE_ATTRIBUTES instead of (DWORD)-1 ---------------------------------------------------------------------- Comment By: Tobbe (tobbeswe) Date: 2008-09-16 22:05 Message: Eh? Compiles just fine here... I'm using vc9 to compile it ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2008-09-16 21:38 Message: Thanks, applied with some changes to make it compile. ---------------------------------------------------------------------- Comment By: Tobbe (tobbeswe) Date: 2008-09-16 20:09 Message: Of course I should check if the given path is a directory! Great idea! :) I've modified my patch to do just this and I've also updated the readme file. Please let me know if there's anything else you'd like me to change. I've attached the new patch, and it can also be viewed here: http://paste2.org/p/74793 File Added: browse.patch ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2008-08-30 16:19 Message: Logged In: YES user_id=584402 Originator: NO It's cumbersome due to the reasons I've listed - documentation, obscurity and being mutually exclusive with file selection option. For documentation I'm looking for a Readme.html patch or else the patch is not complete and I have to add stuff to it in order to apply it. As for the reset, you're right. You can't have both an initial file selection and and an initial folder selection and have them being different. But I still don't like the fact that you have to use a backslash to activate this. It's too obscure. It should probably check if the given path is a directory and act accordingly. ---------------------------------------------------------------------- Comment By: Tobbe (tobbeswe) Date: 2008-08-17 10:26 Message: Logged In: YES user_id=1221788 Originator: YES Thanks for your reply > This method of setting the initial working directory is too cumbersome for > my taste. What do you mean "too cumbersome"? Could you elaborate? > First of all, you've provided no documentation for it. What kind of documentation are you looking for? Source code comments? Or a patch for Readme.html where I describe how this works? I'll be happy to write any kind of documentation for this patch you are looking for as soon as you are happy with the functionality > It also > requires a hidden switch - trailing backslash, to activate. One of the reasons I choose to implement it the way I did was to try to avoid breaking compatibility with existing scripts. I think this implementation satisfies that goal. > And what if the > user wants both initial directory and initial selection file? This is done the same way it already works. Just specify the full path to a file. If you set the parameter to "C:\Windows\System32\calc.exe" it will look for a file called "calc.exe" in the folder "C:\windows\system32\" The way the functionality is without any patch these three things works: "" - looks for any file "calc.exe" - looks for a file called calc.exe in the current folder "C:\Windows\System32\calc.exe" - looks for a file called "calc.exe" in the folder "C:\windows\system32\" My patch adds the possibility to do this "C:\windows\system32\" - looks for any file in the folder "C:\windows\system32\" Best Regards //Tobbe ---------------------------------------------------------------------- Comment By: Amir Szekely (kichik) Date: 2008-08-15 20:25 Message: Logged In: YES user_id=584402 Originator: NO This method of setting the initial working directory is too cumbersome for my taste. First of all, you've provided no documentation for it. It also requires a hidden switch - trailing backslash, to activate. And what if the user wants both initial directory and initial selection file? ---------------------------------------------------------------------- Comment By: Tobbe (tobbeswe) Date: 2008-07-20 16:05 Message: Logged In: YES user_id=1221788 Originator: YES The link to view the patch should be http://paste2.org/p/43756 ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=373087&aid=2016003&group_id=22049 |