This email hasn't made it to gnome-i18n or gnome-doc-list, so I have
subscribed to those lists to expedite things. The patch mentioned
below is also attached to this email. Sorry for any unnecessary
duplication.
On 8/22/06, Sanford Armstrong [EMAIL PROTECTED] wrote:
As part of Tomboy being included in GNOME 2.16 [1], several users have
requested the ability for old Sticky Notes to be automatically
imported into Tomboy [2] [3]. This feature is now ready to be
committed.
Attached is the patch, and it breaks the string freeze for Tomboy in two ways:
1) A GConf key has been added to tomboy.schemas.in. Since the Sticky
Note import plugin is an official part of Tomboy, and the plugin uses
a GConf key to determine if it has ever been run before, this is a
necessary change.
2) Previously, when manually running the Sticky Note import plugin,
the dialog would say something like 4 of 4 Sticky Notes were
successfully imported. But if a user upgrades/installs Tomboy, and
the first time it starts is on their next log-in, that message is
somewhat disembodied and needs to be more explicit. Therefore it now
ends with successfully imported into Tomboy. I feel that this is an
important change for users who are just transitioning from Sticky
Notes to Tomboy. If anyone has a better suggestion for the verbiage
in that dialog, I would be happy to hear it.
I am new to internationalization, so if there is any additional way I
have broken the freeze please let me know. I would like to commit
this patch to CVS as soon as possible.
Thanks,
Sandy Armstrong
[1] http://mail.gnome.org/archives/devel-announce-list/2006-August/msg0.html
[2] http://mail.gnome.org/archives/desktop-devel-list/2006-July/msg00642.html
[3] http://mail.gnome.org/archives/desktop-devel-list/2006-August/msg00211.html
? INSTALL
? Tomboy/Plugins/.StickyNoteImport.cs.swp
? data/DefaultPlugins.desktop
? data/DefaultPlugins.desktop.in
? data/tomboy-plugins.pc
? po/stamp-it
Index: Tomboy/NoteManager.cs
===
RCS file: /cvs/gnome/tomboy/Tomboy/NoteManager.cs,v
retrieving revision 1.30
diff -u -p -r1.30 NoteManager.cs
--- Tomboy/NoteManager.cs 27 Jul 2006 08:50:17 - 1.30
+++ Tomboy/NoteManager.cs 23 Aug 2006 04:54:00 -
@@ -143,7 +143,10 @@ namespace Tomboy
trie_controller.Update ();
// Load all the plugins for our notes.
- foreach (Note note in notes) {
+ // Iterating through copy of notes list, because list may be
+ // changed when loading plugins.
+ ArrayList notesCopy = new ArrayList (notes);
+ foreach (Note note in notesCopy) {
plugin_mgr.LoadPluginsForNote (note);
}
}
Index: Tomboy/Preferences.cs
===
RCS file: /cvs/gnome/tomboy/Tomboy/Preferences.cs,v
retrieving revision 1.8
diff -u -p -r1.8 Preferences.cs
--- Tomboy/Preferences.cs 2 Aug 2006 07:08:24 - 1.8
+++ Tomboy/Preferences.cs 23 Aug 2006 04:54:00 -
@@ -23,6 +23,8 @@ namespace Tomboy
public const string EXPORTHTML_LAST_DIRECTORY = /apps/tomboy/export_html/last_directory;
public const string EXPORTHTML_EXPORT_LINKED = /apps/tomboy/export_html/export_linked;
+ public const string STICKYNOTEIMPORTER_FIRST_RUN = /apps/tomboy/sticky_note_importer/sticky_importer_first_run;
+
static GConf.Client client;
static GConf.NotifyEventHandler changed_handler;
@@ -70,6 +72,9 @@ namespace Tomboy
case EXPORTHTML_LAST_DIRECTORY:
return ;
+
+ case STICKYNOTEIMPORTER_FIRST_RUN:
+return true;
}
return null;
Index: Tomboy/Plugins/StickyNoteImport.cs
===
RCS file: /cvs/gnome/tomboy/Tomboy/Plugins/StickyNoteImport.cs,v
retrieving revision 1.3
diff -u -p -r1.3 StickyNoteImport.cs
--- Tomboy/Plugins/StickyNoteImport.cs 25 Jul 2006 22:34:25 - 1.3
+++ Tomboy/Plugins/StickyNoteImport.cs 23 Aug 2006 04:54:00 -
@@ -18,9 +18,15 @@ public class StickyNoteImporter : NotePl
private const string base_duplicate_note_title = {0} (#{1});
private const string debug_no_sticky_file =
- StickyNoteImporter: Sticky Notes XML file does not exist!;
+ StickyNoteImporter: Sticky Notes XML file does not exist or is invalid!;
private const string debug_create_error_base =
StickyNoteImporter: Error while trying to create note \{0}\: {1};
+ private const string debug_first_run_detected =
+ StickyNoteImporter: Detecting that importer has never been run...;
+ private const string debug_gconf_set_error_base =
+ StickyNoteImporter: Error setting initial GConf first run key value: {0};
+
+ private string sticky_xml_path;
protected override void Initialize ()
{
@@ -30,6 +36,12 @@ public class StickyNoteImporter : NotePl
item.Activated += ImportButtonClicked;
item.Show ();
AddPluginMenuItem (item);
+
+ sticky_xml_path =
+ Environment.GetFolderPath (System.Environment.SpecialFolder.Personal)
+ + sticky_xml_rel_path;
+
+