[gedit-latex/gnome-3-0] Fix completion popup
- From: Jose Aliste <jaliste src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-latex/gnome-3-0] Fix completion popup
- Date: Wed, 29 Jun 2011 15:30:46 +0000 (UTC)
commit 14d9ebd2be06c58fe24464063bcdd5dee986e34c
Author: John Stowers <john stowers gmail com>
Date: Thu Jun 30 00:54:14 2011 +1200
Fix completion popup
latex/base/completion.py | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/latex/base/completion.py b/latex/base/completion.py
index 6ea0c0d..3b9e176 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,8 +153,11 @@ 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()
def _get_cursor_pos(self, text_view):
@@ -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]