--- Begin Message ---
Subject: |
Programmatically launching a plugin configuration |
Date: |
Mon, 09 May 2011 23:29:03 -0500 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 |
Hey Mark,
I'm cleaning up the Mileage plugin in preparation for writing the
tutorial. I need to force the user to configure the plugin on it's
first run to setup the expense and credit accounts. Do you know how I
could programmatically call run_configuration_interface from the
initialiser? The initialiser doesn't seem to have the parent_window and
the backend_account_fetch arguments as far as I can tell.
class MileagePlugin(SimplePlugin):
...
def __init__(self):
super(MileagePlugin, self).__init__()
while MileagePlugin.debit_account == (None,) or \
MileagePlugin.credit_account == (None,):
self.run_configuration_interface(self.parent_window,
self.backend_account_fetch)
def run_configuration_interface(self, parent_window,
backend_account_fetch):
dialog = MileageConfigDialog(parent_window,
backend_account_fetch, self)
dialog.run()
Thanks,
Samuel
--- End Message ---