Ignore:
Timestamp:
2010-09-01T16:20:27+12:00 (14 years ago)
Author:
ak19
Message:

For ticket 152 (moveable collectdir): busy cursor when changing a collectdir takes some time to finish.

Location:
main/trunk/gli/src/org/greenstone/gatherer/gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/gui/NewCollectionDetailsPrompt.java

    r22605 r22831  
    541541            }
    542542        }
    543         }
    544 
    545         // going through with collection creation
    546         if(collectDirChanged) {     
    547         Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), newCollectPath);
    548         // will tell the server that the collect directory has changed and that
    549         // the workspace needs to be refreshed (Documents in Greenstone Collections)
    550         }
    551 
     543        }       
    552544        description_final = description.getText();
    553545
     
    557549       
    558550        cancelled = false;
     551       
     552        self.dispose();
    559553       
    560         self.dispose();
     554        // going through with collection creation
     555        if(collectDirChanged) {     
     556        Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(),
     557                newCollectPath, Gatherer.g_man.getContentPane());
     558        // will tell the server that the collect directory has changed and that
     559        // the workspace needs to be refreshed (Documents in Greenstone Collections)
     560        }
    561561    }
    562562    }
  • main/trunk/gli/src/org/greenstone/gatherer/gui/OpenCollectionDialog.java

    r22605 r22831  
    424424        }
    425425
    426         Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), newCollectPath);
     426        Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(),
     427                newCollectPath, Gatherer.g_man.getContentPane());
    427428            // will tell the server that the collect directory has changed and that
    428         // the workspace needs to be refreshed (Documents in Greenstone Collections)
     429            // the workspace needs to be refreshed (Documents in Greenstone Collections)
    429430    }
    430431    }
  • main/trunk/gli/src/org/greenstone/gatherer/gui/Preferences.java

    r22605 r22831  
    863863        Configuration.setSiteAndServlet(new_site, (String)servlet_combobox.getSelectedItem());
    864864        }
    865 
    866         // collect directory change
    867         String newCollectPath = collect_dir_field.getText();
    868         if(!newCollectPath.endsWith(File.separator)) {
    869         newCollectPath += File.separator;
    870         }
    871         Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(), newCollectPath);
    872         // will tell the server that the collect directory has changed and that
    873         // the workspace needs to be refreshed (Documents in Greenstone Collections)
    874 
    875        
     865       
    876866        Configuration.set("general.use_proxy", true, use_proxy_checkbox.isSelected());
    877867        Configuration.setString("general.proxy_host", true, proxy_host_field.getText());
     
    984974        }
    985975
     976        // collect directory change
     977        String newCollectPath = collect_dir_field.getText();
     978        if(!newCollectPath.endsWith(File.separator)) {
     979        newCollectPath += File.separator;
     980        }
     981        // wait cursor will display while changing the collect directory, need to work out what component to
     982        // display it on: main GLI frame or Preferences window, depending on if OK or Apply was pressed
     983        Container container = close ? Gatherer.g_man.getContentPane() : Preferences.this.getContentPane();
     984        Gatherer.collectDirectoryHasChanged(Gatherer.getCollectDirectoryPath(),
     985                newCollectPath, container);
     986            // will tell the server that the collect directory has changed and that
     987            // the workspace needs to be refreshed (Documents in Greenstone Collections)       
     988       
    986989        if (restart_required) {
    987990          if (keep_collection_open) {
Note: See TracChangeset for help on using the changeset viewer.