Changeset 164


Ignore:
Timestamp:
27/09/08 16:08:34 (6 years ago)
Author:
guyru
Message:

remove dependency on SettingsDB

Location:
trunk/src
Files:
2 deleted
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MainFrame.cpp

    r163 r164  
    9191        m_config = new configuration::Configuration(config_file); 
    9292 
    93         m_settingsdb = new SettingsDB(); //Get the settings database connection 
    9493        m_highscoredb = new HighScoreTableDB(); 
    9594 
     
    10901089 
    10911090 
     1091///TODO: delete this function 
    10921092/** 
    10931093 * Initializes the database and stores default settings if needed. 
     
    10961096int MainFrame::InitializeDatabase() 
    10971097{ 
    1098         std::ostringstream sstr; 
    1099  
    1100  
    1101         if (m_settingsdb->GetKey("highscoresize") == "") { //check if we need to create a new high score table 
    1102                 m_highscoredb->SetSize(DEF_HIGHSCORESIZE); 
    1103                 sstr<<DEF_HIGHSCORESIZE<<std::flush; 
    1104                 m_settingsdb->SetKey("highscoresize", sstr.str()); 
    1105         } else { 
    1106                 int highscoresize = atoi((m_settingsdb->GetKey("highscoresize")).c_str()); 
    1107                 //m_highscoredb->SetSize((highscoresize>0)?highscoresize:DEF_HIGHSCORESIZE); 
    1108                 m_highscoredb->SetSize(highscoresize); 
    1109         } 
    1110          
     1098 
     1099        int highscoresize = atoi((m_config->get("highscore-list-size")).c_str()); 
     1100        m_highscoredb->SetSize(highscoresize); 
    11111101 
    11121102        return 1; 
     
    13571347        // free pointers 
    13581348        delete m_config; 
    1359         delete m_settingsdb; 
    13601349        delete m_highscoredb; 
    13611350        delete m_evt_handler; 
  • trunk/src/MainFrame.h

    r163 r164  
    2525*/ 
    2626 
    27 #include "SettingsDB.h" 
    2827#include "HighScoreTableDB.h" 
    2928#include "ScoreDice.h" 
     
    110109        short int m_rollsundo; //holds the number of remaining rolls for use with the undo option 
    111110 
    112         SettingsDB *m_settingsdb; //handles the settings database 
    113111        HighScoreTableDB *m_highscoredb; //handles the highscore database managment 
    114112         
  • trunk/src/Makefile.am

    r163 r164  
    1313        icon32.xpm \ 
    1414        openyahtzee.cpp \ 
    15         SettingsDB.cpp \ 
    1615        settings_dialog.cpp \ 
    1716        settings_dialog.h \ 
     
    5655        MainFrame.h \ 
    5756        ObjectsID.h \ 
    58         SettingsDB.h \ 
    5957        ScoreDice.h \ 
    6058        UtilityFunctions.h \ 
Note: See TracChangeset for help on using the changeset viewer.