Changeset 4292
- Timestamp:
- 2003-05-21T14:00:33+12:00 (21 years ago)
- Location:
- trunk/gsdl/src/w32server
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/src/w32server/fnord.cpp
r4289 r4292 142 142 void finish_up() { 143 143 // remember the current preferences 144 write_settings( );144 write_settings(""); 145 145 146 146 // Shutdown the HTTP server … … 320 320 if (have_networking) { 321 321 text_t url = "http://" + text_t(localname); 322 323 gsdl_url = url; 324 write_settings(gsdl_url); 325 322 326 if (gsdl_port_num != 80) 323 327 url += ":" + text_t(gsdl_port_num); 324 328 325 329 url += gsdl_enterlib; 326 330 … … 367 371 "Failed to start your chosen browser. It seems that your\n" 368 372 "chosen browser has been removed or corrupted.\n" 369 "Please check you browser choice by going to the\n"373 "Please check your browser choice by going to the\n" 370 374 "'Settings...' item under the 'File' menu.", 371 375 "Greenstone Digital Library Software", MB_OK); -
trunk/gsdl/src/w32server/settings.cpp
r2577 r4292 62 62 int gsdl_browser = GS_IEXPLORE; 63 63 char gsdl_browser_exe[MAX_FILENAME_SIZE] = ""; 64 64 text_t gsdl_url; 65 65 66 66 // private data … … 267 267 } 268 268 269 void write_settings ( ) {269 void write_settings (const text_t url) { 270 270 char conffile[MAX_FILENAME_SIZE]; 271 271 … … 281 281 // top (gsdl) level stuff 282 282 fout << "[gsdl]\n"; 283 284 if (!url.empty()) { 285 // url entry should only be written to gsdlsite.cfg when the 286 // server is actually running, not when it's stopped (since we 287 // can't be sure what the url is at that stage). That is, 288 // write_settings() is called with the url argument set when the 289 // server first starts up, it's then called without url set as 290 // the server shuts down. 291 write_ini_line(fout, "url", url); 292 } 293 283 294 write_ini_line(fout, "enterlib", gsdl_enterlib); 284 295 write_ini_line(fout, "gsdlhome", gsdl_gsdlhome); … … 814 825 // save the settings if we exited via the ok button 815 826 if (res == 1) { 816 write_settings( );827 write_settings(gsdl_url); 817 828 // reset httpprefix in case port number was changed 818 829 // configure_httpprefix (); -
trunk/gsdl/src/w32server/settings.h
r2286 r4292 57 57 extern int gsdl_browser; 58 58 extern char gsdl_browser_exe[MAX_FILENAME_SIZE]; 59 extern text_t gsdl_url; 59 60 60 61 void Settings_Dialog(HWND window, int netscapeneeded); 61 62 62 63 void read_settings (int netscapeneeded); 63 void write_settings ( );64 void write_settings (const text_t url); 64 65 65 66 void gsdl_check_browser_settings (int netscapeneeded);
Note:
See TracChangeset
for help on using the changeset viewer.