From 88b7ba98be9a3e1a38cda3ca450ba3462defe952 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Pr=C3=B6pper?= Date: Fri, 16 Aug 2013 19:04:18 +0200 Subject: [PATCH 1/4] New specs for freezing on OS X --- bin/freeze/Info.plist | 2 +- bin/freeze/main.spec | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/freeze/Info.plist b/bin/freeze/Info.plist index 3995d0c..3bf8155 100644 --- a/bin/freeze/Info.plist +++ b/bin/freeze/Info.plist @@ -2,7 +2,7 @@ CFBundleShortVersionString -0.2.1 +0.4.0 CFBundleExecutable MacOS/spykeviewer CFBundleName diff --git a/bin/freeze/main.spec b/bin/freeze/main.spec index 5d4d15e..e943aa7 100644 --- a/bin/freeze/main.spec +++ b/bin/freeze/main.spec @@ -80,9 +80,9 @@ a.datas.extend(dir_files(os.path.join(module_path, 'plugins'), 'plugins')) dist_dir = os.path.join('dist', 'main') coll = COLLECT(exe, a.binaries, a.zipfiles, a.datas, strip=None, upx=False, name=dist_dir) - + if platform.system() == 'Darwin': - app = BUNDLE(exe, appname='Spyke Viewer', + app = BUNDLE(exe, name='Spyke Viewer.app', version=find_version(viewer_path)) elif platform.system() == 'Windows': # Bugfix for pythoncom dist_total = os.path.join(viewer_path, 'bin', 'freeze', dist_dir) From aca8a342ab4c6550a0a174fc2339b81b22c6c085 Mon Sep 17 00:00:00 2001 From: Ningfei Li Date: Wed, 21 Aug 2013 12:30:09 +0200 Subject: [PATCH 2/4] fix DBusMenuExporterPrivate::addAction errors when updating "View" menu Recent versions of Ubuntu give DBusMenuExporterPrivate::addAction errors when adding the same action multiple times. --- spykeviewer/ui/main_window.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/spykeviewer/ui/main_window.py b/spykeviewer/ui/main_window.py index 2c88a15..903d609 100644 --- a/spykeviewer/ui/main_window.py +++ b/spykeviewer/ui/main_window.py @@ -265,6 +265,7 @@ def update_view_menu(self): if hasattr(self, 'menuView'): a = self.menuView.menuAction() self.mainMenu.removeAction(a) + self.menuView.clear() self.menuView = self.createPopupMenu() self.menuView.setTitle('&View') self.mainMenu.insertMenu(self.menuHelp.menuAction(), self.menuView) @@ -1547,4 +1548,4 @@ def closeEvent(self, event): self.fileTreeView.setModel(None) del self.file_system_model self.pluginsTreeView.setModel(None) - del self.plugin_model \ No newline at end of file + del self.plugin_model From a90aec46830084391c5de8db0edd68c34a728698 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Pr=C3=B6pper?= Date: Wed, 21 Aug 2013 14:20:02 +0200 Subject: [PATCH 3/4] Only create the view menu once --- spykeviewer/ui/main_window.py | 1 - 1 file changed, 1 deletion(-) diff --git a/spykeviewer/ui/main_window.py b/spykeviewer/ui/main_window.py index 903d609..fa99cb6 100644 --- a/spykeviewer/ui/main_window.py +++ b/spykeviewer/ui/main_window.py @@ -203,7 +203,6 @@ def p(x): # Docks self.setCentralWidget(None) - self.update_view_menu() # Finish initialization if we are not a subclass if type(self) is MainWindow: From 854842b00a0af312cb4d69f3d722439de65e1b91 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Pr=C3=B6pper?= Date: Tue, 3 Sep 2013 14:23:12 +0200 Subject: [PATCH 4/4] Clarify imports plugin vs. console --- doc/source/extending.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/doc/source/extending.rst b/doc/source/extending.rst index 0cffe5e..3b718ce 100644 --- a/doc/source/extending.rst +++ b/doc/source/extending.rst @@ -85,7 +85,9 @@ using ``matplotlib`` for the plot, you first have to import it by adding:: import matplotlib.pyplot as plt -at the top of the plugin file. +at the top of the plugin file. Note that ``matplotlib`` is already imported +in the console, but you have to explicitly import everything you need in +plugins. Next, replace the code in the ``start`` method by::