void Editor::openTextFile() { OovString filename; PathChooser ch; if(ch.ChoosePath(Gui::getMainWindow(), "Open File", GTK_FILE_CHOOSER_ACTION_OPEN, filename)) { openTextFile(filename); } }
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); } }
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()); } }
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()); } }
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); } }