- Timestamp:
- 2003-11-21T10:57:10+13:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/gui/CreatePane.java
r5892 r5929 46 46 import org.greenstone.gatherer.Dictionary; 47 47 import org.greenstone.gatherer.Gatherer; 48 import org.greenstone.gatherer.cdm.SearchTypeManager; 48 49 import org.greenstone.gatherer.collection.BuildOptions; 49 50 import org.greenstone.gatherer.collection.Collection; … … 246 247 preview_button.setEnabled(false); 247 248 } else { 248 // set up the home page for the current collection249 String extra_args = "";250 String build_type = current_collection.getCollectionType();251 if (build_type.equals("mgpp")) {252 // we need some more args on the url253 String search_types = current_collection.getSearchTypes();254 if (search_types.equals("")) {255 extra_args = "&ct=1&qt=0&qto=3";256 } else if (search_types.equals("plain")) {257 extra_args = "&ct=1&qt=0&qto=1";258 } else if (search_types.equals("form")) {259 extra_args = "&ct=1&qt=1&qto=2";260 } else if (search_types.equals("plain,form")) {261 extra_args = "&ct=1&qt=0&qto=3";262 } else if (search_types.equals("form,plain")) {263 extra_args = "&ct=1&qt=1&qto=3";264 }265 }266 267 homepage = Gatherer.config.exec_address.toString() + "?a=p&p=about&c=" + current_collection.getName()+extra_args;268 249 preview_button.setEnabled(true); 269 250 } 270 251 } 252 271 253 /** This method is called to actually layout the components. 272 254 * @see org.greenstone.gatherer.Configuration … … 426 408 } 427 409 } 410 411 private void configureHomeURL() { 412 413 // set up the home page for the current collection 414 Collection current_collection = Gatherer.c_man.getCollection(); 415 String extra_args = ""; 416 SearchTypeManager st_man = current_collection.cdm.searchtype_manager; 417 if (st_man.isMGPPEnabled()) { 418 // we need some more args on the url 419 String search_types = st_man.getSearchTypes(); 420 if (search_types.equals("")) { 421 extra_args = "&ct=1&qt=0&qto=3"; 422 } else if (search_types.equals("plain")) { 423 extra_args = "&ct=1&qt=0&qto=1"; 424 } else if (search_types.equals("form")) { 425 extra_args = "&ct=1&qt=1&qto=2"; 426 } else if (search_types.equals("plain,form")) { 427 extra_args = "&ct=1&qt=0&qto=3"; 428 } else if (search_types.equals("form,plain")) { 429 extra_args = "&ct=1&qt=1&qto=3"; 430 } 431 } 432 433 homepage = Gatherer.config.exec_address.toString() + "?a=p&p=about&c=" + current_collection.getName()+extra_args; 434 435 } 436 428 437 429 438 /** This class serves as the listener for actions on the build button. */ … … 495 504 496 505 public void actionPerformed(ActionEvent event) { 506 configureHomeURL(); 497 507 Gatherer.self.spawnBrowser(homepage); 498 508
Note:
See TracChangeset
for help on using the changeset viewer.