GNOME Bugzilla – Bug 359168
Add "Insert Date" to tools
Last modified: 2008-02-26 20:52:52 UTC
When pasting stuff to the start here note using the middle mouse button, tomboy creates a nice date before pasting stuff, please add "Insert Date" with this capabilities to the tools.
Changing this to an enhancement. Will re-evaluate for tomboy 0.8.0.
The plugin developed on the HowTo page does that: http://live.gnome.org/Tomboy/HowToCreatePlugins
Awesome tutorial, Stefan!
Created attachment 90344 [details] [review] Addin version of plugin
This patch looks great to me, but Boyd knows the Addin system best.
Looks good to me, too. The only problem with addins right now is that the user can't disable them. But I guess we need to address that separately.
Created attachment 90398 [details] updated version with choice "Date&Time", "Date", "Time" Just a minor update to provide choice of "Date & Time", "Date", or "Time". Also changed the bold to monospace which I like better (I also like it in italic). Feel free to change to the tags you want... (might be an idea to add a preferences dialog eventually so these are confable). Please note that "monospace" is defined by the FixedWidth plugin, so you need that plugin (on) for this tag to have an effect.
The idea of the addin was to quickly insert a timestamp to a note because it can be important to remember when something was written down. In my opinion it is not necessary to have separate date and time options. Maybe we should change the menu item to "Insert timestamp" and rename the addin to TimestampAddin. What do you think?
Can this feature be reconsidered for tomboy 0.10?
Created attachment 97203 [details] [review] Timestamp addin I renamed the addin and the menu item to "Insert Timestamp" and tried to adopt the mono coding guidelines. The addin is disabled per default. I can commit the patch when it's reviewed.
Stefan, I like. What do you think about the addin having a configuration dialog to let the user pick a different date format? Maybe there's a combobox with some common options, but also a way for them to get more specific if they want? I think this will be required, if for no other reason than Europeans and Americans liking different date formats. ;-) Which brings up an idea...maybe in the en_US locale it defaults to one format, but in every other locale it defaults to a different one? It would be nice to have good defaults, is all. Definitely open to other ideas on this, too.
Created attachment 97210 [details] Gedit config dialog The addin uses the same date format that the middle-click feature on the tray icon already uses. This format can be changed in the translation files. Is this sufficient? Gedit has a configuration dialog for a similar plugin (see screenshot).
Oh, duh, I totally forgot that the default was wrapped in Catalog.GetString. Of course you're right and that is sufficient. In general I like the gedit dialog, but it could use some streamlining. I don't think we need the 'prompt' option, and maybe there are too many options in the list to choose from, too. I like how you can see what your custom format would look like. I wonder if it would be helpful or irritating to have the string in the custom field change to match whatever you are selecting in in the list. That way the user could see the formatting strings for the options in the list, and tweak them. That could be total overkill, though.
Stefan, your addin is looking pretty sweet. :) I like the proposed config dialog as well ... except for the prompt option. Go ahead and commit the patch from comment #10 (complete with a proper ChangeLog entry). You can add in the configuration dialog as an additional step. I think the configuration dialog is important, but not absolutely necessary for this add-in to be useful. Something else I'd like to see in the add-in would be a keyboard hot-key for inserting the date/time so the user doesn't have to select the item from the tools menu. I'm not sure what the appropriate hot-key would be, but it would be nice to have it.
Commited in revision 1602. I cannot find where I can change the status of the patch to commited. Maybe I do not have the permission to do that.
If you could, it would be a drop-down in the Status column of the attachment table. Probably only "Tomboy Developer"s have permission. Thanks for the patch!
Boyd, gnome-target is meant to be used on bugs severe enough to possibly require delaying GNOME releases. The target milestone is the field you want for bugs you'd like to remember to fix by a certain release. You can add target milestones for your product by clicking on the "Edit this product" link in the lower-right hand corner of the browse.cgi ("product overview") page. See also the "Target Milestone" and "GNOME Target Milestone" sections of http://bugzilla.gnome.org/page.cgi?id=bug-status.html.
Created attachment 97801 [details] [review] Accelerator for Timestamp addin This patch adds a keybord accelerator to the addin, Ctrl+D is the best I could find although it is used for adding bookmarks in other applications. What do you think? I added a property to the NoteWindow to access its AccelGroup. I also moved the creation of the menu item from the addin's Initialize method to OnNoteOpened because it is not necessary to create menu items for unused notes. I will work on the configuration dialog in the next weeks.
Created attachment 98416 [details] [review] Accelerator for Timestamp addin updated Same patch as before plus removing an unintended '+' character from the xml file.
Created attachment 98880 [details] [review] Shortcut and configuration dialog This is the complete patch with a keyboard shortcut and a configuration dialog.
Any comments on the patch? I know it's quite huge, maybe I should split it up a bit.
Created attachment 100650 [details] [review] Shortcut and configuration dialog updated Now the patch applies again to trunk. I also improved the scrolling of the tree view a bit.
This is all committed in r1768. I'm closing this bug. Let's open new bugs for individual issues with this addin (if there are any, it seems to work awesomely for me).