ViewVC Help
View File | Revision Log | View Changeset | Root Listing
root/Oni2/AE/Installer/trunk/source/main_window.cpp
(Generate patch)

Comparing AE/Installer/trunk/source/main_window.cpp (file contents):
Revision 352 by iritscen, Thu Jun 4 12:05:26 2009 UTC vs.
Revision 353 by iritscen, Sun Jun 14 23:28:58 2009 UTC

# Line 1 | Line 1
1   /*
2   AE/Mod Installer
3 v1.0
3   by Gumby and Iritscen
4   */
5  
6 + // To-do: - Disable Install button when nothing (new) is selected
7 + //                - Institute lots of checks into file-handling
8 + //                - Clear mod info fields when mod is de-selected
9 +
10   #define DEBUG
11   #include <stdio.h>
12   //#include <conio.h>
# Line 42 | Line 45 | const string strOniSplit = "mono Onispli
45   string strImportOption = "-import:sep";
46   const char* strClsCmd = "clear";
47   const char* strPauseCmd = "read -n 1 -p \"Press any key to continue\"";
48 + void Sleep(int ms) { sleep( ms / 1000 ); }
49   #endif
50  
51   using namespace boost::filesystem;
# Line 778 | Line 782 | void recompileAll(vector<string> install
782          writeInstalledMods(installedMods);
783          setProgressBar(1000);
784          setStatusArea("Done!");
785 <        sleep(1000);
785 >        Sleep(1000);
786          setProgressBar(0);
783        
787   }
788  
789   void writeInstalledMods(vector<string> installedMods)
# Line 1032 | Line 1035 | void MainWindow::Init()
1035   /*
1036   * Control creation for MainWindow
1037   */
1038 < wxStatusBar* TheStatusBar;
1038 > wxStatusBar **TheStatusBar;
1039   wxButton* TheInstallButton;
1040   wxGauge* TheProgressBar;
1041   void MainWindow::CreateControls()
# Line 1218 | Line 1221 | void MainWindow::CreateControls()
1221                          Mods_CheckboxList->Append(globalPackages[i].name.c_str());
1222                          if( binary_search(globalInstalledMods.begin(), globalInstalledMods.end(), globalPackages[i].modStringName ) ) Mods_CheckboxList->Check(i);
1223          }
1224 <                TheStatusBar = StatusArea;
1224 >                TheStatusBar = &StatusArea;
1225                  TheInstallButton = InstallButton;
1226                  TheProgressBar = ProgressBar;
1227                  OptionsPanel->Hide();
# Line 1342 | Line 1345 | void MainWindow::OnModsCheckboxList1Sele
1345          creatorText->SetValue(globalPackages[event.GetSelection()].creator.c_str());
1346          descriptionText->SetValue(globalPackages[event.GetSelection()].readme.c_str());
1347  
1348 <        creatorText->Refresh();
1348 >        //creatorText->Refresh();
1349   }
1350  
1351  
# Line 1424 | Line 1427 | void MainWindow::OnInstallButtonClick( w
1427                  //MainWindow::MainWindow().Hide();      
1428          //      boost::thread thrd2(recompileAll(localPackages) );
1429                  //MainWindow::MainWindow().Show();
1430 <    recompile packages(localPackages);
1431 <    boost::thread thrd(packages);
1430 > #ifdef WIN32
1431 >                recompile packages(localPackages);
1432 >                boost::thread thrd(packages);
1433 > #else
1434 >                this->Disable();
1435 >                recompileAll(localPackages);
1436 >                this->Enable();
1437 > #endif
1438  
1439          }
1440          
1441          
1442   }
1443  
1444 < void setStatusArea( string s ) {
1445 <        TheStatusBar->SetStatusText(_(s.c_str()));
1444 > /*void setStatusArea( string s ) {
1445 >        //TheStatusBar = MainWindow::StatusArea;
1446 >        (**TheStatusBar).SetStatusText(_(s.c_str()), 0);
1447          
1448                  //MainWindow::MainWindow().SetSize(MainWindow::MainWindow().GetRect().GetWidth(), MainWindow::MainWindow().GetRect().GetHeight()+1);
1449                                                  
# Line 1441 | Line 1451 | void setStatusArea( string s ) {
1451          //StatusBar->SetLabel(s);
1452   //->SetLabel(s);
1453          
1454 < }
1454 > }*/
1455  
1456   void setProgressBar( int i ) {
1457   //TheProgressBar->SetValue(

Diff Legend

Removed lines
+ Added lines
< Changed lines (old)
> Changed lines (new)