summaryrefslogtreecommitdiffstats
path: root/iw/partition_gui.py
Commit message (Collapse)AuthorAgeFilesLines
* Display the device path with a smaller font and different color.Joel Granados Moreno2009-10-011-10/+20
| | | | | | | * iw/partition_gui.py (__init__): For the "Device" cell renderer, use 'markup' instead of just text. (populate): Use pango markup to chaqnge the size and color of the device paths for 'normal' devices and raid devices.
* Display bar view for the selected device only.Joel Granados Moreno2009-10-011-31/+44
| | | | | | | | | | | | * iw/partition_gui.py (__init__): Add variable to track the displayed storage element. (getDisplayed, setDisplayed): New functions that manage the varialbe holding the current displayed storage element. (display): New function that handles the display of a disk. (populate): Show only one disk in the bar view. (treeSelectCB): When the user clicks on one of the disks or the partitions, modify the bar view if needed. (getScreen): A vertical Pane is not needed anymore.
* Fix indentation in editCBJoel Granados Moreno2009-10-011-2/+2
| | | | | * iw/partition_gui.py (editCB): Fix indentation on the "Unable to edit" message.
* Organize the creation of the custom screen into sections.Joel Granados Moreno2009-10-011-43/+49
| | | | | | | | Increase readability in getScreen. * iw/partition_gui.py (getScreen): Remove the unneeded spaces. Replace the \t where needed. Put the "Hide" checkbox in the same level as the buttons.
* Use a checkmark from a PNG image instead of a string.Joel Granados Moreno2009-10-011-29/+2
| | | | | | * iw/partition_gui.py (getScreen): Point the checkmark loading line to the new checkMark.png image. * pixmaps/checkMark.png : New check mark image.
* Put the size after the device name in the storage tree.Joel Granados Moreno2009-10-011-4/+2
| | | | * iw/partition_gui.py (DiskTreeModel): Modified the "titles" variable.
* Add the warning message for an invalid create.Joel Granados Moreno2009-10-011-2/+7
|
* Reorganize the Customization screen a little.Joel Granados Moreno2009-10-011-3/+5
| | | | | | | | Put the action buttons at the bottom of the screen (on top of the "Ok" and "Cancel") buttons so they similar to what gnome standard uses. * iw/partition_gui.py (getScreen): Change the order of the main customization screen.
* Remove unneeded functions & add the about messages for LVM and RAID.Joel Granados Moreno2009-10-011-157/+49
| | | | | | | * iw/partition_gui.py (makeLvmCB, makepartCB, makeraidCB): Remove functions. (createCB): Add the messages. * ui/create-storage.glade: Make the buttons visible and sensitive.
* Have an intermediary screen for the "Create" action.Joel Granados Moreno2009-10-011-9/+183
| | | | | | | * iw/partition_gui.py (createCB): New function. All the create requests will pass through this function. It pops up a dialog that presents the different creat options to the user. Use the new storage/partitioning.py function (hasFreeDiskSpace).
* Edit LVM LV when user has a LV selected.Joel Granados Moreno2009-10-011-2/+32
| | | | | | | | | | | | * iw/lvm_dialog_gui.py (run, convertToActions): New function. Need to have a separate function so we can run it from the editLVMLogicalVolume function in iw/partition_gui.py. We call new function from run. * iw/partition_gui.py (editCB): Call the new editLVMLogicalVolume function. (editLVMLogicalVolume): New function. Serves the same purpose as editLVMVolumeGroup but for Logical Volumes. (deleteCB): All actions are created when we delete a selected LV. We do need to make sure that we delete the deleted LV from the VG that
* Handle Esc keypress in (some more) dialogs as Cancel - (#520110).Radek Vykydal2009-09-211-1/+1
| | | | Addition to patch 4fff93ac8e3b3187af5f50d17a065fafc610a5df.
* Do not show Unknown as filesystem type for free space.David Cantrell2009-09-171-0/+1
| | | | | | When doing a custom disk layout, free space was showing 'Unknown' for the filesystem type. This patch blanks out the Type field for free space.
* Rename doDeleteDependentDevices to doClearPartitionedDevice for clarity.David Lehman2009-09-151-1/+1
|
* Don't traceback if Delete button is hit when no device is selected.David Lehman2009-08-171-0/+2
|
* Change all disklabel manipulations to use the DiskLabel format class.David Lehman2009-08-171-5/+3
| | | | | | | | The DiskDevice class no longer has any implicit requirement that the device contain a disklabel. The disklabel is now represented as a device format. This provides the basis for future support for device types that can optionally be partitioned, as well as whole-disk formats such as filesystems.
* Change DeviceTree.devices from a dict to a list.David Lehman2009-07-211-1/+1
|
* Fix discovery of existing raid/lvm for ks install without clearpart ↵Radek Vykydal2009-06-051-0/+1
| | | | | | | | | | | | | | | | | (#503310) (#503681) Default clearPartType to None so that all devices are discovered during storage initialization step, and UI parttype can be set to its default "Replace existing linux system". Also set clearPartType appropriately when going back from partition dialog so that all devices are discovered during storage reset. There is one case that can't be resolved this way: clearpart --all or --linux is set in ks and "Create custom layout" is selected in parttype UI step. Because of ks setting, storage initialization doesn't discover devices (RAID, LVM) on partitions that are to be cleared and therefore they are not present in custom partition dialog. This can be workarounded by going back and than again to custom partitioning dialog. I think we should grey-out type of partitioning combo set to value from ks clearpart command.
* Use gettext.ldngettext when necessary (#467603)David Cantrell2009-06-031-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The i18n people have suggested using ngettext when we need to have singular and plural forms of strings, where the count will vary as to what we are reporting to the user. I've made the changes they have suggested. I created a new lambda function called P_() to use for the plural cases. P_() takes in three parameters: 1) The singular form of the string. 2) The plural form of the string. 3) A count. Here's an example: ....some loop runs doing stuff bytesWritten = 47 msg = P_("Wrote %d byte.", "Wrote %d bytes.", bytesWritten) % (bytesWritten,) print msg The % substitution is correct at the end because P_() returns a single string, so we only need the format string to account for that. Some strings have been changed slightly to make it easier for translations to other languages, particularly when choosing plural forms.
* Show unknown partitions as "Unknown" in partition editor.David Cantrell2009-06-021-2/+2
| | | | | Show unknown partition types as "Unknown" instead of "None" in the partition editor window.
* Don't traceback when a freespace partition is present (#499662).Chris Lumens2009-05-071-2/+15
| | | | | This does not allow you to click on a freespace slice in the graph and then edit, new, delete, etc. but it does prevent tracebacks. One step at a time.
* Use storage objects throughout the partition editing UI code (#491806, #496002).Chris Lumens2009-05-061-17/+16
| | | | | | | | This fixes the problem where highlighting the partition in the slice graph doesn't allow you to click "edit", and where selecting from the tree view doesn't highlight the partition in the graph. The underlying problem was that our list stores storage objects, but we were passing in a pyparted object to do the comparison with.
* Allow editing of the hdiso source partition so it can be mounted (#498591).Chris Lumens2009-05-011-1/+1
|
* Use getDeviceNodeName() instead of basename of device node.Hans de Goede2009-04-081-1/+2
| | | | Missed this one in my initial cciss prep patch.
* Remove some old, unused code that also uses biosGeometry.Chris Lumens2009-04-061-14/+4
|
* For very small disks, don't try to display a stripe in the graph (#480484).Chris Lumens2009-04-061-0/+6
|
* Try to handle devices which live in a subdir of /dev properlyHans de Goede2009-04-061-3/+0
| | | | | | This hopefully fixes cciss (will test once an anaconda with this in has hit rawhide, so I can use rhts to test). This is the second version of this patch, this time it also does the / -> ! translation for sysfs names.
* Fix some pylint warnings in iw/*.pyHans de Goede2009-03-311-9/+1
|
* Reference the format by type, not name.(#492596)Joel Granados Moreno2009-03-311-1/+1
|
* Handle system crappyness.Joel Granados Moreno2009-03-191-1/+1
| | | | | | | | | | | | | | | | | | | | * storage/__init__.py (createSuggestedVGName): Take into account the new lvm black list. * storage/devicelibs/lvm.py (blacklistVG): New function, add a VG to a the black list. * storage/devicelibs/lvm.py (vgreduce): introduces a new argument to the function. rm means use the lvm --removemissing option. * storage/devices.py (LVMVolumeGroupDevice.complete): New function to evaluate if VG is consistent. * storage/devices.py (LVMLogicalVolumeDevice.complete): Likewise for LVs. * storage/devicetree.py (_handleInconsistencies): New function intended to catch all unwanted behavior from the system before continuing. * storage/devicetree.py (questionReinitILVM): New function intended to ask the user what to do in case we find inconsistent LVM metadata.
* Fix getChildren call in partition UIRadek Vykydal2009-03-181-1/+1
|
* Do not create a LUKSDevice if we do not have a way to map the device.David Lehman2009-03-161-6/+18
| | | | | | | | If the user elects not to provide a passphrase or key, do not create a LUKSDevice. We will just keep the backing device with its luks format. This saves us the trouble of checking whether we have the ability to set up each LUKSDevice since we only have LUKSDevice instances for those we can set up.
* editPartitionRequest -> editPartition in iw/partition_gui.py (#490384).Chris Lumens2009-03-161-3/+3
|
* Fix display of LV format type for encrypted LVs.David Lehman2009-03-131-1/+1
|
* Fix infinite loops in partition screen populate. (#490051)David Lehman2009-03-131-0/+2
|
* Speed up partitioning screen redraws by trimming workload where possible.David Lehman2009-03-101-40/+48
| | | | | | | | | | | Previously we would call doPartitioning every time we refreshed the main partitioning screen. This makes little sense if the user just finished modifying a vg or md array or only assigned a mountpoint to an existing device. There is still more that we could do, like only calling doPartitioning if one of the generated action involves partition allocation.
* Add dmraid functionality to new storage code.Joel Granados Moreno2009-03-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * storage/devices.py (DMRaidArrayDevice): Complete the DMRaidArrayDevice class. * storage/devices.py (PartitionDeviceFactory): When creating a partition we need to decide, based on the device holding the partition, what type of partition class will be returned. * storage/devices.py (PartitionDevice): When setting the disk we must be careful to change stuff accordingly. * storage/devicetree.py (addUdevDevice): Handle the creation of the dmraid device and its members in the addUdeveDevice function. * storage/formats/dmraid.py (DMRaidMember): Complete the format that handles devices being members of a dmraid array. * storage/udev.py (udev_device_is_dmraid): add a function that recognizes dmraid devices from the provided info list. * storage/udev.py (udev_device_get_dmraid_partition_disk): function that gets the disk string from partition info. * storage/udev.py (udev_device_is_dmraid_partition): function that checks for dmraid partitions. * storage/__init__.py (disks(self)): return a list of disks from the internal attribute. * storage/__init__.py (Storage.disks): we really want to make sure we return all the objects that comply with the DiskDevice interface (inheret from DiskDevice) * storage/__init__.py (Storage.partitions): Same as above but for PartitionDevice. * iw/autopart_type (PartitionTypeWindow(InstallWindow)): use disk.name instead of munging the first 5 characters of the path. * storage/partitioning (newPartition): Use the new partition factory to create a partition.
* Fix check for newly encrypted partitions in main part window.David Lehman2009-03-031-1/+3
|
* Several fixes to main partitioning gui.David Lehman2009-03-031-16/+5
| | | | | | | | | | - Fix indentation of block that sets up format indicators for partitions. - Fix check for partitionable devices in deleteCB. - Refresh UI even if dialogs return empty action list, so we pick up little things like a newly set mountpoint on a pre- existing device. - Don't pass storage instance to vgeditor since anaconda has it.
* Import lvm module to provide has_lvm.David Lehman2009-03-021-0/+1
|
* Import doPartitioning from storage.partitioning.David Cantrell2009-03-021-1/+2
| | | | doPartitioning is not in autopart anymore.
* Lots of minor fixes and cleanups. A non-exhaustive list follows.David Lehman2009-02-271-24/+26
| | | | | | | | | | | - Change minsize/maxsize to minSize/maxSize since that's the convention elsewhere throughout the code. - Redirect output from all external utilities to tty5, not /dev/null. - Don't waste calls to basename for debug log statements, especially when the device can be None. - Add lots of missing imports. - Fix lots of remnants of previous code usage.
* Lots of little updates to make things use the new storage module.David Lehman2009-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | exception.py: - Remove unused partedUtils import. - Collect things from storage, not partitions. gui.py: - exceptionDisks is in storage now, not diskset. installclasses/rhel.py: installclasses/fedora.py: - setDefaultPartitioning take storage arg, not partitions. iw/autopart_type.py: - Find things in storage, not partitions. iw/bootloader_main_gui.py: iw/osbootwidget.py: - Remove unused partedUtils import. - Find fsset in storage now. - Use storage, not diskset, for iterating over disks/partitions. iw/lvm_dialog_gui.py: - Fix several typos from the original storage update. iw/partition_gui.py: - Find unusedMDMembers in storage, not partitions. iw/partitionui_helpers_gui.py: - Use StorageDevice.minSize,maxSize for resize limits. - Update doUIRAIDLVMChecks to use new storage module. packages.py: - Use new storage module to list vgs for selinux hack. storage/__init__.py: - Fix FSSet.createSwapFile so it creates the file on the correct device. storage/iscsi.py: - Use new storage module to identify iscsi disks. textw/partition_text.py: textw/upgrade_text.py: - Initial update to use new storage module. yuminstall.py: - Use storage module to find space for upgrade transaction. - Use storage module to locate protected partitions to mount in doPreInstall.
* Remove a bunch of obsolete imports.David Lehman2009-02-231-6/+0
|
* Update UI code to use new storage module.David Lehman2009-02-231-349/+291
|
* It's part.active, not part.is_active().Chris Lumens2009-02-161-1/+1
|
* Iterate over partitions to see free space.David Cantrell2009-02-121-1/+7
| | | | | | Use the getFirstPartition() and nextPartition() method to iterate over partitions so we can see the free space as represented by libparted.
* Syntax fixes for the new pyparted for parted.FileSystem.David Cantrell2009-02-121-2/+2
| | | | | | | | To get the name of the filesystem type (e.g., 'ext3'), use parted.FileSystem.type. This string is also a valid key in to the parted.fileSystemType hash table. You can extract the value from the hash table to get a _ped.FileSystemType object for your filesystem.
* Iterate over partitions using disk.partitionsDavid Cantrell2009-02-121-12/+5
| | | | | | | Rather than calling disk.nextPartition() over and over, we can get a hash table of all partitions on a disk via disk.partitions. Iterate over the values() of this hash (the keys correspond to the partition number).
* Read CHS values from Device.biosGeometry propertyDavid Cantrell2009-02-121-7/+6
| | | | | | The old pyparted had CHS values as properties directly on the PedDevice. The new pyparted API gives a 3-tuple for the CHS values via the biosGeometry and hardwareGeometry properties.