mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-12 17:14:52 -07:00
Portable mode for windows (#2794)
* Portable mode for windows * fix start menu in portable mode * Make gcc an happy puppy * Clean old installation if we are installing over an old portable mode installation * Default to Desktop\CockatricePortable * Settings dialog fixes * wording
This commit is contained in:
parent
1565309146
commit
1366e5970e
13 changed files with 217 additions and 86 deletions
|
|
@ -130,6 +130,21 @@ GeneralSettingsPage::GeneralSettingsPage()
|
|||
QPushButton *tokenDatabasePathButton = new QPushButton("...");
|
||||
connect(tokenDatabasePathButton, SIGNAL(clicked()), this, SLOT(tokenDatabasePathButtonClicked()));
|
||||
|
||||
if(settingsCache->getIsPortableBuild())
|
||||
{
|
||||
deckPathEdit->setEnabled(false);
|
||||
replaysPathEdit->setEnabled(false);
|
||||
picsPathEdit->setEnabled(false);
|
||||
cardDatabasePathEdit->setEnabled(false);
|
||||
tokenDatabasePathEdit->setEnabled(false);
|
||||
|
||||
deckPathButton->setVisible(false);
|
||||
replaysPathButton->setVisible(false);
|
||||
picsPathButton->setVisible(false);
|
||||
cardDatabasePathButton->setVisible(false);
|
||||
tokenDatabasePathButton->setVisible(false);
|
||||
}
|
||||
|
||||
QGridLayout *pathsGrid = new QGridLayout;
|
||||
pathsGrid->addWidget(&deckPathLabel, 0, 0);
|
||||
pathsGrid->addWidget(deckPathEdit, 0, 1);
|
||||
|
|
@ -273,7 +288,14 @@ void GeneralSettingsPage::retranslateUi()
|
|||
personalGroupBox->setTitle(tr("Personal settings"));
|
||||
languageLabel.setText(tr("Language:"));
|
||||
picDownloadCheckBox.setText(tr("Download card pictures on the fly"));
|
||||
pathsGroupBox->setTitle(tr("Paths"));
|
||||
|
||||
if(settingsCache->getIsPortableBuild())
|
||||
{
|
||||
pathsGroupBox->setTitle(tr("Paths (editing disabled in portable mode)"));
|
||||
} else {
|
||||
pathsGroupBox->setTitle(tr("Paths"));
|
||||
}
|
||||
|
||||
deckPathLabel.setText(tr("Decks directory:"));
|
||||
replaysPathLabel.setText(tr("Replays directory:"));
|
||||
picsPathLabel.setText(tr("Pictures directory:"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue