Orange Forum • View topic - OSX 2 nits: delete in canvas view. Topbar says "Python"

OSX 2 nits: delete in canvas view. Topbar says "Python"

Report bugs (or imagined bugs).
(Archived/read-only, please use our ticketing system for reporting bugs and their discussion.)
Forum rules
Archived/read-only, please use our ticketing system for reporting bugs and their discussion.

OSX 2 nits: delete in canvas view. Topbar says "Python"

Postby gregglind » Fri Feb 18, 2011 22:20

Orange 2.0b, OSX 10.6.5

1. when deleting widgets on the canvas view, the 'delete' button doesn't work, but the fn+delete button does. I.e., |x> on OSX is 'fn + del'. This is a bit unpolished. Maybe both should work?

2. The top bar, where 'file, options' etc. live... the first label is 'Python' rather than 'Orange'.

http://stackoverflow.com/questions/2932 ... ion-bundle

I tried:

Gregg-Linds-MacBook-Pro:Contents gregg$ svn diIndex: MacOS/Orange
===================================================================
--- MacOS/Orange (revision 10265)
+++ MacOS/Orange (working copy)
@@ -6,7 +6,8 @@

CANVAS_FILE="$FRAMEWORKS_DIR"Python.framework/Versions/2.5/lib/python2.5/site-packages/orange/OrangeCanvas/orngCanvas.pyw

-PYTHONEXECUTABLE="$FRAMEWORKS_DIR"Python.framework/Resources/Python.app/Contents/MacOS/Python
+ln -s "$FRAMEWORKS_DIR"Python.framework/Resources/Python.app/Contents/MacOS/{Python,Goofy}
+PYTHONEXECUTABLE="$FRAMEWORKS_DIR"Python.framework/Resources/Python.app/Contents/MacOS/Goofy
PYTHONHOME="$FRAMEWORKS_DIR"Python.framework/Versions/2.5/

DYLD_FRAMEWORK_PATH="$FRAMEWORKS_DIR"${DYLD_FRAMEWORK_PATH:+:$DYLD_FRAMEWORK_PATH}

But I don't know about mac python and app deployment to fix it.

Re: OSX 2 nits: delete in canvas view. Topbar says "Python

Postby gregglind » Fri Feb 18, 2011 23:51

Backspace patch (with unknown effects on windows)

diff --git a/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/OrangeCanvas/orngCanvas.
index 58da9b2..54523ec 100644
--- a/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/OrangeCanvas/orngCanvas.pyw
+++ b/Contents/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/orange/OrangeCanvas/orngCanvas.pyw
@@ -345,7 +345,7 @@ class OrangeCanvasDlg(QMainWindow):
self.widgetPopup.addSeparator()
self.renameActiveWidgetAction = rename = self.widgetPopup.addAction("&Rename", self.schema.canvasView.renameActiv
self.removeActiveWidgetAction = delete = self.widgetPopup.addAction("Remove", self.schema.canvasView.removeActive
- delete.setShortcuts([Qt.Key_Delete, Qt.CTRL + Qt.Key_Backspace, Qt.CTRL + Qt.Key_Delete])
+ delete.setShortcuts([Qt.Key_Delete, Qt.CTRL + Qt.Key_Backspace, Qt.Key_Backspace, Qt.CTRL + Qt.Key_Delete])
self.widgetPopup.addSeparator()
self.helpActiveWidgetAction = self.widgetPopup.addAction("Help", self.schema.canvasView.helpOnActiveWidget, Qt.Ke
self.widgetPopup.setEnabled(0)

Re: OSX 2 nits: delete in canvas view. Topbar says "Python

Postby gregglind » Sat Feb 19, 2011 12:03

I have been trying to work the 'topbar' issue http://stackoverflow.com/questions/5047 ... rom-python , but without much success. OSX packaging is gnarly :)

Re: OSX 2 nits: delete in canvas view. Topbar says "Python

Postby gregglind » Sun Feb 20, 2011 6:44

Here is a patch for the 'topbar says Python' bug:

diff --git a/Contents/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/Info.plist b/Contents/Framewo
index 4b1194a..fe9d035 100644
--- a/Contents/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/Info.plist
+++ b/Contents/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/Info.plist
@@ -39,7 +39,7 @@
<key>CFBundleLongVersionString</key>
<string>2.6.5, (c) 2004-2009 Python Software Foundation.</string>
<key>CFBundleName</key>
- <string>Python</string>
+ <string>Orange</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>

Re: OSX 2 nits: delete in canvas view. Topbar says "Python

Postby Ales » Mon Feb 21, 2011 10:58

Thanks.
I will include the menu fix, as soon as the build process is once again running (it is currently down due to migration).

However the standard 'delete' shortcut on mac should be cmd + backspace. I don't think we should change this.

Re: OSX 2 nits: delete in canvas view. Topbar says "Python

Postby gregglind » Tue Feb 22, 2011 16:53

I urge you to reconsider the position the delete fix. It doesn't *replace* the mac fn+delete, but augments it. I find it very strange that in the canvas view, the delete key (unmodified) does nothing, with no indication of why it is failing to remove the widget. This seems like incomplete HCI design to me. Adding the additional shortcut breaks nothing, while making a common intuitive behaviour work correctly.

In NeoOffice, by contrast, the delete key clears cells as one would expect.

Re: OSX 2 nits: delete in canvas view. Topbar says "Python

Postby gregglind » Tue Feb 22, 2011 19:16

In rereading your comment re: delete, the 'shortcut' as displayed in the right-click menu icon for the 'Remove' action is still the standard |x> symbol. I did some hallway testing this morning with another macbook user as well, and they were surprised when the delete key didn't delete widgets.

Re: OSX 2 nits: delete in canvas view. Topbar says "Python

Postby Ales » Wed Feb 23, 2011 11:17

How about changing the order of shortcuts so cmd+delete is the shortcut displayed in the context menu(i.e. 'cmd+<x|' instead of '|x>'). This would then be the same as in Finder.

Re: OSX 2 nits: delete in canvas view. Topbar says "Python

Postby gregglind » Wed Feb 23, 2011 17:06

Sure, that is totally great! And if it makes sense to make it Mac only, easy enough to do that. Whichever order makes sense! Thanks for reconsidering!


Return to Bugs