diff options
author | Michael Meeks <michael.meeks@suse.com> | 2011-12-05 13:04:05 +0000 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2011-12-05 20:53:24 +0000 |
commit | 41b8bad143c06bc5419783b9f3cf5685aa3eea63 (patch) | |
tree | 440af2f411acfd9bbf43c6d3f33da0a94ae3b4d0 /wizards/com | |
parent | fb7f82382bd317dd12913a6d7a3a5e4be6a6671c (diff) |
wizards: completely work python wizard packaging and registration
Also improve exception handling and error printing in pythonloader
Allow registration of explicit .py components - the only method that works
Diffstat (limited to 'wizards/com')
-rw-r--r-- | wizards/com/sun/star/wizards/fax/CallWizard.py | 9 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialog.py | 1 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/__init__.py | 2 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/fax.component | 3 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/ui/UnoDialog2.py | 1 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/ui/WizardDialog.py | 1 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/ui/event/__init__.py | 0 |
7 files changed, 13 insertions, 4 deletions
diff --git a/wizards/com/sun/star/wizards/fax/CallWizard.py b/wizards/com/sun/star/wizards/fax/CallWizard.py index 5aae1b75140f..1114603bf621 100644 --- a/wizards/com/sun/star/wizards/fax/CallWizard.py +++ b/wizards/com/sun/star/wizards/fax/CallWizard.py @@ -14,8 +14,13 @@ class CallWizard(unohelper.Base, XJobExecutor): self.ctx = ctx def trigger(self, args): - fw = FaxWizardDialogImpl(self.ctx.ServiceManager) - fx.startWizard() + try: + fw = FaxWizardDialogImpl(self.ctx.ServiceManager) + fw.startWizard(self.ctx.ServiceManager) + except Exception as e: + print ("Wizard failure exception " + str(type(e)) + + " message " + str(e) + " args " + str(e.args) + + traceback.format_exc()); # pythonloader looks for a static g_ImplementationHelper variable g_ImplementationHelper = unohelper.ImplementationHelper() diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py index c465d88952e8..c74aa1faa2e0 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialog.py @@ -1,3 +1,4 @@ +import wizards.ui.UIConsts from wizards.ui.WizardDialog import * from wizards.fax.FaxWizardDialogResources import FaxWizardDialogResources from wizards.fax.FaxWizardDialogConst import * diff --git a/wizards/com/sun/star/wizards/fax/__init__.py b/wizards/com/sun/star/wizards/fax/__init__.py index e69de29bb2d1..1ad913ad7b52 100644 --- a/wizards/com/sun/star/wizards/fax/__init__.py +++ b/wizards/com/sun/star/wizards/fax/__init__.py @@ -0,0 +1,2 @@ +__all__ = ['CallWizard', 'CGFax', 'GCFaxWizard', 'FaxDocument', 'FaxWizardDialogConst', + 'FaxWizardDialogImpl', 'FaxWizardDialog', 'FaxWizardDialogResources'] diff --git a/wizards/com/sun/star/wizards/fax/fax.component b/wizards/com/sun/star/wizards/fax/fax.component index a03d00afc5a6..06383e74db2f 100644 --- a/wizards/com/sun/star/wizards/fax/fax.component +++ b/wizards/com/sun/star/wizards/fax/fax.component @@ -28,8 +28,7 @@ <component loader="com.sun.star.loader.Python" xmlns="http://openoffice.org/2010/uno-components"> - <implementation - name="com.sun.star.wizards.fax.CallWizard"> + <implementation name="com.sun.star.wizards.fax.CallWizard"> <service name="com.sun.star.task.Job"/> </implementation> </component> diff --git a/wizards/com/sun/star/wizards/ui/UnoDialog2.py b/wizards/com/sun/star/wizards/ui/UnoDialog2.py index 58b448c92afa..31ab465c2e0a 100644 --- a/wizards/com/sun/star/wizards/ui/UnoDialog2.py +++ b/wizards/com/sun/star/wizards/ui/UnoDialog2.py @@ -1,3 +1,4 @@ +from wizards.ui.UIConsts import * from wizards.ui.UnoDialog import * from wizards.ui.event.CommonListener import * from wizards.common.Desktop import Desktop diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index d73fb4f736b6..fddc2e09d63a 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -1,3 +1,4 @@ +import wizards.ui.UIConsts from wizards.ui.UnoDialog2 import * from abc import ABCMeta, abstractmethod from wizards.common.Resource import Resource diff --git a/wizards/com/sun/star/wizards/ui/event/__init__.py b/wizards/com/sun/star/wizards/ui/event/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 --- /dev/null +++ b/wizards/com/sun/star/wizards/ui/event/__init__.py |