Hello community, here is the log from the commit of package tomboy checked in at Mon Aug 27 20:10:36 CEST 2007. -------- --- GNOME/tomboy/tomboy.changes 2007-08-24 20:23:57.000000000 +0200 +++ /mounts/work_src_done/STABLE/tomboy/tomboy.changes 2007-08-27 19:36:21.499104000 +0200 @@ -1,0 +2,12 @@ +Mon Aug 27 19:07:23 CEST 2007 - btimothy@suse.de + +- Expose events for note save/add/delete over DBus. Fixes + BGO #465639. +- Synchronization fixes from svn.gnome.org/svn/tomboy/trunk r1444. +- Prevent attempting to mount FUSE paths for synchronizing more than + once. Improved gnome-keyring-sharp exception handling. +- Fixed sync pref widget sensitivity and nuke client manifest.xml + during save and reset. +- Fixed strings in sync dialog. + +------------------------------------------------------------------- New: ---- tomboy-expose-dbus-events-bgo465639.patch tomboy-sync-dialog-string-r1447.patch tomboy-sync-fixes-r1444.patch tomboy-sync-fixes-r1445.patch tomboy-sync-fixes-r1446.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tomboy.spec ++++++ --- /var/tmp/diff_new_pack.oQ9464/_old 2007-08-27 20:10:10.000000000 +0200 +++ /var/tmp/diff_new_pack.oQ9464/_new 2007-08-27 20:10:10.000000000 +0200 @@ -16,7 +16,7 @@ Group: Productivity/Office/Other Requires: mono Version: 0.7.4 -Release: 4 +Release: 7 Summary: GNOME Note Taking Application URL: http://www.beatniksoftware.com/tomboy/ Source: %{name}-%{version}.tar.bz2 @@ -24,6 +24,11 @@ Patch0: tomboy-no-highlight.patch Patch1: tomboy-tasks-addin-20070824.diff Patch2: tomboy-disable-starthere.patch +Patch3: tomboy-expose-dbus-events-bgo465639.patch +Patch4: tomboy-sync-fixes-r1444.patch +Patch5: tomboy-sync-fixes-r1445.patch +Patch6: tomboy-sync-fixes-r1446.patch +Patch7: tomboy-sync-dialog-string-r1447.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: mono-core Requires: dbus-1-x11 @@ -56,6 +61,11 @@ %patch0 %patch1 %patch2 -p1 +%patch3 +%patch4 +%patch5 +%patch6 +%patch7 %build autoreconf -f -i @@ -121,6 +131,15 @@ %files lang -f %{name}.lang %changelog +* Mon Aug 27 2007 - btimothy@suse.de +- Expose events for note save/add/delete over DBus. Fixes + BGO #465639. +- Synchronization fixes from svn.gnome.org/svn/tomboy/trunk r1444. +- Prevent attempting to mount FUSE paths for synchronizing more than + once. Improved gnome-keyring-sharp exception handling. +- Fixed sync pref widget sensitivity and nuke client manifest.xml + during save and reset. +- Fixed strings in sync dialog. * Fri Aug 24 2007 - btimothy@suse.de - Replaced tomboy-tasks-addin-20070801.diff with tomboy-tasks-addin-20070824.diff which fixes the view completed ++++++ tomboy-expose-dbus-events-bgo465639.patch ++++++ Tomboy/RemoteControl.cs: Expose events for note save/add/delete over DBus. Fixes BGO #465639 (patch courtesy of John Carr). Index: Tomboy/RemoteControl.cs =================================================================== --- Tomboy/RemoteControl.cs (revision 1442) +++ Tomboy/RemoteControl.cs (revision 1443) @@ -7,6 +7,10 @@ namespace Tomboy { + public delegate void RemoteDeletedHandler (string uri, string title); + public delegate void RemoteAddedHandler (string uri); + public delegate void RemoteSavedHandler (string uri); + [Interface ("org.gnome.Tomboy.RemoteControl")] public class RemoteControl : MarshalByRefObject { @@ -15,6 +19,9 @@ public RemoteControl (NoteManager mgr) { note_manager = mgr; + note_manager.NoteDeleted += OnNoteDeleted; + note_manager.NoteAdded += OnNoteAdded; + note_manager.NoteSaved += OnNoteSaved; } //Convert System.DateTime to unix timestamp @@ -268,5 +275,27 @@ tagged_note_uris [i] = tag.Notes [i].Uri; return tagged_note_uris; } + + private void OnNoteDeleted (object sender, Note note) + { + if (NoteDeleted != null) + NoteDeleted (note.Uri, note.Title); + } + + private void OnNoteAdded (object sender, Note note) + { + if (NoteAdded != null) + NoteAdded (note.Uri); + } + + private void OnNoteSaved (Note note) + { + if (NoteSaved != null) + NoteSaved (note.Uri); + } + + public event RemoteDeletedHandler NoteDeleted; + public event RemoteAddedHandler NoteAdded; + public event RemoteSavedHandler NoteSaved; } } ++++++ tomboy-sync-dialog-string-r1447.patch ++++++ This patch fixes some strings. Patch from SVN r1447: * Tomboy/Synchronization/SyncDialog.cs: String work. Index: Tomboy/Synchronization/SyncDialog.cs =================================================================== --- Tomboy/Synchronization/SyncDialog.cs (revision 1446) +++ Tomboy/Synchronization/SyncDialog.cs (revision 1447) @@ -266,7 +266,7 @@ case SyncState.Locked: Title = Catalog.GetString ("Server Locked"); HeaderText = Catalog.GetString ("Server is locked"); - MessageText = Catalog.GetString ("One of your other computers is currently synchronizing. Please wait and try again."); + MessageText = Catalog.GetString ("One of your other computers is currently synchronizing. Please wait 2 minutes and try again."); ProgressText = string.Empty; break; case SyncState.PrepareDownload: @@ -334,7 +334,7 @@ statusText = Catalog.GetString ("Deleted locally"); break; case NoteSyncType.DeleteFromServer: - statusText = Catalog.GetString ("Deleting from server"); + statusText = Catalog.GetString ("Deleted from server"); break; case NoteSyncType.DownloadModified: statusText = Catalog.GetString ("Updated"); @@ -343,10 +343,10 @@ statusText = Catalog.GetString ("Added"); break; case NoteSyncType.UploadModified: - statusText = Catalog.GetString ("Uploading changes to server"); + statusText = Catalog.GetString ("Uploaded changes to server"); break; case NoteSyncType.UploadNew: - statusText = Catalog.GetString ("Uploading new note to server"); + statusText = Catalog.GetString ("Uploaded new note to server"); break; } AddUpdateItem (noteTitle, statusText); ++++++ tomboy-sync-fixes-r1444.patch ++++++ This patch is from r1444 of svn.gnome.org/svn/trunk. It fixes the following issues: * Tomboy/PreferencesDialog.cs: Check for TomboySyncException when saving sync configuration. Use exception message in error dialog content. * Tomboy/Synchronization/FuseSyncServiceAddin.cs: Adding FuseMountTimeoutError and FuseMountDirectoryError members, to be overriden by child classes that need to customize these error messages. MountFuse method throws TomboySyncException instead of just returning false. Check for existence of mountPath directory after mounting...wdfs with incorrect user/pass credentials will appear to mount correctly but Directory.Exists will return false. * Tomboy/Synchronization/SyncManager.cs: Added TomboySyncException type, an extension of System.ApplicationException. * Tomboy/Addins/FileSystemSyncService/FileSystemSyncServiceAddin.cs, Tomboy/Addins/WebDavSyncService/WebDavSyncServiceAddin.cs, Tomboy/Addins/SshSyncService/SshSyncServiceAddin.cs: Throw TomboySyncException when configuration is incorrect. Index: Tomboy/PreferencesDialog.cs =================================================================== --- Tomboy/PreferencesDialog.cs (revision 1443) +++ Tomboy/PreferencesDialog.cs (revision 1444) @@ -1082,12 +1082,15 @@ return; bool saved = false; + string errorMsg = null; try { GdkWindow.Cursor = new Gdk.Cursor (Gdk.CursorType.Watch); GdkWindow.Display.Flush (); saved = selectedSyncAddin.SaveConfiguration (); + } catch (TomboySyncException syncEx) { + errorMsg = syncEx.Message; } catch (Exception e) { - Logger.Debug ("Error calling {0}.SaveConfiguration: {1}\n{2}", + Logger.Debug ("Unexpected error calling {0}.SaveConfiguration: {1}\n{2}", selectedSyncAddin.Id, e.Message, e.StackTrace); } finally { GdkWindow.Cursor = null; @@ -1132,14 +1135,18 @@ // Give the user a visual letting them know that connecting // was successful. + if (errorMsg == null) + errorMsg = Catalog.GetString ("Sorry, but something went wrong. " + + "Please check your information and " + + "try again. The ~/.tomboy.log might " + + "be useful too."); dialog = new HIGMessageDialog (this, Gtk.DialogFlags.Modal, Gtk.MessageType.Warning, Gtk.ButtonsType.Close, Catalog.GetString ("Error connecting :("), - Catalog.GetString ( - "Sorry, but something went wrong. Please check your information and try again. The ~/.tomboy.log might be useful too.")); + errorMsg); dialog.Run (); dialog.Destroy (); } Index: Tomboy/Synchronization/FuseSyncServiceAddin.cs =================================================================== --- Tomboy/Synchronization/FuseSyncServiceAddin.cs (revision 1443) +++ Tomboy/Synchronization/FuseSyncServiceAddin.cs (revision 1444) @@ -3,6 +3,8 @@ using System.Diagnostics; using System.Collections.Generic; +using Mono.Unix; + namespace Tomboy.Sync { public abstract class FuseSyncServiceAddin : SyncServiceAddin @@ -51,7 +53,7 @@ // Mount if necessary if (IsConfigured) { - if (!IsMounted && !MountFuse (true)) + if (!IsMounted && !MountFuse (true)) // MountFuse may throw TomboySyncException! throw new Exception ("Could not mount " + mountPath); server = new FileSystemSyncServer (mountPath); } else @@ -121,7 +123,25 @@ protected abstract string GetFuseMountExeArgs (string mountPath, bool fromStoredValues); #endregion // Abstract Members + +#region Public Virtual Members + public virtual string FuseMountTimeoutError + { + get + { + return Catalog.GetString ("Timeout connecting to server."); + } + } + public virtual string FuseMountDirectoryError + { + get + { + return Catalog.GetString ("Error connecting to server."); + } + } +#endregion + #region Private Methods private bool MountFuse (bool useStoredValues) { @@ -131,15 +151,21 @@ if (SyncUtils.IsFuseEnabled () == false) { if (SyncUtils.EnableFuse () == false) { Logger.Debug ("User canceled or something went wrong enabling FUSE"); - return false; + throw new TomboySyncException (Catalog.GetString ("FUSE could not be enabled.")); } } CreateMountPath (); Process p = new Process (); + + // Need to redirect stderr for displaying errors to user, + // but we can't use stdout and by not redirecting it, it + // should appear in the console Tomboy is started from. + p.StartInfo.RedirectStandardOutput = false; + p.StartInfo.RedirectStandardError = true; + p.StartInfo.UseShellExecute = false; - p.StartInfo.RedirectStandardOutput = false; p.StartInfo.FileName = fuseMountExePath; p.StartInfo.Arguments = GetFuseMountExeArgs (mountPath, useStoredValues); p.StartInfo.CreateNoWindow = true; @@ -148,13 +174,31 @@ bool exited = p.WaitForExit (timeoutMs); if (!exited) { + UnmountTimeout (null, null); // TODO: This is awfully ugly Logger.Debug (string.Format ("Error calling {0}: timed out after {1} seconds", fuseMountExePath, timeoutMs / 1000)); - return false; + throw new TomboySyncException (FuseMountTimeoutError); } else if (p.ExitCode == 1) { + UnmountTimeout (null, null); // TODO: This is awfully ugly Logger.Debug ("Error calling " + fuseMountExePath); - return false; + throw new TomboySyncException (Catalog.GetString ("An error ocurred while connecting to the specified server:\n\n") + + p.StandardError.ReadToEnd ()); } + + // For wdfs, incorrect user credentials will cause the mountPath to + // be messed up, and not recognized as a directory. This is the only + // way I can find to report that the username/password may be incorrect (for wdfs). + if (!Directory.Exists (mountPath)) { + Logger.Debug ("FUSE mount call succeeded, but mount path does not exist. " + + "This may be an indication that incorrect user credentials were " + + "provided, but it may also represent any number of error states " + + "not properly handled by the FUSE filesystem."); + // Even though the mountPath is screwed up, it is still (apparently) + // a valid FUSE mount and must be unmounted. + UnmountTimeout (null, null); // TODO: This is awfully ugly + throw new TomboySyncException (FuseMountDirectoryError); + } + return true; } Index: Tomboy/Synchronization/SyncManager.cs =================================================================== --- Tomboy/Synchronization/SyncManager.cs (revision 1443) +++ Tomboy/Synchronization/SyncManager.cs (revision 1444) @@ -741,4 +741,12 @@ void Reset (); string AssociatedServerId { get; set; } } + + public class TomboySyncException : ApplicationException + { + public TomboySyncException (string message) : + base (message) {} + public TomboySyncException (string message, Exception innerException) : + base (message, innerException) {} + } } Index: Tomboy/Addins/FileSystemSyncService/FileSystemSyncServiceAddin.cs =================================================================== --- Tomboy/Addins/FileSystemSyncService/FileSystemSyncServiceAddin.cs (revision 1443) +++ Tomboy/Addins/FileSystemSyncService/FileSystemSyncServiceAddin.cs (revision 1444) @@ -141,7 +141,7 @@ if (syncPath == string.Empty) { // TODO: Figure out a way to send the error back to the client Logger.Debug ("The path is empty"); - return false; + throw new TomboySyncException (Catalog.GetString ("Folder path field is empty.")); } // Attempt to create the path and fail if we can't @@ -150,7 +150,8 @@ Directory.CreateDirectory (syncPath); } catch (Exception e) { Logger.Debug ("Could not create \"{0}\": {1}", path, e.Message); - return false; + throw new TomboySyncException (Catalog.GetString ("Specified folder path does not exist, " + + "and Tomboy was unable to create it.")); } } Index: Tomboy/Addins/WebDavSyncService/WebDavSyncServiceAddin.cs =================================================================== --- Tomboy/Addins/WebDavSyncService/WebDavSyncServiceAddin.cs (revision 1443) +++ Tomboy/Addins/WebDavSyncService/WebDavSyncServiceAddin.cs (revision 1444) @@ -84,7 +84,7 @@ if (!GetPrefWidgetSettings (out url, out username, out password)) { // TODO: Figure out a way to send the error back to the client Logger.Debug ("One of url, username, or password was empty"); - return false; + throw new TomboySyncException (Catalog.GetString ("URL, username, or password field is empty.")); } return true; @@ -155,10 +155,22 @@ password); } - protected override string FuseMountExeName { + protected override string FuseMountExeName + { get { return "wdfs"; } } + public override string FuseMountDirectoryError + { + get + { + return Catalog.GetString ("There was an error connecting to the server. " + + "This may be caused by using an " + + "incorrect user name and/or password."); + } + } + + #region Private Methods /// <summary> /// Get config settings Index: Tomboy/Addins/SshSyncService/SshSyncServiceAddin.cs =================================================================== --- Tomboy/Addins/SshSyncService/SshSyncServiceAddin.cs (revision 1443) +++ Tomboy/Addins/SshSyncService/SshSyncServiceAddin.cs (revision 1444) @@ -86,7 +86,7 @@ if (!GetPrefWidgetSettings (out server, out folder, out username)) { // TODO: Figure out a way to send the error back to the client Logger.Debug ("One of url, username was empty"); - return false; + throw new TomboySyncException (Catalog.GetString ("Server or username field is empty.")); } return true; @@ -160,10 +160,22 @@ mountPath); } - protected override string FuseMountExeName { + protected override string FuseMountExeName + { get { return "sshfs"; } } + public override string FuseMountTimeoutError + { + get + { + return Catalog.GetString ("Timeout connecting to server. " + + "Please ensure that your SSH key has been " + + "added to a running SSH daemon."); + } + } + + #region Private Methods /// <summary> /// Get config settings ++++++ tomboy-sync-fixes-r1445.patch ++++++ This patch has fixes from SVN r1445: * Tomboy/Synchronization/FuseSyncServiceAddin.cs: Rename CreateMountPath method to PrepareMountPath, and add a call to make sure there is no existing FUSE mount at that path. * Tomboy/Addins/WebDavSyncService/WebDavSyncServiceAddin.cs: Pass gnome-keyring-sharp exception messages along in TomboySyncException. Short on time to implement non-keyring credential storage solution. Index: Tomboy/Synchronization/FuseSyncServiceAddin.cs =================================================================== --- Tomboy/Synchronization/FuseSyncServiceAddin.cs (revision 1444) +++ Tomboy/Synchronization/FuseSyncServiceAddin.cs (revision 1445) @@ -155,7 +155,7 @@ } } - CreateMountPath (); + PrepareMountPath (); Process p = new Process (); @@ -181,8 +181,8 @@ } else if (p.ExitCode == 1) { UnmountTimeout (null, null); // TODO: This is awfully ugly Logger.Debug ("Error calling " + fuseMountExePath); - throw new TomboySyncException (Catalog.GetString ("An error ocurred while connecting to the specified server:\n\n") + - p.StandardError.ReadToEnd ()); + throw new TomboySyncException (Catalog.GetString ("An error ocurred while connecting to the specified server:") + + "\n\n" + p.StandardError.ReadToEnd ()); } // For wdfs, incorrect user credentials will cause the mountPath to @@ -208,7 +208,7 @@ mountPath = Path.Combine (notesPath, "sync-" + Id); // TODO: Best mount path name? } - private void CreateMountPath () + private void PrepareMountPath () { if (Directory.Exists (mountPath) == false) { try { @@ -219,7 +219,10 @@ "Couldn't create \"{0}\" directory: {1}", mountPath, e.Message)); } - } + } else + // Just in case, make sure there is no + // existing FUSE mount at mountPath. + UnmountTimeout (null, null); } //private bool Index: Tomboy/Addins/WebDavSyncService/WebDavSyncServiceAddin.cs =================================================================== --- Tomboy/Addins/WebDavSyncService/WebDavSyncServiceAddin.cs (revision 1444) +++ Tomboy/Addins/WebDavSyncService/WebDavSyncServiceAddin.cs (revision 1445) @@ -240,7 +240,9 @@ // Save configuration into GConf //Preferences.Set ("/apps/tomboy/sync_wdfs_url", url ?? string.Empty); //Preferences.Set ("/apps/tomboy/sync_wdfs_username", username ?? string.Empty); - //throw; + throw new TomboySyncException (Catalog.GetString ("Saving configuration to the GNOME keyring " + + "failed with the following message:") + + "\n\n" + ke.Message); } } ++++++ tomboy-sync-fixes-r1446.patch ++++++ This patch contains fixes from SVN r1446: * Tomboy/PreferencesDialog.cs: Improved sync pref widget sensitivity behavior. Nuke sync client manifest.xml on save as well as reset. Index: Tomboy/PreferencesDialog.cs =================================================================== --- Tomboy/PreferencesDialog.cs (revision 1445) +++ Tomboy/PreferencesDialog.cs (revision 1446) @@ -403,7 +403,7 @@ syncAddinPrefsWidget = l; } if (syncAddinPrefsWidget != null && addin_id != null && - syncAddinIters.ContainsKey (addin_id)) + syncAddinIters.ContainsKey (addin_id) && selectedSyncAddin.IsConfigured) syncAddinPrefsWidget.Sensitive = false; syncAddinPrefsWidget.Show (); @@ -1052,6 +1052,20 @@ Preferences.SYNC_CONFIGURED_CONFLICT_BEHAVIOR, Preferences.GetDefault (Preferences.SYNC_CONFIGURED_CONFLICT_BEHAVIOR)); + NukeSyncClientManifest (); + + syncAddinCombo.Sensitive = true; + resetSyncAddinButton.Sensitive = false; + saveSyncAddinButton.Sensitive = true; + if (syncAddinPrefsWidget != null) + syncAddinPrefsWidget.Sensitive = true; + } + + // TODO: This class shouldn't know about the manifest. + // Abstract this out somehow (ie, SyncManager.ResetClient() + // or something like that). + void NukeSyncClientManifest () + { // Nuke ~/.tomboy/manifest.xml string clientManifestPath = System.IO.Path.Combine ( Tomboy.DefaultNoteManager.NoteDirectoryPath, @@ -1065,12 +1079,6 @@ e.Message); } } - - syncAddinCombo.Sensitive = true; - resetSyncAddinButton.Sensitive = false; - saveSyncAddinButton.Sensitive = true; - if (syncAddinPrefsWidget != null) - syncAddinPrefsWidget.Sensitive = true; } /// <summary> @@ -1107,6 +1115,8 @@ syncAddinPrefsWidget.Sensitive = false; resetSyncAddinButton.Sensitive = true; saveSyncAddinButton.Sensitive = false; + + NukeSyncClientManifest (); // Give the user a visual letting them know that connecting // was successful. ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org