summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2011-12-05 13:04:05 +0000
committerMichael Meeks <michael.meeks@suse.com>2011-12-05 20:53:24 +0000
commit41b8bad143c06bc5419783b9f3cf5685aa3eea63 (patch)
tree440af2f411acfd9bbf43c6d3f33da0a94ae3b4d0 /wizards
parentfb7f82382bd317dd12913a6d7a3a5e4be6a6671c (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')
-rw-r--r--wizards/Module_wizards.mk1
-rw-r--r--wizards/Pyuno_commonwizards.mk62
-rw-r--r--wizards/Pyuno_event.mk36
-rw-r--r--wizards/Pyuno_fax.mk5
-rw-r--r--wizards/com/sun/star/wizards/fax/CallWizard.py9
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialog.py1
-rw-r--r--wizards/com/sun/star/wizards/fax/__init__.py2
-rw-r--r--wizards/com/sun/star/wizards/fax/fax.component3
-rw-r--r--wizards/com/sun/star/wizards/ui/UnoDialog2.py1
-rw-r--r--wizards/com/sun/star/wizards/ui/WizardDialog.py1
-rw-r--r--wizards/com/sun/star/wizards/ui/event/__init__.py0
11 files changed, 15 insertions, 106 deletions
diff --git a/wizards/Module_wizards.mk b/wizards/Module_wizards.mk
index b17e872f3cba..14cd3600a504 100644
--- a/wizards/Module_wizards.mk
+++ b/wizards/Module_wizards.mk
@@ -38,7 +38,6 @@ $(eval $(call gb_Module_add_targets,wizards,\
AllLangResTarget_wzi \
Pyuno_fax \
Pyuno_commonwizards \
- Pyuno_event \
Zip_depot \
Zip_euro \
Zip_form \
diff --git a/wizards/Pyuno_commonwizards.mk b/wizards/Pyuno_commonwizards.mk
deleted file mode 100644
index f13c1c2ada33..000000000000
--- a/wizards/Pyuno_commonwizards.mk
+++ /dev/null
@@ -1,62 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2011 David Tardon, Red Hat Inc. <dtardon@redhat.com> (initial developer)
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Pyuno_Pyuno,common,$(SRCDIR)/wizards/com/sun/star/wizards))
-
-$(eval $(call gb_Pyuno_add_files,common,\
- common/ConfigGroup.py \
- common/Configuration.py \
- common/FileAccess.py \
- common/Properties.py \
- common/Resource.py \
- common/ConfigNode.py \
- common/DebugHelper.py \
- common/Helper.py \
- common/NoValidPathException.py \
- common/PropertyNames.py \
- common/SystemDialog.py \
- common/ConfigSet.py \
- common/Desktop.py \
- common/HelpIds.py \
- common/NumberFormatter.py \
- common/PropertySetHelper.py \
- document/OfficeDocument.py \
- text/TextDocument.py \
- text/TextFieldHandler.py \
- text/TextSectionHandler.py \
- text/ViewHandler.py \
- ui/ControlScroller.py \
- ui/ImageList.py \
- ui/PathSelection.py \
- ui/UIConsts.py \
- ui/UnoDialog.py \
- ui/XPathSelectionListener.py \
- ui/DocumentPreview.py \
- ui/PeerConfig.py \
- ui/UnoDialog2.py \
- ui/WizardDialog.py \
-))
-
-# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/wizards/Pyuno_event.mk b/wizards/Pyuno_event.mk
deleted file mode 100644
index f34963763978..000000000000
--- a/wizards/Pyuno_event.mk
+++ /dev/null
@@ -1,36 +0,0 @@
-# Version: MPL 1.1 / GPLv3+ / LGPLv3+
-#
-# The contents of this file are subject to the Mozilla Public License Version
-# 1.1 (the "License"); you may not use this file except in compliance with
-# the License or as specified alternatively below. You may obtain a copy of
-# the License at http://www.mozilla.org/MPL/
-#
-# Software distributed under the License is distributed on an "AS IS" basis,
-# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
-# for the specific language governing rights and limitations under the
-# License.
-#
-# Major Contributor(s):
-# Copyright (C) 2011 David Tardon, Red Hat Inc. <dtardon@redhat.com> (initial developer)
-#
-# All Rights Reserved.
-#
-# For minor contributions see the git repository.
-#
-# Alternatively, the contents of this file may be used under the terms of
-# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
-# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
-# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
-# instead of those above.
-
-$(eval $(call gb_Pyuno_Pyuno,event,$(SRCDIR)/wizards/com/sun/star/wizards/ui/event))
-
-$(eval $(call gb_Pyuno_add_files,event,\
- CommonListener.py \
- DataAware.py \
- ListModelBinder.py \
- RadioDataAware.py \
- UnoDataAware.py \
-))
-
-# vim:set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/wizards/Pyuno_fax.mk b/wizards/Pyuno_fax.mk
index 61467a1db256..fa07924384ff 100644
--- a/wizards/Pyuno_fax.mk
+++ b/wizards/Pyuno_fax.mk
@@ -26,6 +26,7 @@
$(eval $(call gb_Pyuno_Pyuno,fax,$(SRCDIR)/wizards/com/sun/star/wizards/fax))
$(eval $(call gb_Pyuno_add_files,fax,\
+ __init__.py \
CallWizard.py \
CGFax.py \
CGFaxWizard.py \
@@ -34,9 +35,7 @@ $(eval $(call gb_Pyuno_add_files,fax,\
FaxWizardDialogImpl.py \
FaxWizardDialog.py \
FaxWizardDialogResources.py \
- __init__.py \
))
-
-$(eval $(call gb_Pyuno_set_componentfile,fax,wizards/com/sun/star/wizards/fax/fax))
+$(eval $(call gb_Pyuno_set_componentfile_full,fax,wizards/com/sun/star/wizards/fax/fax,vnd.sun.star.expand:\dLO_LIB_DIR/wizards/fax/CallWizard,.py))
# vim:set shiftwidth=4 softtabstop=4 expandtab:
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