Skip to content

Commit 0ba7dc0

Browse files
committed
Improvement
1 parent 73f3799 commit 0ba7dc0

4 files changed

Lines changed: 37 additions & 12 deletions

File tree

scripts/gui/multibootusb.ui

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,7 @@
351351
</property>
352352
<property name="icon">
353353
<iconset>
354-
<normaloff>:/icon_uninstall</normaloff>:/icon_uninstall</iconset>
354+
<normaloff>:/icon_uninstall</normaloff>:/icon_uninstall</iconset>
355355
</property>
356356
<property name="iconSize">
357357
<size>
@@ -374,7 +374,7 @@
374374
</property>
375375
<property name="icon">
376376
<iconset>
377-
<normaloff>:/icon_install</normaloff>:/icon_install</iconset>
377+
<normaloff>:/icon_install</normaloff>:/icon_install</iconset>
378378
</property>
379379
<property name="iconSize">
380380
<size>
@@ -548,7 +548,7 @@
548548
</spacer>
549549
</item>
550550
<item row="2" column="1">
551-
<spacer name="verticalSpacer_5">
551+
<spacer name="verticalSpacer_2">
552552
<property name="orientation">
553553
<enum>Qt::Vertical</enum>
554554
</property>
@@ -560,6 +560,16 @@
560560
</property>
561561
</spacer>
562562
</item>
563+
<item row="3" column="0" colspan="3">
564+
<widget class="QLabel" name="label_waning">
565+
<property name="text">
566+
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;justify&quot;&gt;&lt;span style=&quot; font-weight:600; color:#ff0000;&quot;&gt;WARNING&lt;/span&gt; : Any bootable USB made using&lt;span style=&quot; font-weight:600;&quot;&gt; ISO Imager will destroy all data &lt;/span&gt;on the selected USB disk. &lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;Use it at your own risk. Developers are not responsile for loss of any data.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
567+
</property>
568+
<property name="wordWrap">
569+
<bool>false</bool>
570+
</property>
571+
</widget>
572+
</item>
563573
</layout>
564574
</item>
565575
</layout>
@@ -935,7 +945,7 @@
935945
<x>0</x>
936946
<y>0</y>
937947
<width>629</width>
938-
<height>19</height>
948+
<height>21</height>
939949
</rect>
940950
</property>
941951
<property name="nativeMenuBar">

scripts/gui/old_multibootusb.ui

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<bool>true</bool>
2121
</property>
2222
<property name="currentIndex">
23-
<number>0</number>
23+
<number>1</number>
2424
</property>
2525
<widget class="QWidget" name="tab_3">
2626
<property name="enabled">

scripts/gui/ui_multibootusb.py

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# -*- coding: utf-8 -*-
22

3-
# Form implementation generated from reading ui file 'gui/multibootusb.ui'
3+
# Form implementation generated from reading ui file 'multibootusb.ui'
44
#
5-
# Created by: PyQt5 UI code generator 5.5.1
5+
# Created by: PyQt5 UI code generator 5.6
66
#
77
# WARNING! All changes made in this file will be lost!
88

