[gedit-latex] Fix completion popup



commit b2697cfccd407e998cc0ff9e74f0a0b265e61e7d
Author: John Stowers <john stowers gmail com>
Date:   Thu Jun 30 00:54:14 2011 +1200

    Fix completion popup

 latex/base/completion.py |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/latex/base/completion.py b/latex/base/completion.py
index a6bc919..21893df 100644
--- a/latex/base/completion.py
+++ b/latex/base/completion.py
@@ -142,8 +142,8 @@ class ProposalPopup(Gtk.Window):
         else:
             return
 
-        path = self._view.get_cursor()[0]
-        index = path[0]
+        path,column = self._view.get_cursor()
+        index = int(path.to_string()[0])
         max = self._store.iter_n_children(None)
 
         index += d
@@ -153,7 +153,10 @@ class ProposalPopup(Gtk.Window):
         elif index >= max:
             index = max - 1
 
-        self._view.set_cursor(index)
+        self._view.set_cursor(
+                Gtk.TreePath.new_from_string("%d" % index),
+                column,
+                False)
 
         self._update_details_popup()
 
@@ -180,7 +183,9 @@ class ProposalPopup(Gtk.Window):
         contains details.
         """
         try:
-            index = self._view.get_cursor()[0][0]
+            path,column = self._view.get_cursor()
+            index = int(path.to_string()[0])
+
             proposal = self._store[index][1]
 
 #            self._log.debug("proposal.details: " + str(proposal.details))



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