Changeset 353 for AE/Installer/trunk
- Timestamp:
- Jun 15, 2009, 1:28:58 AM (16 years ago)
- Location:
- AE/Installer/trunk/source
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/Installer/trunk/source/main.cpp
r324 r353 1 1 ///////////////////////////////////////////////////////////////////////////// 2 // Name: main.cpp2 // Name: aeinstallerapp.cpp 3 3 // Purpose: 4 4 // Author: … … 25 25 26 26 #include "main.h" 27 #include <string> 27 28 28 29 ////@begin XPM images … … 74 75 void AEInstallerApp::Init() 75 76 { 76 ////@begin AEInstallerApp member initialisation77 ////@end AEInstallerApp member initialisation77 ////@begin AEInstallerApp member initialisation 78 ////@end AEInstallerApp member initialisation 78 79 } 79 80 … … 81 82 * Initialisation for AEInstallerApp 82 83 */ 83 84 MainWindow* TheWindow; 84 85 bool AEInstallerApp::OnInit() 85 86 { 86 ////@begin AEInstallerApp initialisation87 ////@begin AEInstallerApp initialisation 87 88 // Remove the comment markers above and below this block 88 89 // to make permanent changes to the code. 89 90 90 91 #if wxUSE_XPM 91 92 wxImage::AddHandler(new wxXPMHandler); … … 102 103 MainWindow* mainWindow = new MainWindow( NULL ); 103 104 mainWindow->Show(true); 104 ////@end AEInstallerApp initialisation 105 ////@end AEInstallerApp initialisation 106 TheWindow = mainWindow; 107 108 return true; 109 } 105 110 106 return true; 111 112 void setStatusArea( string s ) { 113 wxString wxs(s.c_str(), wxConvUTF8); 114 115 TheWindow->StatusArea->SetStatusText( wxs ); 116 //TheWindow->StatusArea->SetStatusText(s.c_str()); 117 //StatusArea->SetStatusText(_(s.c_str())); 118 //(*TheStatusBar)->SetStatusText(_(s.c_str())); 119 //AEInstallerApp:: 120 // TheWindow->StatusArea->SetStatusText("hi"); 121 //mainWindow 122 //itemFrame1->StatusArea->SetStatusText(_"lol"); 123 //MainWindow.StatusArea->SetStatusText("hi"); 124 // class AbstractStatusNotifier { public: virtual void NotifyStatus(const wxString &statusString) = 0; }; 125 //class StatusBarStatusNotifier : public AbstractStatusNotifier { wxStatusBar *statusbar; StatusBarStatusNotifier(wxStatusBar *bar) : statusbar(bar) { } ; 126 //void NotifyStatus(const wxString &status) { statusbar->SetStatus(status); } } 127 128 129 //MainWindow::StatusArea-> 130 //MainWindow::MainWindow().SetSize(MainWindow::MainWindow().GetRect().GetWidth(), MainWindow::MainWindow().GetRect().GetHeight()+1); 131 132 //MainWindow::StatusBar->SetLabel("Importing Files..."); 133 //StatusBar->SetLabel(s); 134 //->SetLabel(s); 135 107 136 } 108 137 … … 114 143 int AEInstallerApp::OnExit() 115 144 { 116 ////@begin AEInstallerApp cleanup145 ////@begin AEInstallerApp cleanup 117 146 return wxApp::OnExit(); 118 ////@end AEInstallerApp cleanup147 ////@end AEInstallerApp cleanup 119 148 } 120 149 -
AE/Installer/trunk/source/main_window.cpp
r331 r353 1 1 /* 2 2 AE/Mod Installer 3 v1.04 3 by Gumby and Iritscen 5 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 6 9 7 10 #define DEBUG … … 43 46 const char* strClsCmd = "clear"; 44 47 const char* strPauseCmd = "read -n 1 -p \"Press any key to continue\""; 48 void Sleep(int ms) { sleep( ms / 1000 ); } 45 49 #endif 46 50 … … 779 783 setProgressBar(1000); 780 784 setStatusArea("Done!"); 781 sleep(1000);785 Sleep(1000); 782 786 setProgressBar(0); 783 784 787 } 785 788 … … 1033 1036 * Control creation for MainWindow 1034 1037 */ 1035 wxStatusBar *TheStatusBar;1038 wxStatusBar **TheStatusBar; 1036 1039 wxButton* TheInstallButton; 1037 1040 wxGauge* TheProgressBar; … … 1219 1222 if( binary_search(globalInstalledMods.begin(), globalInstalledMods.end(), globalPackages[i].modStringName ) ) Mods_CheckboxList->Check(i); 1220 1223 } 1221 TheStatusBar = StatusArea;1224 TheStatusBar = &StatusArea; 1222 1225 TheInstallButton = InstallButton; 1223 1226 TheProgressBar = ProgressBar; … … 1343 1346 descriptionText->SetValue(globalPackages[event.GetSelection()].readme.c_str()); 1344 1347 1345 creatorText->Refresh();1348 //creatorText->Refresh(); 1346 1349 } 1347 1350 … … 1425 1428 // boost::thread thrd2(recompileAll(localPackages) ); 1426 1429 //MainWindow::MainWindow().Show(); 1427 recompile packages(localPackages); 1428 boost::thread thrd(packages); 1429 1430 } 1431 1432 1433 } 1434 1435 void setStatusArea( string s ) { 1436 TheStatusBar->SetStatusText(_(s.c_str())); 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 = MainWindow::StatusArea; 1446 (**TheStatusBar).SetStatusText(_(s.c_str()), 0); 1437 1447 1438 1448 //MainWindow::MainWindow().SetSize(MainWindow::MainWindow().GetRect().GetWidth(), MainWindow::MainWindow().GetRect().GetHeight()+1); … … 1442 1452 //->SetLabel(s); 1443 1453 1444 } 1454 }*/ 1445 1455 1446 1456 void setProgressBar( int i ) {
Note:
See TracChangeset
for help on using the changeset viewer.