[gedit] Snippet insertion should be not undoable.
- From: Ignacio Casal Quinteiro <icq src gnome org>
- To: svn-commits-list gnome org
- Subject: [gedit] Snippet insertion should be not undoable.
- Date: Sat, 30 May 2009 15:18:08 -0400 (EDT)
commit c5aab1fda7cef9caaebc4279c3948dae38a26780
Author: Ignacio Casal Quinteiro <icq gnome org>
Date: Sat May 30 21:17:28 2009 +0200
Snippet insertion should be not undoable.
Snippet insertion should be not undoable. (Fixes bug #584288).
---
plugins/snippets/snippets/Manager.py | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/plugins/snippets/snippets/Manager.py b/plugins/snippets/snippets/Manager.py
index 46c8236..6f1fbec 100644
--- a/plugins/snippets/snippets/Manager.py
+++ b/plugins/snippets/snippets/Manager.py
@@ -527,8 +527,11 @@ class Manager:
sens = False
self['entry_tab_trigger'].set_text('')
- self['entry_accelerator'].set_text('')
- self['source_view_snippet'].get_buffer().set_text('')
+ self['entry_accelerator'].set_text('')
+ buf = self['source_view_snippet'].get_buffer()
+ buf.begin_not_undoable_action()
+ buf.set_text('')
+ buf.end_not_undoable_action()
self['combo_drop_targets'].child.set_text('')
else:
@@ -540,7 +543,9 @@ class Manager:
self['combo_drop_targets'].child.set_text(', '.join(self.snippet['drop-targets']))
buf = self['source_view_snippet'].get_buffer()
+ buf.begin_not_undoable_action()
buf.set_text(self.snippet['text'])
+ buf.end_not_undoable_action()
for name in ['source_view_snippet', 'label_tab_trigger',
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]