Show
Ignore:
Timestamp:
21/05/10 19:44:17 (2 years ago)
Author:
westram
Message:
  • AW_root
    • ctor initializes AWAR subsystem
    • made more clear that AW_root is a singleton
    • call dtor atexit; unlink AWARs from prop-DB and free memory (AW_window instances and releated mem still remain)
    • close properties DB
    • renamed some functions
  • AW_awar
    • added dtor
  • added AWT_create_root (necessary to add properties DB to DB-browser)
  • removed AWT_open_properties (done inside AW_root-ctor now)
  • EDIT properties
    • detect existing properties before constructing AW_root
  • removed AW_config_struct
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/EDIT4/ED4_main.cxx

    r6513 r6666  
    482482} 
    483483 
    484  
    485 static void openProperties() { 
    486     for (int mode = 0; mode <= 2; ++mode) { // search for defaults-database 
    487         const char *name  = ED4_propertyName(mode); 
    488         AW_default  found = ED4_ROOT->aw_root->open_default(name, mode == 2); // if mode == 2 -> create if missing 
    489  
    490         if (found) { 
    491             ED4_ROOT->props_db = found; 
    492             ED4_ROOT->db_name  = strdup(name); 
    493             break; 
    494         } 
    495     } 
    496  
    497     GB_informationf("Using properties from '%s'", ED4_ROOT->db_name); 
    498 #if defined(DEBUG) 
    499     AWT_announce_properties_to_browser(ED4_ROOT->props_db, ED4_ROOT->db_name); 
    500 #endif // DEBUG 
    501     ED4_ROOT->aw_root->init_variables(ED4_ROOT->props_db); // pass defaults 
    502 } 
    503  
    504484int main(int argc, char **argv) 
    505485{ 
     
    542522    } 
    543523 
     524    aw_initstatus(); 
     525 
    544526    GLOBAL_gb_main = GB_open(data_path, "rwt"); 
    545527    if (!GLOBAL_gb_main) 
     
    552534    AWT_announce_db_to_browser(GLOBAL_gb_main, GBS_global_string("ARB database (%s)", data_path)); 
    553535#endif // DEBUG 
     536 
    554537    ED4_ROOT = new ED4_root; 
    555  
    556     openProperties(); // open properties database 
    557  
    558     ED4_ROOT->aw_root->init_root("ARB_EDIT4", false); // initialize window-system 
    559538 
    560539    ED4_ROOT->database = new EDB_root_bact; 
     
    563542 
    564543    ED4_ROOT->st_ml = STAT_create_ST_ML(GLOBAL_gb_main); 
    565     ED4_ROOT->sequence_colors = new AWT_seq_colors((GBDATA *)ED4_ROOT->aw_root->application_database, (int)ED4_G_SEQUENCES, ED4_refresh_window, 0, 0); 
     544    ED4_ROOT->sequence_colors = new AWT_seq_colors(AW_ROOT_DEFAULT, ED4_G_SEQUENCES, ED4_refresh_window, 0, 0); 
    566545 
    567546    ED4_ROOT->edk = new ed_key;