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
1=== modified file 'AptURL/AptURL.mdp'
2--- AptURL/AptURL.mdp 2009-06-23 00:52:54 +0000
3+++ AptURL/AptURL.mdp 2010-04-04 13:44:19 +0000
4@@ -1,23 +1,23 @@
5-<Project name="AptURL" fileversion="2.0" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
6+<Project name="AptURL" fileversion="2.0" DefaultNamespace="AptURL" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
7 <Configurations active="Debug">
8 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
9 <Output directory="bin/Debug" assembly="AptURL" />
10 <Build debugmode="True" target="Library" />
11- <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" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
14 </Configuration>
15 <Configuration name="Release" ctype="DotNetProjectConfiguration">
16 <Output directory="bin/Release" assembly="AptURL" />
17 <Build debugmode="False" target="Library" />
18- <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />
19+ <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
20 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
21 </Configuration>
22 </Configurations>
23 <Contents>
24- <File name="." subtype="Directory" buildaction="Compile" />
25- <File name="src" subtype="Directory" buildaction="Compile" />
26- <File name="src/AptUrl.cs" subtype="Code" buildaction="Compile" />
27- <File name="Resources/AptURL.addin.xml" subtype="Code" buildaction="EmbedAsResource" />
28+ <File subtype="Directory" buildaction="Compile" name="." />
29+ <File subtype="Directory" buildaction="Compile" name="src" />
30+ <File subtype="Code" buildaction="Compile" name="src/AptUrl.cs" />
31+ <File subtype="Code" buildaction="EmbedAsResource" name="Resources/AptURL.addin.xml.in" />
32 </Contents>
33 <References>
34 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
35
36=== modified file 'DiskMounter/DiskMounter.mdp'
37--- DiskMounter/DiskMounter.mdp 2009-06-29 08:47:41 +0000
38+++ DiskMounter/DiskMounter.mdp 2010-04-04 13:44:19 +0000
39@@ -1,30 +1,31 @@
40-<Project name="DiskMounter" fileversion="2.0" language="C#" DefaultNamespace="DiskMounter" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
41+<Project name="DiskMounter" fileversion="2.0" DefaultNamespace="DiskMounter" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
42 <Configurations active="Debug">
43 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
44 <Output directory="bin/Debug" assembly="DiskMounter" />
45 <Build debugmode="True" target="Library" />
46- <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />
47+ <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
48 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
49 </Configuration>
50 <Configuration name="Release" ctype="DotNetProjectConfiguration">
51 <Output directory="bin/Release" assembly="DiskMounter" />
52 <Build debugmode="False" target="Library" />
53- <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" />
54+ <Execution consolepause="False" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
55 <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
56 </Configuration>
57 </Configurations>
58 <Contents>
59- <File name="src" subtype="Directory" buildaction="Compile" />
60- <File name="src/DriveItem.cs" subtype="Code" buildaction="Compile" />
61- <File name="src/DriveItemSource.cs" subtype="Code" buildaction="Compile" />
62- <File name="src/MountAction.cs" subtype="Code" buildaction="Compile" />
63- <File name="src/OpenVolumeAction.cs" subtype="Code" buildaction="Compile" />
64- <File name="src/UnmountAction.cs" subtype="Code" buildaction="Compile" />
65- <File name="Resources/DiskMounter.addin.xml" subtype="Code" buildaction="EmbedAsResource" />
66+ <File subtype="Directory" buildaction="Compile" name="src" />
67+ <File subtype="Code" buildaction="Compile" name="src/DriveItem.cs" />
68+ <File subtype="Code" buildaction="Compile" name="src/DriveItemSource.cs" />
69+ <File subtype="Code" buildaction="Compile" name="src/MountAction.cs" />
70+ <File subtype="Code" buildaction="Compile" name="src/OpenVolumeAction.cs" />
71+ <File subtype="Code" buildaction="Compile" name="src/UnmountAction.cs" />
72+ <File subtype="Directory" buildaction="Compile" name="Resources" />
73+ <File subtype="Code" buildaction="EmbedAsResource" name="Resources/DiskMounter.addin.xml.in" />
74 </Contents>
75 <References>
76 <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
77- <ProjectReference type="Gac" localcopy="True" refto="gnome-vfs-sharp, Version=2.24.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
78+ <ProjectReference type="Gac" localcopy="True" specificVersion="False" refto="gnome-vfs-sharp, Version=2.24.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
79 <ProjectReference type="Gac" localcopy="True" refto="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
80 <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
81 <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.9.0.0, Culture=neutral" />
82
83=== modified file 'Flickr/gtk-gui/gui.stetic'
84--- Flickr/gtk-gui/gui.stetic 2009-06-23 00:52:54 +0000
85+++ Flickr/gtk-gui/gui.stetic 2010-04-04 13:44:19 +0000
86@@ -2,9 +2,10 @@
87 <stetic-interface>
88 <configuration>
89 <images-root-path>..</images-root-path>
90- <target-gtk-version>2.12.8</target-gtk-version>
91+ <target-gtk-version>2.12</target-gtk-version>
92 </configuration>
93 <import>
94+ <widget-library name="Do.Platform.Linux, Version=0.9.0.0, Culture=neutral" />
95 <widget-library name="../bin/Debug/Flickr.dll" internal="true" />
96 </import>
97 <widget class="Gtk.Bin" id="Flickr.AccountConfig" design-size="401 347">
98@@ -127,7 +128,7 @@
99 </widget>
100 </child>
101 </widget>
102- <widget class="Gtk.Bin" id="Flickr.UploadConfig" design-size="346 354">
103+ <widget class="Gtk.Bin" id="Flickr.UploadConfig" design-size="351 354">
104 <property name="MemberName" />
105 <child>
106 <widget class="Gtk.VBox" id="vbox3">
107@@ -157,7 +158,6 @@
108 <property name="MemberName" />
109 <property name="CanFocus">True</property>
110 <property name="Label" translatable="yes">Private</property>
111- <property name="Active">True</property>
112 <property name="DrawIndicator">True</property>
113 <property name="HasLabel">True</property>
114 <property name="UseUnderline">True</property>
115
116=== added file 'Tomboy/Resources/Tomboy.addin.xml'
117--- Tomboy/Resources/Tomboy.addin.xml 1970-01-01 00:00:00 +0000
118+++ Tomboy/Resources/Tomboy.addin.xml 2010-04-04 13:44:19 +0000
119@@ -0,0 +1,32 @@
120+<Addin
121+ id="Tomboy"
122+ namespace="Do"
123+ version="1.4"
124+ name="Tomboy"
125+ description="Search and create new Tomboy notes."
126+ author="Rick Harding, Chris Szikszoy"
127+ category="Official"
128+ defaultEnabled="false"
129+ url="http://do.davebsd.com/wiki/Tomboy_Plugin"
130+ >
131+
132+ <Runtime>
133+ <Import assembly="Tomboy.dll"/>
134+ </Runtime>
135+
136+ <Localizer type="Gettext" catalog="gnome-do-plugins" location="@expanded_datadir@/locale" />
137+
138+ <Dependencies>
139+ <Addin id="Universe" version="1.0" />
140+ </Dependencies>
141+
142+ <Extension path="/Do/ItemSource">
143+ <ItemSource type="Tomboy.NotesItemSource" />
144+ </Extension>
145+ <Extension path="/Do/Action">
146+ <Action type="Tomboy.NewNoteAction" />
147+ <Action type="Tomboy.SearchNotesAction" />
148+ <Action type="Tomboy.AppendNoteAction" />
149+ <Action type="Tomboy.GetNoteTextAction" />
150+ </Extension>
151+</Addin>
152
153=== removed file 'Tomboy/Resources/Tomboy.addin.xml.in'
154--- Tomboy/Resources/Tomboy.addin.xml.in 2009-06-26 15:25:17 +0000
155+++ Tomboy/Resources/Tomboy.addin.xml.in 1970-01-01 00:00:00 +0000
156@@ -1,30 +0,0 @@
157-<Addin
158- id="Tomboy"
159- namespace="Do"
160- version="1.4"
161- name="Tomboy"
162- description="Search and create new Tomboy notes."
163- author="Rick Harding, Chris Szikszoy"
164- category="Official"
165- defaultEnabled="false"
166- url="http://do.davebsd.com/wiki/Tomboy_Plugin"
167- >
168-
169- <Runtime>
170- <Import assembly="Tomboy.dll"/>
171- </Runtime>
172-
173- <Localizer type="Gettext" catalog="gnome-do-plugins" location="@expanded_datadir@/locale" />
174-
175- <Dependencies>
176- <Addin id="Universe" version="1.0" />
177- </Dependencies>
178-
179- <Extension path="/Do/ItemSource">
180- <ItemSource type="Tomboy.NotesItemSource" />
181- </Extension>
182- <Extension path="/Do/Action">
183- <Action type="Tomboy.NewNoteAction" />
184- <Action type="Tomboy.SearchNotesAction" />
185- </Extension>
186-</Addin>
187
188=== modified file 'Tomboy/Tomboy.mdp'
189--- Tomboy/Tomboy.mdp 2009-06-23 00:52:54 +0000
190+++ Tomboy/Tomboy.mdp 2010-04-04 13:44:19 +0000
191@@ -1,32 +1,34 @@
192-<Project name="Tomboy" fileversion="2.0" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
193+<Project name="Tomboy" fileversion="2.0" DefaultNamespace="Tomboy" language="C#" clr-version="Net_2_0" targetFramework="3.5" ctype="DotNetProject">
194 <Configurations active="Debug">
195 <Configuration name="Debug" ctype="DotNetProjectConfiguration">
196 <Output directory="bin/Debug" assembly="Tomboy" />
197 <Build debugmode="True" target="Library" />
198- <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
199- <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
200+ <Execution consolepause="True" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
201+ <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="True" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
202 </Configuration>
203 <Configuration name="Release" ctype="DotNetProjectConfiguration">
204 <Output directory="bin/Release" assembly="Tomboy" />
205 <Build debugmode="False" target="Library" />
206- <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" clr-version="Net_2_0" />
207- <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
208+ <Execution consolepause="True" runwithwarnings="True" runtime="MsNet" clr-version="Net_2_0" />
209+ <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="True" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
210 </Configuration>
211 </Configurations>
212 <Contents>
213- <File name="src" subtype="Directory" buildaction="Compile" />
214- <File name="src/TomboyDBus.cs" subtype="Code" buildaction="Compile" />
215- <File name="src/TomboyItem.cs" subtype="Code" buildaction="Compile" />
216- <File name="src/NewNoteAction.cs" subtype="Code" buildaction="Compile" />
217- <File name="src/NotesItemSource.cs" subtype="Code" buildaction="Compile" />
218- <File name="src/SearchNotesAction.cs" subtype="Code" buildaction="Compile" />
219- <File name="gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" />
220- <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
221- <File name="src/TomboyConfiguration.cs" subtype="Code" buildaction="Compile" />
222- <File name="gtk-gui/Tomboy.TomboyConfiguration.cs" subtype="Code" buildaction="Compile" />
223- <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" />
224- <File name="Resources/Tomboy.addin.xml" subtype="Code" buildaction="EmbedAsResource" />
225- <File name="src/TomboyBrowseNotesItem.cs" subtype="Code" buildaction="Compile" />
226+ <File subtype="Directory" buildaction="Compile" name="src" />
227+ <File subtype="Code" buildaction="Compile" name="src/TomboyDBus.cs" />
228+ <File subtype="Code" buildaction="Compile" name="src/TomboyItem.cs" />
229+ <File subtype="Code" buildaction="Compile" name="src/NewNoteAction.cs" />
230+ <File subtype="Code" buildaction="Compile" name="src/NotesItemSource.cs" />
231+ <File subtype="Code" buildaction="Compile" name="src/SearchNotesAction.cs" />
232+ <File subtype="Code" buildaction="EmbedAsResource" name="gtk-gui/gui.stetic" />
233+ <File subtype="Code" buildaction="Compile" name="gtk-gui/generated.cs" />
234+ <File subtype="Code" buildaction="Compile" name="src/TomboyConfiguration.cs" />
235+ <File subtype="Code" buildaction="Compile" name="gtk-gui/Tomboy.TomboyConfiguration.cs" />
236+ <File subtype="Code" buildaction="EmbedAsResource" name="gtk-gui/objects.xml" />
237+ <File subtype="Code" buildaction="Compile" name="src/TomboyBrowseNotesItem.cs" />
238+ <File subtype="Code" buildaction="Compile" name="src/AppendNoteAction.cs" />
239+ <File subtype="Code" buildaction="EmbedAsResource" name="Resources/Tomboy.addin.xml" />
240+ <File subtype="Code" buildaction="Compile" name="src/GetContentsAction.cs" />
241 </Contents>
242 <References>
243 <ProjectReference type="Gac" localcopy="True" refto="NDesk.DBus, Version=1.0.0.0, Culture=neutral, PublicKeyToken=f6716e4f9b2ed099" />
244
245=== modified file 'Tomboy/gtk-gui/Tomboy.TomboyConfiguration.cs'
246--- Tomboy/gtk-gui/Tomboy.TomboyConfiguration.cs 2009-06-23 00:52:54 +0000
247+++ Tomboy/gtk-gui/Tomboy.TomboyConfiguration.cs 2010-04-04 13:44:19 +0000
248@@ -35,7 +35,23 @@
249
250 private Gtk.RadioButton titleFirstRadioButton;
251
252- private Gtk.Label GtkLabel2;
253+ private Gtk.Label GtkLabel4;
254+
255+ private Gtk.Frame frame3;
256+
257+ private Gtk.Alignment GtkAlignment2;
258+
259+ private Gtk.VBox vbox4;
260+
261+ private Gtk.CheckButton insertionIncludeTime;
262+
263+ private Gtk.ComboBox InsertionDateFormat;
264+
265+ private Gtk.RadioButton insertionPrepend;
266+
267+ private Gtk.RadioButton insertionAppend;
268+
269+ private Gtk.Label GtkLabel9;
270
271 protected virtual void Build() {
272 Stetic.Gui.Initialize(this);
273@@ -44,7 +60,6 @@
274 this.Name = "Tomboy.TomboyConfiguration";
275 // Container child Tomboy.TomboyConfiguration.Gtk.Container+ContainerChild
276 this.vbox1 = new Gtk.VBox();
277- this.vbox1.Name = "vbox1";
278 this.vbox1.Spacing = 6;
279 // Container child vbox1.Gtk.Box+BoxChild
280 this.frame1 = new Gtk.Frame();
281@@ -101,7 +116,6 @@
282 this.contentFirstRadioButton = new Gtk.RadioButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("First pane is content, second pane is title."));
283 this.contentFirstRadioButton.CanFocus = true;
284 this.contentFirstRadioButton.Name = "contentFirstRadioButton";
285- this.contentFirstRadioButton.Active = true;
286 this.contentFirstRadioButton.DrawIndicator = true;
287 this.contentFirstRadioButton.UseUnderline = true;
288 this.contentFirstRadioButton.Group = new GLib.SList(System.IntPtr.Zero);
289@@ -124,16 +138,97 @@
290 w6.Fill = false;
291 this.GtkAlignment1.Add(this.vbox3);
292 this.frame2.Add(this.GtkAlignment1);
293- this.GtkLabel2 = new Gtk.Label();
294- this.GtkLabel2.Name = "GtkLabel2";
295- this.GtkLabel2.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("<b>New Note Title and Content Entry</b>");
296- this.GtkLabel2.UseMarkup = true;
297- this.frame2.LabelWidget = this.GtkLabel2;
298+ this.GtkLabel4 = new Gtk.Label();
299+ this.GtkLabel4.Name = "GtkLabel4";
300+ this.GtkLabel4.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("<b>New Note Title and Content Entry</b>");
301+ this.GtkLabel4.UseMarkup = true;
302+ this.frame2.LabelWidget = this.GtkLabel4;
303 this.vbox1.Add(this.frame2);
304 Gtk.Box.BoxChild w9 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame2]));
305 w9.Position = 1;
306 w9.Expand = false;
307 w9.Fill = false;
308+ // Container child vbox1.Gtk.Box+BoxChild
309+ this.frame3 = new Gtk.Frame();
310+ this.frame3.Name = "frame3";
311+ this.frame3.ShadowType = ((Gtk.ShadowType)(0));
312+ this.frame3.BorderWidth = ((uint)(1));
313+ // Container child frame3.Gtk.Container+ContainerChild
314+ this.GtkAlignment2 = new Gtk.Alignment(0F, 0F, 1F, 1F);
315+ this.GtkAlignment2.Name = "GtkAlignment2";
316+ this.GtkAlignment2.LeftPadding = ((uint)(12));
317+ // Container child GtkAlignment2.Gtk.Container+ContainerChild
318+ this.vbox4 = new Gtk.VBox();
319+ this.vbox4.Name = "vbox4";
320+ this.vbox4.Spacing = 6;
321+ // Container child vbox4.Gtk.Box+BoxChild
322+ this.insertionIncludeTime = new Gtk.CheckButton();
323+ this.insertionIncludeTime.CanFocus = true;
324+ this.insertionIncludeTime.Name = "insertionIncludeTime";
325+ this.insertionIncludeTime.Label = Mono.Addins.AddinManager.CurrentLocalizer.GetString("Include Date and Time");
326+ this.insertionIncludeTime.DrawIndicator = true;
327+ this.insertionIncludeTime.UseUnderline = true;
328+ this.vbox4.Add(this.insertionIncludeTime);
329+ Gtk.Box.BoxChild w10 = ((Gtk.Box.BoxChild)(this.vbox4[this.insertionIncludeTime]));
330+ w10.Position = 0;
331+ w10.Expand = false;
332+ w10.Fill = false;
333+ // Container child vbox4.Gtk.Box+BoxChild
334+ this.InsertionDateFormat = Gtk.ComboBox.NewText();
335+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Year/Month/Day 24Hours:Minutes"));
336+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Year/Month/Day Hours:Minutes am/pm"));
337+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Year/Month/Day"));
338+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day/Year 24Hours:Minutes"));
339+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day/Year Hours:Minutes am/pm"));
340+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day/Year"));
341+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day 24Hours:Minutes"));
342+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day Hours:Minutes am/pm\""));
343+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Month/Day"));
344+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("24Hours:Minutes"));
345+ this.InsertionDateFormat.AppendText(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Hours:Minutes am/pm"));
346+ this.InsertionDateFormat.Name = "InsertionDateFormat";
347+ this.InsertionDateFormat.Active = 0;
348+ this.vbox4.Add(this.InsertionDateFormat);
349+ Gtk.Box.BoxChild w11 = ((Gtk.Box.BoxChild)(this.vbox4[this.InsertionDateFormat]));
350+ w11.Position = 1;
351+ w11.Expand = false;
352+ w11.Fill = false;
353+ // Container child vbox4.Gtk.Box+BoxChild
354+ this.insertionPrepend = new Gtk.RadioButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Prepend to Top of Note"));
355+ this.insertionPrepend.CanFocus = true;
356+ this.insertionPrepend.Name = "insertionPrepend";
357+ this.insertionPrepend.DrawIndicator = true;
358+ this.insertionPrepend.UseUnderline = true;
359+ this.insertionPrepend.Group = new GLib.SList(System.IntPtr.Zero);
360+ this.vbox4.Add(this.insertionPrepend);
361+ Gtk.Box.BoxChild w12 = ((Gtk.Box.BoxChild)(this.vbox4[this.insertionPrepend]));
362+ w12.Position = 2;
363+ w12.Expand = false;
364+ w12.Fill = false;
365+ // Container child vbox4.Gtk.Box+BoxChild
366+ this.insertionAppend = new Gtk.RadioButton(Mono.Addins.AddinManager.CurrentLocalizer.GetString("Append to Bottom of Note"));
367+ this.insertionAppend.CanFocus = true;
368+ this.insertionAppend.Name = "insertionAppend";
369+ this.insertionAppend.DrawIndicator = true;
370+ this.insertionAppend.UseUnderline = true;
371+ this.insertionAppend.Group = this.insertionPrepend.Group;
372+ this.vbox4.Add(this.insertionAppend);
373+ Gtk.Box.BoxChild w13 = ((Gtk.Box.BoxChild)(this.vbox4[this.insertionAppend]));
374+ w13.Position = 3;
375+ w13.Expand = false;
376+ w13.Fill = false;
377+ this.GtkAlignment2.Add(this.vbox4);
378+ this.frame3.Add(this.GtkAlignment2);
379+ this.GtkLabel9 = new Gtk.Label();
380+ this.GtkLabel9.Name = "GtkLabel9";
381+ this.GtkLabel9.LabelProp = Mono.Addins.AddinManager.CurrentLocalizer.GetString("<b>Note Insertion</b>");
382+ this.GtkLabel9.UseMarkup = true;
383+ this.frame3.LabelWidget = this.GtkLabel9;
384+ this.vbox1.Add(this.frame3);
385+ Gtk.Box.BoxChild w16 = ((Gtk.Box.BoxChild)(this.vbox1[this.frame3]));
386+ w16.Position = 2;
387+ w16.Expand = false;
388+ w16.Fill = false;
389 this.Add(this.vbox1);
390 if ((this.Child != null)) {
391 this.Child.ShowAll();
392
393=== modified file 'Tomboy/gtk-gui/gui.stetic'
394--- Tomboy/gtk-gui/gui.stetic 2009-06-23 00:52:54 +0000
395+++ Tomboy/gtk-gui/gui.stetic 2010-04-04 13:44:19 +0000
396@@ -2,12 +2,13 @@
397 <stetic-interface>
398 <configuration>
399 <images-root-path>..</images-root-path>
400- <target-gtk-version>2.12.8</target-gtk-version>
401+ <target-gtk-version>2.12</target-gtk-version>
402 </configuration>
403 <import>
404+ <widget-library name="Do.Platform.Linux, Version=0.9.0.0, Culture=neutral" />
405 <widget-library name="../bin/Debug/Tomboy.dll" internal="true" />
406 </import>
407- <widget class="Gtk.Bin" id="Tomboy.TomboyConfiguration" design-size="413 300">
408+ <widget class="Gtk.Bin" id="Tomboy.TomboyConfiguration" design-size="413 304">
409 <property name="MemberName" />
410 <property name="Visible">False</property>
411 <child>
412@@ -88,6 +89,7 @@
413 <property name="MemberName" />
414 <property name="CanFocus">True</property>
415 <property name="Label" translatable="yes">First pane is content, second pane is title.</property>
416+ <property name="Active">True</property>
417 <property name="DrawIndicator">True</property>
418 <property name="HasLabel">True</property>
419 <property name="UseUnderline">True</property>
420@@ -122,7 +124,7 @@
421 </widget>
422 </child>
423 <child>
424- <widget class="Gtk.Label" id="GtkLabel2">
425+ <widget class="Gtk.Label" id="GtkLabel4">
426 <property name="MemberName" />
427 <property name="LabelProp" translatable="yes">&lt;b&gt;New Note Title and Content Entry&lt;/b&gt;</property>
428 <property name="UseMarkup">True</property>
429@@ -139,6 +141,118 @@
430 <property name="Fill">False</property>
431 </packing>
432 </child>
433+ <child>
434+ <widget class="Gtk.Frame" id="frame3">
435+ <property name="MemberName" />
436+ <property name="ShadowType">None</property>
437+ <property name="BorderWidth">1</property>
438+ <child>
439+ <widget class="Gtk.Alignment" id="GtkAlignment2">
440+ <property name="MemberName" />
441+ <property name="Xalign">0</property>
442+ <property name="Yalign">0</property>
443+ <property name="LeftPadding">12</property>
444+ <child>
445+ <widget class="Gtk.VBox" id="vbox4">
446+ <property name="MemberName">append</property>
447+ <property name="Spacing">6</property>
448+ <child>
449+ <widget class="Gtk.CheckButton" id="insertionIncludeTime">
450+ <property name="MemberName" />
451+ <property name="CanFocus">True</property>
452+ <property name="Label" translatable="yes">Include Date and Time</property>
453+ <property name="DrawIndicator">True</property>
454+ <property name="HasLabel">True</property>
455+ <property name="UseUnderline">True</property>
456+ </widget>
457+ <packing>
458+ <property name="Position">0</property>
459+ <property name="AutoSize">True</property>
460+ <property name="Expand">False</property>
461+ <property name="Fill">False</property>
462+ </packing>
463+ </child>
464+ <child>
465+ <widget class="Gtk.ComboBox" id="InsertionDateFormat">
466+ <property name="MemberName" />
467+ <property name="IsTextCombo">True</property>
468+ <property name="Items" translatable="yes">Year/Month/Day 24Hours:Minutes
469+Year/Month/Day Hours:Minutes am/pm
470+Year/Month/Day
471+Month/Day/Year 24Hours:Minutes
472+Month/Day/Year Hours:Minutes am/pm
473+Month/Day/Year
474+Month/Day 24Hours:Minutes
475+Month/Day Hours:Minutes am/pm"
476+Month/Day
477+24Hours:Minutes
478+Hours:Minutes am/pm</property>
479+ <property name="Active">0</property>
480+ </widget>
481+ <packing>
482+ <property name="Position">1</property>
483+ <property name="AutoSize">True</property>
484+ <property name="Expand">False</property>
485+ <property name="Fill">False</property>
486+ </packing>
487+ </child>
488+ <child>
489+ <widget class="Gtk.RadioButton" id="insertionPrepend">
490+ <property name="MemberName" />
491+ <property name="CanFocus">True</property>
492+ <property name="Label" translatable="yes">Prepend to Top of Note</property>
493+ <property name="Active">True</property>
494+ <property name="DrawIndicator">True</property>
495+ <property name="HasLabel">True</property>
496+ <property name="UseUnderline">True</property>
497+ <property name="Group">append</property>
498+ </widget>
499+ <packing>
500+ <property name="Position">2</property>
501+ <property name="AutoSize">True</property>
502+ <property name="Expand">False</property>
503+ <property name="Fill">False</property>
504+ </packing>
505+ </child>
506+ <child>
507+ <widget class="Gtk.RadioButton" id="insertionAppend">
508+ <property name="MemberName" />
509+ <property name="CanFocus">True</property>
510+ <property name="Label" translatable="yes">Append to Bottom of Note</property>
511+ <property name="DrawIndicator">True</property>
512+ <property name="HasLabel">True</property>
513+ <property name="UseUnderline">True</property>
514+ <property name="Group">append</property>
515+ </widget>
516+ <packing>
517+ <property name="Position">3</property>
518+ <property name="AutoSize">True</property>
519+ <property name="Expand">False</property>
520+ <property name="Fill">False</property>
521+ </packing>
522+ </child>
523+ </widget>
524+ </child>
525+ </widget>
526+ </child>
527+ <child>
528+ <widget class="Gtk.Label" id="GtkLabel9">
529+ <property name="MemberName" />
530+ <property name="LabelProp" translatable="yes">&lt;b&gt;Note Insertion&lt;/b&gt;</property>
531+ <property name="UseMarkup">True</property>
532+ </widget>
533+ <packing>
534+ <property name="type">label_item</property>
535+ </packing>
536+ </child>
537+ </widget>
538+ <packing>
539+ <property name="Position">2</property>
540+ <property name="AutoSize">True</property>
541+ <property name="Expand">False</property>
542+ <property name="Fill">False</property>
543+ </packing>
544+ </child>
545 </widget>
546 </child>
547 </widget>
548
549=== added file 'Tomboy/src/AppendNoteAction.cs'
550--- Tomboy/src/AppendNoteAction.cs 1970-01-01 00:00:00 +0000
551+++ Tomboy/src/AppendNoteAction.cs 2010-04-04 13:44:19 +0000
552@@ -0,0 +1,86 @@
553+// AppendNoteAction.cs
554+//
555+// GNOME Do is the legal property of its developers, whose names are too
556+// numerous to list here. Please refer to the COPYRIGHT file distributed with
557+// this source distribution.
558+//
559+// This program is free software: you can redistribute it and/or modify
560+// it under the terms of the GNU General Public License as published by
561+// the Free Software Foundation, either version 3 of the License, or
562+// (at your option) any later version.
563+//
564+// This program is distributed in the hope that it will be useful,
565+// but WITHOUT ANY WARRANTY; without even the implied warranty of
566+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
567+// GNU General Public License for more details.
568+//
569+// You should have received a copy of the GNU General Public License
570+// along with this program. If not, see <http://www.gnu.org/licenses/>.
571+// Authors
572+// Marcus Walz psgenfan@gmail.com
573+//
574+
575+using System;
576+using System.Linq;
577+using System.Diagnostics;
578+using System.Collections.Generic;
579+
580+using Mono.Addins;
581+
582+using Do.Universe;
583+using Do.Platform.Linux;
584+
585+namespace Tomboy
586+{
587+
588+ public class AppendNoteAction : Act
589+ {
590+ public override string Name {
591+ get { return AddinManager.CurrentLocalizer.GetString ("Add to Note"); }
592+ }
593+
594+ public override string Description {
595+ get { return AddinManager.CurrentLocalizer.GetString ("Insert text to the beginning or end of a tomboy note."); }
596+ }
597+
598+ public override string Icon {
599+ get { return "list-add"; }
600+ }
601+
602+ public override IEnumerable<Type> SupportedItemTypes {
603+ get { yield return typeof (NoteItem); }
604+ }
605+
606+ public override IEnumerable<Type> SupportedModifierItemTypes {
607+ get { yield return typeof (ITextItem); }
608+ }
609+
610+ public override bool ModifierItemsOptional {
611+ get { return false; }
612+ }
613+
614+ public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems)
615+ {
616+ //ITextItem mainItem = items.First () as ITextItem;
617+ foreach (NoteItem note in items)
618+ {
619+ //NoteItem note = items.First() as NoteItem;
620+ ITextItem modItem = null;
621+ if (modItems.Any ()) {
622+ modItem = modItems.First () as ITextItem;
623+ if(!string.IsNullOrEmpty(modItem.Text))
624+ {
625+ TomboyDBus tb = new TomboyDBus ();
626+ tb.AppendNote(note.Name, modItem.Text);
627+ }
628+ }
629+ }
630+ yield break;
631+ }
632+
633+// public Gtk.Bin GetConfiguration ()
634+// {
635+// return new TomboyConfiguration ();
636+// }
637+ }
638+}
639\ No newline at end of file
640
641=== added file 'Tomboy/src/GetContentsAction.cs'
642--- Tomboy/src/GetContentsAction.cs 1970-01-01 00:00:00 +0000
643+++ Tomboy/src/GetContentsAction.cs 2010-04-04 13:44:19 +0000
644@@ -0,0 +1,65 @@
645+
646+// AppendNoteAction.cs
647+//
648+// GNOME Do is the legal property of its developers, whose names are too
649+// numerous to list here. Please refer to the COPYRIGHT file distributed with
650+// this source distribution.
651+//
652+// This program is free software: you can redistribute it and/or modify
653+// it under the terms of the GNU General Public License as published by
654+// the Free Software Foundation, either version 3 of the License, or
655+// (at your option) any later version.
656+//
657+// This program is distributed in the hope that it will be useful,
658+// but WITHOUT ANY WARRANTY; without even the implied warranty of
659+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
660+// GNU General Public License for more details.
661+//
662+// You should have received a copy of the GNU General Public License
663+// along with this program. If not, see <http://www.gnu.org/licenses/>.
664+// Authors
665+// Marcus Walz psgenfan@gmail.com
666+//
667+
668+using System;
669+using System.Linq;
670+using System.Diagnostics;
671+using System.Collections.Generic;
672+
673+using Mono.Addins;
674+
675+using Do.Universe;
676+using Do.Platform.Linux;
677+using Do.Universe.Common;
678+
679+namespace Tomboy
680+{
681+
682+ public class GetNoteTextAction : Act
683+ {
684+ public override string Name {
685+ get { return AddinManager.CurrentLocalizer.GetString ("Get Note's Text"); }
686+ }
687+
688+ public override string Description {
689+ get { return AddinManager.CurrentLocalizer.GetString ("Returns the selected Tomboy Note's Text."); }
690+ }
691+
692+ public override string Icon {
693+ get { return "text-editor"; }
694+ }
695+
696+ public override IEnumerable<Type> SupportedItemTypes {
697+ get { yield return typeof (NoteItem); }
698+ }
699+
700+ public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems)
701+ {
702+ //ITextItem mainItem = items.First () as ITextItem;
703+ NoteItem note = items.First() as NoteItem;
704+ TomboyDBus tb = new TomboyDBus ();
705+ yield return new TextItem(tb.GetNoteText(note.Name));
706+ }
707+
708+ }
709+}
710
711=== modified file 'Tomboy/src/TomboyConfiguration.cs'
712--- Tomboy/src/TomboyConfiguration.cs 2009-01-21 19:21:55 +0000
713+++ Tomboy/src/TomboyConfiguration.cs 2010-04-04 13:44:19 +0000
714@@ -38,7 +38,9 @@
715 {
716 private const string DeriveTitlePrefKey = "deriveTitle";
717 private const string TitleFirstPrefKey = "titleFirst";
718-
719+ private const string InsertionDatePrefKey = "includeDate";
720+ private const string PrependPrefKey = "insertPrepand";
721+ private const string DateFormatKey = "dateFormat";
722 private static IPreferences prefs;
723
724 static TomboyConfiguration ()
725@@ -56,6 +58,18 @@
726 get { return prefs.Get (TitleFirstPrefKey, false); }
727 }
728
729+ public static bool DateInsertion
730+ {
731+ get { return prefs.Get (InsertionDatePrefKey, false); }
732+ }
733+ public static bool PrependInsertion
734+ {
735+ get {return prefs.Get (PrependPrefKey, false); }
736+ }
737+ public static int DateFormat
738+ {
739+ get {return prefs.Get (DateFormatKey, 0);}
740+ }
741 public TomboyConfiguration()
742 {
743 this.Build();
744@@ -64,13 +78,28 @@
745 deriveTitleCheckButton.Active = DeriveTitle;
746 contentFirstRadioButton.Active = !TitleFirst;
747 titleFirstRadioButton.Active = TitleFirst;
748-
749+ insertionIncludeTime.Active = DateInsertion;
750+ insertionPrepend.Active = PrependInsertion;
751+ insertionAppend.Active = !PrependInsertion;
752+ InsertionDateFormat.Active = DateFormat;
753 // Set up events. I had trouble doing this from stetic.
754 deriveTitleCheckButton.Toggled += OnDeriveTitleCheckButtonToggled;
755 contentFirstRadioButton.Toggled += OnContentFirstRadioButtonToggled;
756 titleFirstRadioButton.Toggled += OnContentFirstRadioButtonToggled;
757+ insertionIncludeTime.Toggled += OnInsertionIncludeTimeToggled;
758+ insertionPrepend.Toggled += OnInsertionPrependToggled;
759+ insertionAppend.Toggled += OnInsertionPrependToggled;
760+ InsertionDateFormat.Changed += OnDateFormatSelection;
761 }
762
763+ protected virtual void OnInsertionIncludeTimeToggled (object Sender, System.EventArgs e)
764+ {
765+ prefs.Set(InsertionDatePrefKey, insertionIncludeTime.Active);
766+ }
767+ protected virtual void OnInsertionPrependToggled (object Sender, System.EventArgs e)
768+ {
769+ prefs.Set(PrependPrefKey, insertionPrepend.Active);
770+ }
771 protected virtual void OnDeriveTitleCheckButtonToggled (object sender, System.EventArgs e)
772 {
773 prefs.Set (DeriveTitlePrefKey, deriveTitleCheckButton.Active);
774@@ -80,5 +109,9 @@
775 {
776 prefs.Set (TitleFirstPrefKey, titleFirstRadioButton.Active);
777 }
778+ protected virtual void OnDateFormatSelection(object sender, System.EventArgs e)
779+ {
780+ prefs.Set (DateFormatKey, InsertionDateFormat.Active);
781+ }
782 }
783 }
784
785=== modified file 'Tomboy/src/TomboyDBus.cs'
786--- Tomboy/src/TomboyDBus.cs 2009-01-21 19:21:55 +0000
787+++ Tomboy/src/TomboyDBus.cs 2010-04-04 13:44:19 +0000
788@@ -42,6 +42,9 @@
789 string[] ListAllNotes ();
790 void DisplaySearchWithText (string search_text);
791 string Version ();
792+ string GetNoteContents (string uri);
793+ string GetNoteContentsXml (string uri);
794+ bool SetNoteContentsXml (string uri, string xml);
795 bool SetNoteContents (string uri, string text_contents);
796 event DBusNoteAddedHandler NoteAdded;
797 event DBusNoteRemovedHandler NoteRemoved;
798@@ -52,6 +55,19 @@
799
800 class TomboyDBus
801 {
802+ string[] dateformats = {
803+ "yyyy/MM/dd HH:mm",
804+ "yyyy/MM/dd hh:mm tt",
805+ "yyyy/MM/dd",
806+ "MM/dd/yyyy HH:mm",
807+ "MM/dd/yyyy hh:mm tt",
808+ "MM/dd/yyyy",
809+ "MM/dd HH:mm",
810+ "MM/dd hh:mm tt",
811+ "MM/dd",
812+ "HH:mm",
813+ "hh:mm tt"};
814+
815 #region Constants
816
817 private const string OBJECT_PATH = "/org/gnome/Tomboy/RemoteControl";
818@@ -203,6 +219,7 @@
819 i++;
820 }
821 }
822+
823
824 note_title = TomboyInstance.GetNoteTitle (uri);
825 TomboyInstance.DisplayNote (uri);
826@@ -211,7 +228,48 @@
827 TomboyInstance.SetNoteContents (uri, note_title + "\n\n" + note_content);
828 return uri;
829 }
830-
831+
832+ public string GetNoteText(string note_title){
833+ EnsureTomboyInstance();
834+ string uri = TomboyInstance.FindNote(note_title);
835+ try{
836+ return TomboyInstance.GetNoteContents(uri);
837+ } catch (Exception) {
838+ Console.Error.WriteLine ("Could not open the note: {0}", note_title);
839+ return "";
840+ }
841+ }
842+ public void AppendNote(string note_title, string text){
843+ EnsureTomboyInstance();
844+ string uri = TomboyInstance.FindNote(note_title);
845+ string note;
846+ try{
847+ note = TomboyInstance.GetNoteContentsXml(uri);
848+ } catch (Exception) {
849+ Console.Error.WriteLine ("Could not open the note: {0}", note_title);
850+ return;
851+ }
852+ if(TomboyConfiguration.DateInsertion)
853+ {
854+ text = "<bold>"+System.DateTime.Now.ToString(dateformats[TomboyConfiguration.DateFormat])+"</bold> " + text;
855+ }
856+ if(TomboyConfiguration.PrependInsertion)
857+ {
858+ while(note.Substring(note.IndexOfAny("\n".ToCharArray())+2).StartsWith("\n")) //This Works Somehow
859+ note = note.Remove(note.IndexOfAny("\n".ToCharArray())+2, 2); //Removies Trailing Line Breaks
860+ note = note.Insert(note.IndexOfAny("\n".ToCharArray())+2, text+"\n\n"); //First Line is note's title so after first break
861+ }
862+ else
863+ {
864+ while(note.Substring(note.LastIndexOf("<")-2).StartsWith("\n"))
865+ note = note.Remove(note.LastIndexOf("<")-2, 2); //This is Magic, Make it Better
866+ note = note.Insert(note.LastIndexOf("<"), "\n\n"+text); //insert before last end tag
867+ }
868+ Console.Error.WriteLine ("Sending Note: {0}", note);
869+ if(!TomboyInstance.SetNoteContentsXml(uri,note))
870+ Console.Error.WriteLine("Could not append note: {0}", note_title);
871+
872+ }
873 /// <summary>
874 /// Open the Tomboy search window with the search string entered
875 /// </summary>

Subscribers

People subscribed via source and target branches