Changeset 76
- Timestamp:
- 28/04/07 16:33:02 (6 years ago)
- Location:
- trunk/OpenYahtzee
- Files:
-
- 4 edited
-
macros/autogen.sh (modified) (1 diff)
-
src/About.cpp (modified) (1 diff)
-
src/MainFrame.cpp (modified) (2 diffs)
-
src/MainFrame.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/OpenYahtzee/macros/autogen.sh
r66 r76 1 1 #!/bin/sh 2 2 aclocal 3 autoheader 3 4 libtoolize --automake --force --copy 4 5 automake -a -c -
trunk/OpenYahtzee/src/About.cpp
r72 r76 53 53 label_1 = new wxStaticText(notebook_main_pane_about, -1, wxT("http://openyahtzee.sourceforge.net/")); 54 54 label_7 = new wxStaticText(notebook_main_pane_authors, -1, wxT("Please report bugs to openyahtzee-users@lists.sourceforge.net.\n\nGuy Rutenberg\n\tguyrutenberg@gmail.com\n\tAuthor, maintainer")); 55 label_6 = new wxStaticText(notebook_main_pane_thanks, -1, wxT("Seamous McGill\n\tjohndoe@gmail.com\n\tLogo and dice design\n\nNeil Gierman\n\t Neil Gierman\n\tRPM packages\n\nJohn Doe3\n email@john.com\n Windows Installer"));55 label_6 = new wxStaticText(notebook_main_pane_thanks, -1, wxT("Seamous McGill\n\tjohndoe@gmail.com\n\tLogo and dice design\n\nNeil Gierman\n\tngierman@roadrunn.com\n\tRPM packages")); 56 56 label_15 = new wxStaticText(notebook_main_pane_license, -1, wxT("This program is free software; you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by \nthe Free Software Foundation; either version 2 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of \nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details. \n\nYou should have received a copy of the GNU General Public License \nalong with this program; if not, write to the\nFree Software Foundation, Inc.,\n59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.")); 57 57 close_button = new wxButton(this, wxID_OK, wxT("Close")); -
trunk/OpenYahtzee/src/MainFrame.cpp
r71 r76 67 67 m_settingsdb = new SettingsDB(); //Get the settings database connection 68 68 m_highscoredb = new HighScoreTableDB(); 69 70 //DATABASE initialization 71 if (m_settingsdb->GetKey("highscoresize") == "") { //check if we need to create a new high score table 72 m_highscoredb->SetSize(DEF_HIGHSCORESIZE); 73 sstr<<DEF_HIGHSCORESIZE<<std::flush; 74 m_settingsdb->SetKey("highscoresize", sstr.str()); 75 } else { 76 int highscoresize = atoi((m_settingsdb->GetKey("highscoresize")).c_str()); 77 //m_highscoredb->SetSize((highscoresize>0)?highscoresize:DEF_HIGHSCORESIZE); 78 m_highscoredb->SetSize(highscoresize); 79 } 80 81 if (m_settingsdb->GetKey("animate") == "Yes") { 82 m_animate = true; 83 } else if (m_settingsdb->GetKey("animate") == "No") { 84 m_animate = false; 85 } else { 86 m_settingsdb->SetKey("animate", "Yes"); 87 m_animate = true; 88 } 89 if (m_settingsdb->GetKey("calculatesubtotal") == "Yes") { 90 m_calculatesubtotal = true; 91 } else if (m_settingsdb->GetKey("calculatesubtotal") == "No") { 92 m_calculatesubtotal = false; 93 } else { 94 m_settingsdb->SetKey("calculatesubtotal", "Yes"); 95 m_calculatesubtotal = true; 96 } 97 98 // END Database initialization 69 70 InitializeDatabase();//this must come _after_ m_settingsdb and m_highscoredb are created 99 71 100 72 bitmap_dices[0] = new wxBitmap(one_xpm); … … 1023 995 } 1024 996 } 997 998 /** 999 * Initializes the database and stores default settings if needed. 1000 * @return 0 if some error 1001 */ 1002 int MainFrame::InitializeDatabase() 1003 { 1004 std::ostringstream sstr; 1005 1006 1007 if (m_settingsdb->GetKey("highscoresize") == "") { //check if we need to create a new high score table 1008 m_highscoredb->SetSize(DEF_HIGHSCORESIZE); 1009 sstr<<DEF_HIGHSCORESIZE<<std::flush; 1010 m_settingsdb->SetKey("highscoresize", sstr.str()); 1011 } else { 1012 int highscoresize = atoi((m_settingsdb->GetKey("highscoresize")).c_str()); 1013 //m_highscoredb->SetSize((highscoresize>0)?highscoresize:DEF_HIGHSCORESIZE); 1014 m_highscoredb->SetSize(highscoresize); 1015 } 1016 1017 if (m_settingsdb->GetKey("animate") == "Yes") { 1018 m_animate = true; 1019 } else if (m_settingsdb->GetKey("animate") == "No") { 1020 m_animate = false; 1021 } else { 1022 m_settingsdb->SetKey("animate", "Yes"); 1023 m_animate = true; 1024 } 1025 if (m_settingsdb->GetKey("calculatesubtotal") == "Yes") { 1026 m_calculatesubtotal = true; 1027 } else if (m_settingsdb->GetKey("calculatesubtotal") == "No") { 1028 m_calculatesubtotal = false; 1029 } else { 1030 m_settingsdb->SetKey("calculatesubtotal", "Yes"); 1031 m_calculatesubtotal = true; 1032 } 1033 1034 if (m_settingsdb->GetKey("openyahtzeehomepage") == "") { 1035 m_settingsdb->SetKey("openyahtzeehomepage", "http://openyahtzee.sourceforge.net/"); 1036 } 1037 1038 if (m_settingsdb->GetKey("updateurl") == "") { 1039 /*the version string will be appended in the end of the 1040 given url */ 1041 m_settingsdb->SetKey("updateurl", "http://openyahtzee.sourceforge.net/update.php?version="); 1042 } 1043 1044 return 1; 1045 } -
trunk/OpenYahtzee/src/MainFrame.h
r71 r76 76 76 void CalculateSubTotal(); 77 77 void LaunchBrowser (wxString link); 78 int InitializeDatabase(); 78 79 79 80 //pointers to hold bitmap data for the dices
Note: See TracChangeset
for help on using the changeset viewer.