@@ -233,11 +233,15 @@ def setupUi(self, MainWindow):
233233
self.gridLayout_9.addItem(spacerItem2, 0, 1, 1, 1)
234234
spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
235235
self.gridLayout_9.addItem(spacerItem3, 2, 1, 1, 1)
236+
self.label_6 = QtWidgets.QLabel(self.tab_imager)
237+
self.label_6.setObjectName("label_6")
238+
self.gridLayout_9.addWidget(self.label_6, 3, 0, 1, 3)
236239
self.horizontalLayout_7.addLayout(self.gridLayout_9)
237240
self.tabWidget.addTab(self.tab_imager, "")
238241
self.tab_syslinux = QtWidgets.QWidget()
239242
self.tab_syslinux.setObjectName("tab_syslinux")
240243
self.horizontalLayout_3 = QtWidgets.QHBoxLayout(self.tab_syslinux)
244+
self.horizontalLayout_3.setContentsMargins(0, 0, 0, 0)
241245
self.horizontalLayout_3.setObjectName("horizontalLayout_3")
242246
self.gridLayout_2 = QtWidgets.QGridLayout()
243247
self.gridLayout_2.setObjectName("gridLayout_2")
@@ -286,6 +290,7 @@ def setupUi(self, MainWindow):
286290
self.tab_testboot = QtWidgets.QWidget()
287291
self.tab_testboot.setObjectName("tab_testboot")
288292
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.tab_testboot)
293+
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
289294
self.verticalLayout_2.setObjectName("verticalLayout_2")
290295
self.gridLayout_6 = QtWidgets.QGridLayout()
291296
self.gridLayout_6.setContentsMargins(-1, 10, -1, -1)
@@ -364,7 +369,7 @@ def setupUi(self, MainWindow):
364369
self.verticalLayout_7.addWidget(self.progressbar)
365370
MainWindow.setCentralWidget(self.centralwidget)
366371
self.menubar = QtWidgets.QMenuBar(MainWindow)
367-
self.menubar.setGeometry(QtCore.QRect(0, 0, 629, 19))
372+
self.menubar.setGeometry(QtCore.QRect(0, 0, 629, 21))
368373
self.menubar.setNativeMenuBar(True)
369374
self.menubar.setObjectName("menubar")
370375
self.menuFile = QtWidgets.QMenu(self.menubar)
@@ -415,6 +420,7 @@ def retranslateUi(self, MainWindow):
415420
self.label_persistence_value.setText(_translate("MainWindow", "0 MB"))
416421
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_multibootusb), _translate("MainWindow", "MultiBootUSB"))
417422
self.button_write_image_to_disk.setText(_translate("MainWindow", "Write image to USB"))
423+
self.label_6.setText(_translate("MainWindow", "<html><head/><body><p align=\"justify\"><span style=\" font-weight:600; color:#ff0000;\">WARNING</span> : Any bootable USB made using<span style=\" font-weight:600;\"> ISO Imager will destroy all data </span>on the selected USB disk. </p><p align=\"justify\">Use it at your own risk. Developers are not responsile for loss of any data.</p></body></html>"))
418424
self.tabWidget.setTabText(self.tabWidget.indexOf(self.tab_imager), _translate("MainWindow", "Write Image to disk"))
419425
self.groupBox_2.setTitle(_translate("MainWindow", "Install Syslinux"))
420426
self.check_install_sys_only.setText(_translate("MainWindow", "Install only syslinu&x (existing configurations will not be altered)."))
@@ -450,3 +456,13 @@ def retranslateUi(self, MainWindow):
450456
self.action_Quit.setText(_translate("MainWindow", "&Quit"))
451457
self.action_About.setText(_translate("MainWindow", "&About"))
452458

459+
460+
if __name__ == "__main__":
461+
import sys
462+
app = QtWidgets.QApplication(sys.argv)
463+
MainWindow = QtWidgets.QMainWindow()
464+
ui = Ui_MainWindow()
465+
ui.setupUi(MainWindow)
466+
MainWindow.show()
467+
sys.exit(app.exec_())
468+

scripts/mbusb_cli.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,10 @@ def iso_install(iso_image):
7575
_distro = distro(iso_cfg_ext_dir(), iso_image)
7676
if _distro is not None:
7777
log('Initiating installation process for ' + iso.iso_basename(iso_image))
78+
log('Detected distro type is :' + _distro)
79+
log('\nSelected ISO is :' + quote(iso_name(iso_image)))
80+
log('Selected target device is :' + quote(config.usb_disk), '\n')
7881
if config.yes is not True:
79-
log('Detected distro type is :' + _distro)
80-
log('\nSelected ISO is :' + quote(iso_name(iso_image)))
81-
log('Selected target device is :' + quote(config.usb_disk), '\n')
8282
log('Please confirm the option.')
8383
log('Y/y/Yes/yes/YES or N/n/No/no/NO')
8484
if read_input_yes() is True:
@@ -100,7 +100,6 @@ def iso_install(iso_image):
100100
syslinux_default(config.usb_disk)
101101
update_distro_cfg_files(iso_image, config.usb_disk, _distro)
102102
log('Finished installing ' + iso.iso_basename(iso_image))
103-
104103
else:
105104
log('\n\nSorry ' + iso_name(iso_image) + ' is not supported at the moment.\n'
106105
'Please report tissue at https://github.com/mbusb/multibootusb/issues\n')

0 commit comments

Comments
 (0)