← Back to team overview

bzr-explorer-dev team mailing list archive

Re: Integrating Plugins with Bzr-Explorer

 

Simon Kersey wrote:

> Further to my previous mail I have now fixed some ‘features’ of my
> previous patches.  In particular I have stopped the crash when Explorer
> is minimised and a working tree linked toolbar is displayed.

Well done. I've reviewed these patches now and they generally look good.
See my comments below. (I'm copying the main Bazaar list as some details
below will most likely interest a wider audience than just the explorer
devs.)

Firstly though, here's an update on my thinking re custom toolbars ...

I want to have different toolbars for different location kinds, e.g. the
actions for a repository will be different to those to a branch,
bound-branch or checkout. For example, 'switch' might be on the toolbar
shown for checkouts while multi-pull might be on the toolbar for
repositories.

I want users to be able to tag locations with a "logical kind" as well.
For example, you might want to say this is a "review branch",
"pipeline", "packaging branch" or (bzr-builder) "recipe". A new dialog
will be added (File --> Properties) that shows the name and kind of a
location and lets you set/unset the logical kind. (BTW, logical kinds
will have icons that are displayed in place of the actual kind's one on
tabs, etc.)

Behind the scenes, the toolbar for each kind will be defined in a folder
of that name inside toolbars.xml. Users and plugins will be able to add
their items or replace the standard toolbars. They will also be able to
add toolbars for logical kinds, e.g. the toolbar for a "review-branch"
may have actions like Pull, Merge and Revert but it won't have a Commit
action.

> http://code.launchpad.net/~simon-kersey/bzr-explorer/update-tool-defs

> (2)    <tool … applies=”toolbox toolbar menu wt_menu” /> -  to specify
> to which GUI items a tool can be added
> 
> (3)    <folder … add-to=”toolbox toolbar menu wt_menu”> - to specify to
> which GUI items a toolset should be added

Given my comments above, please remove toolbar from the list of
supported values.

I'd also like to hear some feedback on how useful it is to have tools
that only appear in the Tools menu or Toolbox but not both. Currently,
it's a "feature" that there's one set of tools and 2 ways (Tools menu or
Toolbox panel) for launching them. *If* we decide it's better to keep
the 2 in sync, then we're down to menu vs wt_menu. In that case, I
wonder whether those should be multiple exclusive, i.e. this tool is
either item-selection-dependent or it isn't?

> (4)    <folder … linked=”wt”> - to specify that the toolset was linked
> to the working tree (so would only be visible when it was visible)

This sounds interesting. I'm curious as to how you're using this to
improve the UI experience! If you get a moment, could you outline an
example folder of WT actions you've defined?

> 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.

Cool. Was --execute added as a generic q* feature or is it only
supported for some commands?

After we give others a 2-3 days to provide input, could you please put
together a merge proposal based on add-tool-exec? Your code looks good.
Tests are welcome (but not strictly required). A NEWS item is welcome too.

Ian C.



Follow ups

References