← Back to team overview

bzr-explorer-dev team mailing list archive

Integrating Plugins with Bzr-Explorer

 

Hi,

Has any thought been given as to how to integrate command line plugins with Bzr-Explorer?

I have noticed the addition of command hooks to allow the presentation of bespoke initialisation dialogs for plugins but I was thinking of simpler mechanisms.

Basically I thought that Bzr-Explorer needed a way to add tools to toolbars rather than add them to the toolbox and have the command defined by a tool run against the selected item in the working tree. (The toolbox doesn't dock very sensibly if you want to have commands available to use on selected files - though the toolbox is fine for starting completely unlinked applications to which you don't want to supply any information).

My thoughts were the following:


(1)    Bzr-Explorer needs a way to allow the user to edit and produce customised toolbars.

(2)    Bzr-Explorer needs a way to allow the selected items in the working tree widget to be passed to the user defined tools when they are run.

(3)    Bzr-Explorer needs a way to allow a plugin to register/define a Bzr-Explorer toolbar and icons for the commands defined on the toolbar.

(4)    Bzr-Explorer needs a way to allow the user/a plugin to add options to the right click menu on the working tree widget.

I have attempted a quick hack where I changed the toolbox code to produce top level toolbars as well and changed the code that runs the tools to use the qrun --execute option and to get the selected item(s) from the treewidget to pass as the '%selecteds' command placeholder. This seems to work quite well.  I have also had a look at adding functionality to qbzr treewidget to support adding items to the right-click menu.

My main problem is that I need some overall guidance on the structure of incorporating these ideas - if people think they are worthwhile.

Do I create some additional xml entities for tools.xml to allow tools to be added to the toolbox; toolbars and/or treewidget right click menu?
Or should these be in separate files, e.g. toolbartools.xml; rightclicktools.xml?

With regard to plugins extending Bzr-Explorer should a plugin define an Explorer directory which contained tools.xml and some icons and have Bzr-Explorer search through the plugins for tools.xml files?

I'd be very grateful for any thoughts on these ideas.

Many thanks,

Simon Kersey



The information transmitted is intended only for the person
or entity to which it is addressed and may contain
confidential and/or privileged material. If you are not the
addressee, any disclosure, reproduction, copying,
distribution, or other dissemination or use of this
communication is strictly prohibited. If you have received
this transmission in error please notify the sender
immediately and then delete this email.

Any representations or commitments expressed in this email
are subject to contract.

This message has been scanned for viruses and dangerous
content. However, it is essential that the recipient also
checks this message using commercially available mail
scanning and anti-virus software. IPL Information Processing
Limited accepts no liability for any loss or damage resulting
from any virus or other dangerous content in this message.

IPL Information Processing Limited is registered in England
and Wales under company registration number 1418818.
Registration took place at Cardiff on 10 May 1979. IPL
Information Processing Limited's registered office and
normal place of business is Eveleigh House, Grove Street,
Bath, BA1 5LR, United Kingdom. IPL is also registered for
Value Added Tax (VAT) under registration number GB 601 2931 83.


Follow ups