FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > ArchLinux > ArchLinux Pacman Development

 
 
LinkBack Thread Tools
 
Old 02-25-2011, 01:29 PM
Ales Kozumplik
 
Default Do not lose selection in the bootloader's drive order dialog (#583837).

---
iw/driveorderwidget.py | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/iw/driveorderwidget.py b/iw/driveorderwidget.py
index 0bd58fb..c2979f0 100644
--- a/iw/driveorderwidget.py
+++ b/iw/driveorderwidget.py
@@ -101,13 +101,16 @@ class DriveOrderWidget:
# there has got to be a better way to do this =
drive = model.get_value(iter, 0)[5:]
index = self.driveOrder.index(drive)
- if direction == gtk.ARROW_DOWN:
+ if direction == gtk.ARROW_DOWN and index < len(self.driveOrder) - 1:
+ previous = self.driveOrderStore.get_iter(index + 1)
+ self.driveOrderStore.swap(previous, iter)
self.driveOrder.remove(drive)
self.driveOrder.insert(index + 1, drive)
- elif direction == gtk.ARROW_UP:
+ elif direction == gtk.ARROW_UP and index > 0:
+ next = self.driveOrderStore.get_iter(index - 1)
+ self.driveOrderStore.swap(next, iter)
self.driveOrder.remove(drive)
self.driveOrder.insert(index - 1, drive)
- self.makeDriveOrderStore()

# make the store for the drive order
def makeDriveOrderStore(self):
--
1.7.3.3

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 06:46 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org