[alacarte] make moving items up/down work again



commit 2d291f4339956d29f87aaaab7b808a49d82e65af
Author: Olav Vitters <olav vitters nl>
Date:   Tue Aug 23 23:05:23 2011 +0200

    make moving items up/down work again

 Alacarte/MainWindow.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/Alacarte/MainWindow.py b/Alacarte/MainWindow.py
index 08d77da..4cd50ee 100644
--- a/Alacarte/MainWindow.py
+++ b/Alacarte/MainWindow.py
@@ -605,10 +605,10 @@ class MainWindow:
 			return
 		path = items.get_path(iter)
 		#at top, can't move up
-		if path[0] == 0:
+		if path.get_indices()[0] == 0:
 			return
 		item = items[path][3]
-		before = items[(path[0] - 1,)][3]
+		before = items[(path.get_indices()[0] - 1,)][3]
 		if item.get_type() == gmenu.TYPE_ENTRY:
 			self.editor.moveItem(item, item.get_parent(), before=before)
 		elif item.get_type() == gmenu.TYPE_DIRECTORY:
@@ -623,7 +623,7 @@ class MainWindow:
 			return
 		path = items.get_path(iter)
 		#at bottom, can't move down
-		if path[0] == (len(items) - 1):
+		if path.get_indices()[0] == (len(items) - 1):
 			return
 		item = items[path][3]
 		after = items[path][3]



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]