# HG changeset patch # User Tim Smith # Date 1486253519 28800 # Sat Feb 04 16:11:59 2017 -0800 # Node ID 7c8283c9039d4406368b05c82ead2dd9adcb2e46 # Parent 382a9e5bcd76253075a8e01010f5f78977ce5dc5 Fix gtk-mac-integration module import #4489 The name of the Python module changed in 2011; https://github.com/jralls/gtk-mac-integration/commit/6788f82 The KK7DS runtime has an older version so both should be supported. diff -r 382a9e5bcd76 -r 7c8283c9039d chirp/ui/mainapp.py --- a/chirp/ui/mainapp.py Mon Jan 23 23:19:46 2017 -0800 +++ b/chirp/ui/mainapp.py Sat Feb 04 16:11:59 2017 -0800 @@ -1945,10 +1945,23 @@ d.destroy() def _init_macos(self, menu_bar): + macapp = None + + # for KK7DS runtime <= R10 try: import gtk_osxapplication macapp = gtk_osxapplication.OSXApplication() - except ImportError, e: + except ImportError: + pass + + # for gtk-mac-integration >= 2.0.7 + try: + import gtkosx_application + macapp = gtkosx_application.Application() + except ImportError: + pass + + if macapp is None: LOG.error("No MacOS support: %s" % e) return