Пример #1
0
void Editor::openTextFile()
    {
    OovString filename;
    PathChooser ch;
    if(ch.ChoosePath(Gui::getMainWindow(), "Open File",
            GTK_FILE_CHOOSER_ACTION_OPEN, filename))
        {
        openTextFile(filename);
        }
    }
Пример #2
0
void Editor::setPreferencesWorkingDir()
    {
    PathChooser chooser;
    chooser.setDefaultPath(Project::getBuildOutputDir(BuildConfigDebug));
    OovString dir;
    if(chooser.ChoosePath(Gui::getMainWindow(), "Select Working Directory",
            GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, dir))
        {
        GtkEntry *workDirEntry = GTK_ENTRY(mBuilder.getWidget("DebugWorkingDirEntry"));
        Gui::setText(workDirEntry, dir);
        }
    }
Пример #3
0
void ProjectSettingsDialog::rootSourceDirButtonClicked()
    {
    PathChooser ch;
    OovString srcRootDir;
    if(ch.ChoosePath(sProjectSettingsDialog->getParentWindow(),
            "Open Root Source Directory",
            GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, srcRootDir))
        {
        GtkEntry *dirEntry = GTK_ENTRY(Builder::getBuilder()->getWidget(
                "RootSourceDirEntry"));
        gtk_entry_set_text(dirEntry, srcRootDir.c_str());
        }
    }
Пример #4
0
void ProjectSettingsDialog::oovaideProjectDirButtonClicked()
    {
    PathChooser ch;
    OovString projectDir;
    if(ch.ChoosePath(sProjectSettingsDialog->getParentWindow(),
            "Create OOVAIDE Project Directory",
            GTK_FILE_CHOOSER_ACTION_CREATE_FOLDER,
        projectDir))
        {
        GtkEntry *dirEntry = GTK_ENTRY(Builder::getBuilder()->getWidget(
                "OovaideProjectDirEntry"));
        gtk_entry_set_text(dirEntry, projectDir.c_str());
        }
    }
Пример #5
0
void ProjectSettingsDialog::excludeDirsButtonClicked()
    {
    PathChooser ch;
    OovString dir;
    if(ch.ChoosePath(sProjectSettingsDialog->getParentWindow(),
            "Add Exclude Directory",
            GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER, dir))
        {
        GtkTextView *dirTextView = GTK_TEXT_VIEW(Builder::getBuilder()->getWidget(
                "ExcludeDirsTextview"));
        std::string relDir;
        relDir = Project::getSrcRootDirRelativeSrcFileDir(getRootSrcDir(), dir);
        relDir += '\n';
        Gui::appendText(dirTextView, relDir);
        }
    }