summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2002-06-17 20:55:10 +0000
committerJeremy Katz <katzj@redhat.com>2002-06-17 20:55:10 +0000
commit8b19c5c74a277a692a271895144925d855c2499b (patch)
tree3d67bd9f4a76967e5325a29d14bc8ec9a1e85b59
parentcd6c235fd0291888df9d2d8bfd378c1459b5387a (diff)
downloadanaconda-8b19c5c74a277a692a271895144925d855c2499b.tar.gz
anaconda-8b19c5c74a277a692a271895144925d855c2499b.tar.xz
anaconda-8b19c5c74a277a692a271895144925d855c2499b.zip
make things work with new pygtk2
-rw-r--r--iw/account_gui.py11
-rw-r--r--iw/bootloader_gui.py10
-rw-r--r--iw/language_gui.py10
-rw-r--r--iw/lvm_dialog_gui.py7
-rw-r--r--iw/mouse_gui.py10
-rw-r--r--iw/network_gui.py5
-rw-r--r--iw/package_gui.py10
-rw-r--r--iw/timezone_gui.py5
-rw-r--r--iw/timezone_map_gui.py7
-rw-r--r--iw/upgrade_swap_gui.py4
-rw-r--r--iw/xconfig_gui.py10
11 files changed, 33 insertions, 56 deletions
diff --git a/iw/account_gui.py b/iw/account_gui.py
index 6800303d5..7fa05f38c 100644
--- a/iw/account_gui.py
+++ b/iw/account_gui.py
@@ -102,11 +102,10 @@ class AccountWindow (InstallWindow):
def getSelectedIter(self):
selection = self.userlist.get_selection()
- rc = selection.get_selected()
- if rc is None:
+ (model, iter) = selection.get_selected()
+ if iter is None:
return None
- model, iter = rc
return iter
def getSelectedData(self):
@@ -279,12 +278,10 @@ class AccountWindow (InstallWindow):
def deleteUser(self, *args):
selection = self.userlist.get_selection()
- rc = selection.get_selected()
- if rc is None:
+ (model, iter) = selection.get_selected()
+ if iter is None:
return
- model, iter = rc
-
accountName = self.userstore.get_value(iter, 0)
del self.passwords[accountName]
diff --git a/iw/bootloader_gui.py b/iw/bootloader_gui.py
index 34613d7fa..f37e5239d 100644
--- a/iw/bootloader_gui.py
+++ b/iw/bootloader_gui.py
@@ -481,10 +481,9 @@ class AdvancedBootloaderWindow (InstallWindow):
def getSelected(self):
selection = self.osTreeView.get_selection()
- rc = selection.get_selected()
- if not rc:
+ (model, iter) = selection.get_selected()
+ if not iter:
return None
- model, iter = rc
dev = model.get_value(iter, 2)
theDev = dev[5:] # strip /dev/
@@ -567,10 +566,9 @@ class AdvancedBootloaderWindow (InstallWindow):
def arrowClicked(self, widget, direction, *args):
selection = self.driveOrderView.get_selection()
- rc = selection.get_selected()
- if not rc:
+ (model, iter) = selection.get_selected()
+ if not iter:
return
- model, iter = rc
# there has got to be a better way to do this =\
drive = model.get_value(iter, 0)[5:]
diff --git a/iw/language_gui.py b/iw/language_gui.py
index be412bbd6..0eca0d2ce 100644
--- a/iw/language_gui.py
+++ b/iw/language_gui.py
@@ -25,9 +25,8 @@ class LanguageWindow (InstallWindow):
InstallWindow.__init__ (self, ics)
def getNext (self):
- rc = self.listView.get_selection().get_selected()
- if rc:
- model, iter = rc
+ (model, iter) = self.listView.get_selection().get_selected()
+ if iter:
self.lang = self.listStore.get_value(iter, 1)
self.instLang.setRuntimeLanguage(self.lang)
@@ -37,10 +36,9 @@ class LanguageWindow (InstallWindow):
def listScroll(self, widget, *args):
# recenter the list
- rc = self.listView.get_selection().get_selected()
- if rc is None:
+ (model, iter) = self.listView.get_selection().get_selected()
+ if iter is None:
return
- model, iter = rc
path = self.listStore.get_path(iter)
col = self.listView.get_column(0)
diff --git a/iw/lvm_dialog_gui.py b/iw/lvm_dialog_gui.py
index b3313a01c..370eab515 100644
--- a/iw/lvm_dialog_gui.py
+++ b/iw/lvm_dialog_gui.py
@@ -317,12 +317,7 @@ class VolumeGroupEditor:
def getCurrentLogicalVolume(self):
selection = self.logvollist.get_selection()
- rc = selection.get_selected()
- if rc:
- model, iter = rc
- else:
- return None
-
+ (model, iter) = selection.get_selected()
return iter
diff --git a/iw/mouse_gui.py b/iw/mouse_gui.py
index 5bebffe27..9a0642b40 100644
--- a/iw/mouse_gui.py
+++ b/iw/mouse_gui.py
@@ -42,9 +42,8 @@ class MouseWindow(InstallWindow):
def selectDeviceType(self, selection, *args):
if self.ignoreEvents:
return
- rc = selection.get_selected()
- if rc:
- model, iter = rc
+ (model, iter) = selection.get_selected()
+ if iter:
self.serialDevice = model.get_value(iter, 1)
self.ics.setNextEnabled(gtk.TRUE)
else:
@@ -53,10 +52,9 @@ class MouseWindow(InstallWindow):
def selectMouseType(self, selection, *args):
if self.ignoreEvents:
return
- rc = selection.get_selected()
- if rc is None:
+ (model, iter) = selection.get_selected()
+ if iter is None:
return
- model, iter = rc
if model.iter_has_child(iter):
self.devview.get_selection().unselect_all()
diff --git a/iw/network_gui.py b/iw/network_gui.py
index 7b9711f4f..7bc532c5b 100644
--- a/iw/network_gui.py
+++ b/iw/network_gui.py
@@ -186,10 +186,9 @@ class NetworkWindow(InstallWindow):
return
selection = self.ethdevices.get_selection()
- rc = selection.get_selected()
- if not rc:
+ (model, iter) = selection.get_selected()
+ if not iter:
return None
- model, iter = rc
dev = model.get_value(iter, 1)
bootproto = model.get_value(iter, 2)
diff --git a/iw/package_gui.py b/iw/package_gui.py
index 7e4b5fca5..1f0548381 100644
--- a/iw/package_gui.py
+++ b/iw/package_gui.py
@@ -125,9 +125,8 @@ class IndividualPackageSelectionWindow (InstallWindow):
def select_group(self, selection):
- rc = selection.get_selected()
- if rc:
- model, iter = rc
+ (model, iter) = selection.get_selected()
+ if iter:
currentGroup = model.get_value(iter, 1)
self.packageList.clear()
@@ -160,9 +159,8 @@ class IndividualPackageSelectionWindow (InstallWindow):
self.updateSize()
def select_package(self, selection):
- rc = selection.get_selected()
- if rc:
- model, iter = rc
+ (model, iter) = selection.get_selected()
+ if iter:
package = model.get_value(iter, 1)
if not self.pkgs.has_key(package):
diff --git a/iw/timezone_gui.py b/iw/timezone_gui.py
index fc10df7fd..5d0ab9a2d 100644
--- a/iw/timezone_gui.py
+++ b/iw/timezone_gui.py
@@ -67,9 +67,8 @@ class TimezoneWindow(InstallWindow):
self.timezone.setTimezoneInfo(newzone, self.systemUTC.get_active())
else:
selection = self.uview.get_selection()
- rc = selection.get_selected()
- if rc:
- model, iter = rc
+ (model, iter) = selection.get_selected()
+ if iter:
val = model.get_value(iter, 0)
timezone = None
for zone in self.timeZones:
diff --git a/iw/timezone_map_gui.py b/iw/timezone_map_gui.py
index db6f288a5..38b0284fa 100644
--- a/iw/timezone_map_gui.py
+++ b/iw/timezone_map_gui.py
@@ -121,12 +121,9 @@ class TimezoneMap(gtk.VBox):
return self.currentEntry
def selectionChanged(self, selection, *args):
- # XXX broken, returns None if there is no selection, so I have to
- # check before unpacking
- rc = selection.get_selected()
- if rc is None:
+ (model, iter) = selection.get_selected()
+ if iter is None:
return
- model, iter = rc
entry = self.listStore.get_value(iter, self.columns.ENTRY)
self.setCurrent(entry, skipList=1)
diff --git a/iw/upgrade_swap_gui.py b/iw/upgrade_swap_gui.py
index cdef00b36..b3c4c49b0 100644
--- a/iw/upgrade_swap_gui.py
+++ b/iw/upgrade_swap_gui.py
@@ -45,8 +45,8 @@ class UpgradeSwapWindow (InstallWindow):
return None
selection = self.view.get_selection()
- rc = selection.get_selected()
- if rc:
+ (model, iter) = selection.get_selected()
+ if iter:
model, iter = rc
mnt = model.get_value(iter, 0)
part = model.get_value(iter, 1)
diff --git a/iw/xconfig_gui.py b/iw/xconfig_gui.py
index 303d32c73..a6a7a68aa 100644
--- a/iw/xconfig_gui.py
+++ b/iw/xconfig_gui.py
@@ -511,9 +511,8 @@ class MonitorWindow (InstallWindow):
if self.ignoreEvents:
return
- rc = selection.get_selected()
- if rc:
- monxxx, iter = rc
+ (monxxx, iter) = selection.get_selected()
+ if iter:
monid = monxxx.get_value(iter, 0)
self.setCurrent(monid, recenter=0)
@@ -803,9 +802,8 @@ class XConfigWindow (InstallWindow):
if self.ignoreEvents:
return
- rc = selection.get_selected()
- if rc:
- model, iter = rc
+ (model, iter) = selection.get_selected()
+ if iter:
self.currentCard = model.get_value(iter, 0)
else:
print "unknown error in selectCardType!"