Subversion Repositories svn.mios32

Rev

Rev 1502 | Rev 1759 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1502 Rev 1724
Line 1... Line 1...
1
/* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
1
/* -*- mode:C++; tab-width:4; c-basic-offset:4; indent-tabs-mode:nil -*- */
2
// $Id: UploadWindow.cpp 1502 2012-09-05 22:25:07Z tk $
2
// $Id: UploadWindow.cpp 1724 2013-03-28 20:23:40Z tk $
3
/*
3
/*
4
 * Upload Window Component
4
 * Upload Window Component
5
 *
5
 *
6
 * ==========================================================================
6
 * ==========================================================================
7
 *
7
 *
Line 72... Line 72...
72
    stopButton->setEnabled(false);
72
    stopButton->setEnabled(false);
73
73
74
    addAndMakeVisible(progressBar = new ProgressBar(progress));
74
    addAndMakeVisible(progressBar = new ProgressBar(progress));
75
75
76
    // restore settings
76
    // restore settings
77
    PropertiesFile *propertiesFile = ApplicationProperties::getInstance()->getCommonSettings(true);
77
    PropertiesFile *propertiesFile = MiosStudioProperties::getInstance()->getCommonSettings(true);
78
    if( propertiesFile ) {
78
    if( propertiesFile ) {
79
        String recentlyUsedHexFiles = propertiesFile->getValue(T("recentlyUsedHexFiles"), String::empty);
79
        String recentlyUsedHexFiles = propertiesFile->getValue(T("recentlyUsedHexFiles"), String::empty);
80
        // seems that Juce doesn't provide a split function?
80
        // seems that Juce doesn't provide a split function?
81
        StringArray recentlyUsedHexFilesArray;
81
        StringArray recentlyUsedHexFilesArray;
82
        int index = 0;
82
        int index = 0;
Line 165... Line 165...
165
        uploadStatus->addEntry(Colours::black, T("Reading ") + inFile.getFileName());
165
        uploadStatus->addEntry(Colours::black, T("Reading ") + inFile.getFileName());
166
        MultiTimer::startTimer(TIMER_LOAD_HEXFILE, 1);
166
        MultiTimer::startTimer(TIMER_LOAD_HEXFILE, 1);
167
        startButton->setEnabled(false); // will be enabled if file is valid
167
        startButton->setEnabled(false); // will be enabled if file is valid
168
168
169
        // store setting
169
        // store setting
170
        PropertiesFile *propertiesFile = ApplicationProperties::getInstance()->getCommonSettings(true);
170
        PropertiesFile *propertiesFile = MiosStudioProperties::getInstance()->getCommonSettings(true);
171
        if( propertiesFile ) {
171
        if( propertiesFile ) {
172
            String recentlyUsedHexFiles = fileChooser->getRecentlyUsedFilenames().joinIntoString(";");
172
            String recentlyUsedHexFiles = fileChooser->getRecentlyUsedFilenames().joinIntoString(";");
173
            propertiesFile->setValue(T("recentlyUsedHexFiles"), recentlyUsedHexFiles);
173
            propertiesFile->setValue(T("recentlyUsedHexFiles"), recentlyUsedHexFiles);
174
            propertiesFile->setValue(T("defaultFile"), inFile.getFullPathName());
174
            propertiesFile->setValue(T("defaultFile"), inFile.getFullPathName());
175
        }
175
        }