Add Tool Command Placeholders

Bug #502891 reported by Alexander Belchenko
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar Explorer
Fix Released
Wishlist
Simon Kersey

Bug Description

How are the command placeholders used?
Is %(selected)s replaced with the details of the directories or files selected in the Working Tree pane?

Related branches

Revision history for this message
Simon Kersey (simon-kersey) wrote :

From my tests the 'selected' placeholder doesn't seem to get populated with information from the Working Tree pane.

As an experiment I hacked around the Explorer code and changed the Working Tree pane to populate the 'selected' element and updated the Toolbox code to build Toolbars rather than a separate Toolbox. This seemed to work OK as a means of adding additional commands and customising the Explorer. I'd be interested to know if anyone thought this a useful feature.

Revision history for this message
Ian Clatworthy (ian-clatworthy) wrote :

Setting selected in the context based on the WT selection is good. Please put up a simple patch for that ASAP if you haven't already.

Changed in bzr-explorer:
importance: Undecided → Wishlist
status: New → Confirmed
Revision history for this message
Simon Kersey (simon-kersey) wrote :

I have merged the following patch with bzr-explorer 405 locally but have not pushed it to launchpad yet:

http://code.launchpad.net/~simon-kersey/bzr-explorer/update-tool-defs
This added:
(1) <tool … type=“bzrexec” /> - to specify a tool that should use qrun --execute
(2) <tool … applies=”toolbox menu wt_menu” /> - to specify to which GUI items a tool can be added
(3) <folder … add-to=”toolbox menu wt_menu”> - to specify to which GUI items a toolset should be added
(4) <folder … linked=”wt”> - to specify that the toolset was linked to the working tree (so would only be visible when it was visible)
(5) Validation of parsing so that elements without mandatory attributes were ignored with a mutter. NOTE Currently elements are created, and an invalid tools.xml will cause Explorer to exit at start-up.
(6) Default icon for ‘bzrexec’ tool type.

I am currently updating the following patch:

http://code.launchpad.net/~simon-kersey/bzr-explorer/add-tool-exec

This added:
(1) Functionality to hide toolsets on the tools menu and in the toolbox depending on whether the working tree is visible or not and the linked attribute is set to ”wt”
(2) Functionality to call qrun --execute if tool type=”bzrexec”
(3) Functionality to pass the selected items from the working tree to the tool command if tool action contains %(selected)s and tool belongs to a toolset that is linked to the working tree.

but the structure of this functionality in bzr-explorer has changed rather a lot...

Revision history for this message
Simon Kersey (simon-kersey) wrote :

http://code.launchpad.net/~simon-kersey/bzr-explorer/add-tool-exec

This has now been merged with 405; pushed to launchpad and a merge requested.

Changed in bzr-explorer:
status: Confirmed → Fix Released
assignee: nobody → Simon Kersey (simon-kersey)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.