diff options
author | Andrew Gaffney <agaffney@gentoo.org> | 2007-05-11 15:23:09 +0000 |
---|---|---|
committer | Andrew Gaffney <agaffney@gentoo.org> | 2007-05-11 15:23:09 +0000 |
commit | 6467630ab5c72eec8ce4ffc87c219d8a747f5de8 (patch) | |
tree | e756ab871898289ee42c95d96977f9515d6399fd | |
parent | new gtkfe splash image (diff) | |
download | gli-6467630ab5c72eec8ce4ffc87c219d8a747f5de8.tar.gz gli-6467630ab5c72eec8ce4ffc87c219d8a747f5de8.tar.bz2 gli-6467630ab5c72eec8ce4ffc87c219d8a747f5de8.zip |
add check for mounted partitions
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1849 f8877401-5920-0410-a79b-8e2d7e04ca0d
-rw-r--r-- | src/Partitioning.py | 7 | ||||
-rw-r--r-- | src/fe/gtk/Partition.py | 4 | ||||
-rw-r--r-- | src/fe/gtk/installer-banner-800x64.png | bin | 18229 -> 21350 bytes |
3 files changed, 11 insertions, 0 deletions
diff --git a/src/Partitioning.py b/src/Partitioning.py index e14b6b8..eeced08 100644 --- a/src/Partitioning.py +++ b/src/Partitioning.py @@ -110,6 +110,13 @@ class Device: parted_part = self._parted_disk.next_partition(parted_part) ## + # Checks to see if partitions are mounted on device + def has_mounted_partitions(self): + if self._parted_dev.is_busy(): + return True + return False + + ## # Returns the partition object with the specified minor # @param idx Index of partition object def get_partition(self, idx): diff --git a/src/fe/gtk/Partition.py b/src/fe/gtk/Partition.py index 455397c..f2252b5 100644 --- a/src/fe/gtk/Partition.py +++ b/src/fe/gtk/Partition.py @@ -340,6 +340,10 @@ click the Next button, your partition table will remain untouched. for drive in tmp_drives: try: self.devices[drive] = Partitioning.Device(drive, self.controller.cc.get_arch(), self.controller.install_profile) + if self.devices[drive].has_mounted_partitions(): + msgdlg = gtk.MessageDialog(parent=self.controller.window, type=gtk.MESSAGE_WARNING, buttons=gtk.BUTTONS_OK, message_format="You have a filesystem mounted on %s. Please unmount before performing any operations on this device. Failure to do so could cause data loss. You have been warned." % drive) + msgdlg.run() + msgdlg.destroy() self.detected_dev_combo.append_text(drive) self.drives.append(drive) except: diff --git a/src/fe/gtk/installer-banner-800x64.png b/src/fe/gtk/installer-banner-800x64.png Binary files differindex fa60b92..e95e6cc 100644 --- a/src/fe/gtk/installer-banner-800x64.png +++ b/src/fe/gtk/installer-banner-800x64.png |