Merge lp:~psgenfan/do-plugins/TomboyInsertText into lp:do-plugins

Proposed by Marcus
Status: Needs review
Proposed branch: lp:~psgenfan/do-plugins/TomboyInsertText
Merge into: lp:do-plugins
Diff against target: 875 lines (+539/-83)
12 files modified
AptURL/AptURL.mdp (+7/-7)
DiskMounter/DiskMounter.mdp (+12/-11)
Flickr/gtk-gui/gui.stetic (+3/-3)
Tomboy/Resources/Tomboy.addin.xml (+32/-0)
Tomboy/Resources/Tomboy.addin.xml.in (+0/-30)
Tomboy/Tomboy.mdp (+20/-18)
Tomboy/gtk-gui/Tomboy.TomboyConfiguration.cs (+103/-8)
Tomboy/gtk-gui/gui.stetic (+117/-3)
Tomboy/src/AppendNoteAction.cs (+86/-0)
Tomboy/src/GetContentsAction.cs (+65/-0)
Tomboy/src/TomboyConfiguration.cs (+35/-2)
Tomboy/src/TomboyDBus.cs (+59/-1)
To merge this branch: bzr merge lp:~psgenfan/do-plugins/TomboyInsertText
Reviewer Review Type Date Requested Status
Do Plugins Team Pending
Review via email: mp+22788@code.launchpad.net

Description of the change

I have yet to trace a crash to the changes made. I feel the date settings should be changed, possibly to just a text box, and a link which documents the formatting.

To post a comment you must log in.

Unmerged revisions

681. By Marcus <marcus@marcus-desktop>

