Author Topic: EnhProj - Enhanced Open File dialog  (Read 16635 times)

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
EnhProj - Enhanced Open File dialog
« on: September 07, 2008, 08:43:29 PM »
This is a macro + DLL, so unfortunately it only works on Windows.

See the Readme.htm file for installation and usage instructions.

The new enhOpen command pops up an Open File dialog that is similar to the Files toolbar and the Open toolbar, but has some key differences:
  • There are 3 tabs:  Any (list files relative to current working directory), Project (list files from the current project), and Workspace (list files from the current workspace).
  • There is only one column, which allows the list to show as much of the path as possible.
  • Shows the OS file icons for each file, and the icons are retrieved on a background thread for optimal performance.
  • The list is automatically filtered as you type:  by default a prefix match is used for the filename portion of what you type, and a suffix match is used for the path portion of what you type.  See the Readme file for some examples.
  • Filtering allows * and ? wildcards.  Star (*) matches any number of characters, and question mark (?) matches any one character.  No need to learn a special syntax, it just uses normal file system wildcards.

There are a few configuration settings available.
See the Readme file in the ZIP file for more information.

Full source code for the DLL is included, but there is no makefile/etc.  If you want to build it, you'll need to set that stuff up yourself (the only slightly atypical thing is that you'll need to preprocess the manifest.xml file to get the version number filled in properly).
« Last Edit: September 08, 2008, 12:02:01 AM by chrisant »

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: EnhProj - Enhanced Open File dialog
« Reply #1 on: September 07, 2008, 10:56:19 PM »
@chrisant: The attached file is zero sized :( HS2

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: EnhProj - Enhanced Open File dialog
« Reply #2 on: September 08, 2008, 12:02:35 AM »
Hm, don't know what happened, probably a typo in the path when I uploaded it the first time.
Try now.

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: EnhProj - Enhanced Open File dialog
« Reply #3 on: September 08, 2008, 11:40:32 AM »
Got it :)
Thanks a lot for all your effort chrisant and get a big HP !
HS2

mikesart

  • Community Member
  • Posts: 56
  • Hero Points: 11
Re: EnhProj - Enhanced Open File dialog
« Reply #4 on: September 08, 2008, 05:11:58 PM »
I got an "Identifier 'enhproj-dbg-dll' not declared" error on line 144 when loading the file. "enhproj_dbg_dll" is surrounded by #ifdef CHRISANT but enhOpen() has some code which uses it. I #ifdef'd CHRISANT that locally built copy part out in enhOpen() and it worked great.

One little nit that would be nice is if it could store/restore the window position and size. You know you've done really well when that's the only nit/suggestion I can come up with. :)

Thanks a ton Chrisant. This is massively cool.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: EnhProj - Enhanced Open File dialog
« Reply #5 on: September 08, 2008, 07:37:45 PM »
I got an "Identifier 'enhproj-dbg-dll' not declared" error on line 144 when loading the file. "enhproj_dbg_dll" is surrounded by #ifdef CHRISANT but enhOpen() has some code which uses it. I #ifdef'd CHRISANT that locally built copy part out in enhOpen() and it worked great.
Oops!!  :-[
Will fix that this afternoon.

One little nit that would be nice is if it could store/restore the window position and size. You know you've done really well when that's the only nit/suggestion I can come up with. :)
Oh yes, that's high on my wish list, but I completely forgot to include it in the "future" section.  I'm having some trouble with getting SlickEdit to remember the config variables that get changed, so I didn't add that yet (have never had trouble with that before, and have no idea why it's not working for this macro).  I may end up just storing stuff in the registry (or maybe in a .ini file in the same directory as the .dll file).

Thanks a ton Chrisant. This is massively cool.
You're welcome!  :)

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: EnhProj - Enhanced Open File dialog
« Reply #6 on: September 08, 2008, 07:59:13 PM »
Update:  Fixed macro compilation error (when CHRISANT symbol is not defined).

hs2

  • Senior Community Member
  • Posts: 2761
  • Hero Points: 292
Re: EnhProj - Enhanced Open File dialog
« Reply #7 on: September 08, 2008, 11:27:34 PM »
@chrisant: Please follow the SE paradigm and use an ini/xml/whatever file to store configurations etc.
Thanks, HS2

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: EnhProj - Enhanced Open File dialog
« Reply #8 on: December 24, 2008, 02:05:44 AM »
Update:
  • Now remembers the position/size of the open file dialog.
  • Fixed issue where configuration variables sometimes didn't get saved between sessions.

mikesart

  • Community Member
  • Posts: 56
  • Hero Points: 11
Re: EnhProj - Enhanced Open File dialog
« Reply #9 on: December 29, 2008, 06:17:09 PM »
I got an error when loading in the macro enhOpen(): Identifier 's' not declared. Pretty easy to fix though and it's working great now. Love this macro. Opening files with filters on filenames and directories in incredibly useful. Thanks a ton Chrisant.

chrisant

  • Senior Community Member
  • Posts: 1410
  • Hero Points: 131
Re: EnhProj - Enhanced Open File dialog
« Reply #10 on: January 03, 2009, 06:48:38 PM »
Sigh, again the #ifdef CHRISANT bit me.  :-[

Here's a copy with the syntax error fixed.