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 500 by iritscen, Sun Mar 14 23:31:14 2010 UTC vs.
Revision 503 by gumby, Wed Mar 24 07:12:25 2010 UTC

# Line 104 | Line 104 | BEGIN_EVENT_TABLE( MainWindow, wxFrame )
104  
105      EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick )
106  
107 +        EVT_BUTTON( Dir_Button, MainWindow::OnDirButtonClick )
108   ////@end MainWindow event table entries
109  
110   END_EVENT_TABLE()
# Line 114 | Line 115 | END_EVENT_TABLE()
115   */
116  
117   MainWindow::MainWindow()
118 < {
118 > {  
119          Init();
120   }
121  
# Line 174 | Line 175 | void MainWindow::Init()
175      SeperatedRadio = NULL;
176      CompleteRadio = NULL;
177      ReglobalizeButton = NULL;
178 +
179 +        ChangeDirectoryButton = NULL;
180          ////@end MainWindow member initialisation
181   }
182  
# Line 349 | Line 352 | void MainWindow::CreateControls()
352      ReglobalizeButton->SetName(_T("Reglobalize_Button"));
353      itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5);
354  
355 <    // Connect events and objects
355 >    wxStaticLine* itemStaticLine100 = new wxStaticLine( OptionsPanel, wxID_STATIC, wxDefaultPosition, wxDefaultSize, wxLI_VERTICAL );
356 >    itemBoxSizer25->Add(itemStaticLine100, 0, wxGROW|wxALL, 5);
357 >
358 >        ChangeDirectoryButton =  new wxButton( OptionsPanel, Dir_Button, _("Change Dir"), wxDefaultPosition, wxDefaultSize, 0 );
359 >        ChangeDirectoryButton->SetName(_T("Dir_Button"));
360 >        itemBoxSizer34->Add(ChangeDirectoryButton, 0, wxGROW|wxALL, 5);
361 >
362 >        // Connect events and objects
363      Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this);
364          ////@end MainWindow content construction
365   #ifdef WIN32
# Line 616 | Line 626 | void MainWindow::OnAboutClick( wxCommand
626      // Before editing this code, remove the block markers.
627          // TODO: Make About window work again!
628      About* window = new About(this);
629 +        window->ShowModal();
630      window->Destroy();
631          ////@end wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow.
632   }
# Line 623 | Line 634 | void MainWindow::OnAboutClick( wxCommand
634   /*
635   * wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for NoSep_RadioButton
636   */
637 <
637 >
638   void MainWindow::OnNoSepRadioButtonSelected( wxCommandEvent& event )
639   {
640          static_cast<string>("-import:nosep");
# Line 657 | Line 668 | void MainWindow::OnCompleteRadioButtonSe
668  
669   void MainWindow::OnRefreshButtonClick( wxCommandEvent& event )
670   {
671 +        globalPackages = getPackages();
672          refreshMods(globalInstalledMods);
673   }
674  
# Line 777 | Line 789 | void MainWindow::OnSeperatedRadioButtonS
789   {
790          splitInstances = true;
791   }
792 +
793 + void MainWindow::OnDirButtonClick( wxCommandEvent& event )
794 + {
795 +        wxDirDialog* newDir = new wxDirDialog(this, "Set current directory", "", wxDD_DEFAULT_STYLE,
796 +                wxDefaultPosition, wxDefaultSize, "wxDirCtrl");
797 +        newDir->ShowModal();
798 +        if(newDir->GetPath()[0]) current_path( (path)newDir->GetPath() );
799 +        OnRefreshButtonClick(event);
800 + }

Diff Legend

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