diff options
author | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2013-03-07 14:00:52 +0100 |
---|---|---|
committer | Benjamin Dobell <benjamin.dobell+git@glassechidna.com.au> | 2013-03-07 14:12:27 +0100 |
commit | ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768 (patch) | |
tree | 2267ec17efe5435887cb68169a56418acf7a9f05 /heimdall-frontend | |
parent | Previous libusbx fix was a red herring of sorts. Inadvertedly it did fix the (diff) | |
download | Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.gz Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.bz2 Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.lz Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.xz Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.tar.zst Heimdall-ebbc3e7cd2086a9f62a857dffe9ab0bd1f5da768.zip |
Diffstat (limited to 'heimdall-frontend')
-rw-r--r-- | heimdall-frontend/Source/mainwindow.cpp | 53 | ||||
-rw-r--r-- | heimdall-frontend/Source/mainwindow.h | 4 | ||||
-rw-r--r-- | heimdall-frontend/aboutform.ui | 2 | ||||
-rw-r--r-- | heimdall-frontend/mainwindow.ui | 239 |
4 files changed, 193 insertions, 105 deletions
diff --git a/heimdall-frontend/Source/mainwindow.cpp b/heimdall-frontend/Source/mainwindow.cpp index f990cdd..281fd77 100644 --- a/heimdall-frontend/Source/mainwindow.cpp +++ b/heimdall-frontend/Source/mainwindow.cpp @@ -262,7 +262,10 @@ void MainWindow::UpdateFlashInterfaceAvailability(void) flashProgressBar->setEnabled(false);
optionsGroup->setEnabled(true);
+ sessionGroup->setEnabled(true);
startFlashButton->setEnabled(validFlashSettings);
+ noRebootCheckBox->setEnabled(validFlashSettings);
+ resumeCheckbox->setEnabled(validFlashSettings);
}
else
{
@@ -270,7 +273,7 @@ void MainWindow::UpdateFlashInterfaceAvailability(void) flashProgressBar->setEnabled(true);
optionsGroup->setEnabled(false);
- startFlashButton->setEnabled(false);
+ sessionGroup->setEnabled(false);
}
}
@@ -314,10 +317,7 @@ void MainWindow::UpdateUtilitiesInterfaceAvailability(void) closePcScreenButton->setEnabled(true);
pitSaveAsButton->setEnabled(true);
- if (!pitDestinationLineEdit->text().isEmpty())
- downloadPitButton->setEnabled(true);
- else
- downloadPitButton->setEnabled(false);
+ downloadPitButton->setEnabled(!pitDestinationLineEdit->text().isEmpty());
if (printPitDeviceRadioBox->isChecked())
{
@@ -331,6 +331,7 @@ void MainWindow::UpdateUtilitiesInterfaceAvailability(void) printLocalPitGroup->setEnabled(true);
printLocalPitLineEdit->setEnabled(true);
printLocalPitBrowseButton->setEnabled(true);
+
printPitButton->setEnabled(!printLocalPitLineEdit->text().isEmpty());
}
}
@@ -420,6 +421,7 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) // Menu
QObject::connect(actionDonate, SIGNAL(triggered()), this, SLOT(OpenDonationWebpage()));
QObject::connect(actionVerboseOutput, SIGNAL(toggled(bool)), this, SLOT(SetVerboseOutput(bool)));
+ QObject::connect(actionResumeConnection, SIGNAL(toggled(bool)), this, SLOT(SetResume(bool)));
QObject::connect(actionAboutHeimdall, SIGNAL(triggered()), this, SLOT(ShowAbout()));
// Load Package Tab
@@ -439,7 +441,9 @@ MainWindow::MainWindow(QWidget *parent) : QMainWindow(parent) QObject::connect(pitBrowseButton, SIGNAL(clicked()), this, SLOT(SelectPit()));
QObject::connect(repartitionCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetRepartition(int)));
+
QObject::connect(noRebootCheckBox, SIGNAL(stateChanged(int)), this, SLOT(SetNoReboot(int)));
+ QObject::connect(resumeCheckbox, SIGNAL(stateChanged(int)), this, SLOT(SetResume(int)));
QObject::connect(startFlashButton, SIGNAL(clicked()), this, SLOT(StartFlash()));
@@ -882,13 +886,32 @@ void MainWindow::SelectPit(void) }
}
+
void MainWindow::SetRepartition(int enabled)
{
workingPackageData.GetFirmwareInfo().SetRepartition(enabled);
+
+ repartitionCheckBox->setChecked(enabled);
}
+
void MainWindow::SetNoReboot(int enabled)
{
workingPackageData.GetFirmwareInfo().SetNoReboot(enabled);
+
+ noRebootCheckBox->setChecked(enabled);
+}
+
+void MainWindow::SetResume(bool enabled)
+{
+ resume = enabled;
+
+ actionResumeConnection->setChecked(enabled);
+ resumeCheckbox->setChecked(enabled);
+}
+
+void MainWindow::SetResume(int enabled)
+{
+ SetResume(enabled != 0);
}
void MainWindow::StartFlash(void)
@@ -922,6 +945,9 @@ void MainWindow::StartFlash(void) if (firmwareInfo.GetNoReboot())
arguments.append("--no-reboot");
+ if (resume)
+ arguments.append("--resume");
+
if (verboseOutput)
arguments.append("--verbose");
@@ -1095,6 +1121,9 @@ void MainWindow::ClosePcScreen(void) QStringList arguments;
arguments.append("close-pc-screen");
+
+ if (resume)
+ arguments.append("--resume");
if (verboseOutput)
arguments.append("--verbose");
@@ -1135,6 +1164,9 @@ void MainWindow::DownloadPit(void) arguments.append("--no-reboot");
+ if (resume)
+ arguments.append("--resume");
+
if (verboseOutput)
arguments.append("--verbose");
@@ -1196,6 +1228,9 @@ void MainWindow::PrintPit(void) arguments.append("--stdout-errors");
arguments.append("--no-reboot");
+
+ if (resume)
+ arguments.append("--resume");
if (verboseOutput)
arguments.append("--verbose");
@@ -1237,6 +1272,8 @@ void MainWindow::HandleHeimdallStdout(void) void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitStatus)
{
+ HandleHeimdallStdout();
+
if (exitStatus == QProcess::NormalExit && exitCode == 0)
{
if (heimdallState == MainWindow::kHeimdallStateFlashing)
@@ -1247,6 +1284,12 @@ void MainWindow::HandleHeimdallReturned(int exitCode, QProcess::ExitStatus exitS {
deviceDetectedRadioButton->setChecked(true);
}
+
+ bool executedNoReboot = (heimdallState == kHeimdallStateFlashing && loadedPackageData.GetFirmwareInfo().GetNoReboot())
+ || (heimdallState == kHeimdallStatePrintingPit && printPitDeviceRadioBox->isChecked()) || heimdallState == kHeimdallStateDownloadingPit;
+
+ if (executedNoReboot)
+ SetResume(true);
}
else
{
diff --git a/heimdall-frontend/Source/mainwindow.h b/heimdall-frontend/Source/mainwindow.h index bea15cd..4abee8c 100644 --- a/heimdall-frontend/Source/mainwindow.h +++ b/heimdall-frontend/Source/mainwindow.h @@ -81,6 +81,7 @@ namespace HeimdallFrontend QList<unsigned int> unusedPartitionIds;
bool verboseOutput;
+ bool resume;
void StartHeimdall(const QStringList& arguments);
@@ -133,7 +134,10 @@ namespace HeimdallFrontend void SelectPit(void);
void SetRepartition(int enabled);
+
void SetNoReboot(int enabled);
+ void SetResume(bool enabled);
+ void SetResume(int enabled);
void StartFlash(void);
diff --git a/heimdall-frontend/aboutform.ui b/heimdall-frontend/aboutform.ui index 142de47..ef1b947 100644 --- a/heimdall-frontend/aboutform.ui +++ b/heimdall-frontend/aboutform.ui @@ -114,7 +114,7 @@ p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Heimdall Frontend</span></p>
-<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version 1.4 RC1</p>
+<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Version 1.4 RC3</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Copyright © 2010-2012 Benjamin Dobell, Glass Echidna</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Heimdall (command line)</span></p>
diff --git a/heimdall-frontend/mainwindow.ui b/heimdall-frontend/mainwindow.ui index 6a165fb..ce42a89 100644 --- a/heimdall-frontend/mainwindow.ui +++ b/heimdall-frontend/mainwindow.ui @@ -401,7 +401,7 @@ <rect>
<x>10</x>
<y>300</y>
- <width>751</width>
+ <width>511</width>
<height>171</height>
</rect>
</property>
@@ -414,9 +414,9 @@ </property>
<property name="geometry">
<rect>
- <x>350</x>
+ <x>280</x>
<y>130</y>
- <width>271</width>
+ <width>221</width>
<height>31</height>
</rect>
</property>
@@ -432,8 +432,8 @@ <rect>
<x>10</x>
<y>30</y>
- <width>731</width>
- <height>91</height>
+ <width>491</width>
+ <height>81</height>
</rect>
</property>
<property name="undoRedoEnabled">
@@ -451,7 +451,7 @@ <rect>
<x>10</x>
<y>130</y>
- <width>331</width>
+ <width>261</width>
<height>21</height>
</rect>
</property>
@@ -468,59 +468,6 @@ <set>Qt::AlignBottom|Qt::AlignLeading|Qt::AlignLeft</set>
</property>
</widget>
- <widget class="QPushButton" name="startFlashButton">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="geometry">
- <rect>
- <x>620</x>
- <y>130</y>
- <width>91</width>
- <height>31</height>
- </rect>
- </property>
- <property name="text">
- <string>Start</string>
- </property>
- </widget>
- <widget class="QLabel" name="startFlashTipLabel">
- <property name="geometry">
- <rect>
- <x>720</x>
- <y>130</y>
- <width>21</width>
- <height>23</height>
- </rect>
- </property>
- <property name="font">
- <font>
- <weight>75</weight>
- <bold>true</bold>
- </font>
- </property>
- <property name="toolTip">
- <string notr="true">The "Start" button will remain inactive until at least one partition/file is added.</string>
- </property>
- <property name="frameShape">
- <enum>QFrame::Panel</enum>
- </property>
- <property name="frameShadow">
- <enum>QFrame::Raised</enum>
- </property>
- <property name="lineWidth">
- <number>2</number>
- </property>
- <property name="midLineWidth">
- <number>0</number>
- </property>
- <property name="text">
- <string>?</string>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
</widget>
<widget class="QGroupBox" name="optionsGroup">
<property name="geometry">
@@ -540,7 +487,7 @@ <x>10</x>
<y>20</y>
<width>391</width>
- <height>61</height>
+ <height>91</height>
</rect>
</property>
<property name="title">
@@ -624,6 +571,25 @@ <set>Qt::AlignCenter</set>
</property>
</widget>
+ <widget class="QCheckBox" name="repartitionCheckBox">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>131</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string notr="true">Repartitioning will wipe all data for your phone and install the selected PIT file.</string>
+ </property>
+ <property name="text">
+ <string>Repartition</string>
+ </property>
+ </widget>
</widget>
<widget class="QGroupBox" name="partitionGroup">
<property name="geometry">
@@ -738,44 +704,6 @@ </property>
</widget>
</widget>
- <widget class="QCheckBox" name="noRebootCheckBox">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="geometry">
- <rect>
- <x>250</x>
- <y>90</y>
- <width>151</width>
- <height>21</height>
- </rect>
- </property>
- <property name="toolTip">
- <string notr="true">Can be enabled to prevent your device rebooting after the flash finishes.</string>
- </property>
- <property name="text">
- <string>No Reboot</string>
- </property>
- </widget>
- <widget class="QCheckBox" name="repartitionCheckBox">
- <property name="enabled">
- <bool>false</bool>
- </property>
- <property name="geometry">
- <rect>
- <x>20</x>
- <y>90</y>
- <width>151</width>
- <height>21</height>
- </rect>
- </property>
- <property name="toolTip">
- <string notr="true">Repartitioning will wipe all data for your phone and install the selected PIT file.</string>
- </property>
- <property name="text">
- <string>Repartition</string>
- </property>
- </widget>
<widget class="QGroupBox" name="partitionsGroup">
<property name="geometry">
<rect>
@@ -872,6 +800,110 @@ </widget>
</widget>
</widget>
+ <widget class="QGroupBox" name="sessionGroup">
+ <property name="geometry">
+ <rect>
+ <x>530</x>
+ <y>300</y>
+ <width>231</width>
+ <height>171</height>
+ </rect>
+ </property>
+ <property name="title">
+ <string>Session</string>
+ </property>
+ <widget class="QCheckBox" name="noRebootCheckBox">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>30</y>
+ <width>211</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string notr="true">Can be enabled to prevent your device rebooting after the flash finishes.</string>
+ </property>
+ <property name="text">
+ <string>No Reboot</string>
+ </property>
+ </widget>
+ <widget class="QCheckBox" name="resumeCheckbox">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>10</x>
+ <y>60</y>
+ <width>211</width>
+ <height>21</height>
+ </rect>
+ </property>
+ <property name="toolTip">
+ <string notr="true">Can be enabled to prevent your device rebooting after the flash finishes.</string>
+ </property>
+ <property name="text">
+ <string>Resume (use after "No Reboot")</string>
+ </property>
+ </widget>
+ <widget class="QPushButton" name="startFlashButton">
+ <property name="enabled">
+ <bool>false</bool>
+ </property>
+ <property name="geometry">
+ <rect>
+ <x>50</x>
+ <y>120</y>
+ <width>111</width>
+ <height>31</height>
+ </rect>
+ </property>
+ <property name="text">
+ <string>Start</string>
+ </property>
+ </widget>
+ <widget class="QLabel" name="startFlashTipLabel">
+ <property name="geometry">
+ <rect>
+ <x>170</x>
+ <y>120</y>
+ <width>21</width>
+ <height>23</height>
+ </rect>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="toolTip">
+ <string notr="true">The "Start" button will remain inactive until at least one partition/file is added.</string>
+ </property>
+ <property name="frameShape">
+ <enum>QFrame::Panel</enum>
+ </property>
+ <property name="frameShadow">
+ <enum>QFrame::Raised</enum>
+ </property>
+ <property name="lineWidth">
+ <number>2</number>
+ </property>
+ <property name="midLineWidth">
+ <number>0</number>
+ </property>
+ <property name="text">
+ <string>?</string>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </widget>
</widget>
<widget class="QWidget" name="createPackageTab">
<property name="enabled">
@@ -1826,6 +1858,8 @@ <property name="title">
<string>Advanced</string>
</property>
+ <addaction name="actionResumeConnection"/>
+ <addaction name="separator"/>
<addaction name="actionVerboseOutput"/>
</widget>
<addaction name="menuDonate"/>
@@ -1860,6 +1894,14 @@ <string>Verbose Output</string>
</property>
</action>
+ <action name="actionResumeConnection">
+ <property name="checkable">
+ <bool>true</bool>
+ </property>
+ <property name="text">
+ <string>Resume Connection</string>
+ </property>
+ </action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<tabstops>
@@ -1883,7 +1925,6 @@ <tabstop>partitionFileLineEdit</tabstop>
<tabstop>partitionFileBrowseButton</tabstop>
<tabstop>outputPlainTextEdit</tabstop>
- <tabstop>startFlashButton</tabstop>
<tabstop>createFirmwareNameLineEdit</tabstop>
<tabstop>createFirmwareVersionLineEdit</tabstop>
<tabstop>createPlatformNameLineEdit</tabstop>
|