GNOME Bugzilla – Bug 473335
Tools->Syncronization is enabled even when all plugins are disabled
Last modified: 2009-10-04 00:48:03 UTC
If I disable all plugins in the Syncronization category, the Syncronization entry in the notes' Tools menu is still available, and selecting it results an error message stating I should configure it in the preferences dialog. Entries of other plugins just disappear from the Tools menu after disabling the plugin, so I think the Syncronization menu should also just disappear.
Thanks for your attention to detail. I do think we shouldn't have the synchronization menu item available when it's not configured. However... "It is usually better to make a control insensitive than to hide it altogether. This way, the user can learn about functionality they may be able to use later, even if it is not available right now." [1] [1] http://developer.gnome.org/projects/gup/hig/2.0/controls-sensitivity.html
Agreed. Sync menu items should be set insensitive in this case.
Ok, but what about other plugins, which completely disappear when disabled? Inconsistency isn't good either.
Synchronization is not an addin. It always exists in Tomboy as a main feature. Individual backends are addins that can be disabled. I know it's kind of a weird distinction, but I think it makes a difference.
Oh, I see now... indeed uncommon :) In this case, making it insensitive seems to be the ideal solution.
Created attachment 95030 [details] [review] patch This patch desensitizes the synchronization menu item when synchronization is not enabled. It also adds a Synchronize Notes option to the main Applet context menu. This is often very useful. Synchronization is not exactly something that should require you to have a note open. Additionally, because I was there, I cleaned up the SyncDialog. I fixed some padding and spacing issues which I found to be a bit obnoxious (the Close button didn't line up with the treeview, and padding was slightly excessive and inconsistant in some areas.) Probably did more work than I needed to on the SyncDialog. Also added some comments and reordered some operations in a way I thought was more clear. I'm OCD.
Created attachment 95031 [details] [review] patch Adjusted spacing a bit more.
Jerome: Thanks for the patch! I'll review it tonight. Two quick things: 1. Does the SyncDialog work fix bug #473354 (where some text is cut off)? 2. Normally we try to have patches that only address one thing at a time; this makes them easier to review. Don't worry about it on this one, though; each change in this patch is basically isolated to one file.
Created attachment 95128 [details] [review] sync-notes-disable Revised patch to strip out unrelated changes.
Created attachment 97180 [details] [review] Replacement patch with some style fixes and no item in the recent notes menu. So we're not going to be adding an item for Synchronization to the main Tomboy menu (at least not for 0.8.x). Otherwise I like the behavior in this patch. It needs to be updated so that the Tools menu item in the search dialog shares the same behavior. This menu item is currently set up in the SyncManager.Initialize method. If nobody gets to it before Sunday night I'll do the honors, assuming I have time.
Not fixing for 0.8.1. Resetting target to 0.9.x.
Created attachment 102740 [details] [review] Patch that applies against latest trunk Still need to do the work to make the menu item in the Search UI do the same thing.
Setting the default assignee and QA Contact to "tomboy-maint@gnome.bugs".
Oh man, really lost track of this bug. Targetting for 0.15.x. :-/
Created attachment 135045 [details] [review] Patch to disable both sync menu items if no backend is configured Disables both menu items if no backend is configured.
when getting the preference, please use 'as' instead of casting. It's ridiculously unlikely that somebody would have messed with their prefs to that extent, but I'd still rather not crash if they did. :-) After that change, feel free to push and close this bug.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report.