Changeset 3344


Ignore:
Timestamp:
11/07/07 13:30:22 (12 years ago)
Author:
curtis
Message:

Add one-time dialog for Mac users warning about OLE2 column view crash bug.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/loci/plugins/ImporterOptions.java

    r3337 r3344  
    9090 
    9191  // keys for use in IJ_Prefs.txt 
     92  public static final String PREF_FIRST = "bioformats.firstTime"; 
    9293  public static final String PREF_STACK = "bioformats.stackFormat"; 
    9394  public static final String PREF_ORDER = "bioformats.stackOrder"; 
     
    147148  // -- Fields - core options -- 
    148149 
     150  private boolean firstTime; 
    149151  private String stackFormat; 
    150152  private String stackOrder; 
     
    173175  // -- ImporterOptions API methods - accessors -- 
    174176 
     177  public boolean isFirstTime() { return firstTime; } 
    175178  public String getStackFormat() { return stackFormat; } 
    176179  public String getStackOrder() { return stackOrder; } 
     
    226229  /** Loads default option values from IJ_Prefs.txt. */ 
    227230  public void loadPreferences() { 
     231    firstTime = Prefs.get(PREF_FIRST, true); 
    228232    stackFormat = Prefs.get(PREF_STACK, VIEW_STANDARD); 
    229233    stackOrder = Prefs.get(PREF_ORDER, ORDER_DEFAULT); 
     
    245249  /** Saves option values to IJ_Prefs.txt as the new defaults. */ 
    246250  public void savePreferences() { 
     251    Prefs.set(PREF_FIRST, false); 
    247252    Prefs.set(PREF_STACK, stackFormat); 
    248253    Prefs.set(PREF_ORDER, stackOrder); 
     
    350355   */ 
    351356  public int promptIdLocal() { 
     357    if (firstTime && IJ.isMacOSX()) { 
     358      // present user with one-time dialog box 
     359      IJ.showMessage("Bio-Formats", 
     360        "Please note: There is a bug in Java on Mac OS X with the\n" + 
     361        "native file chooser that crashes ImageJ if you click on a file\n" + 
     362        "in cxd, ipw, oib or zvi format while in column view mode.\n" + 
     363        "You can work around the problem by switching to list view\n" + 
     364        "(press Command+2) or by checking the \"Use JFileChooser\n" + 
     365        "to Open/Save\" option in the Edit>Options>Input/Output...\n" + 
     366        "dialog. This message will not appear again."); 
     367    } 
    352368    if (id == null) { 
    353369      // prompt user for the filename (or grab from macro options) 
Note: See TracChangeset for help on using the changeset viewer.