Patch for application toolbar parameters

Discuss development issues and submit patches here
Post Reply
ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Patch for application toolbar parameters

Post by ajs »

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"
Capture_15-02-2011-17.20.28.gif
Capture_15-02-2011-17.20.28.gif (4.48 KiB) Viewed 11929 times
- 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
Attachments
patch_50__v193.7z
(5.07 KiB) Downloaded 656 times
Last edited by ajs on Thu Feb 17, 2011 1:58 pm, edited 2 times in total.

SlimShady
Posts: 8
Joined: Wed Apr 07, 2010 3:18 am

Re: Patch for application toolbar parameters - 1

Post by SlimShady »

Looks good! I'm looking forward to using it! Yeah!!!

ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Patch for application toolbar parameters

Post by ajs »

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
Capture_17-02-2011-12.55.08.gif
Capture_17-02-2011-12.55.08.gif (8.74 KiB) Viewed 11896 times
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 547 times

twinsen
Posts: 109
Joined: Mon Dec 27, 2010 3:17 pm

Re: Patch for application toolbar parameters

Post by twinsen »

Thanks for adding the separate textbox for the paramaters, that will make it much easier to use.

ajs
Posts: 409
Joined: Mon Jul 05, 2010 6:37 pm

Re: Patch for application toolbar parameters

Post by ajs »

twinsen wrote:Thanks for adding the separate textbox for the paramaters, that will make it much easier to use.
No worries ;) You need to patch E++ yourself since both patches haven't been committed yet.
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)

mcjathan
Posts: 9
Joined: Sun Mar 20, 2011 6:39 am

Re: Patch for application toolbar parameters

Post by mcjathan »

Any estimate when this patch will be included in the nightly build or new release?

David Erceg
Site Admin
Posts: 910
Joined: Sat Apr 18, 2009 1:46 am

Re: Patch for application toolbar parameters

Post by David Erceg »

Rejected.

sun
Posts: 25
Joined: Tue Apr 05, 2011 5:02 am
Contact:

Re: Patch for application toolbar parameters

Post by sun »

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.

Cito
Posts: 8
Joined: Thu Aug 19, 2010 8:30 pm

Re: Patch for application toolbar parameters

Post by Cito »

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.

Post Reply