Patch for application toolbar parameters - 1
This patch replaces patch 23 and it is a complete rework from scratch. I was going to do all in a single patch, but I decided to split it into two patches to make easier for David to commit them.
This patch includes these things:
- add an edit control in the "application toolbar button properties" dialog which allows the user to set the parameters for any button
- add a "more" button in the same dialog. This button is not yet used, but it will be with patch 51. It is meant to be used in a way similar to the "more" button in the "mass rename dialog"
- handle the additional parameters: save/restore to (XML)Registry, pass the parameters to the program called by the application button (this also works when drag-and-dropping items onto an application button, feature which was broken by patch 23).
- moved the code to handle a left-click on an application button from MainWndSwitch.cpp to ApplicationToolbarHandler.cpp, in a way similar to what was done for the DrivesToolbar in patch 41.
Patch 50 does not support special parameters to pass selected items or current directory to the application launched. This will be part of patch 51, so a full replacement+extension of patch 23 will require both patches to be applied.
Patch against commit 193
PS for David: the function "ApplicationToolbarDecodeParameters" does very little in this patch (as little as a string copy operation). This function will be expanded with patch 51
Patch for application toolbar parameters
Patch for application toolbar parameters
- Attachments
-
- patch_50__v193.7z
- (5.07 KiB) Downloaded 879 times
Last edited by ajs on Thu Feb 17, 2011 1:58 pm, edited 2 times in total.
Re: Patch for application toolbar parameters - 1
Looks good! I'm looking forward to using it! Yeah!!!
Re: Patch for application toolbar parameters
Second part of the patch.
This patch does this:
- code reorganization for application toolbar (AT) property dialogs: before there were two different dialogs for a new button and an existing button, with most of code and procedures duplicated. I have unified the dialogs in a single one
- add special parameters for the AT buttons
> /E++CD -> current directory
> /E++SI -> selected items in the current listview
> /E++UI -> unselected items in the current listview
> /E++DI -> items drag-n-dropped onto AT button The whole things work like this:
1) when a AT button is clicked, the parameters /E++CD, /E++SI, /E++UI are expanded in place to their equivalent
2) if files/folders are drag-n-dropped to the AT button and /E++DI is part of the parameters' string, /E++CD, /E++SI, /E++UI, /E++DI are expanded in place to their equivalent
3) if files/folders are drag-n-dropped to the AT button and /E++DI is NOT part of the parameters' string, /E++CD, /E++SI, /E++UI are ignored, and the names of the dropped items are simply added at the end of the parameters list.
All this allows a great degree of flexibility with the parameters setting.
The patch is a relative patch against commit 193 and patch 50
This patch does this:
- code reorganization for application toolbar (AT) property dialogs: before there were two different dialogs for a new button and an existing button, with most of code and procedures duplicated. I have unified the dialogs in a single one
- add special parameters for the AT buttons
> /E++CD -> current directory
> /E++SI -> selected items in the current listview
> /E++UI -> unselected items in the current listview
> /E++DI -> items drag-n-dropped onto AT button The whole things work like this:
1) when a AT button is clicked, the parameters /E++CD, /E++SI, /E++UI are expanded in place to their equivalent
2) if files/folders are drag-n-dropped to the AT button and /E++DI is part of the parameters' string, /E++CD, /E++SI, /E++UI, /E++DI are expanded in place to their equivalent
3) if files/folders are drag-n-dropped to the AT button and /E++DI is NOT part of the parameters' string, /E++CD, /E++SI, /E++UI are ignored, and the names of the dropped items are simply added at the end of the parameters list.
All this allows a great degree of flexibility with the parameters setting.
The patch is a relative patch against commit 193 and patch 50
- Attachments
-
- patch_51__v193.p50.7z
- (5.57 KiB) Downloaded 751 times
Re: Patch for application toolbar parameters
Thanks for adding the separate textbox for the paramaters, that will make it much easier to use.
Re: Patch for application toolbar parameters
No worries You need to patch E++ yourself since both patches haven't been committed yet.twinsen wrote:Thanks for adding the separate textbox for the paramaters, that will make it much easier to use.
The easiest way is to download commit 193, apply patch 50 and 51 on it, and then do a folder comparison with your local development branch.
If you try otherwise, applying patch 51 may fail since it is a "relative" patch to patch 50 (i.e. I created it as a difference between two E++ folders)
Re: Patch for application toolbar parameters
Any estimate when this patch will be included in the nightly build or new release?
-
- Site Admin
- Posts: 936
- Joined: Sat Apr 18, 2009 1:46 am
Re: Patch for application toolbar parameters
Curious, any particular reason for rejecting this patch?
Do you prefer the approach taken in http://www.explorerplusplus.com/forum/v ... ?f=4&t=609 ?
Without parameters, the application buttons don't really make sense currently -- although every user probably has plenty of use-cases for custom application buttons.
Do you prefer the approach taken in http://www.explorerplusplus.com/forum/v ... ?f=4&t=609 ?
Without parameters, the application buttons don't really make sense currently -- although every user probably has plenty of use-cases for custom application buttons.
Re: Patch for application toolbar parameters
I'm also curious why this idea was rejected. I like the "open command prompt" feature which opens the command line with the current path, but I'd like to replace the standard command tool with "Console". When I add "Console" as a simple application, it always opens at the same path. There are thousands of other useful things you could do if you could pass the current Explorer++ path and other parameters.