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 359168 - Add "Insert Date" to tools
Add "Insert Date" to tools
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
unspecified
Other Linux
: Normal enhancement
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
Depends on:
Blocks: 359167
 
 
Reported: 2006-10-03 00:48 UTC by Sven Herzberg
Modified: 2008-02-26 20:52 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Addin version of plugin (3.45 KB, patch)
2007-06-20 16:27 UTC, Stefan Schweizer
none Details | Review
updated version with choice "Date&Time", "Date", "Time" (1.98 KB, text/plain)
2007-06-21 15:13 UTC, Raymond Auge
  Details
Timestamp addin (3.72 KB, patch)
2007-10-14 12:32 UTC, Stefan Schweizer
committed Details | Review
Gedit config dialog (34.19 KB, image/png)
2007-10-14 14:19 UTC, Stefan Schweizer
  Details
Accelerator for Timestamp addin (1.51 KB, patch)
2007-10-24 21:29 UTC, Stefan Schweizer
none Details | Review
Accelerator for Timestamp addin updated (1.95 KB, patch)
2007-11-02 21:49 UTC, Stefan Schweizer
none Details | Review
Shortcut and configuration dialog (10.54 KB, patch)
2007-11-10 18:42 UTC, Stefan Schweizer
none Details | Review
Shortcut and configuration dialog updated (10.64 KB, patch)
2007-12-09 16:18 UTC, Stefan Schweizer
committed Details | Review

Description Sven Herzberg 2006-10-03 00:48:13 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.
Comment 1 Boyd Timothy 2007-01-31 19:15:43 UTC
Changing this to an enhancement.  Will re-evaluate for tomboy 0.8.0.
Comment 2 Stefan Schweizer 2007-03-28 20:11:42 UTC
The plugin developed on the HowTo page does that:
http://live.gnome.org/Tomboy/HowToCreatePlugins
Comment 3 Sandy Armstrong 2007-03-28 20:18:08 UTC
Awesome tutorial, Stefan!
Comment 4 Stefan Schweizer 2007-06-20 16:27:14 UTC
Created attachment 90344 [details] [review]
Addin version of plugin
Comment 5 Alex Graveley 2007-06-20 22:26:57 UTC
This patch looks great to me, but Boyd knows the Addin system best.
Comment 6 Sandy Armstrong 2007-06-20 23:26:56 UTC
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.
Comment 7 Raymond Auge 2007-06-21 15:13:27 UTC
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.
Comment 8 Stefan Schweizer 2007-07-15 19:21:36 UTC
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?
Comment 9 Stefan Schweizer 2007-09-23 22:09:25 UTC
Can this feature be reconsidered for tomboy 0.10?
Comment 10 Stefan Schweizer 2007-10-14 12:32:15 UTC
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.
Comment 11 Sandy Armstrong 2007-10-14 13:52:37 UTC
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.
Comment 12 Stefan Schweizer 2007-10-14 14:19:38 UTC
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).
Comment 13 Sandy Armstrong 2007-10-14 14:33:45 UTC
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.
Comment 14 Boyd Timothy 2007-10-14 15:31:27 UTC
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.
Comment 15 Stefan Schweizer 2007-10-14 19:23:25 UTC
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.
Comment 16 Sandy Armstrong 2007-10-14 19:30:41 UTC
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!
Comment 17 André Klapper 2007-10-23 18:08:34 UTC
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.
Comment 18 Stefan Schweizer 2007-10-24 21:29:32 UTC
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.
Comment 19 Stefan Schweizer 2007-11-02 21:49:50 UTC
Created attachment 98416 [details] [review]
Accelerator for Timestamp addin updated

Same patch as before plus removing an unintended '+' character from the xml file.
Comment 20 Stefan Schweizer 2007-11-10 18:42:14 UTC
Created attachment 98880 [details] [review]
Shortcut and configuration dialog

This is the complete patch with a keyboard shortcut and a configuration dialog.
Comment 21 Stefan Schweizer 2007-11-26 20:13:13 UTC
Any comments on the patch? I know it's quite huge, maybe I should split it up a bit.
Comment 22 Stefan Schweizer 2007-12-09 16:18:00 UTC
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.
Comment 23 Sandy Armstrong 2008-01-12 15:12:25 UTC
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).