[tomboy-list] Timestamp idea
Stefan Schweizer
steve.schweizer at gmail.com
Wed Jun 20 09:30:41 PDT 2007
I've attached the addin version to bug
http://bugzilla.gnome.org/show_bug.cgi?id=359168
Stefan
On Tue, 2007-06-19 at 21:55 -0400, Boyd Timothy wrote:
> Something like this is cool. It ought to be one of the first Tomboy
> Addins (via Mono.Addins). :)
>
> -Boyd
>
> On 6/15/07, Pete Goodall <pete at yellowhouse.org> wrote:
> Nice. Thx!
>
> - Pete
>
>
> On 6/15/07, Raymond Auge <rauge at liferay.com> wrote:
> I did just this by customizing the example for
> InsertDateTime.cs on the site.
>
> Here is the code I used (virtually the same as that on
> the plugin tutorial page)
>
> =============================================================
> using System;
>
> using Mono.Unix;
>
> using Gtk;
> using Tomboy;
>
> [PluginInfo(
> "Insert Date/Time", Defines.VERSION,
> PluginInfoAttribute.OFFICIAL_AUTHOR,
> "Inserts current date and time at the cursor
> position.",
> WebSite = "http://www.gnome.org/projects/tomboy/"
> )]
> public class InsertDateTimePlugin : NotePlugin
> {
> Gtk.MenuItem item;
>
> protected override void Initialize ()
> {
> item = new Gtk.MenuItem (Catalog.GetString ("Insert
> date and time"));
> item.Activated += OnMenuItemActivated;
> item.Show ();
> AddPluginMenuItem (item);
> }
>
> protected override void Shutdown ()
> {
> item.Activated -= OnMenuItemActivated;
> }
>
> protected override void OnNoteOpened ()
> {
> /*
> * To Add the date when a new note is
> opened I would just add similar code here.
> */
> }
>
> void OnMenuItemActivated (object sender, EventArgs
> args)
> {
> string format = Catalog.GetString ("dddd, MMMM d yyyy,
> h:mm tt");
> string text = DateTime.Now.ToString (format);
>
> NoteBuffer buffer = Note.Buffer;
> Gtk.TextIter cursor = buffer.GetIterAtMark
> (buffer.InsertMark);
> buffer.InsertWithTagsByName (ref cursor, text,
> "bold");
> }
> }
> =================================================================
>
> Compile with
>
> $] gmcs -debug -out:InsertDateTime.dll -target:library
> -pkg:tomboy-plugins -r:Mono.Posix InsertDateTime.cs
>
>
>
>
> On Fri, 2007-06-15 at 11:04 -0400, Pete Goodall wrote:
> > Hi all,
> >
> > Was just browsing through the Place for Ideas site, and noticed the
> > Timestamps idea:
> > http://live.gnome.org/Tomboy/PlaceForNewIdeas#head-4c3b027684b342a623f2133a20f669f6428dd0a6
> >
> >
> >
> > This is similar to what I had in mind, but a bit of overkill. I
> > simply want an "Insert timestamp" option. For instance, when I start
> > a new note, I would like to have "Note started on Friday, 15 June 2007
> > @ 11:02 am EST". Then later in the note I would "Insert timestamp" to
> > paste in the time I started an edit. This would be useful if I have a
> > note that includes meeting notes from various meetings over time.
> >
> > Anyway, that's my $0.02.
> >
> > - Pete
> >
> >
> Raymond Auge <rauge at liferay.com>
> Software Engineer
> Liferay, Inc.
> Enterprise. Open Source. For Life.
>
>
>
>
>
>
> --
> Pete Goodall <pete at yellowhouse.org>
>
> _______________________________________________
> tomboy-list mailing list
> tomboy-list at lists.beatniksoftware.com
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
>
>
> _______________________________________________
> tomboy-list mailing list
> tomboy-list at lists.beatniksoftware.com
> http://lists.beatniksoftware.com/listinfo.cgi/tomboy-list-beatniksoftware.com
More information about the tomboy-list
mailing list