Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# These are supported funding model platforms

github: prrvchr
202 changes: 106 additions & 96 deletions README.md

Large diffs are not rendered by default.

204 changes: 107 additions & 97 deletions README_fr.md

Large diffs are not rendered by default.

11 changes: 7 additions & 4 deletions source/mContactOOo/Drivers.xcu
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
║ ║
╚════════════════════════════════════════════════════════════════════════════════════╝
-->
<oor:component-data oor:name="Drivers" oor:package="org.openoffice.Office.DataAccess"
xsi:schemaLocation="http://openoffice.org/2001/registry/component-update.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
<!DOCTYPE oor:component-data SYSTEM "component-update.dtd">
<oor:component-data
xmlns:install="http://openoffice.org/2004/installation"
xmlns:oor="http://openoffice.org/2001/registry"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
xmlns:xs="http://www.w3.org/2001/XMLSchema"
oor:package="org.openoffice.Office.DataAccess"
oor:name="Drivers" >
<node oor:name="Installed">
<node oor:name="sdbc:address:microsoft:*" oor:op="replace">
<prop oor:name="Driver">
Expand Down Expand Up @@ -90,3 +92,4 @@
</node>
</node>
</oor:component-data>

9 changes: 6 additions & 3 deletions source/mContactOOo/Options.xcs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,16 @@
║ ║
╚════════════════════════════════════════════════════════════════════════════════════╝
-->
<oor:component-schema oor:name="mContactOOo" oor:package="io.github.prrvchr"
xml:lang="en-US"
<!DOCTYPE oor:component-schema SYSTEM "component-schema.dtd">
<oor:component-schema
xmlns:oor="http://openoffice.org/2001/registry"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
oor:package="io.github.prrvchr"
oor:name="mContactOOo"
xml:lang="en-US">
<component>
<prop oor:name="AddressBookName" oor:type="xs:string" oor:localized="true"/>
<prop oor:name="ReplicateTimeout" oor:type="xs:short"/>
</component>
</oor:component-schema>

11 changes: 7 additions & 4 deletions source/mContactOOo/Options.xcu
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
║ ║
╚════════════════════════════════════════════════════════════════════════════════════╝
-->
<oor:component-data oor:name="mContactOOo" oor:package="io.github.prrvchr"
xsi:schemaLocation="http://openoffice.org/2001/registry/component-update.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
<!DOCTYPE oor:component-data SYSTEM "component-update.dtd">
<oor:component-data
xmlns:install="http://openoffice.org/2004/installation"
xmlns:oor="http://openoffice.org/2001/registry"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
xmlns:xs="http://www.w3.org/2001/XMLSchema"
oor:package="io.github.prrvchr"
oor:name="mContactOOo">
<prop oor:name="AddressBookName">
<value xml:lang="en">All my contacts</value>
<value xml:lang="fr">Tous mes contacts</value>
Expand All @@ -37,3 +39,4 @@
<value>600</value>
</prop>
</oor:component-data>

11 changes: 7 additions & 4 deletions source/mContactOOo/OptionsDialog.xcu
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
║ ║
╚════════════════════════════════════════════════════════════════════════════════════╝
-->
<oor:component-data oor:name="OptionsDialog" oor:package="org.openoffice.Office"
xsi:schemaLocation="http://openoffice.org/2001/registry/component-update.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
<!DOCTYPE oor:component-data SYSTEM "component-update.dtd">
<oor:component-data
xmlns:install="http://openoffice.org/2004/installation"
xmlns:oor="http://openoffice.org/2001/registry"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
xmlns:xs="http://www.w3.org/2001/XMLSchema"
oor:package="org.openoffice.Office"
oor:name="OptionsDialog">
<node oor:name="Nodes">
<node oor:name="io.github.prrvchr.mContactOOo" oor:op="fuse">
<prop oor:name="Label">
Expand Down Expand Up @@ -58,3 +60,4 @@
</node>
</node>
</oor:component-data>

