- Timestamp:
- 2009-06-18T15:09:49+12:00 (15 years ago)
- Location:
- gli/trunk/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gli/trunk/src/org/greenstone/gatherer/Gatherer.java
r19758 r19862 371 371 // It is not necessary if an independent GSI was launched and the user hasn't pressed Enter Library yet 372 372 DebugStream.println("Configuration.library_url = " + Configuration.library_url); 373 if (Configuration.library_url == null && (isLocalLibrary && !LocalLibraryServer.isURLPending())) { 374 missingEXEC(); 373 if (Configuration.library_url == null) { 374 if(isLocalLibrary) { 375 if(!LocalLibraryServer.isURLPending()) { 376 missingEXEC(); 377 } 378 // else LocalLibraryServer is expecting a URL soon, so don't need to display the dialog 379 } else { // GS2 webLibrary or GS3 or remote Greenstone 380 missingEXEC(); 381 } 375 382 } 376 383 … … 772 779 static public void configGS3Server(String site, String command) { 773 780 if (Configuration.library_url == null){ 774 System.out.println("Error: you have not provide the Greenstone Library address.");781 System.out.println("Error: you have not provided the Greenstone Library address."); 775 782 return; 776 783 … … 863 870 /** Prints a warning message about a missing library path, which means the final collection cannot be previewed in the Gatherer. 864 871 */ 865 static p rivatevoid missingEXEC() {872 static public void missingEXEC() { 866 873 WarningDialog dialog; 867 874 String configPropertyName = "general.library_url"+Configuration.gliPropertyNameSuffix(); … … 888 895 props.load(new FileInputStream(buildPropsFile)); 889 896 host = props.getProperty("tomcat.server", host); 890 port = props.getProperty("tomcat.port", port); 897 port = props.getProperty("tomcat.port", port); 891 898 }catch(Exception e){ 892 899 DebugStream.println("Could not load build.properties file"); … … 895 902 props = null; 896 903 } 897 String defaultURL = "http://"+host+":"+port+"/"+"greenstone3 /library";904 String defaultURL = "http://"+host+":"+port+"/"+"greenstone3"; 898 905 field.setText(defaultURL); 899 906 field.selectAll(); -
gli/trunk/src/org/greenstone/gatherer/gui/PreviewButton.java
r19758 r19862 82 82 // set up the home page for the current collection 83 83 if (Gatherer.GS3 && !Configuration.fedora_info.isActive()) { // GLI for GS3 case 84 // don't do anything fancy here 85 preview_address = Configuration.library_url.toString() + Configuration.getServletPath() 86 + "?a=p&sa=about&c=" + collGroupWithName + "&l=" + Configuration.getLanguage(); 84 if(Configuration.library_url == null) { 85 Gatherer.missingEXEC(); 86 } else { 87 // don't do anything fancy here 88 preview_address = Configuration.library_url.toString() + Configuration.getServletPath() 89 + "?a=p&sa=about&c=" + collGroupWithName + "&l=" + Configuration.getLanguage(); 90 } 87 91 return; 88 92 }
Note:
See TracChangeset
for help on using the changeset viewer.