[gedit-plugins] Use insert_interactive_at_cursor.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gedit-plugins] Use insert_interactive_at_cursor.
- Date: Mon, 20 Dec 2010 21:30:56 +0000 (UTC)
commit 89493c36076e9cf721cfca609bf389b545d86f68
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Mon Dec 20 22:30:09 2010 +0100
Use insert_interactive_at_cursor.
plugins/charmap/charmap/__init__.py | 9 ++-------
1 files changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/plugins/charmap/charmap/__init__.py b/plugins/charmap/charmap/__init__.py
index ae0577a..7fb3e6f 100644
--- a/plugins/charmap/charmap/__init__.py
+++ b/plugins/charmap/charmap/__init__.py
@@ -130,14 +130,9 @@ class CharmapPlugin(GObject.Object, Gedit.WindowActivatable):
document.begin_user_action()
iters = document.get_selection_bounds()
if iters:
- document.delete_interactive(iters[0], iters[1], True)
- start = iters[0]
- else:
- insert = document.get_insert()
- start = document.get_iter_at_mark(insert)
+ document.delete_interactive(iters[0], iters[1], view.get_editable())
- if start.editable(True):
- document.insert(start, uc)
+ document.insert_interactive_at_cursor(uc, -1, view.get_editable())
document.end_user_action()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]