From d0695f2fc51e025e396181300e96d40ec031e3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Tue, 28 Jul 2015 07:48:08 +0200 Subject: [PATCH] opt-in for Mac integration The Mac integration is not fully stable for now. issue4595 review19341002 --- doc/usage.rst | 5 +++++ tryton/gui/main.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/doc/usage.rst b/doc/usage.rst index 7d2a8c75cb..6ba5c44335 100644 --- a/doc/usage.rst +++ b/doc/usage.rst @@ -49,6 +49,11 @@ Options -s SERVER, --server=SERVER Specify the server hostname +Environment +*********** + +`GTKOSXAPPLICATION` Activate with native Mac desktop + URL *** diff --git a/tryton/gui/main.py b/tryton/gui/main.py index 7d30662918..4dbb7ffa14 100644 --- a/tryton/gui/main.py +++ b/tryton/gui/main.py @@ -42,9 +42,9 @@ import tryton.plugins from tryton.common.placeholder_entry import PlaceholderEntry import pango import time -try: +if os.environ.get('GTKOSXAPPLICATION'): import gtkosx_application -except ImportError: +else: gtkosx_application = None try: import gtkspell