Skip to content

Commit

Permalink
Inform user about the requirement of admin privilege. Added option to…
Browse files Browse the repository at this point in the history
… list all drives (including fixed). Fixed the bug 'maximum 2047 mb allowed'.
  • Loading branch information
mbusb committed Dec 3, 2016
1 parent 4acef6f commit 890c266
Show file tree
Hide file tree
Showing 8 changed files with 267 additions and 177 deletions.
Empty file modified build_pkg
100644 → 100755
Empty file.
6 changes: 5 additions & 1 deletion multibootusb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,12 @@ def usage():


def start_gui():
print('Starting multibootusb GUI...')
from scripts import mbusb_gui
print('Starting multibootusb GUI...')
if platform.system() == 'Linux':
if os.getuid() != 0:
print('\n\n\nAdmin privilege is required to run multibootusb.\n If you are running from source try '
'\'sudo python3 ./multibootusb\'\n or you can try \'multibootusb-pkexec\' (post install)\n\n\n')
mbusb_gui.main_gui()


Expand Down
2 changes: 2 additions & 0 deletions scripts/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
uninstall_distro_dir_path = ""
iso_file_list = ''

process_exist = None

imager_iso_link = ""
imager_usb_disk_selected = ""
imager_lock = ""
Expand Down
194 changes: 102 additions & 92 deletions scripts/gui/multibootusb.ui
Original file line number Diff line number Diff line change
Expand Up @@ -33,54 +33,18 @@
</property>
</widget>
</item>
<item row="5" column="5">
<widget class="QLabel" name="labelstep3">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Step 3&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSlider" name="slider_persistence">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Choose Persistence size. Not all distros supports persistence...</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBothSides</enum>
</property>
<property name="tickInterval">
<number>0</number>
</property>
</widget>
</item>
<item row="5" column="3">
<widget class="QPushButton" name="close">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
<item row="1" column="3" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout_11">
<item>
<widget class="QGroupBox" name="groupBox_11">
<property name="title">
<string>Detect USB</string>
<string>Detect</string>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_8">
<item>
<widget class="QPushButton" name="detect_usb">
<property name="text">
<string>Refresh USB</string>
<string>Detect Drives</string>
</property>
</widget>
</item>
Expand All @@ -89,6 +53,26 @@
</item>
</layout>
</item>
<item row="0" column="0" rowspan="4" colspan="3">
<widget class="QListWidget" name="listWidget"/>
</item>
<item row="7" column="0" colspan="6">
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>0</number>
</property>
</widget>
</item>
<item row="5" column="4">
<widget class="QPushButton" name="create">
<property name="text">
<string>Create</string>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QComboBox" name="comboBox"/>
</item>
<item row="0" column="5">
<widget class="QLabel" name="labelstep1">
<property name="text">
Expand All @@ -103,15 +87,41 @@
</property>
</widget>
</item>
<item row="5" column="4">
<widget class="QPushButton" name="create">
<item row="5" column="3">
<widget class="QPushButton" name="close">
<property name="text">
<string>Create</string>
<string>Close</string>
</property>
</widget>
</item>
<item row="0" column="3" colspan="2">
<widget class="QComboBox" name="comboBox"/>
<item row="5" column="5">
<widget class="QLabel" name="labelstep3">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;center&quot;&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Step 3&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QSlider" name="slider_persistence">
<property name="enabled">
<bool>false</bool>
</property>
<property name="toolTip">
<string>Choose Persistence size. Not all distros supports persistence...</string>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="tickPosition">
<enum>QSlider::TicksBothSides</enum>
</property>
<property name="tickInterval">
<number>0</number>
</property>
</widget>
</item>
<item row="3" column="3" colspan="2">
<widget class="QGroupBox" name="groupBox">
Expand All @@ -133,55 +143,6 @@
</layout>
</widget>
</item>
<item row="4" column="4">
<widget class="QPushButton" name="browse_iso">
<property name="text">
<string>Browse ISO</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_persistence">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Persistence&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="0" column="0" rowspan="4" colspan="3">
<widget class="QListWidget" name="listWidget"/>
</item>
<item row="7" column="0" colspan="6">
<widget class="QProgressBar" name="progressBar">
<property name="value">
<number>0</number>
</property>
</widget>
</item>
<item row="6" column="0" colspan="6">
<widget class="QLabel" name="status">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="text">
<string/>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
<item row="4" column="0" colspan="4">
<widget class="QLineEdit" name="lineEdit"/>
</item>
Expand Down Expand Up @@ -229,6 +190,55 @@
</layout>
</widget>
</item>
<item row="4" column="4">
<widget class="QPushButton" name="browse_iso">
<property name="text">
<string>Browse ISO</string>
</property>
</widget>
</item>
<item row="5" column="0">
<widget class="QLabel" name="label_persistence">
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;&lt;span style=&quot; font-weight:600;&quot;&gt;Persistence&lt;/span&gt;&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
</widget>
</item>
<item row="0" column="4">
<widget class="QCheckBox" name="checkBox_all_drives">
<property name="text">
<string>All Drives</string>
</property>
</widget>
</item>
<item row="6" column="0" colspan="6">
<widget class="QLabel" name="status">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="acceptDrops">
<bool>false</bool>
</property>
<property name="autoFillBackground">
<bool>false</bool>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
<property name="text">
<string/>
</property>
<property name="textFormat">
<enum>Qt::AutoText</enum>
</property>
<property name="scaledContents">
<bool>false</bool>
</property>
</widget>
</item>
</layout>
</item>
</layout>
Expand Down
Loading

0 comments on commit 890c266

Please sign in to comment.