diff options
author | Matt Wilson <msw@redhat.com> | 2001-06-25 05:50:45 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2001-06-25 05:50:45 +0000 |
commit | 0d308d86ae5a20cbad5aa720c7ed685325200b9d (patch) | |
tree | ce759de8c1949586ef2a2be3b1f1cbc8850b7121 /gui.py | |
parent | 7d724caa031e91e208d696be57f9fd38700de4bc (diff) | |
download | anaconda-0d308d86ae5a20cbad5aa720c7ed685325200b9d.tar.gz anaconda-0d308d86ae5a20cbad5aa720c7ed685325200b9d.tar.xz anaconda-0d308d86ae5a20cbad5aa720c7ed685325200b9d.zip |
register a parted exception handler for gui mode
modified isys.makeDevInode to use /dev/foo if it is there, while
preserving backwards compatible behavior
import fsset for workstation, it needs to find the ext2 filesystemtype
for some reason
skip drives that can't be opened or partition tables that can't be
read. we still need to handle 'fresh' disks better.
Diffstat (limited to 'gui.py')
-rwxr-xr-x | gui.py | 29 |
1 files changed, 28 insertions, 1 deletions
@@ -25,7 +25,8 @@ import iutil import string import isys import sys -from translate import cat, _ +import parted +from translate import cat, _, N_ from gnome.ui import * from gnome.xmhtml import * from gtk import * @@ -83,6 +84,31 @@ def processEvents(): while events_pending (): mainiteration (FALSE) +def partedExceptionWindow(exc): + print exc.type_string + print exc.message + print exc.options + win = GnomeDialog (exc.type_string) + win.vbox.pack_start (GtkLabel(exc.message)) + numButtons = 0 + buttonToAction = {} + + flags = ((parted.EXCEPTION_YES, N_("Yes")), + (parted.EXCEPTION_NO, N_("No")), + (parted.EXCEPTION_OK, N_("Ok")), + (parted.EXCEPTION_RETRY, N_("Retry")), + (parted.EXCEPTION_IGNORE, N_("Ignore")), + (parted.EXCEPTION_CANCEL, N_("Cancel"))) + for flag, string in flags: + if exc.options & flag: + win.append_button (_(string)) + buttonToAction[numButtons] = flag + numButtons = numButtons + 1 + win.show_all() + rc = win.run() + print rc, buttonToAction + return buttonToAction[rc] + class WaitWindow: def __init__(self, title, text): self.window = GtkWindow (WINDOW_POPUP) @@ -296,6 +322,7 @@ class InstallInterface: id.fsset.registerMessageWindow(self.messageWindow) id.fsset.registerProgressWindow(self.progressWindow) + parted.exception_set_handler(partedExceptionWindow) lang = id.instLanguage.getCurrent() lang = id.instLanguage.getLangNick(lang) |