~ubuntu-branches/ubuntu/jaunty/tomboy/jaunty

« back to all changes in this revision

Viewing changes to Tomboy/Note.cs

  • Committer: Bazaar Package Importer
  • Author(s): Pedro Fragoso
  • Date: 2008-12-23 13:22:58 UTC
  • mfrom: (1.1.45 upstream)
  • Revision ID: james.westby@ubuntu.com-20081223132258-996tqipm5wqh31w6
Tags: 0.13.2-0ubuntu1
* Sync with Debian experimental
  -  debian/rules: build with dh_clistrip, to avoid stripping Mono
     debugging files in the package.
* New upstream release (LP: #308669)
  - Fix Windows<->Linux sync incompatiblities (##559094).
  - Fix data loss bug in sync and SetNoteCompleteXml dbus method.
  - Link fixes in HTML Export (##564150, Stefan Schweizer).
  - Header cleanups in libtomboy (#564235, Przemysław Grzegorczyk).  
* debian/patches/03_sm-name.patch:
  - Removed, merged upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
789
789
 
790
790
                // Reload note data from a complete note XML string
791
791
                // Should referesh note window, too
792
 
                public void LoadForeignNoteXml (string foreignNoteXml)
 
792
                public void LoadForeignNoteXml (string foreignNoteXml, ChangeType changeType)
793
793
                {
794
794
                        if (foreignNoteXml == null)
795
795
                                throw new ArgumentNullException ("foreignNoteXml");
852
852
 
853
853
                        xml.Close ();
854
854
 
855
 
                        // TODO: Any reason to queue a save here?  Maybe not for sync but for others?
 
855
                        // Allow method caller to specify ChangeType (mostly needed by sync)
 
856
                        QueueSave (changeType);
856
857
                }
857
858
 
858
859
                // TODO: CODE DUPLICATION SUCKS
1228
1229
                public static string WriteString(NoteData note)
1229
1230
                {
1230
1231
                        StringWriter str = new StringWriter ();
1231
 
                        XmlTextWriter xml = new XmlTextWriter (str);
 
1232
                        XmlWriter xml = XmlWriter.Create (str, XmlEncoder.DocumentSettings);
1232
1233
                        Instance.Write (xml, note);
1233
1234
                        xml.Close ();
1234
1235
                        str.Flush();
1244
1245
                {
1245
1246
                        string tmp_file = write_file + ".tmp";
1246
1247
 
1247
 
                        XmlTextWriter xml = new XmlTextWriter (tmp_file, System.Text.Encoding.UTF8);
 
1248
                        XmlWriter xml = XmlWriter.Create (tmp_file, XmlEncoder.DocumentSettings);
1248
1249
                        Write (xml, note);
1249
1250
                        xml.Close ();
1250
1251
 
1274
1275
 
1275
1276
                public void WriteFile (TextWriter writer, NoteData note)
1276
1277
                {
1277
 
                        XmlTextWriter xml = new XmlTextWriter (writer);
 
1278
                        XmlWriter xml = XmlWriter.Create (writer, XmlEncoder.DocumentSettings);
1278
1279
                        Write (xml, note);
1279
1280
                        xml.Close ();
1280
1281
                }
1281
1282
 
1282
 
                void Write (XmlTextWriter xml, NoteData note)
 
1283
                void Write (XmlWriter xml, NoteData note)
1283
1284
                {
1284
 
                        xml.Formatting = Formatting.Indented;
1285
 
 
1286
1285
                        xml.WriteStartDocument ();
1287
1286
                        xml.WriteStartElement (null, "note", "http://beatniksoftware.com/tomboy");
1288
1287
                        xml.WriteAttributeString(null,