* iw/partition_gui.py (makeLvmCB, makepartCB, makeraidCB): Remove functions. --- iw/partition_gui.py | 196 +++++++++++++------------------------------------- 1 files changed, 51 insertions(+), 145 deletions(-) diff --git a/iw/partition_gui.py b/iw/partition_gui.py index dc0ff6a..2d25bda 100644 --- a/iw/partition_gui.py +++ b/iw/partition_gui.py @@ -1040,11 +1040,6 @@ class PartitionWindow(InstallWindow): self.diskStripeGraph.selectSlice(device) - def makepartCB(self, widget): - device = self.storage.newPartition(fmt_type=self.storage.defaultFSType, - size=200) - self.editPartition(device, isNew=1) - def deleteCB(self, widget): """ Right now we can say that if the device is partitioned we want to delete all of the devices it contains. At some point @@ -1119,6 +1114,57 @@ class PartitionWindow(InstallWindow): custom_icon="warning") return +# FIXME: Include the error messages somewhere. +# if not getFormat("software RAID").supported: +# self.intf.messageWindow(_("Not supported"), +# _("Software RAID is NOT supported on " +# "this platform."), type="ok", +# custom_icon="error") +# return +# +# availminors = self.storage.unusedMDMinors +# if len(availminors) < 1: +# self.intf.messageWindow(_("No RAID minor device numbers available"), +# _("A software RAID device cannot " +# "be created because all of the " +# "available RAID minor device numbers " +# "have been used."), +# +# type="ok", custom_icon="error") +# numparts = P_("You currently have %d software RAID partition free to use.", +# "You currently have %d software RAID partitions free to use.", +# len(availraidparts)) % len(availraidparts,) +# +# lbltxt = _("Software RAID allows you to combine several disks into " +# "a larger RAID device. A RAID device can be configured " +# "to provide additional speed and reliability compared " +# "to using an individual drive. For more information on " +# "using RAID devices please consult the %s " +# "documentation.") % (productName,) +# +# lbltxt = lbltxt + "\n\n" + numparts + "\n\n" +# +# if len(availraidparts) < 2: +# lbltxt = lbltxt + _("To use RAID you must first " +# "create at least two partitions of type " +# "'software RAID'. Then you can " +# "create a RAID device that can " +# "be formatted and mounted.\n\n") +# +# lbltxt = lbltxt + _("What do you want to do now?") +# +# FIXME: FOR THE LVM +# if not getFormat("lvmpv").supported or not lvm.has_lvm(): +# self.intf.messageWindow(_("Not supported"), +# _("LVM is NOT supported on " +# "this platform."), type="ok", +# custom_icon="error") +# return + + + + + # GTK crap starts here. create_storage_xml = gtk.glade.XML( gui.findGladeFile("create-storage.glade"), domain="anaconda") @@ -1444,142 +1490,6 @@ class PartitionWindow(InstallWindow): vgeditor.destroy() - def makeLvmCB(self, widget): - if not getFormat("lvmpv").supported or not lvm.has_lvm(): - self.intf.messageWindow(_("Not supported"), - _("LVM is NOT supported on " - "this platform."), type="ok", - custom_icon="error") - return - - vg = self.storage.newVG() - self.editLVMVolumeGroup(vg, isNew = 1) - return - - def makeraidCB(self, widget): - if not getFormat("software RAID").supported: - self.intf.messageWindow(_("Not supported"), - _("Software RAID is NOT supported on " - "this platform."), type="ok", - custom_icon="error") - return - - availminors = self.storage.unusedMDMinors - if len(availminors) < 1: - self.intf.messageWindow(_("No RAID minor device numbers available"), - _("A software RAID device cannot " - "be created because all of the " - "available RAID minor device numbers " - "have been used."), - type="ok", custom_icon="error") - return - - - # see if we have enough free software RAID partitions first - # if no raid partitions exist, raise an error message and return - availraidparts = self.storage.unusedMDMembers() - - dialog = gtk.Dialog(_("RAID Options"), self.parent) - gui.addFrame(dialog) - dialog.add_button('gtk-cancel', 2) - dialog.add_button('gtk-ok', 1) - dialog.set_position(gtk.WIN_POS_CENTER) - - maintable = gtk.Table() - maintable.set_row_spacings(5) - maintable.set_col_spacings(5) - row = 0 - - numparts = P_("You currently have %d software RAID partition free to use.", - "You currently have %d software RAID partitions free to use.", - len(availraidparts)) % len(availraidparts,) - - lbltxt = _("Software RAID allows you to combine several disks into " - "a larger RAID device. A RAID device can be configured " - "to provide additional speed and reliability compared " - "to using an individual drive. For more information on " - "using RAID devices please consult the %s " - "documentation.") % (productName,) - - lbltxt = lbltxt + "\n\n" + numparts + "\n\n" - - if len(availraidparts) < 2: - lbltxt = lbltxt + _("To use RAID you must first " - "create at least two partitions of type " - "'software RAID'. Then you can " - "create a RAID device that can " - "be formatted and mounted.\n\n") - - lbltxt = lbltxt + _("What do you want to do now?") - - lbl = gui.WrappingLabel(lbltxt) - maintable.attach(lbl, 0, 1, row, row + 1) - row = row + 1 - - newminor = availminors[0] - radioBox = gtk.VBox (False) - - createRAIDpart = gtk.RadioButton(None, _("Create a software RAID _partition.")) - radioBox.pack_start(createRAIDpart, False, False, padding=10) - createRAIDdev = gtk.RadioButton(createRAIDpart, - _("Create a RAID _device [default=/dev/md%s].") % newminor) - radioBox.pack_start(createRAIDdev, False, False, padding=10) - - doRAIDclone = gtk.RadioButton(createRAIDpart, - _("Clone a _drive to create a " - "RAID device [default=/dev/md%s].") % newminor) - radioBox.pack_start(doRAIDclone, False, False, padding=10) - - createRAIDpart.set_active(1) - doRAIDclone.set_sensitive(0) - createRAIDdev.set_sensitive(0) - if len(availraidparts) > 0 and len(self.storage.disks) > 1: - doRAIDclone.set_sensitive(1) - - if len(availraidparts) > 1: - createRAIDdev.set_active(1) - createRAIDdev.set_sensitive(1) - - align = gtk.Alignment(0.5, 0.0) - align.add(radioBox) - maintable.attach(align,0,1,row, row+1) - row = row + 1 - - maintable.show_all() - dialog.vbox.pack_start(maintable) - dialog.show_all() - rc = dialog.run() - dialog.destroy() - if rc == 2: - return - - # see which option they choose - if createRAIDpart.get_active(): - member = self.storage.newPartition(fmt_type="software RAID", - size=200) - rc = self.editPartition(member, - isNew = 1, - restrictfs=["mdmember"]) - elif createRAIDdev.get_active(): - array = self.storage.newMDArray(fmt_type=self.storage.defaultFSType) - self.editRaidArray(array, isNew=1) - else: - cloneDialog = raid_dialog_gui.RaidCloneDialog(self.storage, - self.intf, - self.parent) - if cloneDialog is None: - self.intf.messageWindow(_("Couldn't Create Drive Clone Editor"), - _("The drive clone editor could not " - "be created for some reason."), - custom_icon="error") - return - - if cloneDialog.run(): - self.refresh() - - cloneDialog.destroy() - return - def viewButtonCB(self, widget): self.show_uneditable = not widget.get_active() self.diskStripeGraph.shutDown() @@ -1608,10 +1518,6 @@ class PartitionWindow(InstallWindow): (_("_Delete"), self.deleteCB), (_("Re_set"), self.resetCB)) -# (_("_Partition"), self.makepartCB), -# (_("R_AID"), self.makeraidCB), -# (_("_LVM"), self.makeLvmCB)) - for label, cb in ops: button = gtk.Button(label) buttonBox.add (button) -- 1.6.0.6 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list