1 change: 1 addition & 0 deletions source/mContactOOo/component-schema.dtd
1 change: 1 addition & 0 deletions source/mContactOOo/component-update.dtd
2 changes: 1 addition & 1 deletion source/mContactOOo/description.xml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
xmlns:d="http://openoffice.org/extensions/description/2006"
xmlns:l="http://libreoffice.org/extensions/description/2011"
xmlns:xlink="http://www.w3.org/1999/xlink">
<version value="1.3.1"/>
<version value="1.4.0"/>
<identifier value="io.github.prrvchr.mContactOOo"/>
<platform value="all"/>
<dependencies>
Expand Down
1 change: 1 addition & 0 deletions source/mContactOOo/dialogs/OptionDialog.xdl
16 changes: 16 additions & 0 deletions source/mContactOOo/dialogs/OptionDialog_en_US.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
OptionDialog.HelpText=
OptionDialog.Title=
OptionDialog.FixedLine1.HelpText=
OptionDialog.FixedLine1.Label=mContactOOo settings
OptionDialog.Label1.HelpText=
OptionDialog.Label1.Label=Replication interval:
OptionDialog.NumericField1.HelpText=Replication interval in minutes
OptionDialog.Label2.HelpText=
OptionDialog.Label2.Label=View datasource:
OptionDialog.CommandButton1.HelpText=
OptionDialog.CommandButton1.Label=View DataBase
OptionDialog.Label3.HelpText=
OptionDialog.Label3.Label=Main table name:
OptionDialog.TextField1.HelpText=The name of the main table in your address book
OptionDialog.TextField1.Text=

16 changes: 16 additions & 0 deletions source/mContactOOo/dialogs/OptionDialog_fr_FR.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
OptionDialog.HelpText=
OptionDialog.Title=
OptionDialog.FixedLine1.HelpText=
OptionDialog.FixedLine1.Label=Options mContactOOo
OptionDialog.Label1.HelpText=
OptionDialog.Label1.Label=Intervalle de r\u00e9plication:
OptionDialog.NumericField1.HelpText=Intervalle de r\u00e9plication en minutes
OptionDialog.Label2.HelpText=
OptionDialog.Label2.Label=Voir la source de donn\u00e9es:
OptionDialog.CommandButton1.HelpText=
OptionDialog.CommandButton1.Label=Voir la base de donn\u00e9es
OptionDialog.Label3.HelpText=
OptionDialog.Label3.Label=Nom de la table principale:
OptionDialog.TextField1.HelpText=Le nom de la table principale dans votre carnet d'adresses
OptionDialog.TextField1.Text=

Empty file.
1 change: 1 addition & 0 deletions source/mContactOOo/dialogs/OptionsDialog_en_US.default
17 changes: 0 additions & 17 deletions source/mContactOOo/dialogs/OptionsDialog_en_US.properties

This file was deleted.

1 change: 1 addition & 0 deletions source/mContactOOo/dialogs/OptionsDialog_en_US.properties
17 changes: 0 additions & 17 deletions source/mContactOOo/dialogs/OptionsDialog_fr_FR.properties

This file was deleted.

1 change: 1 addition & 0 deletions source/mContactOOo/dialogs/OptionsDialog_fr_FR.properties
1 change: 1 addition & 0 deletions source/mContactOOo/dialogs/dialog.dtd
1 change: 1 addition & 0 deletions source/mContactOOo/idl/com/sun/star/task/XTaskEvent.idl
4 changes: 2 additions & 2 deletions source/mContactOOo/package.properties

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions source/mContactOOo/service/OptionsHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def callHandlerMethod(self, window, event, method):
handled = True
return handled
except Exception as e:
print("OptionsHandler.callHandlerMethod() ERROR: %s" % traceback.format_exc())
self._logger.logprb(SEVERE, 'OptionsHandler', 'callHandlerMethod()', 201, e, traceback.format_exc())

def getSupportedMethodNames(self):
Expand Down
1 change: 0 additions & 1 deletion source/mContactOOo/service/pythonpath/mcontact/options

This file was deleted.

31 changes: 31 additions & 0 deletions source/mContactOOo/service/pythonpath/mcontact/options/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!
# -*- coding: utf-8 -*-

