After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 404739 - Disable Import Of Sticky Notes Option If None Exist
Disable Import Of Sticky Notes Option If None Exist
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other All
: Normal enhancement
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-02-05 20:38 UTC by David Richards
Modified: 2008-02-27 01:30 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
Patch to remove Import menu option if no sticky notes exist (untested) (1.22 KB, patch)
2007-02-05 22:26 UTC, Sandy Armstrong
none Details | Review
Updated patch - only checks for file existence once. (2.15 KB, patch)
2007-02-06 06:19 UTC, Sandy Armstrong
none Details | Review

Description David Richards 2007-02-05 20:38:39 UTC
The way it works now, the option is always enabled and then checks for data to import after selecting the option.  Software should do the reverse, and not present options that will produce an error dialog.  Check for the directory in advance, and then gray out that option if non exist.
Comment 1 Sandy Armstrong 2007-02-05 22:26:56 UTC
Created attachment 81958 [details] [review]
Patch to remove Import menu option if no sticky notes exist (untested)

Added an untested patch to only add the Import menu option if the sticky notes XML file exists.  Will test it when I get back to my Linux box.

If there is no sticky notes XML file, then this plug-in is wasting resources checking for files whenever it's initialized.  Should it disable itself if this happens?

If a user starts with Tomboy, tries the Sticky Notes applet, and then wants to migrate those new notes to Tomboy, is it OK that they would then have to manually re-enable the plug-in in Tomboy's preferences?
Comment 2 Sandy Armstrong 2007-02-06 06:19:04 UTC
Created attachment 81979 [details] [review]
Updated patch - only checks for file existence once.

Updated (and tested) patch.  This version only checks for Sticky Notes XML file existence on Initialize once per Tomboy session.  I would commit this, but I'm not sure if it counts as a new feature, and I don't want to break any freezes.
Comment 3 Sandy Armstrong 2007-02-06 06:21:38 UTC
I didn't mention, but this patch also moves the generation of the Sticky Notes XML fie path to a static member so it is only done once.
Comment 4 Sandy Armstrong 2007-02-09 17:25:46 UTC
Committed patch to SVN.

Calum Benson suggested that we have a single Import dialog that can work on multiple sources, in which case the "Import" menu item would always exist.  Good idea if we get support for more import sources in the future.
Comment 5 Sandy Armstrong 2007-02-10 03:29:34 UTC
Reverted change in behavior.  UI freeze break was not approved.  Will put this in after 0.6.0 branches.
Comment 6 Sandy Armstrong 2007-02-16 21:25:02 UTC
Received approval, patch reapplied as of svn rev 969.  Closing this bug.
Comment 7 Boyd Timothy 2007-02-26 21:01:21 UTC
Marking this as fixed/closed in the 0.5.9 release.
Comment 8 Boyd Timothy 2008-02-27 01:30:54 UTC
Modifying default assignee and qa contact to be tomboy-maint@gnome.bugs.