first

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'AptURL/AptURL.mdp'
--- AptURL/AptURL.mdp 2009-06-23 00:52:54 +0000
+++ AptURL/AptURL.mdp 2010-04-04 13:44:19 +0000
@@ -1,23 +1,23 @@
1<Project name="AptURL" fileversion="2.0" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">1<Project name="AptURL" fileversion="2.0" DefaultNamespace="AptURL" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
2 <Configurations active="Debug">2 <Configurations active="Debug">
3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
4 <Output directory="bin/Debug" assembly="AptURL" />4 <Output directory="bin/Debug" assembly="AptURL" />
5 <Build debugmode="True" target="Library" />5 <Build debugmode="True" target="Library" />
6 <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />6 <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
8 </Configuration>8 </Configuration>
9 <Configuration name="Release" ctype="DotNetProjectConfiguration">9 <Configuration name="Release" ctype="DotNetProjectConfiguration">
10 <Output directory="bin/Release" assembly="AptURL" />10 <Output directory="bin/Release" assembly="AptURL" />
11 <Build debugmode="False" target="Library" />11 <Build debugmode="False" target="Library" />
12 <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />12 <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
13 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />13 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
14 </Configuration>14 </Configuration>
15 </Configurations>15 </Configurations>
16 <Contents>16 <Contents>
17 <File name="." subtype="Directory" buildaction="Compile" />17 <File subtype="Directory" buildaction="Compile" name="." />
18 <File name="src" subtype="Directory" buildaction="Compile" />18 <File subtype="Directory" buildaction="Compile" name="src" />
19 <File name="src/AptUrl.cs" subtype="Code" buildaction="Compile" />19 <File subtype="Code" buildaction="Compile" name="src/AptUrl.cs" />
20 <File name="Resources/AptURL.addin.xml" subtype="Code" buildaction="EmbedAsResource" />20 <File subtype="Code" buildaction="EmbedAsResource" name="Resources/AptURL.addin.xml.in" />
21 </Contents>21 </Contents>
22 <References>22 <References>
23 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />23 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
2424
=== modified file 'DiskMounter/DiskMounter.mdp'
--- DiskMounter/DiskMounter.mdp 2009-06-29 08:47:41 +0000
+++ DiskMounter/DiskMounter.mdp 2010-04-04 13:44:19 +0000
@@ -1,30 +1,31 @@
1<Project name="DiskMounter" fileversion="2.0" language="C#" DefaultNamespace="DiskMounter" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">1<Project name="DiskMounter" fileversion="2.0" DefaultNamespace="DiskMounter" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
2 <Configurations active="Debug">2 <Configurations active="Debug">
3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
4 <Output directory="bin/Debug" assembly="DiskMounter" />4 <Output directory="bin/Debug" assembly="DiskMounter" />
5 <Build debugmode="True" target="Library" />5 <Build debugmode="True" target="Library" />
6 <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />6 <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
8 </Configuration>8 </Configuration>
9 <Configuration name="Release" ctype="DotNetProjectConfiguration">9 <Configuration name="Release" ctype="DotNetProjectConfiguration">
10 <Output directory="bin/Release" assembly="DiskMounter" />10 <Output directory="bin/Release" assembly="DiskMounter" />
11 <Build debugmode="False" target="Library" />11 <Build debugmode="False" target="Library" />
12 <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />12 <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
13 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />13 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
14 </Configuration>14 </Configuration>
15 </Configurations>15 </Configurations>
16 <Contents>16 <Contents>
17 <File name="src" subtype="Directory" buildaction="Compile" />17 <File subtype="Directory" buildaction="Compile" name="src" />
18 <File name="src/DriveItem.cs" subtype="Code" buildaction="Compile" />18 <File subtype="Code" buildaction="Compile" name="src/DriveItem.cs" />
19 <File name="src/DriveItemSource.cs" subtype="Code" buildaction="Compile" />19 <File subtype="Code" buildaction="Compile" name="src/DriveItemSource.cs" />
20 <File name="src/MountAction.cs" subtype="Code" buildaction="Compile" />20 <File subtype="Code" buildaction="Compile" name="src/MountAction.cs" />
21 <File name="src/OpenVolumeAction.cs" subtype="Code" buildaction="Compile" />21 <File subtype="Code" buildaction="Compile" name="src/OpenVolumeAction.cs" />
22 <File name="src/UnmountAction.cs" subtype="Code" buildaction="Compile" />22 <File subtype="Code" buildaction="Compile" name="src/UnmountAction.cs" />
23 <File name="Resources/DiskMounter.addin.xml" subtype="Code" buildaction="EmbedAsResource" />23 <File subtype="Directory" buildaction="Compile" name="Resources" />
24 <File subtype="Code" buildaction="EmbedAsResource" name="Resources/DiskMounter.addin.xml.in" />
24 </Contents>25 </Contents>
25 <References>26 <References>
26 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />27 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
27 <ProjectReference type="Gac" localcopy="True" refto="gnome-vfs-sharp, Version=2.24.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />28 <ProjectReference type="Gac" localcopy="True" specificVersion="False" refto="gnome-vfs-sharp, Version=2.24.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
28 <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />29 <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
29 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />30 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
30 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.9.0.0, Culture=neutral" />31 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.9.0.0, Culture=neutral" />
3132
=== modified file 'Flickr/gtk-gui/gui.stetic'
--- Flickr/gtk-gui/gui.stetic 2009-06-23 00:52:54 +0000
+++ Flickr/gtk-gui/gui.stetic 2010-04-04 13:44:19 +0000
@@ -2,9 +2,10 @@
2<stetic-interface>2<stetic-interface>
3 <configuration>3 <configuration>
4 <images-root-path>..</images-root-path>4 <images-root-path>..</images-root-path>
5 <target-gtk-version>2.12.8</target-gtk-version>5 <target-gtk-version>2.12</target-gtk-version>
6 </configuration>6 </configuration>
7 <import>7 <import>
8 <widget-library name="Do.Platform.Linux, Version=0.9.0.0, Culture=neutral" />
8 <widget-library name="../bin/Debug/Flickr.dll" internal="true" />9 <widget-library name="../bin/Debug/Flickr.dll" internal="true" />
9 </import>10 </import>
10 <widget class="Gtk.Bin" id="Flickr.AccountConfig" design-size="401 347">11 <widget class="Gtk.Bin" id="Flickr.AccountConfig" design-size="401 347">
@@ -127,7 +128,7 @@
127 </widget>128 </widget>
128 </child>129 </child>
129 </widget>130 </widget>
130 <widget class="Gtk.Bin" id="Flickr.UploadConfig" design-size="346 354">131 <widget class="Gtk.Bin" id="Flickr.UploadConfig" design-size="351 354">
131 <property name="MemberName" />132 <property name="MemberName" />
132 <child>133 <child>
133 <widget class="Gtk.VBox" id="vbox3">134 <widget class="Gtk.VBox" id="vbox3">
@@ -157,7 +158,6 @@
157 <property name="MemberName" />158 <property name="MemberName" />
158 <property name="CanFocus">True</property>159 <property name="CanFocus">True</property>
159 <property name="Label" translatable="yes">Private</property>160 <property name="Label" translatable="yes">Private</property>
160 <property name="Active">True</property>
161 <property name="DrawIndicator">True</property>161 <property name="DrawIndicator">True</property>
162 <property name="HasLabel">True</property>162 <property name="HasLabel">True</property>
163 <property name="UseUnderline">True</property>163 <property name="UseUnderline">True</property>
164164
=== added file 'Tomboy/Resources/Tomboy.addin.xml'
--- Tomboy/Resources/Tomboy.addin.xml 1970-01-01 00:00:00 +0000
+++ Tomboy/Resources/Tomboy.addin.xml 2010-04-04 13:44:19 +0000
@@ -0,0 +1,32 @@
1<Addin
2 id="Tomboy"
3 namespace="Do"
4 version="1.4"
5 name="Tomboy"
6 description="Search and create new Tomboy notes."
7 author="Rick Harding, Chris Szikszoy"
8 category="Official"
9 defaultEnabled="false"
10 url="http://do.davebsd.com/wiki/Tomboy_Plugin"
11 >
12
13 <Runtime>
14 <Import assembly="Tomboy.dll"/>
15 </Runtime>
16
17 <Localizer type="Gettext" catalog="gnome-do-plugins" location="@expanded_datadir@/locale" />
18
19 <Dependencies>
20 <Addin id="Universe" version="1.0" />
21 </Dependencies>
22
23 <Extension path="/Do/ItemSource">
24 <ItemSource type="Tomboy.NotesItemSource" />
25 </Extension>
26 <Extension path="/Do/Action">
27 <Action type="Tomboy.NewNoteAction" />
28 <Action type="Tomboy.SearchNotesAction" />
29 <Action type="Tomboy.AppendNoteAction" />
30 <Action type="Tomboy.GetNoteTextAction" />
31 </Extension>
32</Addin>
033
=== removed file 'Tomboy/Resources/Tomboy.addin.xml.in'
--- Tomboy/Resources/Tomboy.addin.xml.in 2009-06-26 15:25:17 +0000
+++ Tomboy/Resources/Tomboy.addin.xml.in 1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
1<Addin
2 id="Tomboy"
3 namespace="Do"
4 version="1.4"
5 name="Tomboy"
6 description="Search and create new Tomboy notes."
7 author="Rick Harding, Chris Szikszoy"
8 category="Official"
9 defaultEnabled="false"
10 url="http://do.davebsd.com/wiki/Tomboy_Plugin"
11 >
12
13 <Runtime>
14 <Import assembly="Tomboy.dll"/>
15 </Runtime>
16
17 <Localizer type="Gettext" catalog="gnome-do-plugins" location="@expanded_datadir@/locale" />
18
19 <Dependencies>
20 <Addin id="Universe" version="1.0" />
21 </Dependencies>
22
23 <Extension path="/Do/ItemSource">
24 <ItemSource type="Tomboy.NotesItemSource" />
25 </Extension>
26 <Extension path="/Do/Action">
27 <Action type="Tomboy.NewNoteAction" />
28 <Action type="Tomboy.SearchNotesAction" />
29 </Extension>
30</Addin>
310
=== modified file 'Tomboy/Tomboy.mdp'
--- Tomboy/Tomboy.mdp 2009-06-23 00:52:54 +0000
+++ Tomboy/Tomboy.mdp 2010-04-04 13:44:19 +0000
@@ -1,32 +1,34 @@
1<Project name="Tomboy" fileversion="2.0" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">1<Project name="Tomboy" fileversion="2.0" DefaultNamespace="Tomboy" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
2 <Configurations active="Debug">2 <Configurations active="Debug">
3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">3 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
4 <Output directory="bin/Debug" assembly="Tomboy" />4 <Output directory="bin/Debug" assembly="Tomboy" />
5 <Build debugmode="True" target="Library" />5 <Build debugmode="True" target="Library" />
6 <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />6 <Execution consolepause="True" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />7 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="True" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
8 </Configuration>8 </Configuration>
9 <Configuration name="Release" ctype="DotNetProjectConfiguration">9 <Configuration name="Release" ctype="DotNetProjectConfiguration">
10 <Output directory="bin/Release" assembly="Tomboy" />10 <Output directory="bin/Release" assembly="Tomboy" />
11 <Build debugmode="False" target="Library" />11 <Build debugmode="False" target="Library" />
12 <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />12 <Execution consolepause="True" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
13 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />13 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="True" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
14 </Configuration>14 </Configuration>
15 </Configurations>15 </Configurations>
16 <Contents>16 <Contents>
17 <File name="src" subtype="Directory" buildaction="Compile" />17 <File subtype="Directory" buildaction="Compile" name="src" />
18 <File name="src/TomboyDBus.cs" subtype="Code" buildaction="Compile" />18 <File subtype="Code" buildaction="Compile" name="src/TomboyDBus.cs" />
19 <File name="src/TomboyItem.cs" subtype="Code" buildaction="Compile" />19 <File subtype="Code" buildaction="Compile" name="src/TomboyItem.cs" />
20 <File name="src/NewNoteAction.cs" subtype="Code" buildaction="Compile" />20 <File subtype="Code" buildaction="Compile" name="src/NewNoteAction.cs" />
21 <File name="src/NotesItemSource.cs" subtype="Code" buildaction="Compile" />21 <File subtype="Code" buildaction="Compile" name="src/NotesItemSource.cs" />
22 <File name="src/SearchNotesAction.cs" subtype="Code" buildaction="Compile" />22 <File subtype="Code" buildaction="Compile" name="src/SearchNotesAction.cs" />
23 <File name="gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" />23 <File subtype="Code" buildaction="EmbedAsResource" name="gtk-gui/gui.stetic" />
24 <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />24 <File subtype="Code" buildaction="Compile" name="gtk-gui/generated.cs" />
25 <File name="src/TomboyConfiguration.cs" subtype="Code" buildaction="Compile" />25 <File subtype="Code" buildaction="Compile" name="src/TomboyConfiguration.cs" />
26 <File name="gtk-gui/Tomboy.TomboyConfiguration.cs" subtype="Code" buildaction="Compile" />26 <File subtype="Code" buildaction="Compile" name="gtk-gui/Tomboy.TomboyConfiguration.cs" />
27 <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" />27 <File subtype="Code" buildaction="EmbedAsResource" name="gtk-gui/objects.xml" />
28 <File name="Resources/Tomboy.addin.xml" subtype="Code" buildaction="EmbedAsResource" />28 <File subtype="Code" buildaction="Compile" name="src/TomboyBrowseNotesItem.cs" />
29 <File name="src/TomboyBrowseNotesItem.cs" subtype="Code" buildaction="Compile" />29 <File subtype="Code" buildaction="Compile" name="src/AppendNoteAction.cs" />
30 <File subtype="Code" buildaction="EmbedAsResource" name="Resources/Tomboy.addin.xml" />
31 <File subtype="Code" buildaction="Compile" name="src/GetContentsAction.cs" />
30 </Contents>32 </Contents>
31 <References>33 <References>
32 <ProjectReference type="Gac" localcopy="True" refto="NDesk.DBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6716e4f9b2ed099" />34 <ProjectReference type="Gac" localcopy="True" refto="NDesk.DBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6716e4f9b2ed099" />
3335
=== modified file 'Tomboy/gtk-gui/Tomboy.TomboyConfiguration.cs'
--- Tomboy/gtk-gui/Tomboy.TomboyConfiguration.cs 2009-06-23 00:52:54 +0000
+++ Tomboy/gtk-gui/Tomboy.TomboyConfiguration.cs 2010-04-04 13:44:19 +0000
@@ -35,7 +35,23 @@
35 35
36 private Gtk.RadioButton titleFirstRadioButton;36 private Gtk.RadioButton titleFirstRadioButton;
37 37
38 private Gtk.Label GtkLabel2;38 private Gtk.Label GtkLabel4;
39
40 private Gtk.Frame frame3;
41
42 private Gtk.Alignment GtkAlignment2;
43
44 private Gtk.VBox vbox4;
45
46 private Gtk.CheckButton insertionIncludeTime;
47
48 private Gtk.ComboBox InsertionDateFormat;
49
50 private Gtk.RadioButton insertionPrepend;
51
52 private Gtk.RadioButton insertionAppend;
53
54 private Gtk.Label GtkLabel9;
39 55
40 protected virtual void Build() {56 protected virtual void Build() {
41 Stetic.Gui.Initialize(this);57 Stetic.Gui.Initialize(this);
@@ -44,7 +60,6 @@
44 this.Name = "Tomboy.TomboyConfiguration";60 this.Name = "Tomboy.TomboyConfiguration";
45 // Container child Tomboy.TomboyConfiguration.Gtk.Container+ContainerChild61 // Container child Tomboy.TomboyConfiguration.Gtk.Container+ContainerChild
46 this.vbox1 = new Gtk.VBox();62 this.vbox1 = new Gtk.VBox();
47 this.vbox1.Name = "vbox1";
48 this.vbox1.Spacing = 6;63 this.vbox1.Spacing = 6;
49 // Container child vbox1.Gtk.Box+BoxChild64 // Container child vbox1.Gtk.Box+BoxChild
50 this.frame1 = new Gtk.Frame();65 this.frame1 = new Gtk.Frame();
@@ -101,7 +116,6 @@
101 this.contentFirstRadioButton = new Gtk.RadioButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("First pane is content, second pane is title."));116 this.contentFirstRadioButton = new Gtk.RadioButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("First pane is content, second pane is title."));
102 this.contentFirstRadioButton.CanFocus = true;117 this.contentFirstRadioButton.CanFocus = true;
103 this.contentFirstRadioButton.Name = "contentFirstRadioButton";118 this.contentFirstRadioButton.Name = "contentFirstRadioButton";
104 this.contentFirstRadioButton.Active = true;
105 this.contentFirstRadioButton.DrawIndicator = true;119 this.contentFirstRadioButton.DrawIndicator = true;
106 this.contentFirstRadioButton.UseUnderline = true;120 this.contentFirstRadioButton.UseUnderline = true;
107 this.contentFirstRadioButton.Group = new GLib.SList(System.IntPtr.Zero);121 this.contentFirstRadioButton.Group = new GLib.SList(System.IntPtr.Zero);
@@ -124,16 +138,97 @@
124 w6.Fill = false;138 w6.Fill = false;
125 this.GtkAlignment1.Add(this.vbox3);139 this.GtkAlignment1.Add(this.vbox3);
126 this.frame2.Add(this.GtkAlignment1);140 this.frame2.Add(this.GtkAlignment1);
127 this.GtkLabel2 = new Gtk.Label();141 this.GtkLabel4 = new Gtk.Label();
128 this.GtkLabel2.Name = "GtkLabel2";142 this.GtkLabel4.Name = "GtkLabel4";
129 this.GtkLabel2.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("<b>New Note Title and Content Entry</b>");143 this.GtkLabel4.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("<b>New Note Title and Content Entry</b>");
130 this.GtkLabel2.UseMarkup = true;144 this.GtkLabel4.UseMarkup = true;
131 this.frame2.LabelWidget = this.GtkLabel2;145 this.frame2.LabelWidget = this.GtkLabel4;
132 this.vbox1.Add(this.frame2);146 this.vbox1.Add(this.frame2);
133 Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame2]));147 Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame2]));
134 w9.Position = 1;148 w9.Position = 1;
135 w9.Expand = false;149 w9.Expand = false;
136 w9.Fill = false;150 w9.Fill = false;
151 // Container child vbox1.Gtk.Box+BoxChild
152 this.frame3 = new Gtk.Frame();
153 this.frame3.Name = "frame3";
154 this.frame3.ShadowType = ((Gtk.ShadowType)(0));
155 this.frame3.BorderWidth = ((uint)(1));
156 // Container child frame3.Gtk.Container+ContainerChild
157 this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
158 this.GtkAlignment2.Name = "GtkAlignment2";
159 this.GtkAlignment2.LeftPadding = ((uint)(12));
160 // Container child GtkAlignment2.Gtk.Container+ContainerChild
161 this.vbox4 = new Gtk.VBox();
162 this.vbox4.Name = "vbox4";
163 this.vbox4.Spacing = 6;
164 // Container child vbox4.Gtk.Box+BoxChild
165 this.insertionIncludeTime = new Gtk.CheckButton();
166 this.insertionIncludeTime.CanFocus = true;
167 this.insertionIncludeTime.Name = "insertionIncludeTime";
168 this.insertionIncludeTime.Label = Mono.Addins.AddinManager.CurrentLocalizer.GetString("Include Date and Time");
169 this.insertionIncludeTime.DrawIndicator = true;
170 this.insertionIncludeTime.UseUnderline = true;
171 this.vbox4.Add(this.insertionIncludeTime);
172 Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox4[this.insertionIncludeTime]));
173 w10.Position = 0;
174 w10.Expand = false;
175 w10.Fill = false;
176 // Container child vbox4.Gtk.Box+BoxChild
177 this.InsertionDateFormat = Gtk.ComboBox.NewText();
178 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Year/Month/Day 24Hours:Minutes"));
179 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Year/Month/Day Hours:Minutes am/pm"));
180 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Year/Month/Day"));
181 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day/Year 24Hours:Minutes"));
182 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day/Year Hours:Minutes am/pm"));
183 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day/Year"));
184 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day 24Hours:Minutes"));
185 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day Hours:Minutes am/pm\""));
186 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day"));
187 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("24Hours:Minutes"));
188 this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Hours:Minutes am/pm"));
189 this.InsertionDateFormat.Name = "InsertionDateFormat";
190 this.InsertionDateFormat.Active = 0;
191 this.vbox4.Add(this.InsertionDateFormat);
192 Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox4[this.InsertionDateFormat]));
193 w11.Position = 1;
194 w11.Expand = false;
195 w11.Fill = false;
196 // Container child vbox4.Gtk.Box+BoxChild
197 this.insertionPrepend = new Gtk.RadioButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Prepend to Top of Note"));
198 this.insertionPrepend.CanFocus = true;
199 this.insertionPrepend.Name = "insertionPrepend";
200 this.insertionPrepend.DrawIndicator = true;
201 this.insertionPrepend.UseUnderline = true;
202 this.insertionPrepend.Group = new GLib.SList(System.IntPtr.Zero);
203 this.vbox4.Add(this.insertionPrepend);
204 Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox4[this.insertionPrepend]));
205 w12.Position = 2;
206 w12.Expand = false;
207 w12.Fill = false;
208 // Container child vbox4.Gtk.Box+BoxChild
209 this.insertionAppend = new Gtk.RadioButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Append to Bottom of Note"));
210 this.insertionAppend.CanFocus = true;
211 this.insertionAppend.Name = "insertionAppend";
212 this.insertionAppend.DrawIndicator = true;
213 this.insertionAppend.UseUnderline = true;
214 this.insertionAppend.Group = this.insertionPrepend.Group;
215 this.vbox4.Add(this.insertionAppend);
216 Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox4[this.insertionAppend]));
217 w13.Position = 3;
218 w13.Expand = false;
219 w13.Fill = false;
220 this.GtkAlignment2.Add(this.vbox4);
221 this.frame3.Add(this.GtkAlignment2);
222 this.GtkLabel9 = new Gtk.Label();
223 this.GtkLabel9.Name = "GtkLabel9";
224 this.GtkLabel9.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("<b>Note Insertion</b>");
225 this.GtkLabel9.UseMarkup = true;
226 this.frame3.LabelWidget = this.GtkLabel9;
227 this.vbox1.Add(this.frame3);
228 Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame3]));
229 w16.Position = 2;
230 w16.Expand = false;
231 w16.Fill = false;
137 this.Add(this.vbox1);232 this.Add(this.vbox1);
138 if ((this.Child != null)) {233 if ((this.Child != null)) {
139 this.Child.ShowAll();234 this.Child.ShowAll();
140235
=== modified file 'Tomboy/gtk-gui/gui.stetic'
--- Tomboy/gtk-gui/gui.stetic 2009-06-23 00:52:54 +0000
+++ Tomboy/gtk-gui/gui.stetic 2010-04-04 13:44:19 +0000
@@ -2,12 +2,13 @@
2<stetic-interface>2<stetic-interface>
3 <configuration>3 <configuration>
4 <images-root-path>..</images-root-path>4 <images-root-path>..</images-root-path>
5 <target-gtk-version>2.12.8</target-gtk-version>5 <target-gtk-version>2.12</target-gtk-version>
6 </configuration>6 </configuration>
7 <import>7 <import>
8 <widget-library name="Do.Platform.Linux, Version=0.9.0.0, Culture=neutral" />
8 <widget-library name="../bin/Debug/Tomboy.dll" internal="true" />9 <widget-library name="../bin/Debug/Tomboy.dll" internal="true" />
9 </import>10 </import>
10 <widget class="Gtk.Bin" id="Tomboy.TomboyConfiguration" design-size="413 300">11 <widget class="Gtk.Bin" id="Tomboy.TomboyConfiguration" design-size="413 304">
11 <property name="MemberName" />12 <property name="MemberName" />
12 <property name="Visible">False</property>13 <property name="Visible">False</property>
13 <child>14 <child>
@@ -88,6 +89,7 @@
88 <property name="MemberName" />89 <property name="MemberName" />
89 <property name="CanFocus">True</property>90 <property name="CanFocus">True</property>
90 <property name="Label" translatable="yes">First pane is content, second pane is title.</property>91 <property name="Label" translatable="yes">First pane is content, second pane is title.</property>
92 <property name="Active">True</property>
91 <property name="DrawIndicator">True</property>93 <property name="DrawIndicator">True</property>
92 <property name="HasLabel">True</property>94 <property name="HasLabel">True</property>
93 <property name="UseUnderline">True</property>95 <property name="UseUnderline">True</property>
@@ -122,7 +124,7 @@
122 </widget>124 </widget>
123 </child>125 </child>
124 <child>126 <child>
125 <widget class="Gtk.Label" id="GtkLabel2">127 <widget class="Gtk.Label" id="GtkLabel4">
126 <property name="MemberName" />128 <property name="MemberName" />
127 <property name="LabelProp" translatable="yes">&lt;b&gt;New Note Title and Content Entry&lt;/b&gt;</property>129 <property name="LabelProp" translatable="yes">&lt;b&gt;New Note Title and Content Entry&lt;/b&gt;</property>
128 <property name="UseMarkup">True</property>130 <property name="UseMarkup">True</property>
@@ -139,6 +141,118 @@
139 <property name="Fill">False</property>141 <property name="Fill">False</property>
140 </packing>142 </packing>
141 </child>143 </child>
144 <child>
145 <widget class="Gtk.Frame" id="frame3">
146 <property name="MemberName" />
147 <property name="ShadowType">None</property>
148 <property name="BorderWidth">1</property>
149 <child>
150 <widget class="Gtk.Alignment" id="GtkAlignment2">
151 <property name="MemberName" />
152 <property name="Xalign">0</property>
153 <property name="Yalign">0</property>
154 <property name="LeftPadding">12</property>
155 <child>
156 <widget class="Gtk.VBox" id="vbox4">
157 <property name="MemberName">append</property>
158 <property name="Spacing">6</property>
159 <child>
160 <widget class="Gtk.CheckButton" id="insertionIncludeTime">
161 <property name="MemberName" />
162 <property name="CanFocus">True</property>
163 <property name="Label" translatable="yes">Include Date and Time</property>
164 <property name="DrawIndicator">True</property>
165 <property name="HasLabel">True</property>
166 <property name="UseUnderline">True</property>
167 </widget>
168 <packing>
169 <property name="Position">0</property>
170 <property name="AutoSize">True</property>
171 <property name="Expand">False</property>
172 <property name="Fill">False</property>
173 </packing>
174 </child>
175 <child>
176 <widget class="Gtk.ComboBox" id="InsertionDateFormat">
177 <property name="MemberName" />
178 <property name="IsTextCombo">True</property>
179 <property name="Items" translatable="yes">Year/Month/Day 24Hours:Minutes
180Year/Month/Day Hours:Minutes am/pm
181Year/Month/Day
182Month/Day/Year 24Hours:Minutes
183Month/Day/Year Hours:Minutes am/pm
184Month/Day/Year
185Month/Day 24Hours:Minutes
186Month/Day Hours:Minutes am/pm"
187Month/Day
18824Hours:Minutes
189Hours:Minutes am/pm</property>
190 <property name="Active">0</property>
191 </widget>
192 <packing>
193 <property name="Position">1</property>
194 <property name="AutoSize">True</property>
195 <property name="Expand">False</property>
196 <property name="Fill">False</property>
197 </packing>
198 </child>
199 <child>
200 <widget class="Gtk.RadioButton" id="insertionPrepend">
201 <property name="MemberName" />
202 <property name="CanFocus">True</property>
203 <property name="Label" translatable="yes">Prepend to Top of Note</property>
204 <property name="Active">True</property>
205 <property name="DrawIndicator">True</property>
206 <property name="HasLabel">True</property>
207 <property name="UseUnderline">True</property>
208 <property name="Group">append</property>
209 </widget>
210 <packing>
211 <property name="Position">2</property>
212 <property name="AutoSize">True</property>
213 <property name="Expand">False</property>
214 <property name="Fill">False</property>
215 </packing>
216 </child>
217 <child>
218 <widget class="Gtk.RadioButton" id="insertionAppend">
219 <property name="MemberName" />
220 <property name="CanFocus">True</property>
221 <property name="Label" translatable="yes">Append to Bottom of Note</property>
222 <property name="DrawIndicator">True</property>
223 <property name="HasLabel">True</property>
224 <property name="UseUnderline">True</property>
225 <property name="Group">append</property>
226 </widget>
227 <packing>
228 <property name="Position">3</property>
229 <property name="AutoSize">True</property>
230 <property name="Expand">False</property>
231 <property name="Fill">False</property>
232 </packing>
233 </child>
234 </widget>
235 </child>
236 </widget>
237 </child>
238 <child>
239 <widget class="Gtk.Label" id="GtkLabel9">
240 <property name="MemberName" />
241 <property name="LabelProp" translatable="yes">&lt;b&gt;Note Insertion&lt;/b&gt;</property>
242 <property name="UseMarkup">True</property>
243 </widget>
244 <packing>
245 <property name="type">label_item</property>
246 </packing>
247 </child>
248 </widget>
249 <packing>
250 <property name="Position">2</property>
251 <property name="AutoSize">True</property>
252 <property name="Expand">False</property>
253 <property name="Fill">False</property>
254 </packing>
255 </child>
142 </widget>256 </widget>
143 </child>257 </child>
144 </widget>258 </widget>
145259
=== added file 'Tomboy/src/AppendNoteAction.cs'
--- Tomboy/src/AppendNoteAction.cs 1970-01-01 00:00:00 +0000
+++ Tomboy/src/AppendNoteAction.cs 2010-04-04 13:44:19 +0000
@@ -0,0 +1,86 @@
1// AppendNoteAction.cs
2//
3// GNOME Do is the legal property of its developers, whose names are too
4// numerous to list here. Please refer to the COPYRIGHT file distributed with
5// this source distribution.
6//
7// This program is free software: you can redistribute it and/or modify
8// it under the terms of the GNU General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// This program is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU General Public License
18// along with this program. If not, see <http://www.gnu.org/licenses/>.
19// Authors
20// Marcus Walz psgenfan@gmail.com
21//
22
23using System;
24using System.Linq;
25using System.Diagnostics;
26using System.Collections.Generic;
27
28using Mono.Addins;
29
30using Do.Universe;
31using Do.Platform.Linux;
32
33namespace Tomboy
34{
35
36 public class AppendNoteAction : Act
37 {
38 public override string Name {
39 get { return AddinManager.CurrentLocalizer.GetString ("Add to Note"); }
40 }
41
42 public override string Description {
43 get { return AddinManager.CurrentLocalizer.GetString ("Insert text to the beginning or end of a tomboy note."); }
44 }
45
46 public override string Icon {
47 get { return "list-add"; }
48 }
49
50 public override IEnumerable<Type> SupportedItemTypes {
51 get { yield return typeof (NoteItem); }
52 }
53
54 public override IEnumerable<Type> SupportedModifierItemTypes {
55 get { yield return typeof (ITextItem); }
56 }
57
58 public override bool ModifierItemsOptional {
59 get { return false; }
60 }
61
62 public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems)
63 {
64 //ITextItem mainItem = items.First () as ITextItem;
65 foreach (NoteItem note in items)
66 {
67 //NoteItem note = items.First() as NoteItem;
68 ITextItem modItem = null;
69 if (modItems.Any ()) {
70 modItem = modItems.First () as ITextItem;
71 if(!string.IsNullOrEmpty(modItem.Text))
72 {
73 TomboyDBus tb = new TomboyDBus ();
74 tb.AppendNote(note.Name, modItem.Text);
75 }
76 }
77 }
78 yield break;
79 }
80
81// public Gtk.Bin GetConfiguration ()
82// {
83// return new TomboyConfiguration ();
84// }
85 }
86}
0\ No newline at end of file87\ No newline at end of file
188
=== added file 'Tomboy/src/GetContentsAction.cs'
--- Tomboy/src/GetContentsAction.cs 1970-01-01 00:00:00 +0000
+++ Tomboy/src/GetContentsAction.cs 2010-04-04 13:44:19 +0000
@@ -0,0 +1,65 @@
1
2// AppendNoteAction.cs
3//
4// GNOME Do is the legal property of its developers, whose names are too
5// numerous to list here. Please refer to the COPYRIGHT file distributed with
6// this source distribution.
7//
8// This program is free software: you can redistribute it and/or modify
9// it under the terms of the GNU General Public License as published by
10// the Free Software Foundation, either version 3 of the License, or
11// (at your option) any later version.
12//
13// This program is distributed in the hope that it will be useful,
14// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16// GNU General Public License for more details.
17//
18// You should have received a copy of the GNU General Public License
19// along with this program. If not, see <http://www.gnu.org/licenses/>.
20// Authors
21// Marcus Walz psgenfan@gmail.com
22//
23
24using System;
25using System.Linq;
26using System.Diagnostics;
27using System.Collections.Generic;
28
29using Mono.Addins;
30
31using Do.Universe;
32using Do.Platform.Linux;
33using Do.Universe.Common;
34
35namespace Tomboy
36{
37
38 public class GetNoteTextAction : Act
39 {
40 public override string Name {
41 get { return AddinManager.CurrentLocalizer.GetString ("Get Note's Text"); }
42 }
43
44 public override string Description {
45 get { return AddinManager.CurrentLocalizer.GetString ("Returns the selected Tomboy Note's Text."); }
46 }
47
48 public override string Icon {
49 get { return "text-editor"; }
50 }
51
52 public override IEnumerable<Type> SupportedItemTypes {
53 get { yield return typeof (NoteItem); }
54 }
55
56 public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems)
57 {
58 //ITextItem mainItem = items.First () as ITextItem;
59 NoteItem note = items.First() as NoteItem;
60 TomboyDBus tb = new TomboyDBus ();
61 yield return new TextItem(tb.GetNoteText(note.Name));
62 }
63
64 }
65}
066
=== modified file 'Tomboy/src/TomboyConfiguration.cs'
--- Tomboy/src/TomboyConfiguration.cs 2009-01-21 19:21:55 +0000
+++ Tomboy/src/TomboyConfiguration.cs 2010-04-04 13:44:19 +0000
@@ -38,7 +38,9 @@
38 {38 {
39 private const string DeriveTitlePrefKey = "deriveTitle";39 private const string DeriveTitlePrefKey = "deriveTitle";
40 private const string TitleFirstPrefKey = "titleFirst";40 private const string TitleFirstPrefKey = "titleFirst";
41 41 private const string InsertionDatePrefKey = "includeDate";
42 private const string PrependPrefKey = "insertPrepand";
43 private const string DateFormatKey = "dateFormat";
42 private static IPreferences prefs;44 private static IPreferences prefs;
43 45
44 static TomboyConfiguration ()46 static TomboyConfiguration ()
@@ -56,6 +58,18 @@
56 get { return prefs.Get (TitleFirstPrefKey, false); }58 get { return prefs.Get (TitleFirstPrefKey, false); }
57 }59 }
58 60
61 public static bool DateInsertion
62 {
63 get { return prefs.Get (InsertionDatePrefKey, false); }
64 }
65 public static bool PrependInsertion
66 {
67 get {return prefs.Get (PrependPrefKey, false); }
68 }
69 public static int DateFormat
70 {
71 get {return prefs.Get (DateFormatKey, 0);}
72 }
59 public TomboyConfiguration()73 public TomboyConfiguration()
60 {74 {
61 this.Build();75 this.Build();
@@ -64,13 +78,28 @@
64 deriveTitleCheckButton.Active = DeriveTitle;78 deriveTitleCheckButton.Active = DeriveTitle;
65 contentFirstRadioButton.Active = !TitleFirst;79 contentFirstRadioButton.Active = !TitleFirst;
66 titleFirstRadioButton.Active = TitleFirst;80 titleFirstRadioButton.Active = TitleFirst;
67 81 insertionIncludeTime.Active = DateInsertion;
82 insertionPrepend.Active = PrependInsertion;
83 insertionAppend.Active = !PrependInsertion;
84 InsertionDateFormat.Active = DateFormat;
68 // Set up events. I had trouble doing this from stetic.85 // Set up events. I had trouble doing this from stetic.
69 deriveTitleCheckButton.Toggled += OnDeriveTitleCheckButtonToggled;86 deriveTitleCheckButton.Toggled += OnDeriveTitleCheckButtonToggled;
70 contentFirstRadioButton.Toggled += OnContentFirstRadioButtonToggled;87 contentFirstRadioButton.Toggled += OnContentFirstRadioButtonToggled;
71 titleFirstRadioButton.Toggled += OnContentFirstRadioButtonToggled;88 titleFirstRadioButton.Toggled += OnContentFirstRadioButtonToggled;
89 insertionIncludeTime.Toggled += OnInsertionIncludeTimeToggled;
90 insertionPrepend.Toggled += OnInsertionPrependToggled;
91 insertionAppend.Toggled += OnInsertionPrependToggled;
92 InsertionDateFormat.Changed += OnDateFormatSelection;
72 }93 }
7394
95 protected virtual void OnInsertionIncludeTimeToggled (object Sender, System.EventArgs e)
96 {
97 prefs.Set(InsertionDatePrefKey, insertionIncludeTime.Active);
98 }
99 protected virtual void OnInsertionPrependToggled (object Sender, System.EventArgs e)
100 {
101 prefs.Set(PrependPrefKey, insertionPrepend.Active);
102 }
74 protected virtual void OnDeriveTitleCheckButtonToggled (object sender, System.EventArgs e)103 protected virtual void OnDeriveTitleCheckButtonToggled (object sender, System.EventArgs e)
75 {104 {
76 prefs.Set (DeriveTitlePrefKey, deriveTitleCheckButton.Active);105 prefs.Set (DeriveTitlePrefKey, deriveTitleCheckButton.Active);
@@ -80,5 +109,9 @@
80 {109 {
81 prefs.Set (TitleFirstPrefKey, titleFirstRadioButton.Active);110 prefs.Set (TitleFirstPrefKey, titleFirstRadioButton.Active);
82 }111 }
112 protected virtual void OnDateFormatSelection(object sender, System.EventArgs e)
113 {
114 prefs.Set (DateFormatKey, InsertionDateFormat.Active);
115 }
83 }116 }
84}117}
85118
=== modified file 'Tomboy/src/TomboyDBus.cs'
--- Tomboy/src/TomboyDBus.cs 2009-01-21 19:21:55 +0000
+++ Tomboy/src/TomboyDBus.cs 2010-04-04 13:44:19 +0000
@@ -42,6 +42,9 @@
42 string[] ListAllNotes ();42 string[] ListAllNotes ();
43 void DisplaySearchWithText (string search_text);43 void DisplaySearchWithText (string search_text);
44 string Version ();44 string Version ();
45 string GetNoteContents (string uri);
46 string GetNoteContentsXml (string uri);
47 bool SetNoteContentsXml (string uri, string xml);
45 bool SetNoteContents (string uri, string text_contents);48 bool SetNoteContents (string uri, string text_contents);
46 event DBusNoteAddedHandler NoteAdded;49 event DBusNoteAddedHandler NoteAdded;
47 event DBusNoteRemovedHandler NoteRemoved;50 event DBusNoteRemovedHandler NoteRemoved;
@@ -52,6 +55,19 @@
5255
53 class TomboyDBus 56 class TomboyDBus
54 {57 {
58 string[] dateformats = {
59 "yyyy/MM/dd HH:mm",
60 "yyyy/MM/dd hh:mm tt",
61 "yyyy/MM/dd",
62 "MM/dd/yyyy HH:mm",
63 "MM/dd/yyyy hh:mm tt",
64 "MM/dd/yyyy",
65 "MM/dd HH:mm",
66 "MM/dd hh:mm tt",
67 "MM/dd",
68 "HH:mm",
69 "hh:mm tt"};
70
55#region Constants71#region Constants
5672
57 private const string OBJECT_PATH = "/org/gnome/Tomboy/RemoteControl";73 private const string OBJECT_PATH = "/org/gnome/Tomboy/RemoteControl";
@@ -203,6 +219,7 @@
203 i++;219 i++;
204 }220 }
205 }221 }
222
206223
207 note_title = TomboyInstance.GetNoteTitle (uri);224 note_title = TomboyInstance.GetNoteTitle (uri);
208 TomboyInstance.DisplayNote (uri);225 TomboyInstance.DisplayNote (uri);
@@ -211,7 +228,48 @@
211 TomboyInstance.SetNoteContents (uri, note_title + "\n\n" + note_content);228 TomboyInstance.SetNoteContents (uri, note_title + "\n\n" + note_content);
212 return uri;229 return uri;
213 }230 }
214231
232 public string GetNoteText(string note_title){
233 EnsureTomboyInstance();
234 string uri = TomboyInstance.FindNote(note_title);
235 try{
236 return TomboyInstance.GetNoteContents(uri);
237 } catch (Exception) {
238 Console.Error.WriteLine ("Could not open the note: {0}", note_title);
239 return "";
240 }
241 }
242 public void AppendNote(string note_title, string text){
243 EnsureTomboyInstance();
244 string uri = TomboyInstance.FindNote(note_title);
245 string note;
246 try{
247 note = TomboyInstance.GetNoteContentsXml(uri);
248 } catch (Exception) {
249 Console.Error.WriteLine ("Could not open the note: {0}", note_title);
250 return;
251 }
252 if(TomboyConfiguration.DateInsertion)
253 {
254 text = "<bold>"+System.DateTime.Now.ToString(dateformats[TomboyConfiguration.DateFormat])+"</bold> " + text;
255 }
256 if(TomboyConfiguration.PrependInsertion)
257 {
258 while(note.Substring(note.IndexOfAny("\n".ToCharArray())+2).StartsWith("\n")) //This Works Somehow
259 note = note.Remove(note.IndexOfAny("\n".ToCharArray())+2, 2); //Removies Trailing Line Breaks
260 note = note.Insert(note.IndexOfAny("\n".ToCharArray())+2, text+"\n\n"); //First Line is note's title so after first break
261 }
262 else
263 {
264 while(note.Substring(note.LastIndexOf("<")-2).StartsWith("\n"))
265 note = note.Remove(note.LastIndexOf("<")-2, 2); //This is Magic, Make it Better
266 note = note.Insert(note.LastIndexOf("<"), "\n\n"+text); //insert before last end tag
267 }
268 Console.Error.WriteLine ("Sending Note: {0}", note);
269 if(!TomboyInstance.SetNoteContentsXml(uri,note))
270 Console.Error.WriteLine("Could not append note: {0}", note_title);
271
272 }
215 /// <summary>273 /// <summary>
216 /// Open the Tomboy search window with the search string entered274 /// Open the Tomboy search window with the search string entered
217 /// </summary>275 /// </summary>

Subscribers

People subscribed via source and target branches