summaryrefslogtreecommitdiffstats
path: root/heimdall-frontend
diff options
context:
space:
mode:
Diffstat (limited to 'heimdall-frontend')
-rw-r--r--heimdall-frontend/Source/mainwindow.cpp53
-rw-r--r--heimdall-frontend/Source/mainwindow.h4
-rw-r--r--heimdall-frontend/aboutform.ui2
-rw-r--r--heimdall-frontend/mainwindow.ui239
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; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'MS Shell Dlg 2'; font-size:10pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Heimdall Frontend&lt;/span&gt;&lt;/p&gt;
-&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Version 1.4 RC1&lt;/p&gt;
+&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Version 1.4 RC3&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Copyright © 2010-2012 Benjamin Dobell, Glass Echidna&lt;/p&gt;
&lt;p style=&quot;-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;/p&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Heimdall (command line)&lt;/span&gt;&lt;/p&gt;
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 &quot;Start&quot; 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 &quot;No Reboot&quot;)</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 &quot;Start&quot; 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>