diff --git a/files/ZAZExtensions_v0.1.0.oxt b/files/ZAZExtensions_v0.1.0.oxt index 8b117ab..04fc166 100644 Binary files a/files/ZAZExtensions_v0.1.0.oxt and b/files/ZAZExtensions_v0.1.0.oxt differ diff --git a/source/ZAZExtensions.py b/source/ZAZExtensions.py index e2dc133..87d9912 100644 --- a/source/ZAZExtensions.py +++ b/source/ZAZExtensions.py @@ -1,6 +1,7 @@ import uno import unohelper from com.sun.star.task import XJobExecutor +from main import main ID_EXTENSION = 'net.elmau.zaz.extensions' @@ -12,8 +13,8 @@ class ZAZExtensions(unohelper.Base, XJobExecutor): def __init__(self, ctx): self.ctx = ctx - def trigger(self, args='pyUNO'): - print('Hello World', args) + def trigger(self, args): + main(args) return diff --git a/source/pythonpath/controllers.py b/source/pythonpath/controllers.py new file mode 100644 index 0000000..63f77b6 --- /dev/null +++ b/source/pythonpath/controllers.py @@ -0,0 +1,2 @@ +#!/usr/bin/env python3 + diff --git a/source/pythonpath/main.py b/source/pythonpath/main.py new file mode 100644 index 0000000..852aae6 --- /dev/null +++ b/source/pythonpath/main.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python3 + +from ui import dialog_main + + +def main(args): + dialog = dialog_main() + dialog.open() + return + + diff --git a/source/pythonpath/ui.py b/source/pythonpath/ui.py new file mode 100644 index 0000000..996f556 --- /dev/null +++ b/source/pythonpath/ui.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 + +import easymacro as app + + +def dialog_main(): + args = dict( + Name = 'dialog', + Width = 200, + Height = 200, + ) + dialog = app.create_dialog(args) + + return dialog