[gedit/gnome-2-26] Set initial external tool text not undoable



commit a21da2835835aec72dfc8152478bdcffa714ea3d
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 6544a1e..6ac275a 100644
--- a/plugins/externaltools/tools/manager.py
+++ b/plugins/externaltools/tools/manager.py
@@ -167,7 +167,11 @@ class Manager(Singleton):
     def clear_fields(self):
         self['description'].set_text('')
         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'):
             self[nm].set_active(0)
@@ -181,7 +185,11 @@ class Manager(Singleton):
 
         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]