Changeset 6088


Ignore:
Timestamp:
2003-12-02T17:19:20+13:00 (20 years ago)
Author:
jmt12
Message:

Fixed slight problem with the home page icon in that it doesn't know what _httpcollection_ is

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java

    r6051 r6088  
    245245        // Connection
    246246        beta_checkbox.addActionListener(CollectionDesignManager.change_listener);
    247         ActionListener browse_listener = new BrowseListener();
    248         browse_about_icon_button.addActionListener(browse_listener);
    249         browse_home_icon_button.addActionListener(browse_listener);
    250         browse_listener = null;
     247        browse_about_icon_button.addActionListener(new BrowseListener(StaticStrings.IMAGES_PATH_RELATIVE_TO_COLLECTION_PREFIX));
     248        browse_home_icon_button.addActionListener(new BrowseListener(StaticStrings.IMAGES_PATH_RELATIVE_TO_GSDL_PREFIX));
    251249        public_checkbox.addActionListener(CollectionDesignManager.change_listener);
    252250        creator_emailfield.getDocument().addDocumentListener(CollectionDesignManager.change_listener);
     
    362360        implements ActionListener {
    363361
     362        private String prefix;
     363
     364        public BrowseListener(String prefix) {
     365        this.prefix = prefix;
     366        }
     367
    364368        public void actionPerformed(ActionEvent event) {
    365369        // Open an almost standard file browser to the images folder of the current collection
     
    381385            File file = file_chooser.getSelectedFile();
    382386            if(!file.getParentFile().equals(images_folder)) {
    383             if(JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary.get("CDM.General.Copy_Image"), Dictionary.get("General.Warning"), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
     387            if(true) { //JOptionPane.showConfirmDialog(Gatherer.g_man, Dictionary.get("CDM.General.Copy_Image"), Dictionary.get("General.Warning"), JOptionPane.YES_NO_OPTION) == JOptionPane.YES_OPTION) {
    384388                // Copy the file
    385389                try {
     
    400404            }
    401405            // Create the path starting _httpcollection_/images/<filename>
    402             String path = StaticStrings.IMAGES_PATH_PREFIX + file.getName();
     406            String path = prefix + file.getName();
    403407            if(event.getSource() == browse_about_icon_button) {
    404408            icon_textfield.setText(path);
Note: See TracChangeset for help on using the changeset viewer.