Changeset 380

Show
Ignore:
Timestamp:
10/05/11 09:35:09 (8 months ago)
Author:
erik
Message:

Patched platformApplicationSupport table. FL5.1 is back to legacy2. For the FL5.1 legacy2 dialogs, call NSApplication.sharedApplication() first.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Lib/robofab/interface/all/dialogs.py

    r378 r380  
    115115    # because FontLab 5.01 and earlier on 2.3.5 can run EasyDialogs 
    116116    # |         |               |           | 
    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"), 
    118119    # because FontLab 5.1 on mac 10.6 should theoretically be able to run cocoa dialogs, 
    119120    # but they are very unreliable. So until we know what's going on, FL5.1 on 10.6 
    120121    # is going to have to live with DialogKit dialogs.  
    121122    # |         |               |           | 
    122     #('mac',     'fontlab',      (2,5,5),    "dialogs_fontlab_legacy2"), 
    123     ('mac',     'fontlab',      None,    "dialogs_fontlab_legacy2"), 
     123    ('mac',     'fontlab',      None,       "dialogs_fontlab_legacy2"), 
    124124    # because FontLab 5.1 on mac, 10.7+ should run cocoa / vanilla 
    125125    # |         |               |           | 
     
    127127    # perhaps nonelab scripts can run vanilla as well? 
    128128    # |         |               |           | 
    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 
    137131] 
    138132 
  • trunk/Lib/robofab/interface/all/dialogs_fontlab_legacy2.py

    r375 r380  
    1717from Foundation import NSObject 
    1818from AppKit import * 
     19 
     20# is this the magic that will make this work in FL 5.1 
     21# however, what are the side effects? 
     22NSApplication.sharedApplication() 
     23 
    1924 
    2025 
     
    6065            alert.addButtonWithTitle_(buttonTitle) 
    6166        self._value = None 
    62         print "alert", alert 
    6367        code = alert.runModal() 
    64         print "are we waiting?", code 
    6568        self._translateValue(code) 
    6669        return self 
    6770 
    6871    def _translateValue(self, code): 
    69         print "_translateValue", self._buttonTitlesValues, code 
    70         print "NSAlertFirstButtonReturn", NSAlertFirstButtonReturn 
    71         print "NSAlertSecondButtonReturn", NSAlertSecondButtonReturn 
    72         print "NSAlertThirdButtonReturn", NSAlertThirdButtonReturn 
    7372        if code == NSAlertFirstButtonReturn: 
    7473            value = 1 
     
    8079            value = code - NSAlertThirdButtonReturn + 3 
    8180        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@") 
    9081 
    9182    def windowWillClose_(self, notification): 
  • trunk/Lib/robofab/interface/all/dialogs_legacy.py

    r377 r380  
    22""" 
    33 
    4 Dialogs. Not just for FontLab any more. 
     4Dialogs. 
    55Cross-platform and cross-application compatible. Some of them anyway. 
    66(Not all dialogs work on PCs outside of FontLab. Some dialogs are for FontLab only. Sorry.)