Changeset 380
- Timestamp:
- 10/05/11 09:35:09 (8 months ago)
- Files:
-
- trunk/Lib/robofab/interface/all/dialogs.py (modified) (2 diffs)
- trunk/Lib/robofab/interface/all/dialogs_fontlab_legacy2.py (modified) (3 diffs)
- trunk/Lib/robofab/interface/all/dialogs_legacy.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/Lib/robofab/interface/all/dialogs.py
r378 r380 115 115 # because FontLab 5.01 and earlier on 2.3.5 can run EasyDialogs 116 116 # | | | | 117 ('mac', 'fontlab', (2,5,4), "dialogs_fontlab_legacy1"), 117 #('mac', 'fontlab', (2,5,4), "dialogs_fontlab_legacy1"), 118 ('mac', 'fontlab', (2,5,4), "dialogs_fontlab_legacy2"), 118 119 # because FontLab 5.1 on mac 10.6 should theoretically be able to run cocoa dialogs, 119 120 # but they are very unreliable. So until we know what's going on, FL5.1 on 10.6 120 121 # is going to have to live with DialogKit dialogs. 121 122 # | | | | 122 #('mac', 'fontlab', (2,5,5), "dialogs_fontlab_legacy2"), 123 ('mac', 'fontlab', None, "dialogs_fontlab_legacy2"), 123 ('mac', 'fontlab', None, "dialogs_fontlab_legacy2"), 124 124 # because FontLab 5.1 on mac, 10.7+ should run cocoa / vanilla 125 125 # | | | | … … 127 127 # perhaps nonelab scripts can run vanilla as well? 128 128 # | | | | 129 ('mac', 'robofont', None, "dialogs_mac_vanilla"), 130 # because robofont can run vanilla 131 # | | | | 132 ('mac', 'glyphs', None, "dialogs_mac_vanilla"), 133 # because glyphs can run vanilla 134 # | | | | 135 ('linux', 'fontforge', None, None), 136 # no idea what fontforge runs. 129 ('win', None, None, "dialogs_legacy"), 130 # older windows stuff might be able to use the legacy dialogs 137 131 ] 138 132 trunk/Lib/robofab/interface/all/dialogs_fontlab_legacy2.py
r375 r380 17 17 from Foundation import NSObject 18 18 from AppKit import * 19 20 # is this the magic that will make this work in FL 5.1 21 # however, what are the side effects? 22 NSApplication.sharedApplication() 23 19 24 20 25 … … 60 65 alert.addButtonWithTitle_(buttonTitle) 61 66 self._value = None 62 print "alert", alert63 67 code = alert.runModal() 64 print "are we waiting?", code65 68 self._translateValue(code) 66 69 return self 67 70 68 71 def _translateValue(self, code): 69 print "_translateValue", self._buttonTitlesValues, code70 print "NSAlertFirstButtonReturn", NSAlertFirstButtonReturn71 print "NSAlertSecondButtonReturn", NSAlertSecondButtonReturn72 print "NSAlertThirdButtonReturn", NSAlertThirdButtonReturn73 72 if code == NSAlertFirstButtonReturn: 74 73 value = 1 … … 80 79 value = code - NSAlertThirdButtonReturn + 3 81 80 self._value = self._buttonTitlesValues[value-1][1] 82 83 #def alertDidEnd_returnCode_contextInfo_(self, alert, code, context):84 # alert.window().close()85 # self._translateValue(code)86 # if self._resultCallback is not None:87 # self._resultCallback(self._value)88 89 #alertDidEnd_returnCode_contextInfo_ = selector(alertDidEnd_returnCode_contextInfo_, signature="v@:@i@")90 81 91 82 def windowWillClose_(self, notification): trunk/Lib/robofab/interface/all/dialogs_legacy.py
r377 r380 2 2 """ 3 3 4 Dialogs. Not just for FontLab any more.4 Dialogs. 5 5 Cross-platform and cross-application compatible. Some of them anyway. 6 6 (Not all dialogs work on PCs outside of FontLab. Some dialogs are for FontLab only. Sorry.)
