Ignore:
Timestamp:
2003-10-07T15:35:23+13:00 (21 years ago)
Author:
mdewsnip
Message:

Changed calls to the Dictionary.

Location:
trunk/gli/src/org/greenstone/gatherer/collection
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java

    r5590 r5593  
    229229    try {
    230230        // Create a progress monitor.
    231         ProgressMonitor progress = new ProgressMonitor(Gatherer.g_man, Dictionary.newget("CollectionManager.Creating_New"), "mkcol.pl", 0, 7);
     231        ProgressMonitor progress = new ProgressMonitor(Gatherer.g_man, Dictionary.get("CollectionManager.Creating_New"), "mkcol.pl", 0, 7);
    232232        // Create the new collection.
    233233        makeCollection(description, email, name, title);
     
    241241        gcache_dir.mkdirs();
    242242        if(progress != null) {
    243         progress.setNote(Dictionary.newget("CollectionManager.Gcache_Created"));
     243        progress.setNote(Dictionary.get("CollectionManager.Gcache_Created"));
    244244        }
    245245
     
    249249        log_dir.mkdirs();
    250250        if(progress != null) {
    251         progress.setNote(Dictionary.newget("CollectionManager.Log_Created"));
     251        progress.setNote(Dictionary.get("CollectionManager.Log_Created"));
    252252        }
    253253
     
    401401        String args[] = new String[1];
    402402        args[0] = name;
    403         progress.setNote(Dictionary.newget("CollectionManager.Session_Ready", args));
     403        progress.setNote(Dictionary.get("CollectionManager.Session_Ready", args));
    404404        progress.close();
    405405    }
     
    584584        return collection.getTitle();
    585585    }
    586     return Dictionary.newget("Collection.No_Collection");
     586    return Dictionary.get("Collection.No_Collection");
    587587    }
    588588
     
    616616    // Create and add Greenstone collections node.
    617617    // Starting at the collection directory of gsdl...
    618     FileNode world_root = new FileNode(Dictionary.newget("Tree.World"));
     618    FileNode world_root = new FileNode(Dictionary.get("Tree.World"));
    619619    world_root.unmap();
    620620    workspace_root.insert(world_root);
     
    625625    if(roots != null) {
    626626        FileNode file_root;
    627         String name = Dictionary.newget("Tree.Root");
     627        String name = Dictionary.get("Tree.Root");
    628628        if(roots.length == 1) {
    629629        file_root = new FileNode(roots[0], name);
     
    652652        String[] args = new String[1];
    653653        args[0] = home_folder.getName();
    654         FileNode home_folder_node = new FileNode(home_folder, Dictionary.newget("Tree.Home", args));
     654        FileNode home_folder_node = new FileNode(home_folder, Dictionary.get("Tree.Home", args));
    655655        workspace_root.insert(home_folder_node);
    656656    }
     
    659659    if(Gatherer.config.get("workflow.mirror", false)) {
    660660        // Add Public workspace
    661         FileNode public_root = new FileNode(new File(Utility.CACHE_DIR), Dictionary.newget("Tree.Public"));
     661        FileNode public_root = new FileNode(new File(Utility.CACHE_DIR), Dictionary.get("Tree.Public"));
    662662        workspace_root.insert(public_root);
    663663        // Add Private workspace if a collection has been loaded.
    664664        if(ready()) {
    665         FileNode private_root = new FileNode(new File(getCollectionCache()), Dictionary.newget("Tree.Private"));
     665        FileNode private_root = new FileNode(new File(getCollectionCache()), Dictionary.get("Tree.Private"));
    666666        workspace_root.insert(private_root);
    667667        }
     
    761761        File metadata_directory = new File(collection_directory, Utility.META_DIR);
    762762        if(!metadata_directory.exists()) {
    763             JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CollectionManager.Old_Collection", args2), Dictionary.newget("General.Warning"), JOptionPane.INFORMATION_MESSAGE);
     763            JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Old_Collection", args2), Dictionary.get("General.Warning"), JOptionPane.INFORMATION_MESSAGE);
    764764        }
    765765        // Normal GLI collection
     
    793793                String[] args = new String[1];
    794794                args[0] = name;
    795                 Gatherer.println(Dictionary.newget("CollectionManager.Loading_Successful", args));
     795                Gatherer.println(Dictionary.get("CollectionManager.Loading_Successful", args));
    796796                // Now we need to hook up classes that depend on messages from the metadata set manager to keep their content fresh.
    797797                collection.msm.addMSMListener(this);
     
    806806                // There is obviously no existing collection present.
    807807                Gatherer.printStackTrace(error);
    808                 JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CollectionManager.Cannot_Open", args2), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);
     808                JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Cannot_Open", args2), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);
    809809            }
    810810            }
     
    813813        }
    814814        else {
    815         JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CollectionManager.File_Not_Found", args2), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);
     815        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.File_Not_Found", args2), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);
    816816        }
    817817        collection_directory = null;
    818818    }
    819819    else {
    820         JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CollectionManager.Not_Col_File", args2), Dictionary.newget("General.Error"), JOptionPane.ERROR_MESSAGE);
     820        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Not_Col_File", args2), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);
    821821        Gatherer.println("Not a Gatherer Collection.");
    822822    }
     
    939939        workspace_model = null;
    940940        Gatherer.g_man.collectionChanged(ready());
    941         JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CollectionManager.Preview_Ready"), Dictionary.newget("CollectionManager.Preview_Ready_Title"), JOptionPane.INFORMATION_MESSAGE);
     941        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Preview_Ready"), Dictionary.get("CollectionManager.Preview_Ready_Title"), JOptionPane.INFORMATION_MESSAGE);
    942942    }
    943943    else if(event.getStatus() == GShell.ERROR) {
    944         JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.newget("CollectionManager.Preview_Ready_Failed"), Dictionary.newget("CollectionManager.Preview_Ready_Title"), JOptionPane.ERROR_MESSAGE);
     944        JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CollectionManager.Preview_Ready_Failed"), Dictionary.get("CollectionManager.Preview_Ready_Title"), JOptionPane.ERROR_MESSAGE);
    945945        Gatherer.g_man.collectionChanged(ready());
    946946    }
     
    986986    FileNode greenstone_collections_node = null;
    987987    int root_child_count = root.getChildCount();
    988     String greenstone_collections_str = Dictionary.newget("Tree.World");
     988    String greenstone_collections_str = Dictionary.get("Tree.World");
    989989    for(int i = 0; greenstone_collections_node == null && i < root_child_count; i++) {
    990990        TreeNode child = root.getChildAt(i);
     
    11061106        model.removeNodeFromParent(old);
    11071107                // Create and insert new.
    1108         FileNode private_workspace = new FileNode(new File(getCollectionCache()), Dictionary.newget("Tree.Private"));
     1108        FileNode private_workspace = new FileNode(new File(getCollectionCache()), Dictionary.get("Tree.Private"));
    11091109        model.insertNodeInto(private_workspace, root, 2);
    11101110    }
     
    11441144
    11451145        // Special case for build mode "all": replace index dir with building dir
    1146         if (build_mode == null || build_mode.equals(Dictionary.newget("CreatePane.Mode_All"))) {
     1146        if (build_mode == null || build_mode.equals(Dictionary.get("CreatePane.Mode_All"))) {
    11471147        // Remove the old index directory
    11481148        if (index_dir.exists()) {
  • trunk/gli/src/org/greenstone/gatherer/collection/DeleteCollectionPrompt.java

    r5581 r5593  
    199199    args[0] = collection.getName();
    200200    if (success) {
    201         JOptionPane.showMessageDialog(prompt,Dictionary.newget("DeleteCollectionPrompt.Successful_Delete", args),Dictionary.newget("DeleteCollectionPrompt.Successful_Title"),JOptionPane.INFORMATION_MESSAGE);
     201        JOptionPane.showMessageDialog(prompt,Dictionary.get("DeleteCollectionPrompt.Successful_Delete", args),Dictionary.get("DeleteCollectionPrompt.Successful_Title"),JOptionPane.INFORMATION_MESSAGE);
    202202    }
    203203    else {
    204         JOptionPane.showMessageDialog(prompt,Dictionary.newget("DeleteCollectionPrompt.Failed_Delete", args),Dictionary.newget("DeleteCollectionPrompt.Failed_Title"),JOptionPane.WARNING_MESSAGE);
     204        JOptionPane.showMessageDialog(prompt,Dictionary.get("DeleteCollectionPrompt.Failed_Delete", args),Dictionary.get("DeleteCollectionPrompt.Failed_Title"),JOptionPane.WARNING_MESSAGE);
    205205    }
    206206    }
  • trunk/gli/src/org/greenstone/gatherer/collection/Job.java

    r5581 r5593  
    220220        int count = 0;
    221221        while(count < 3 && (user_pass = (String) Gatherer.authentications.get(address)) == null) {
    222         Authenticator.requestPasswordAuthentication(proxy_host, null, Integer.parseInt(proxy_port), "http://", Dictionary.newget("WGet.Prompt"), "HTTP");
     222        Authenticator.requestPasswordAuthentication(proxy_host, null, Integer.parseInt(proxy_port), "http://", Dictionary.get("WGet.Prompt"), "HTTP");
    223223        count++;
    224224        }
  • trunk/gli/src/org/greenstone/gatherer/collection/SaveCollectionTask.java

    r5564 r5593  
    110110    // Create progress monitor box. It will display itself as necessary.
    111111    // WARNING: ProgressMonitors seem to be extremely dodgy, and are not recommended!
    112     // ProgressMonitor spd = new ProgressMonitor(Gatherer.g_man, Dictionary.newget("SaveProgressDialog.Title", collection.getName()), null, 0, 100);
     112    // ProgressMonitor spd = new ProgressMonitor(Gatherer.g_man, Dictionary.get("SaveProgressDialog.Title", collection.getName()), null, 0, 100);
    113113    // spd.setMillisToDecideToPopup(100);
    114114    // spd.setMillisToPopup(100);
Note: See TracChangeset for help on using the changeset viewer.