Changeset 503


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...)

Location:
AE/Installer/trunk/source
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • AE/Installer/trunk/source/globals.h

    r502 r503  
    4141
    4242#pragma mark DEFINES
    43 #define INSTALLER_VERSION                "1.1" // only place in source we need to set this
     43#define INSTALLER_VERSION                "1.2" // only place we need to change this
    4444#define UPDATE_LOG_READ_ERR             -1
    4545#define UPDATE_INST_REPL_ERR    -2
  • 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}
  • AE/Installer/trunk/source/main_window.h

    r487 r503  
    6666#define wxID_LOAD 10006
    6767#define wxID_OPTIONS 10017
     68#define Dir_Button 10100
    6869#define SYMBOL_MAINWINDOW_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxMINIMIZE_BOX|wxMAXIMIZE_BOX|wxCLOSE_BOX|wxSIMPLE_BORDER
    6970#define SYMBOL_MAINWINDOW_TITLE _("Installer")
     
    154155    void OnAboutClick( wxCommandEvent& event );
    155156
     157        /// change currently directory
     158        void OnDirButtonClick( wxCommandEvent& event );
    156159////@end MainWindow event handler declarations
    157160
     
    185188    wxRadioButton* CompleteRadio;
    186189    wxButton* ReglobalizeButton;
     190        wxButton* ChangeDirectoryButton;
    187191////@end MainWindow member variables
    188192
  • AE/Installer/trunk/source/replace_installer.bat

    r496 r503  
    77
    88        COPY AEInstaller.exe  .\..\..\..\install\
    9         START ..\..\..\install\AEInstaller.exe
     9        cd ..\..\..\install\
     10        START AEInstaller.exe
    1011)
Note: See TracChangeset for help on using the changeset viewer.