diff options
author | Jeremy Katz <katzj@redhat.com> | 2005-09-12 20:59:59 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2005-09-12 20:59:59 +0000 |
commit | 5714c77ba120dcd6f19afa40e87d1419fbaee238 (patch) | |
tree | 65ea3ef0cd529bac60242c276155363af1478b84 /iw | |
parent | a4cfea5755c37ae042d6093c0eb81cc752f78a26 (diff) | |
download | anaconda-5714c77ba120dcd6f19afa40e87d1419fbaee238.tar.gz anaconda-5714c77ba120dcd6f19afa40e87d1419fbaee238.tar.xz anaconda-5714c77ba120dcd6f19afa40e87d1419fbaee238.zip |
2005-09-12 Jeremy Katz <katzj@redhat.com>
* iw/fdisk_gui.py: Remove dead code.
* iw/fdasd_gui.py: Likewise.
* textw/fdisk_text.py: Likewise.
* textw/fdasd_text.py: Likewise.
Diffstat (limited to 'iw')
-rw-r--r-- | iw/fdasd_gui.py | 139 | ||||
-rw-r--r-- | iw/fdisk_gui.py | 130 |
2 files changed, 0 insertions, 269 deletions
diff --git a/iw/fdasd_gui.py b/iw/fdasd_gui.py deleted file mode 100644 index b04d688df..000000000 --- a/iw/fdasd_gui.py +++ /dev/null @@ -1,139 +0,0 @@ -# -# fdasd_gui.py: interface that allows the user to run util-linux fdasd. -# -# Copyright 2001-2002 Red Hat, Inc. -# -# This software may be freely redistributed under the terms of the GNU -# library public license. -# -# You should have received a copy of the GNU Library Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -from gtk import * -from iw_gui import * -from gnome.zvt import * -from rhpl.translate import _ -from dispatch import DISPATCH_NOOP -import partitioning -import isys -import os -import iutil - -class FDasdWindow (InstallWindow): - def __init__ (self, ics): - InstallWindow.__init__ (self, ics) - self.fdasd_name = _("fdasd") - self.selectlabel = _("Select drive to run fdasd on") - self.drive = None - - ics.setTitle (self.fdasd_name) - ics.readHTML ("usefdasd-s390") - - def getNext(self): - # reread partitions - self.diskset.refreshDevices(self.intf) - partitioning.checkNoDisks(self.diskset, self.intf) - self.partrequests.setFromDisk(self.diskset) - - return None - - - def child_died (self, widget, button): - self.windowContainer.remove (self.windowContainer.children ()[0]) - self.windowContainer.pack_start (self.buttonBox) - button.set_state (STATE_NORMAL) - try: - os.remove ('/tmp/' + self.drive) - except: - # XXX fixme - pass - - self.ics.readHTML ("usefdasd-s390") - self.ics.setPrevEnabled (1) - self.ics.setNextEnabled (1) -# self.ics.setHelpEnabled (1) - - - def row_selected (self, clist, row, column, event): - self.drive = clist.get_text(row, column) - - def fdasd_button_clicked (self, widget): - if self.drive == None: - return - zvt = ZvtTerm (80, 24) - zvt.set_del_key_swap(TRUE) - zvt.connect ("child_died", self.child_died, widget) - - - # free our fd's to the hard drive -- we have to - # fstab.rescanDrives() after this or bad things happen! - if os.access("/sbin/fdasd", os.X_OK): - path = "/sbin/fdasd" - else: - path = "/usr/sbin/fdasd" - - - isys.makeDevInode(self.drive, '/tmp/' + self.drive) - - if zvt.forkpty() == 0: - env = os.environ - os.execve (path, (path, '/tmp/' + self.drive), env) - zvt.show () - - self.windowContainer.remove (self.buttonBox) - self.windowContainer.pack_start (zvt) - - self.ics.readHTML ("usefdasd-s390") - self.ics.setPrevEnabled (0) - self.ics.setNextEnabled (0) - - def dasdfmt_button_clicked (self, widget): - rc = self.intf.messageWindow(_("Warning"), _("Formatting the selected " - "DASD device will destroy all contents of the device. Do you " - "really want to format the selected DASD device?"), "yesno") - if rc == 1: - self.diskset.dasdFmt(self.intf, self.drive) - - # FdasdWindow tag="fdasd" - def getScreen (self, diskset, partrequests, intf): - self.diskset = diskset - self.partrequests = partrequests - self.intf = intf - - self.windowContainer = GtkVBox (FALSE) - self.buttonBox = GtkVBox (FALSE, 5) - self.buttonBox.set_border_width (5) - box = GtkVButtonBox () - label = GtkLabel (self.selectlabel) - - drives = self.diskset.driveList() - - # close all references we had to the diskset - self.diskset.closeDevices() - - clist = GtkCList(1, ["Available DASD devices:"]) - for drive in drives: - clist.append([drive]) - - clist.connect ("select_row", self.row_selected) - box.add (clist) - - box2 = GtkHButtonBox () - box2.set_layout (BUTTONBOX_SPREAD) - button = GtkButton ("Run fdasd") - button.connect ("clicked", self.fdasd_button_clicked) - box2.add(button) - button = GtkButton ("Run dasdfmt") - button.connect ("clicked", self.dasdfmt_button_clicked) - box2.add(button) - - self.buttonBox.pack_start (label, FALSE) - self.buttonBox.pack_start (box, FALSE) - self.buttonBox.pack_start (box2, FALSE) - self.windowContainer.pack_start (self.buttonBox) - - self.ics.setNextEnabled (1) - - return self.windowContainer diff --git a/iw/fdisk_gui.py b/iw/fdisk_gui.py deleted file mode 100644 index 42b568f7d..000000000 --- a/iw/fdisk_gui.py +++ /dev/null @@ -1,130 +0,0 @@ -# -# fdisk_gui.py: interface that allows the user to run util-linux fdisk. -# -# Copyright 2000-2002 Red Hat, Inc. -# -# This software may be freely redistributed under the terms of the GNU -# library public license. -# -# You should have received a copy of the GNU Library Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -# - -import gtk -from iw_gui import * -import vte -from rhpl.translate import _ -from dispatch import DISPATCH_NOOP -import partitioning -import isys -import os - -class FDiskWindow(InstallWindow): - def __init__(self, ics): - InstallWindow.__init__(self, ics) - ics.setTitle(_("Partitioning with fdisk")) - ics.readHTML("fdisk") - - def getNext(self): - # reread partitions - self.diskset.refreshDevices(self.intf) - self.diskset.checkNoDisks(self.intf) - self.partrequests.setFromDisk(self.diskset) - - return None - - - def child_died(self, widget, button): - self.windowContainer.remove(self.windowContainer.get_children()[0]) - self.windowContainer.pack_start(self.buttonBox) - button.set_state(gtk.STATE_NORMAL) - try: - os.remove('/tmp/' + self.drive) - except: - # XXX fixme - pass - - self.ics.readHTML("fdisk") - self.ics.setPrevEnabled(1) - self.ics.setNextEnabled(1) - cw = self.ics.getICW() - if cw.displayHelp: - cw.refreshHelp() -# self.ics.setHelpEnabled (1) - - - def button_clicked(self, widget, drive): - term = vte.Terminal() - term.set_encoding("UTF-8") - term.set_font_from_string("monospace 10") - term.set_color_background(gtk.gdk.color_parse('white')) - term.set_color_foreground(gtk.gdk.color_parse('black')) - term.connect("child_exited", self.child_died, widget) - term.reset(True, True) - - self.drive = drive - - # free our fd's to the hard drive -- we have to - # fstab.rescanDrives() after this or bad things happen! - if os.access("/sbin/fdisk", os.X_OK): - path = "/sbin/fdisk" - else: - path = "/usr/sbin/fdisk" - - isys.makeDevInode(drive, '/tmp/' + drive) - - term.fork_command(path, (path, '/tmp/' + drive)) - term.show() - - self.windowContainer.remove(self.buttonBox) - self.windowContainer.pack_start(term) - - self.ics.readHTML("fdiskpart") - cw = self.ics.getICW() - if cw.displayHelp: - cw.refreshHelp() - - self.ics.setPrevEnabled(0) - self.ics.setNextEnabled(0) - - # FDiskWindow tag="fdisk" - def getScreen(self, diskset, partrequests, intf): - - self.diskset = diskset - self.partrequests = partrequests - self.intf = intf - - self.windowContainer = gtk.VBox(False) - self.buttonBox = gtk.VBox(False, 5) - self.buttonBox.set_border_width(5) - box = gtk.VButtonBox() - box.set_layout("start") - label = gtk.Label(_("Select a drive to partition with fdisk:")) - - drives = self.diskset.driveList() - - # close all references we had to the diskset - self.diskset.closeDevices() - - for drive in drives: - button = gtk.Button(drive) - button.connect("clicked", self.button_clicked, drive) - box.pack_start(button) - - # put the button box in a scrolled window in case there are - # a lot of drives - sw = gtk.ScrolledWindow() - sw.add_with_viewport(box) - sw.set_policy(gtk.POLICY_NEVER, gtk.POLICY_AUTOMATIC) - viewport = sw.get_children()[0] - viewport.set_shadow_type(gtk.SHADOW_ETCHED_IN) - sw.set_size_request(-1, 400) - - self.buttonBox.pack_start(label, False) - self.buttonBox.pack_start(sw, False) - self.windowContainer.pack_start(self.buttonBox) - - self.ics.setNextEnabled(1) - - return self.windowContainer |