Changeset 2251


Ignore:
Timestamp:
02/09/07 09:53:08 (13 years ago)
Author:
melissa
Message:

Don't display OME password in the status bar. Changed login dialog to display
the canonical server name instead of the full name.

Location:
trunk/loci/plugins
Files:
2 edited

Legend:

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

    r2183 r2251  
    180180    // -- Step 2: identify file -- 
    181181 
    182     IJ.showStatus("Identifying " + fileName); 
     182    if (!LOCATION_OME.equals(location)) { 
     183      IJ.showStatus("Identifying " + fileName); 
     184    } 
    183185 
    184186    // determine whether we can handle this file 
  • trunk/loci/plugins/OMEPlugin.java

    r2230 r2251  
    9898  private void getInput() { 
    9999    GenericDialog gd = new GenericDialog("OME Login"); 
    100     gd.addStringField("Server:   ", Prefs.get("downloader.server", ""), 30); 
     100     
     101    String s = Prefs.get("downloader.server", ""); 
     102    if (s.startsWith("http:")) s = s.substring(5); 
     103    while (s.startsWith("/")) s = s.substring(1); 
     104    int slash = s.indexOf("/"); 
     105    if (slash >= 0) s = s.substring(0, slash); 
     106    int colon = s.indexOf(":"); 
     107    if (colon >= 0) s = s.substring(0, colon); 
     108     
     109    gd.addStringField("Server:   ", s, 30); 
    101110    gd.addStringField("Username: ", Prefs.get("downloader.user", ""), 30); 
    102111    gd.addStringField("Password: ", "", 30); 
     
    120129    } 
    121130    while (server.startsWith("/")) server = server.substring(1); 
    122     int slash = server.indexOf("/"); 
     131    slash = server.indexOf("/"); 
    123132    if (slash >= 0) server = server.substring(0, slash); 
    124     int colon = server.indexOf(":"); 
     133    colon = server.indexOf(":"); 
    125134    if (colon >= 0) server = server.substring(0, colon); 
     135 
     136    Prefs.set("downloader.server", server); 
    126137 
    127138    server = "http://" + server + "/shoola/"; 
     
    130141    password = gd.getNextString(); 
    131142 
    132     Prefs.set("downloader.server", server); 
    133143    Prefs.set("downloader.user", username); 
    134144  } 
     
    297307      //do the image search 
    298308      IJ.showStatus("Searching for images..."); 
    299        
     309      
    300310      String project = gd.getNextChoice(); 
    301311      String owner = gd.getNextChoice(); 
    302312      String img = gd.getNextString(); 
    303313      String imageName = gd.getNextString(); 
    304        
     314      
    305315      while (images.length == 0) { 
    306316        //get search results 
Note: See TracChangeset for help on using the changeset viewer.