vmm_path is no longer temporary
This commit is contained in:
@@ -259,7 +259,7 @@ struct accelKey def_acc_keys[NUM_ACCELS] = {
|
|||||||
.seq="Ctrl+Alt+M" }
|
.seq="Ctrl+Alt+M" }
|
||||||
};
|
};
|
||||||
|
|
||||||
char vmm_path[1024] = { '\0'}; /* TEMPORARY - VM manager path to scan for VMs */
|
char vmm_path[1024] = { '\0' }; /* VM manager path to scan for VMs */
|
||||||
int start_vmm = 1;
|
int start_vmm = 1;
|
||||||
|
|
||||||
/* Statistics. */
|
/* Statistics. */
|
||||||
|
|||||||
@@ -194,7 +194,7 @@ extern char cfg_path[1024]; /* full path of config file */
|
|||||||
extern char global_cfg_path[1024]; /* full path of global config file */
|
extern char global_cfg_path[1024]; /* full path of global config file */
|
||||||
extern int open_dir_usr_path; /* default file open dialog directory of usr_path */
|
extern int open_dir_usr_path; /* default file open dialog directory of usr_path */
|
||||||
extern char uuid[MAX_UUID_LEN]; /* UUID or machine identifier */
|
extern char uuid[MAX_UUID_LEN]; /* UUID or machine identifier */
|
||||||
extern char vmm_path[1024]; /* VM Manager path to scan (temporary) */
|
extern char vmm_path[1024]; /* VM Manager path to scan */
|
||||||
extern int start_vmm;
|
extern int start_vmm;
|
||||||
#ifndef USE_NEW_DYNAREC
|
#ifndef USE_NEW_DYNAREC
|
||||||
extern FILE *stdlog; /* file to log output to */
|
extern FILE *stdlog; /* file to log output to */
|
||||||
|
|||||||
@@ -149,7 +149,6 @@ WithExistingConfigPage(QWidget *parent)
|
|||||||
void
|
void
|
||||||
WithExistingConfigPage::chooseExistingConfigFile()
|
WithExistingConfigPage::chooseExistingConfigFile()
|
||||||
{
|
{
|
||||||
// TODO: FIXME: This is using the CLI arg and needs to instead use a proper variable
|
|
||||||
const auto startDirectory = QString(vmm_path);
|
const auto startDirectory = QString(vmm_path);
|
||||||
const auto selectedConfigFile = QFileDialog::getOpenFileName(this, tr("Choose configuration file"),
|
const auto selectedConfigFile = QFileDialog::getOpenFileName(this, tr("Choose configuration file"),
|
||||||
startDirectory,
|
startDirectory,
|
||||||
@@ -228,7 +227,6 @@ NameAndLocationPage(QWidget *parent)
|
|||||||
#ifdef CUSTOM_SYSTEM_LOCATION
|
#ifdef CUSTOM_SYSTEM_LOCATION
|
||||||
const auto systemLocationLabel = new QLabel(tr("System location:"));
|
const auto systemLocationLabel = new QLabel(tr("System location:"));
|
||||||
systemLocation = new QLineEdit();
|
systemLocation = new QLineEdit();
|
||||||
// TODO: FIXME: This is using the CLI arg and needs to instead use a proper variable
|
|
||||||
systemLocation->setText(QDir::toNativeSeparators(vmm_path));
|
systemLocation->setText(QDir::toNativeSeparators(vmm_path));
|
||||||
registerField("systemLocation*", systemLocation);
|
registerField("systemLocation*", systemLocation);
|
||||||
systemLocationValidation = new QLabel();
|
systemLocationValidation = new QLabel();
|
||||||
@@ -285,7 +283,6 @@ NameAndLocationPage::nextId() const
|
|||||||
void
|
void
|
||||||
NameAndLocationPage::chooseDirectoryLocation()
|
NameAndLocationPage::chooseDirectoryLocation()
|
||||||
{
|
{
|
||||||
// TODO: FIXME: This is pulling in the CLI directory! Needs to be set properly elsewhere
|
|
||||||
const auto directory = QFileDialog::getExistingDirectory(this, "Choose directory", QDir(vmm_path).path());
|
const auto directory = QFileDialog::getExistingDirectory(this, "Choose directory", QDir(vmm_path).path());
|
||||||
systemLocation->setText(QDir::toNativeSeparators(directory));
|
systemLocation->setText(QDir::toNativeSeparators(directory));
|
||||||
emit completeChanged();
|
emit completeChanged();
|
||||||
|
|||||||
@@ -77,8 +77,7 @@ VMManagerPreferences()
|
|||||||
void
|
void
|
||||||
VMManagerPreferences::chooseDirectoryLocation()
|
VMManagerPreferences::chooseDirectoryLocation()
|
||||||
{
|
{
|
||||||
// TODO: FIXME: This is pulling in the CLI directory! Needs to be set properly elsewhere
|
const auto directory = QFileDialog::getExistingDirectory(this, tr("Choose directory"), ui->systemDirectory->text());
|
||||||
const auto directory = QFileDialog::getExistingDirectory(this, tr("Choose directory"), QDir(vmm_path).path());
|
|
||||||
ui->systemDirectory->setText(QDir::toNativeSeparators(directory));
|
ui->systemDirectory->setText(QDir::toNativeSeparators(directory));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -139,22 +139,10 @@ VMManagerSystem::scanForConfigs(QWidget* parent, const QString &searchPath)
|
|||||||
scanTimer.start();
|
scanTimer.start();
|
||||||
QVector<VMManagerSystem *> system_configs;
|
QVector<VMManagerSystem *> system_configs;
|
||||||
|
|
||||||
const auto config = new VMManagerConfig(VMManagerConfig::ConfigType::General);
|
|
||||||
auto systemDirConfig = config->getStringValue("system_directory");
|
|
||||||
|
|
||||||
const auto config_file_name = QString("86box.cfg");
|
const auto config_file_name = QString("86box.cfg");
|
||||||
const QStringList filters = {config_file_name};
|
const QStringList filters = {config_file_name};
|
||||||
QStringList matches;
|
QStringList matches;
|
||||||
// TODO: Preferences. Once I get the CLI args worked out.
|
|
||||||
// For now it just takes vmm_path from the CLI
|
|
||||||
QString search_directory;
|
QString search_directory;
|
||||||
// if(searchPath.isEmpty()) {
|
|
||||||
// // If the location isn't specified in function call, use the one loaded
|
|
||||||
// // from the config file
|
|
||||||
// search_directory = systemDirConfig;
|
|
||||||
// } else {
|
|
||||||
// search_directory = searchPath;
|
|
||||||
// }
|
|
||||||
|
|
||||||
search_directory = searchPath.isEmpty()? vmm_path : searchPath;
|
search_directory = searchPath.isEmpty()? vmm_path : searchPath;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user