"""
╔════════════════════════════════════════════════════════════════════════════════════╗
║ ║
║ Copyright (c) 2020-25 https://prrvchr.github.io ║
║ ║
║ Permission is hereby granted, free of charge, to any person obtaining ║
║ a copy of this software and associated documentation files (the "Software"), ║
║ to deal in the Software without restriction, including without limitation ║
║ the rights to use, copy, modify, merge, publish, distribute, sublicense, ║
║ and/or sell copies of the Software, and to permit persons to whom the Software ║
║ is furnished to do so, subject to the following conditions: ║
║ ║
║ The above copyright notice and this permission notice shall be included in ║
║ all copies or substantial portions of the Software. ║
║ ║
║ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ║
║ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ║
║ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ║
║ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ║
║ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ║
║ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE ║
║ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ║
║ ║
╚════════════════════════════════════════════════════════════════════════════════════╝
"""

from .optionsmanager import OptionsManager

Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
#!
# -*- coding: utf-8 -*-

"""
╔════════════════════════════════════════════════════════════════════════════════════╗
║ ║
║ Copyright (c) 2020-25 https://prrvchr.github.io ║
║ ║
║ Permission is hereby granted, free of charge, to any person obtaining ║
║ a copy of this software and associated documentation files (the "Software"), ║
║ to deal in the Software without restriction, including without limitation ║
║ the rights to use, copy, modify, merge, publish, distribute, sublicense, ║
║ and/or sell copies of the Software, and to permit persons to whom the Software ║
║ is furnished to do so, subject to the following conditions: ║
║ ║
║ The above copyright notice and this permission notice shall be included in ║
║ all copies or substantial portions of the Software. ║
║ ║
║ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ║
║ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ║
║ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ║
║ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ║
║ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ║
║ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE ║
║ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ║
║ ║
╚════════════════════════════════════════════════════════════════════════════════════╝
"""

from com.sun.star.logging.LogLevel import SEVERE

from .optionsmodel import OptionsModel

from .optionsview import OptionsView

from .options import OptionsManager as Manager

from ..unotool import executeDispatch

from ..configuration import g_extension

import traceback


class OptionsManager():
def __init__(self, ctx, logger, window):
self._model = OptionsModel(ctx)
self._view = OptionsView(window, OptionsManager._restart, *self._model.getViewData())
self._manager = Manager(ctx, logger, window)
self._logger = logger

_restart = False

def saveSetting(self):
if self._manager.saveSetting():
OptionsManager._restart = True
self._view.setWarning(True, self._model.isInstrumented())

def loadSetting(self):
self._manager.loadSetting()

Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!
# -*- coding: utf-8 -*-

"""
╔════════════════════════════════════════════════════════════════════════════════════╗
║ ║
║ Copyright (c) 2020-25 https://prrvchr.github.io ║
║ ║
║ Permission is hereby granted, free of charge, to any person obtaining ║
║ a copy of this software and associated documentation files (the "Software"), ║
║ to deal in the Software without restriction, including without limitation ║
║ the rights to use, copy, modify, merge, publish, distribute, sublicense, ║
║ and/or sell copies of the Software, and to permit persons to whom the Software ║
║ is furnished to do so, subject to the following conditions: ║
║ ║
║ The above copyright notice and this permission notice shall be included in ║
║ all copies or substantial portions of the Software. ║
║ ║
║ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, ║
║ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES ║
║ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. ║
║ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY ║
║ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, ║
║ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE ║
║ OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ║
║ ║
╚════════════════════════════════════════════════════════════════════════════════════╝
"""

from ..jdbcdriver import isInstrumented

from ..unotool import getStringResource

from ..configuration import g_identifier


import traceback


class OptionsModel():
def __init__(self, ctx):
self._instrumented = isInstrumented(ctx, 'xdbc:jdbc')
resolver = getStringResource(ctx, g_identifier, 'dialogs', 'OptionsDialog')
self._url = resolver.resolveString('OptionsDialog.Hyperlink1.Url')

# OptionsModel getter methods
def isInstrumented(self):
return self._instrumented

def getViewData(self):
return self._url, self._instrumented

Loading
Loading