Ignore:
Timestamp:
Mar 24, 2010, 8:12:25 AM (15 years ago)
Author:
gumby
Message:

Added button to change the current directory
Fixed about window by adding a ->ShowModal (how did it get deleted?)
Fixed refresh button
Cleaned up replace_installer.bat (i think...)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • AE/Installer/trunk/source/main_window.cpp

    r500 r503  
    105105    EVT_MENU( wxID_ABOUT, MainWindow::OnAboutClick )
    106106
     107        EVT_BUTTON( Dir_Button, MainWindow::OnDirButtonClick )
    107108////@end MainWindow event table entries
    108109
     
    115116
    116117MainWindow::MainWindow()
    117 {
     118{ 
    118119        Init();
    119120}
     
    175176    CompleteRadio = NULL;
    176177    ReglobalizeButton = NULL;
     178
     179        ChangeDirectoryButton = NULL;
    177180        ////@end MainWindow member initialisation
    178181}
     
    350353    itemBoxSizer34->Add(ReglobalizeButton, 0, wxGROW|wxALL, 5);
    351354
    352     // 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
    353363    Mods_CheckboxList->Connect(Mods_CheckboxList1, wxEVT_CREATE, wxWindowCreateEventHandler(MainWindow::ModList_OnCreate), NULL, this);
    354364        ////@end MainWindow content construction
     
    617627        // TODO: Make About window work again!
    618628    About* window = new About(this);
     629        window->ShowModal();
    619630    window->Destroy();
    620631        ////@end wxEVT_COMMAND_MENU_SELECTED event handler for wxID_ABOUT in MainWindow.
     
    624635* wxEVT_COMMAND_RADIOBUTTON_SELECTED event handler for NoSep_RadioButton
    625636*/
    626 
     637 
    627638void MainWindow::OnNoSepRadioButtonSelected( wxCommandEvent& event )
    628639{
     
    658669void MainWindow::OnRefreshButtonClick( wxCommandEvent& event )
    659670{
     671        globalPackages = getPackages();
    660672        refreshMods(globalInstalledMods);
    661673}
     
    778790        splitInstances = true;
    779791}
     792
     793void 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}
Note: See TracChangeset for help on using the changeset viewer.