# HG changeset patch # User Tom Hayward tom@tomh.us # Date 1341509101 21600 # Node ID a6f28cad50dbdf2a503593bd915b476c8209190c # Parent 8ec7fc4952636a930444d44b8cdc0bb48aac3b7f Support PyGTK < 2.22 in bank edit. Fixes #231
diff -r 8ec7fc495263 -r a6f28cad50db chirpui/bankedit.py --- a/chirpui/bankedit.py Wed Jun 13 13:50:27 2012 -0600 +++ b/chirpui/bankedit.py Thu Jul 05 11:25:01 2012 -0600 @@ -154,8 +154,14 @@ return 0 # If the bank is full, just wrap around!
def _toggled_cb(self, rend, path, colnum): - if not rend.get_sensitive(): - return + try: + if not rend.get_sensitive(): + return + except AttributeError: + # support PyGTK < 2.22 + iter = self._store.get_iter(path) + if not self._store.get(iter, self.C_FILLED)[0]: + return
# The bank index is the column number, minus the 3 label columns bank, name = self.banks[colnum - len(self._cols)]