[gedit] Set initial external tool text not undoable



commit b0b7a86205dfde2081e0b22de77a3811b9e33893
Author: Jesse van den Kieboom <jessevdk gnome org>
Date:   Sat Jun 13 12:28:03 2009 +0200

    Set initial external tool text not undoable

 plugins/externaltools/tools/manager.py |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)
---
diff --git a/plugins/externaltools/tools/manager.py b/plugins/externaltools/tools/manager.py
index c2126d6..3acba86 100644
--- a/plugins/externaltools/tools/manager.py
+++ b/plugins/externaltools/tools/manager.py
@@ -510,7 +510,11 @@ class Manager:
 
     def clear_fields(self):
         self['accelerator'].set_text('')
-        self['commands'].get_buffer().set_text('')
+
+	buf = self['commands'].get_buffer()
+	buf.begin_not_undoable_action()
+	buf.set_text('')
+	buf.end_not_undoable_action()
 
         for nm in ('input', 'output', 'applicability', 'save-files'):
             self[nm].set_active(0)
@@ -541,7 +545,11 @@ class Manager:
 
         buf = self['commands'].get_buffer()
         script = default(''.join(node.get_script()), '')
-        buf.set_text(script)
+
+	buf.begin_not_undoable_action()
+	buf.set_text(script)
+	buf.end_not_undoable_action()
+
         self.script_hash = self.compute_hash(script)
         contenttype = gio.content_type_guess(data=script)
         lmanager = gedit.get_language_manager()



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