Commit 91845fc6 authored by rgaudin's avatar rgaudin
Browse files

Better reporting of improper SD-card (GUI)

parent 705f82f2
2.0-rc17
* Fixed bug prevent non-sdcard builds via GUI
* Better SD-card partition check dialog
2.0-rc16
* Fixed etcher-cli call on macOS GUI (space escaping)
......
......@@ -1748,6 +1748,7 @@ class Application:
# check that SD card has a single partition (clean state)
condition = sd_has_single_partition(sd_card, self.logger)
validate_label(self.component.sd_card_label, condition)
validate_label(self.component.sd_card_error_label, condition)
all_valid = all_valid and condition
else:
condition = output_size > 0
......@@ -1853,6 +1854,17 @@ class Application:
has_card = self.component.sd_card_combobox.get_active() != -1
self.component.clean_sd_button.set_visible(has_card)
# update label for selected SD-card
sd_card = self.get_sd_card()
if sd_card:
# check that SD card has a single partition (clean state)
condition = sd_has_single_partition(sd_card, self.logger)
else:
condition = True
validate_label(self.component.sd_card_label, condition)
validate_label(self.component.sd_card_error_label, condition)
self.component.sd_card_error_label.set_visible(not condition)
def sd_card_refresh_button_clicked(self, button):
self.refresh_disk_list()
self.update_free_space()
......
......@@ -1108,6 +1108,18 @@ In File mode the image is created at build path, you can choose the size
<property name="position">13</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="sd_card_error_label">
<property name="visible">False</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes">Your SD-card is not clean. Please Wipe it so it only contains a single FAT-like partition.</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">14</property>
</packing>
</child>
<child>
<object class="GtkBox" id="no_id_20">
<property name="visible">True</property>
......@@ -1142,7 +1154,7 @@ In File mode the image is created at build path, you can choose the size
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">14</property>
<property name="position">15</property>
</packing>
</child>
<child>
......@@ -1180,7 +1192,7 @@ In File mode the image is created at build path, you can choose the size
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">15</property>
<property name="position">16</property>
</packing>
</child>
<child>
......@@ -1216,7 +1228,7 @@ In File mode the image is created at build path, you can choose the size
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">16</property>
<property name="position">17</property>
</packing>
</child>
<child>
......@@ -1276,7 +1288,7 @@ In File mode the image is created at build path, you can choose the size
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">17</property>
<property name="position">18</property>
</packing>
</child>
<child>
......@@ -1355,7 +1367,7 @@ In File mode the image is created at build path, you can choose the size
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">18</property>
<property name="position">19</property>
</packing>
</child>
<child>
......@@ -1420,7 +1432,7 @@ In File mode the image is created at build path, you can choose the size
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">19</property>
<property name="position">20</property>
</packing>
</child>
<child>
......@@ -1456,7 +1468,7 @@ In File mode the image is created at build path, you can choose the size
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">20</property>
<property name="position">21</property>
</packing>
</child>
</object>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment