gedit r6326 - in trunk: . plugins/snippets/snippets
- From: jessevdk svn gnome org
- To: svn-commits-list gnome org
- Subject: gedit r6326 - in trunk: . plugins/snippets/snippets
- Date: Sun, 22 Jun 2008 11:02:49 +0000 (UTC)
Author: jessevdk
Date: Sun Jun 22 11:02:49 2008
New Revision: 6326
URL: http://svn.gnome.org/viewvc/gedit?rev=6326&view=rev
Log:
* plugins/snippets/snippets/Library.py:
* plguins/snippets/snippets/Helper.py:
Fixed problem where overriden snippet did not get added to the user
library (fixes bug #528690)
Modified:
trunk/ChangeLog
trunk/plugins/snippets/snippets/Helper.py
trunk/plugins/snippets/snippets/Library.py
Modified: trunk/plugins/snippets/snippets/Helper.py
==============================================================================
--- trunk/plugins/snippets/snippets/Helper.py (original)
+++ trunk/plugins/snippets/snippets/Helper.py Sun Jun 22 11:02:49 2008
@@ -80,16 +80,16 @@
def snippets_debug(*s):
return
-def write_xml(node, file, cdata_nodes=()):
+def write_xml(node, f, cdata_nodes=()):
assert node is not None
- if not hasattr(file, "write"):
- file = open(file, "wb")
+ if not hasattr(f, "write"):
+ f = open(f, "wb")
# Encoding
- file.write("<?xml version='1.0' encoding='utf-8'?>\n")
+ f.write("<?xml version='1.0' encoding='utf-8'?>\n")
- _write_node(node, file, cdata_nodes)
+ _write_node(node, f, cdata_nodes)
def _write_indent(file, text, indent):
file.write(' ' * indent + text)
Modified: trunk/plugins/snippets/snippets/Library.py
==============================================================================
--- trunk/plugins/snippets/snippets/Library.py (original)
+++ trunk/plugins/snippets/snippets/Library.py Sun Jun 22 11:02:49 2008
@@ -176,7 +176,7 @@
def _create_xml(self, parent=None, update=False, attrib={}):
# Create a new node
- if parent:
+ if parent != None:
element = et.SubElement(parent, 'snippet', attrib)
else:
element = et.Element('snippet')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]