mirror of
https://github.com/TES3MP/openmw-tes3mp.git
synced 2025-01-16 19:19:56 +00:00
Some minor changes, implemented suggestions
This commit is contained in:
parent
ceb66d0790
commit
e8170adde5
7 changed files with 37 additions and 23 deletions
|
@ -32,12 +32,9 @@ void Wizard::InstallationPage::initializePage()
|
||||||
// That way installing all three components would yield 300%
|
// That way installing all three components would yield 300%
|
||||||
// When one component is done the bar will be filled by 33%
|
// When one component is done the bar will be filled by 33%
|
||||||
|
|
||||||
if (field("installation.new").toBool() == true)
|
if (field("installation.new").toBool() == true) {
|
||||||
{
|
|
||||||
installProgressBar->setMaximum((components.count() * 100));
|
installProgressBar->setMaximum((components.count() * 100));
|
||||||
}
|
} else {
|
||||||
else
|
|
||||||
{
|
|
||||||
if (components.contains(QLatin1String("Tribunal"))
|
if (components.contains(QLatin1String("Tribunal"))
|
||||||
&& !mWizard->mInstallations[path]->hasTribunal)
|
&& !mWizard->mInstallations[path]->hasTribunal)
|
||||||
installProgressBar->setMaximum(100);
|
installProgressBar->setMaximum(100);
|
||||||
|
@ -59,8 +56,6 @@ void Wizard::InstallationPage::startInstallation()
|
||||||
mUnshield = new UnshieldWorker();
|
mUnshield = new UnshieldWorker();
|
||||||
mUnshield->moveToThread(thread);
|
mUnshield->moveToThread(thread);
|
||||||
|
|
||||||
qRegisterMetaType<Wizard::Component>("Wizard::Component");
|
|
||||||
|
|
||||||
connect(thread, SIGNAL(started()),
|
connect(thread, SIGNAL(started()),
|
||||||
mUnshield, SLOT(extract()));
|
mUnshield, SLOT(extract()));
|
||||||
|
|
||||||
|
@ -125,11 +120,9 @@ void Wizard::InstallationPage::startInstallation()
|
||||||
|
|
||||||
if (language == QLatin1String("Polish")) {
|
if (language == QLatin1String("Polish")) {
|
||||||
mUnshield->setIniCodec(QTextCodec::codecForName("windows-1250"));
|
mUnshield->setIniCodec(QTextCodec::codecForName("windows-1250"));
|
||||||
}
|
} else if (language == QLatin1String("Russian")) {
|
||||||
else if (language == QLatin1String("Russian")) {
|
|
||||||
mUnshield->setIniCodec(QTextCodec::codecForName("windows-1251"));
|
mUnshield->setIniCodec(QTextCodec::codecForName("windows-1251"));
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
mUnshield->setIniCodec(QTextCodec::codecForName("windows-1252"));
|
mUnshield->setIniCodec(QTextCodec::codecForName("windows-1252"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
#include <QMessageBox>
|
||||||
|
|
||||||
#include "mainwizard.hpp"
|
#include "mainwizard.hpp"
|
||||||
|
|
||||||
|
@ -29,6 +30,27 @@ void Wizard::InstallationTargetPage::initializePage()
|
||||||
targetLineEdit->setText(QDir::toNativeSeparators(dir.absolutePath()));
|
targetLineEdit->setText(QDir::toNativeSeparators(dir.absolutePath()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool Wizard::InstallationTargetPage::validatePage()
|
||||||
|
{
|
||||||
|
QString path(field("installation.path").toString());
|
||||||
|
|
||||||
|
qDebug() << "Validating path: " << path;
|
||||||
|
|
||||||
|
if (mWizard->findFiles(QLatin1String("Morrowind"), path)) {
|
||||||
|
QMessageBox msgBox;
|
||||||
|
msgBox.setWindowTitle(tr("Destination not empty"));
|
||||||
|
msgBox.setIcon(QMessageBox::Warning);
|
||||||
|
msgBox.setStandardButtons(QMessageBox::Ok);
|
||||||
|
msgBox.setText(tr("<html><head/><body><p><b>The destination directory is not empty</b></p> \
|
||||||
|
<p>An existing Morrowind installation is present in the specified location.</p> \
|
||||||
|
<p>Please specify a different location, or go back and select the location as an existing installation.</p></body></html>"));
|
||||||
|
msgBox.exec();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void Wizard::InstallationTargetPage::on_browseButton_clicked()
|
void Wizard::InstallationTargetPage::on_browseButton_clicked()
|
||||||
{
|
{
|
||||||
QString selectedPath = QFileDialog::getExistingDirectory(
|
QString selectedPath = QFileDialog::getExistingDirectory(
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace Wizard
|
||||||
InstallationTargetPage(MainWizard *wizard, const Files::ConfigurationManager &cfg);
|
InstallationTargetPage(MainWizard *wizard, const Files::ConfigurationManager &cfg);
|
||||||
|
|
||||||
int nextId() const;
|
int nextId() const;
|
||||||
|
virtual bool validatePage();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void on_browseButton_clicked();
|
void on_browseButton_clicked();
|
||||||
|
|
|
@ -37,6 +37,8 @@ Wizard::UnshieldWorker::UnshieldWorker(QObject *parent) :
|
||||||
mMorrowindDone = false;
|
mMorrowindDone = false;
|
||||||
mTribunalDone = false;
|
mTribunalDone = false;
|
||||||
mBloodmoonDone = false;
|
mBloodmoonDone = false;
|
||||||
|
|
||||||
|
qRegisterMetaType<Wizard::Component>("Wizard::Component");
|
||||||
}
|
}
|
||||||
|
|
||||||
Wizard::UnshieldWorker::~UnshieldWorker()
|
Wizard::UnshieldWorker::~UnshieldWorker()
|
||||||
|
|
|
@ -20,8 +20,6 @@ namespace Wizard
|
||||||
Component_Bloodmoon
|
Component_Bloodmoon
|
||||||
};
|
};
|
||||||
|
|
||||||
//Q_DECLARE_METATYPE(Wizard::Component)
|
|
||||||
|
|
||||||
class UnshieldWorker : public QObject
|
class UnshieldWorker : public QObject
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>513</width>
|
<width>511</width>
|
||||||
<height>328</height>
|
<height>326</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -43,7 +43,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QCheckBox" name="addonsCheckBox">
|
<widget class="QCheckBox" name="addonsCheckBox">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Import previously selected add-ons (creates a new Content List in the launcher)</string>
|
<string>Import add-on and plugin selection (creates a new Content List in the launcher)</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>398</width>
|
<width>396</width>
|
||||||
<height>298</height>
|
<height>296</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
|
@ -26,7 +26,7 @@
|
||||||
<string notr="true">font-weight:bold;</string>
|
<string notr="true">font-weight:bold;</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Install to a new location</string>
|
<string>Install Morrowind to a new location</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
<string notr="true">font-weight:bold</string>
|
<string notr="true">font-weight:bold</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Select an existing installation</string>
|
<string>Select an existing Morrowind installation</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -149,8 +149,6 @@
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<resources>
|
<resources/>
|
||||||
<include location="../../wizard/wizard.qrc"/>
|
|
||||||
</resources>
|
|
||||||
<connections/>
|
<connections/>
|
||||||
</ui>
|
</ui>
|
||||||
|
|
Loading…
Reference in a new issue