Merge lp://qastaging/~nmarshall23/do-plugins/spellcheck-plugin into lp://qastaging/do-plugins
- spellcheck-plugin
- Merge into trunk
Status: | Superseded |
---|---|
Proposed branch: | lp://qastaging/~nmarshall23/do-plugins/spellcheck-plugin |
Merge into: | lp://qastaging/do-plugins |
Diff against target: | None lines |
To merge this branch: | bzr merge lp://qastaging/~nmarshall23/do-plugins/spellcheck-plugin |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chris S. | Needs Fixing | ||
Review via email: mp+10048@code.qastaging.launchpad.net |
This proposal has been superseded by a proposal from 2009-08-17.
Commit message
Description of the change
Nicholas Marshall (nmarshall23) wrote : | # |
Chris S. (cszikszoy) wrote : | # |
I haven't had a chance to see if this builds / works, so I'm just going by the merge diff right now.
You seem to have done a very good job integrating this with our build system, thanks!
First and foremost: We require that all new plugin submissions follow Mono's coding style guidelines (here: http://
It seems unnecessary to create a new instance of Broker every time you run the perform action, why don't you make Broker a property, (private Broker EnchantBroker { get; set; }) and then use the action's constructor to create a new instance of the broker when the action is initialized (ie, when M.A. loads your plugin).
You could greatly simlify the way you return suggested items. For example, using Linq and lamdas you could do:
List<Item> suggestions = new List<Item> ();
dictionary.Suggest (sub).ForEach ( sug => { suggestions.Add (new TextItem (sug) as Item); });
yield return suggestions;
When working with Enumerables, use yield, not plain-old return. So at the end of the perform action, use yield break;
I'm not familiar with Enchant, does it support multiple languages? I see you hardcoded en-US, if it does support multiple languages it would be nice to make a small config widget so that the user could change the language of the dictionary.
Those are a few initial comments, fix those and I'll take another look. When you're done, come back to this merge request, and look near the top. There should be a yellow "edit" icon near the "Status" description. Click that, then on the next page click on "Resubmit". It will ask you to confirm the new revisions to the branch, just click OK. This will make reviewing much easier because it will generate a new and updated merge diff.
Thanks!
- 645. By Nicholas Marshall
-
made changes as suggested. Dictionary and Broker now properties. cleaned up suggested Items
Alex Launi (alexlauni) wrote : | # |
On Wed, Aug 12, 2009 at 3:07 PM, Chris S. <email address hidden> wrote:
> I see you hardcoded en-US, if it does support multiple languages it would
> be nice to make a small config widget so that the user could change the
> language of the dictionary.
>
it would be better to check the user's locale, and use that.
--
--Alex Launi
Chris S. (cszikszoy) wrote : | # |
>> I see you hardcoded en-US, if it does support multiple languages it would
>> be nice to make a small config widget so that the user could change the
>> language of the dictionary.
>>
>
> it would be better to check the user's locale, and use that.
>
As a default yes, that would be nice. But my locale is en-us, what if
I wanted to use the dictionary for German words?
Alex Launi (alexlauni) wrote : | # |
I just think it's silly to create a config widget for one option in a corner
case which is probably never going to pop up. The BEST solution would be to
parse the word, create a list of possible languages based on some heuristic
(there is research in this area), and check each dictionary to see if it's
spelled correctly!
But that might be more work than our friendly new contributer wants to do..
:P
--
-- Alex Launi
Chris S. (cszikszoy) wrote : | # |
How many dictionaries are supported? Instead of a config widget, what
about making an Item out of each dictinoary, and using those as
dynamic modifier items?
Nicholas Marshall (nmarshall23) wrote : | # |
> it would be better to check the user's locale, and use that.
Chris this sound resonable, I will start working on that.
Every app I have looked at seems to do just that.
Now as an aditional action after CheckSpelling has been selected, if you
could change Dictionaries sure, that seems to fit in the use case.
I have mixed feeling on a config widget, sure it maybe useful.. but I can't
see it being used all that much. We will just have to think about it, and
get feedback from users.
Nicholas Marshall
On 8/13/09, Alex Launi <email address hidden> wrote:
>
> I just think it's silly to create a config widget for one option in a
> corner
> case which is probably never going to pop up. The BEST solution would be to
> parse the word, create a list of possible languages based on some heuristic
> (there is research in this area), and check each dictionary to see if it's
> spelled correctly!
>
> But that might be more work than our friendly new contributer wants to do..
> :P
>
> --
> -- Alex Launi
>
>
> https:/
> You are the owner of lp:~nmarshall23/do-plugins/spellcheck-plugin.
>
--
И
Nicholas Marshall (nmarshall23) wrote : | # |
>How many dictionaries are supported?
I don't know, you can install support for individual Dictionaries, I will
check.
>Making an Item out of each dictionary, and using those as dynamic modifier
items?
I like this idea and will start working on it.. However if there are a lot
of Dictionaries installed by default, then I see no other option but to
write a config widget.
About libenchantnet, I didn't write these bindings. They were originally
intended for use on MS windows. I found them while completing writing my
own, it seemed strange that there wasn't mono bindings for some kind of
spell check.. So I am sure they are quirky. All I did was change one line so
that it loaded the right shared library. And then run the nunit tests to see
if that was all that was required.
>You seem to have done a very good job integrating this with our build
system, thanks!
I spend a week, learning Ubuntu Packaging and autoconfig. I figured it was
my job to package libenchantnet if I really wanted to see it used.
I still have plenty of questions on how is the best way of packaging mono
applications.
Nicholas Marshall
PS: gee, that was funny, guy writes spell checking code then forgets to
check spelling..
On 8/13/09, Chris S. <email address hidden> wrote:
>
> How many dictionaries are supported? Instead of a config widget, what
> about making an Item out of each dictinoary, and using those as
> dynamic modifier items?
> --
>
> https:/
> You are the owner of lp:~nmarshall23/do-plugins/spellcheck-plugin.
>
--
И
- 646. By Nicholas Marshall
-
en-US locate no longer hard coded in, now getting locate from system
- 647. By Nicholas Marshall
-
added debian/ so that I can build my own
- 648. By Nicholas Marshall
-
about to remove more gui code
- 649. By Nicholas Marshall
-
removed GUI code, no config widget needed
- 650. By Nicholas Marshall
-
Building debs in a separate branch
- 651. By Nicholas Marshall
-
Reformated code to follow Mono's coding style guidelines
- 652. By Nicholas Marshall
-
removed last of GUI config boilerplate
- 653. By Nicholas Marshall
-
code cleanup using Linq
- 654. By Nicholas Marshall
-
Working on dictionary switching
- 655. By Nicholas Marshall
-
using CultureInfo to get Display name of locates
- 656. By Nicholas Marshall
-
fixed DictionaryItemS
ource need to s/_/-/ for CultureInfo on DictionaryItem Language items - 657. By Nicholas Marshall
-
CheckSpellingAction can now use a mod DictionaryItem to switch the locate dictionary
- 658. By Nicholas Marshall
-
/CheckSpellingA
ction.cs DictionaryItemS ource.cs added Finalizers to free our Dictionaries, this only comes up when you switch dictionaries..
Nicholas Marshall (nmarshall23) wrote : | # |
> all new plugin submissions follow Mono's coding style guidelines Done! >I
see you hardcoded en-US I over sight on my part, Now it gets the current
locate's dictionary. > Instead of a config widget, what about making an Item
out of each dictionary, > and using those as dynamic modifier items? This is
done! It could use more testing, however it does seems to work for me.
When LP finishes processing my last push, I will Resubmit.
Nicholas Marshall
On Thu, Aug 13, 2009 at 1:06 PM, Chris S. <email address hidden> wrote:
> How many dictionaries are supported? Instead of a config widget, what
> about making an Item out of each dictinoary, and using those as
> dynamic modifier items?
> --
>
> https:/
> You are the owner of lp:~nmarshall23/do-plugins/spellcheck-plugin.
>
- 659. By Nicholas Marshall
-
rm CheckSpelling/
Makefile. in and added a icon to DItemSource
Unmerged revisions
- 659. By Nicholas Marshall
-
rm CheckSpelling/
Makefile. in and added a icon to DItemSource - 658. By Nicholas Marshall
-
/CheckSpellingA
ction.cs DictionaryItemS ource.cs added Finalizers to free our Dictionaries, this only comes up when you switch dictionaries.. - 657. By Nicholas Marshall
-
CheckSpellingAction can now use a mod DictionaryItem to switch the locate dictionary
- 656. By Nicholas Marshall
-
fixed DictionaryItemS
ource need to s/_/-/ for CultureInfo on DictionaryItem Language items - 655. By Nicholas Marshall
-
using CultureInfo to get Display name of locates
- 654. By Nicholas Marshall
-
Working on dictionary switching
- 653. By Nicholas Marshall
-
code cleanup using Linq
- 652. By Nicholas Marshall
-
removed last of GUI config boilerplate
- 651. By Nicholas Marshall
-
Reformated code to follow Mono's coding style guidelines
- 650. By Nicholas Marshall
-
Building debs in a separate branch
Preview Diff
1 | === added file '.bzrignore' |
2 | --- .bzrignore 1970-01-01 00:00:00 +0000 |
3 | +++ .bzrignore 2009-08-12 15:07:14 +0000 |
4 | @@ -0,0 +1,3 @@ |
5 | +*.pidb |
6 | +DoPlugins.userprefs |
7 | +DoPlugins.usertasks |
8 | |
9 | === added directory 'CheckSpelling' |
10 | === added file 'CheckSpelling/AssemblyInfo.cs' |
11 | --- CheckSpelling/AssemblyInfo.cs 1970-01-01 00:00:00 +0000 |
12 | +++ CheckSpelling/AssemblyInfo.cs 2009-08-12 15:00:47 +0000 |
13 | @@ -0,0 +1,42 @@ |
14 | +// |
15 | +// Copyright (C) 2009 Nicholas Marshall |
16 | +// |
17 | +// This program is free software: you can redistribute it and/or modify |
18 | +// it under the terms of the GNU General Public License as published by |
19 | +// the Free Software Foundation, either version 3 of the License, or |
20 | +// (at your option) any later version. |
21 | +// |
22 | +// This program is distributed in the hope that it will be useful, |
23 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
24 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
25 | +// GNU General Public License for more details. |
26 | +// |
27 | +// You should have received a copy of the GNU General Public License |
28 | +// along with this program. If not, see <http://www.gnu.org/licenses/>. |
29 | +// |
30 | +using System.Reflection; |
31 | +using System.Runtime.CompilerServices; |
32 | + |
33 | +// Information about this assembly is defined by the following attributes. |
34 | +// Change them to the values specific to your project. |
35 | + |
36 | +[assembly: AssemblyTitle("CheckSpelling")] |
37 | +[assembly: AssemblyDescription("")] |
38 | +[assembly: AssemblyConfiguration("")] |
39 | +[assembly: AssemblyCompany("")] |
40 | +[assembly: AssemblyProduct("")] |
41 | +[assembly: AssemblyCopyright("")] |
42 | +[assembly: AssemblyTrademark("")] |
43 | +[assembly: AssemblyCulture("")] |
44 | + |
45 | +// The assembly version has the format "{Major}.{Minor}.{Build}.{Revision}". |
46 | +// The form "{Major}.{Minor}.*" will automatically update the build and revision, |
47 | +// and "{Major}.{Minor}.{Build}.*" will update just the revision. |
48 | + |
49 | +[assembly: AssemblyVersion("1.0.*")] |
50 | + |
51 | +// The following attributes are used to specify the signing key for the assembly, |
52 | +// if desired. See the Mono documentation for more information about signing. |
53 | + |
54 | +[assembly: AssemblyDelaySign(false)] |
55 | +[assembly: AssemblyKeyFile("")] |
56 | |
57 | === added file 'CheckSpelling/CheckSpelling.mdp' |
58 | --- CheckSpelling/CheckSpelling.mdp 1970-01-01 00:00:00 +0000 |
59 | +++ CheckSpelling/CheckSpelling.mdp 2009-08-12 15:07:14 +0000 |
60 | @@ -0,0 +1,24 @@ |
61 | +<Project name="CheckSpelling" fileversion="2.0" language="C#" targetFramework="2.0" ctype="DotNetProject"> |
62 | + <Configurations active="Debug"> |
63 | + <Configuration name="Debug" ctype="DotNetProjectConfiguration"> |
64 | + <Output directory="bin/Debug" assembly="CheckSpelling" /> |
65 | + <Build debugmode="True" target="Library" /> |
66 | + <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" /> |
67 | + <CodeGeneration compiler="Mcs" warninglevel="4" optimize="False" unsafecodeallowed="False" generateoverflowchecks="False" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> |
68 | + </Configuration> |
69 | + <Configuration name="Release" ctype="DotNetProjectConfiguration"> |
70 | + <Output directory="bin/Release" assembly="CheckSpelling" /> |
71 | + <Build debugmode="False" target="Library" /> |
72 | + <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" /> |
73 | + <CodeGeneration compiler="Mcs" warninglevel="4" optimize="False" unsafecodeallowed="False" generateoverflowchecks="False" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> |
74 | + </Configuration> |
75 | + </Configurations> |
76 | + <Contents> |
77 | + <File name="AssemblyInfo.cs" subtype="Code" buildaction="Compile" /> |
78 | + <File name="Resources/CheckSpelling.addin.xml.in" subtype="Code" buildaction="Nothing" /> |
79 | + <File name="src/CheckSpellingAction.cs" subtype="Code" buildaction="Compile" /> |
80 | + </Contents> |
81 | + <References> |
82 | + <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> |
83 | + </References> |
84 | +</Project> |
85 | \ No newline at end of file |
86 | |
87 | === added file 'CheckSpelling/Makefile.am' |
88 | --- CheckSpelling/Makefile.am 1970-01-01 00:00:00 +0000 |
89 | +++ CheckSpelling/Makefile.am 2009-08-12 15:00:47 +0000 |
90 | @@ -0,0 +1,18 @@ |
91 | +include $(top_srcdir)/build.rules.mk |
92 | + |
93 | +ASSEMBLY=CheckSpelling |
94 | + |
95 | +FILES = \ |
96 | + src/CheckSpellingAction.cs |
97 | + |
98 | +RESOURCES = \ |
99 | + Resources/CheckSpelling.addin.xml |
100 | + |
101 | +REFERENCES = \ |
102 | + System \ |
103 | + System.Core \ |
104 | + $(ENCHANTNET_LIBS) \ |
105 | + $(GTK_SHARP_20_LIBS) \ |
106 | + $(DO_PLATFORM_LIBS) \ |
107 | + $(DO_PLATFORM_LINUX_LIBS) \ |
108 | + $(DO_UNIVERSE_LIBS) |
109 | |
110 | === added file 'CheckSpelling/Makefile.in' |
111 | --- CheckSpelling/Makefile.in 1970-01-01 00:00:00 +0000 |
112 | +++ CheckSpelling/Makefile.in 2009-08-12 15:00:47 +0000 |
113 | @@ -0,0 +1,511 @@ |
114 | +# Makefile.in generated by automake 1.10.2 from Makefile.am. |
115 | +# @configure_input@ |
116 | + |
117 | +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, |
118 | +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. |
119 | +# This Makefile.in is free software; the Free Software Foundation |
120 | +# gives unlimited permission to copy and/or distribute it, |
121 | +# with or without modifications, as long as this notice is preserved. |
122 | + |
123 | +# This program is distributed in the hope that it will be useful, |
124 | +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without |
125 | +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A |
126 | +# PARTICULAR PURPOSE. |
127 | + |
128 | +@SET_MAKE@ |
129 | + |
130 | +# Rules to more easily specify a C# build for automake. |
131 | +# |
132 | +# Inspired and adapted from Banshee's build system |
133 | + |
134 | +VPATH = @srcdir@ |
135 | +pkgdatadir = $(datadir)/@PACKAGE@ |
136 | +pkglibdir = $(libdir)/@PACKAGE@ |
137 | +pkgincludedir = $(includedir)/@PACKAGE@ |
138 | +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd |
139 | +install_sh_DATA = $(install_sh) -c -m 644 |
140 | +install_sh_PROGRAM = $(install_sh) -c |
141 | +install_sh_SCRIPT = $(install_sh) -c |
142 | +INSTALL_HEADER = $(INSTALL_DATA) |
143 | +transform = $(program_transform_name) |
144 | +NORMAL_INSTALL = : |
145 | +PRE_INSTALL = : |
146 | +POST_INSTALL = : |
147 | +NORMAL_UNINSTALL = : |
148 | +PRE_UNINSTALL = : |
149 | +POST_UNINSTALL = : |
150 | +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ |
151 | + $(top_srcdir)/build.rules.mk |
152 | +@ENABLE_DEBUG_TRUE@am__append_1 = -debug -d:DEBUG |
153 | +subdir = CheckSpelling |
154 | +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
155 | +am__aclocal_m4_deps = $(top_srcdir)/m4/shamrock/expansions.m4 \ |
156 | + $(top_srcdir)/m4/shamrock/i18n.m4 \ |
157 | + $(top_srcdir)/m4/shamrock/mono.m4 \ |
158 | + $(top_srcdir)/m4/shamrock/programs.m4 \ |
159 | + $(top_srcdir)/configure.ac |
160 | +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ |
161 | + $(ACLOCAL_M4) |
162 | +mkinstalldirs = $(install_sh) -d |
163 | +CONFIG_CLEAN_FILES = |
164 | +SOURCES = |
165 | +DIST_SOURCES = |
166 | +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; |
167 | +am__vpath_adj = case $$p in \ |
168 | + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ |
169 | + *) f=$$p;; \ |
170 | + esac; |
171 | +am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; |
172 | +am__installdirs = "$(DESTDIR)$(plugindir)" |
173 | +pluginDATA_INSTALL = $(INSTALL_DATA) |
174 | +DATA = $(plugin_DATA) |
175 | +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) |
176 | +ACLOCAL = @ACLOCAL@ |
177 | +ALL_LINGUAS = @ALL_LINGUAS@ |
178 | +AMTAR = @AMTAR@ |
179 | +ASM_VERSION = @ASM_VERSION@ |
180 | +AUTOCONF = @AUTOCONF@ |
181 | +AUTOHEADER = @AUTOHEADER@ |
182 | +AUTOMAKE = @AUTOMAKE@ |
183 | +AWK = @AWK@ |
184 | +BANSHEE_INDEXER_CFLAGS = @BANSHEE_INDEXER_CFLAGS@ |
185 | +BANSHEE_INDEXER_DLL = @BANSHEE_INDEXER_DLL@ |
186 | +BANSHEE_INDEXER_LIBS = @BANSHEE_INDEXER_LIBS@ |
187 | +CATALOGS = @CATALOGS@ |
188 | +CATOBJEXT = @CATOBJEXT@ |
189 | +CC = @CC@ |
190 | +CCDEPMODE = @CCDEPMODE@ |
191 | +CFLAGS = @CFLAGS@ |
192 | +CONFIG_STATUS_DEPENDENCIES = @CONFIG_STATUS_DEPENDENCIES@ |
193 | +CPP = @CPP@ |
194 | +CPPFLAGS = @CPPFLAGS@ |
195 | +CYGPATH_W = @CYGPATH_W@ |
196 | +DATADIRNAME = @DATADIRNAME@ |
197 | +DEFS = @DEFS@ |
198 | +DEPDIR = @DEPDIR@ |
199 | +DO_INTERFACE_WINK_CFLAGS = @DO_INTERFACE_WINK_CFLAGS@ |
200 | +DO_INTERFACE_WINK_LIBS = @DO_INTERFACE_WINK_LIBS@ |
201 | +DO_PLATFORM_CFLAGS = @DO_PLATFORM_CFLAGS@ |
202 | +DO_PLATFORM_LIBS = @DO_PLATFORM_LIBS@ |
203 | +DO_PLATFORM_LINUX_CFLAGS = @DO_PLATFORM_LINUX_CFLAGS@ |
204 | +DO_PLATFORM_LINUX_LIBS = @DO_PLATFORM_LINUX_LIBS@ |
205 | +DO_UNIVERSE_CFLAGS = @DO_UNIVERSE_CFLAGS@ |
206 | +DO_UNIVERSE_LIBS = @DO_UNIVERSE_LIBS@ |
207 | +ECHO_C = @ECHO_C@ |
208 | +ECHO_N = @ECHO_N@ |
209 | +ECHO_T = @ECHO_T@ |
210 | +EGREP = @EGREP@ |
211 | +ENCHANTNET_CFLAGS = @ENCHANTNET_CFLAGS@ |
212 | +ENCHANTNET_LIBS = @ENCHANTNET_LIBS@ |
213 | +EVOLUTION_SHARP_CFLAGS = @EVOLUTION_SHARP_CFLAGS@ |
214 | +EVOLUTION_SHARP_LIBS = @EVOLUTION_SHARP_LIBS@ |
215 | +EXEEXT = @EXEEXT@ |
216 | +FLICKRNET_CFLAGS = @FLICKRNET_CFLAGS@ |
217 | +FLICKRNET_LIBS = @FLICKRNET_LIBS@ |
218 | +GCONF_SHARP_20_CFLAGS = @GCONF_SHARP_20_CFLAGS@ |
219 | +GCONF_SHARP_20_LIBS = @GCONF_SHARP_20_LIBS@ |
220 | +GDATA_SHARP_CALENDAR_CFLAGS = @GDATA_SHARP_CALENDAR_CFLAGS@ |
221 | +GDATA_SHARP_CALENDAR_LIBS = @GDATA_SHARP_CALENDAR_LIBS@ |
222 | +GDATA_SHARP_CONTACTS_CFLAGS = @GDATA_SHARP_CONTACTS_CFLAGS@ |
223 | +GDATA_SHARP_CONTACTS_LIBS = @GDATA_SHARP_CONTACTS_LIBS@ |
224 | +GDATA_SHARP_DOCUMENTS_CFLAGS = @GDATA_SHARP_DOCUMENTS_CFLAGS@ |
225 | +GDATA_SHARP_DOCUMENTS_LIBS = @GDATA_SHARP_DOCUMENTS_LIBS@ |
226 | +GDATA_SHARP_YOUTUBE_CFLAGS = @GDATA_SHARP_YOUTUBE_CFLAGS@ |
227 | +GDATA_SHARP_YOUTUBE_LIBS = @GDATA_SHARP_YOUTUBE_LIBS@ |
228 | +GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ |
229 | +GLADE_SHARP_20_CFLAGS = @GLADE_SHARP_20_CFLAGS@ |
230 | +GLADE_SHARP_20_LIBS = @GLADE_SHARP_20_LIBS@ |
231 | +GLIB_SHARP_20_CFLAGS = @GLIB_SHARP_20_CFLAGS@ |
232 | +GLIB_SHARP_20_LIBS = @GLIB_SHARP_20_LIBS@ |
233 | +GMOFILES = @GMOFILES@ |
234 | +GMSGFMT = @GMSGFMT@ |
235 | +GNOME_DESKTOP_SHARP_20_CFLAGS = @GNOME_DESKTOP_SHARP_20_CFLAGS@ |
236 | +GNOME_DESKTOP_SHARP_20_LIBS = @GNOME_DESKTOP_SHARP_20_LIBS@ |
237 | +GNOME_KEYRING_SHARP_CFLAGS = @GNOME_KEYRING_SHARP_CFLAGS@ |
238 | +GNOME_KEYRING_SHARP_LIBS = @GNOME_KEYRING_SHARP_LIBS@ |
239 | +GNOME_SHARP_20_CFLAGS = @GNOME_SHARP_20_CFLAGS@ |
240 | +GNOME_SHARP_20_LIBS = @GNOME_SHARP_20_LIBS@ |
241 | +GNOME_VFS_SHARP_20_CFLAGS = @GNOME_VFS_SHARP_20_CFLAGS@ |
242 | +GNOME_VFS_SHARP_20_LIBS = @GNOME_VFS_SHARP_20_LIBS@ |
243 | +GREP = @GREP@ |
244 | +GTK_SHARP_20_CFLAGS = @GTK_SHARP_20_CFLAGS@ |
245 | +GTK_SHARP_20_LIBS = @GTK_SHARP_20_LIBS@ |
246 | +INSTALL = @INSTALL@ |
247 | +INSTALL_DATA = @INSTALL_DATA@ |
248 | +INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
249 | +INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
250 | +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
251 | +INSTOBJEXT = @INSTOBJEXT@ |
252 | +INTLLIBS = @INTLLIBS@ |
253 | +INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@ |
254 | +INTLTOOL_MERGE = @INTLTOOL_MERGE@ |
255 | +INTLTOOL_PERL = @INTLTOOL_PERL@ |
256 | +INTLTOOL_UPDATE = @INTLTOOL_UPDATE@ |
257 | +LDFLAGS = @LDFLAGS@ |
258 | +LIBOBJS = @LIBOBJS@ |
259 | +LIBS = @LIBS@ |
260 | +LTLIBOBJS = @LTLIBOBJS@ |
261 | +MAKEINFO = @MAKEINFO@ |
262 | +MAUTIL = @MAUTIL@ |
263 | +MCS = @MCS@ |
264 | +MKDIR_P = @MKDIR_P@ |
265 | +MKINSTALLDIRS = @MKINSTALLDIRS@ |
266 | +MONO = @MONO@ |
267 | +MONO_ADDINS_CFLAGS = @MONO_ADDINS_CFLAGS@ |
268 | +MONO_ADDINS_GUI_CFLAGS = @MONO_ADDINS_GUI_CFLAGS@ |
269 | +MONO_ADDINS_GUI_LIBS = @MONO_ADDINS_GUI_LIBS@ |
270 | +MONO_ADDINS_LIBS = @MONO_ADDINS_LIBS@ |
271 | +MONO_ADDINS_SETUP_CFLAGS = @MONO_ADDINS_SETUP_CFLAGS@ |
272 | +MONO_ADDINS_SETUP_LIBS = @MONO_ADDINS_SETUP_LIBS@ |
273 | +MSGFMT = @MSGFMT@ |
274 | +MSGFMT_OPTS = @MSGFMT_OPTS@ |
275 | +MSGMERGE = @MSGMERGE@ |
276 | +NDESK_DBUS_10_CFLAGS = @NDESK_DBUS_10_CFLAGS@ |
277 | +NDESK_DBUS_10_LIBS = @NDESK_DBUS_10_LIBS@ |
278 | +NDESK_DBUS_GLIB_10_CFLAGS = @NDESK_DBUS_GLIB_10_CFLAGS@ |
279 | +NDESK_DBUS_GLIB_10_LIBS = @NDESK_DBUS_GLIB_10_LIBS@ |
280 | +NOTIFY_SHARP_CFLAGS = @NOTIFY_SHARP_CFLAGS@ |
281 | +NOTIFY_SHARP_LIBS = @NOTIFY_SHARP_LIBS@ |
282 | +OBJEXT = @OBJEXT@ |
283 | +PACKAGE = @PACKAGE@ |
284 | +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ |
285 | +PACKAGE_NAME = @PACKAGE_NAME@ |
286 | +PACKAGE_STRING = @PACKAGE_STRING@ |
287 | +PACKAGE_TARNAME = @PACKAGE_TARNAME@ |
288 | +PACKAGE_VERSION = @PACKAGE_VERSION@ |
289 | +PATH_SEPARATOR = @PATH_SEPARATOR@ |
290 | +PKG_CONFIG = @PKG_CONFIG@ |
291 | +POFILES = @POFILES@ |
292 | +POSUB = @POSUB@ |
293 | +PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ |
294 | +PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ |
295 | +SET_MAKE = @SET_MAKE@ |
296 | +SHELL = @SHELL@ |
297 | +STRIP = @STRIP@ |
298 | +USE_NLS = @USE_NLS@ |
299 | +VERSION = @VERSION@ |
300 | +WNCK_SHARP_10_CFLAGS = @WNCK_SHARP_10_CFLAGS@ |
301 | +WNCK_SHARP_10_LIBS = @WNCK_SHARP_10_LIBS@ |
302 | +XGETTEXT = @XGETTEXT@ |
303 | +abs_builddir = @abs_builddir@ |
304 | +abs_srcdir = @abs_srcdir@ |
305 | +abs_top_builddir = @abs_top_builddir@ |
306 | +abs_top_srcdir = @abs_top_srcdir@ |
307 | +ac_ct_CC = @ac_ct_CC@ |
308 | +am__include = @am__include@ |
309 | +am__leading_dot = @am__leading_dot@ |
310 | +am__quote = @am__quote@ |
311 | +am__tar = @am__tar@ |
312 | +am__untar = @am__untar@ |
313 | +bindir = @bindir@ |
314 | +build_alias = @build_alias@ |
315 | +builddir = @builddir@ |
316 | +datadir = @datadir@ |
317 | +datarootdir = @datarootdir@ |
318 | +docdir = @docdir@ |
319 | +dvidir = @dvidir@ |
320 | +exec_prefix = @exec_prefix@ |
321 | +expanded_bindir = @expanded_bindir@ |
322 | +expanded_datadir = @expanded_datadir@ |
323 | +expanded_libdir = @expanded_libdir@ |
324 | +host_alias = @host_alias@ |
325 | +htmldir = @htmldir@ |
326 | +includedir = @includedir@ |
327 | +infodir = @infodir@ |
328 | +install_sh = @install_sh@ |
329 | +libdir = @libdir@ |
330 | +libexecdir = @libexecdir@ |
331 | +localedir = @localedir@ |
332 | +localstatedir = @localstatedir@ |
333 | +mandir = @mandir@ |
334 | +mkdir_p = @mkdir_p@ |
335 | +oldincludedir = @oldincludedir@ |
336 | +pdfdir = @pdfdir@ |
337 | +prefix = @prefix@ |
338 | +program_transform_name = @program_transform_name@ |
339 | +psdir = @psdir@ |
340 | +sbindir = @sbindir@ |
341 | +sharedstatedir = @sharedstatedir@ |
342 | +srcdir = @srcdir@ |
343 | +sysconfdir = @sysconfdir@ |
344 | +target_alias = @target_alias@ |
345 | +top_build_prefix = @top_build_prefix@ |
346 | +top_builddir = @top_builddir@ |
347 | +top_srcdir = @top_srcdir@ |
348 | +TARGET = library |
349 | +SOURCES_BUILD = $(addprefix $(srcdir)/, $(FILES)) |
350 | +RESOURCES_EXPANDED = $(addprefix $(srcdir)/, $(RESOURCES)) |
351 | +RESOURCES_BUILD = $(foreach resource, $(RESOURCES_EXPANDED), \ |
352 | + -resource:$(resource),$(notdir $(resource))) |
353 | + |
354 | +BUILD_DIR = $(top_builddir)/build |
355 | +ASSEMBLY_EXTENSION = $(strip $(patsubst library, dll, $(TARGET))) |
356 | +ASSEMBLY_FILE = $(BUILD_DIR)/$(ASSEMBLY).$(ASSEMBLY_EXTENSION) |
357 | +STD_REFERENCES = $(foreach ref,$(filter-out -r:%,$(REFERENCES)),-r:$(ref)) |
358 | +BUILD_REFERENCES = $(filter -r:%,$(REFERENCES) $(STD_REFERENCES)) |
359 | +MA_MANIFEST_FILE = $(filter %.addin.xml, $(RESOURCES_EXPANDED)) |
360 | +MA_ADDIN_NAME = $(shell egrep -o -m 1 'id=".*"' $(MA_MANIFEST_FILE) \ |
361 | + | sed 's/id="//g' | sed 's/"//g') |
362 | + |
363 | +MA_ADDIN_VER = $(shell egrep -o -m 1 'version=".*"' $(MA_MANIFEST_FILE) \ |
364 | + | sed 's/version="//g' | sed 's/"//g') |
365 | + |
366 | +MA_ADDIN_NAMESPACE = Do |
367 | +MA_PACKFILE = $(MA_ADDIN_NAMESPACE).$(MA_ADDIN_NAME)_$(MA_ADDIN_VER).mpack |
368 | +OUTPUT_FILES = \ |
369 | + $(ASSEMBLY_FILE) \ |
370 | + $(ASSEMBLY_FILE).mdb |
371 | + |
372 | + |
373 | +# Install plugins as data; there's no need for them to be excutable |
374 | +plugindir = ${libdir}/gnome-do/plugins |
375 | +plugin_DATA = $(OUTPUT_FILES) |
376 | + |
377 | +# All plugins should be translatable; every plugin will need to link to |
378 | +# Mono.Addins for this. |
379 | +COMPONENT_REFERENCES = $(MONO_ADDINS_LIBS) |
380 | +MCS_FLAGS = $(MCS_LINQ_FLAG) -noconfig -codepage:utf8 -warn:4 \ |
381 | + $(am__append_1) |
382 | + |
383 | +# |
384 | +# Clean and dist targets |
385 | +# |
386 | +EXTRA_DIST = $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(THEME_ICONS_SOURCE) \ |
387 | + $(foreach pkgcfg_file, $(PKG_CONFIG_FILES), $(pkgcfg_file).in) |
388 | + |
389 | +CLEANFILES = $(OUTPUT_FILES) $(pkgconfig_DATA) |
390 | +DISTCLEANFILES = *.pidb |
391 | +MAINTAINERCLEANFILES = Makefile.in |
392 | +ASSEMBLY = CheckSpelling |
393 | +FILES = \ |
394 | + src/CheckSpellingAction.cs |
395 | + |
396 | +RESOURCES = \ |
397 | + Resources/CheckSpelling.addin.xml |
398 | + |
399 | +REFERENCES = \ |
400 | + System \ |
401 | + System.Core \ |
402 | + $(ENCHANTNET_LIBS) \ |
403 | + $(GTK_SHARP_20_LIBS) \ |
404 | + $(DO_PLATFORM_LIBS) \ |
405 | + $(DO_PLATFORM_LINUX_LIBS) \ |
406 | + $(DO_UNIVERSE_LIBS) |
407 | + |
408 | +all: all-am |
409 | + |
410 | +.SUFFIXES: |
411 | +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(top_srcdir)/build.rules.mk $(am__configure_deps) |
412 | + @for dep in $?; do \ |
413 | + case '$(am__configure_deps)' in \ |
414 | + *$$dep*) \ |
415 | + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ |
416 | + && { if test -f $@; then exit 0; else break; fi; }; \ |
417 | + exit 1;; \ |
418 | + esac; \ |
419 | + done; \ |
420 | + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign CheckSpelling/Makefile'; \ |
421 | + cd $(top_srcdir) && \ |
422 | + $(AUTOMAKE) --foreign CheckSpelling/Makefile |
423 | +.PRECIOUS: Makefile |
424 | +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
425 | + @case '$?' in \ |
426 | + *config.status*) \ |
427 | + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ |
428 | + *) \ |
429 | + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ |
430 | + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ |
431 | + esac; |
432 | + |
433 | +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
434 | + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
435 | + |
436 | +$(top_srcdir)/configure: $(am__configure_deps) |
437 | + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
438 | +$(ACLOCAL_M4): $(am__aclocal_m4_deps) |
439 | + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh |
440 | +install-pluginDATA: $(plugin_DATA) |
441 | + @$(NORMAL_INSTALL) |
442 | + test -z "$(plugindir)" || $(MKDIR_P) "$(DESTDIR)$(plugindir)" |
443 | + @list='$(plugin_DATA)'; for p in $$list; do \ |
444 | + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ |
445 | + f=$(am__strip_dir) \ |
446 | + echo " $(pluginDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(plugindir)/$$f'"; \ |
447 | + $(pluginDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(plugindir)/$$f"; \ |
448 | + done |
449 | + |
450 | +uninstall-pluginDATA: |
451 | + @$(NORMAL_UNINSTALL) |
452 | + @list='$(plugin_DATA)'; for p in $$list; do \ |
453 | + f=$(am__strip_dir) \ |
454 | + echo " rm -f '$(DESTDIR)$(plugindir)/$$f'"; \ |
455 | + rm -f "$(DESTDIR)$(plugindir)/$$f"; \ |
456 | + done |
457 | +tags: TAGS |
458 | +TAGS: |
459 | + |
460 | +ctags: CTAGS |
461 | +CTAGS: |
462 | + |
463 | + |
464 | +distdir: $(DISTFILES) |
465 | + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
466 | + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ |
467 | + list='$(DISTFILES)'; \ |
468 | + dist_files=`for file in $$list; do echo $$file; done | \ |
469 | + sed -e "s|^$$srcdirstrip/||;t" \ |
470 | + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ |
471 | + case $$dist_files in \ |
472 | + */*) $(MKDIR_P) `echo "$$dist_files" | \ |
473 | + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ |
474 | + sort -u` ;; \ |
475 | + esac; \ |
476 | + for file in $$dist_files; do \ |
477 | + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ |
478 | + if test -d $$d/$$file; then \ |
479 | + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ |
480 | + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ |
481 | + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ |
482 | + fi; \ |
483 | + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ |
484 | + else \ |
485 | + test -f $(distdir)/$$file \ |
486 | + || cp -p $$d/$$file $(distdir)/$$file \ |
487 | + || exit 1; \ |
488 | + fi; \ |
489 | + done |
490 | +check-am: all-am |
491 | +check: check-am |
492 | +all-am: Makefile $(DATA) |
493 | +installdirs: |
494 | + for dir in "$(DESTDIR)$(plugindir)"; do \ |
495 | + test -z "$$dir" || $(MKDIR_P) "$$dir"; \ |
496 | + done |
497 | +install: install-am |
498 | +install-exec: install-exec-am |
499 | +install-data: install-data-am |
500 | +uninstall: uninstall-am |
501 | + |
502 | +install-am: all-am |
503 | + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am |
504 | + |
505 | +installcheck: installcheck-am |
506 | +install-strip: |
507 | + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ |
508 | + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ |
509 | + `test -z '$(STRIP)' || \ |
510 | + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install |
511 | +mostlyclean-generic: |
512 | + |
513 | +clean-generic: |
514 | + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) |
515 | + |
516 | +distclean-generic: |
517 | + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) |
518 | + -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) |
519 | + |
520 | +maintainer-clean-generic: |
521 | + @echo "This command is intended for maintainers to use" |
522 | + @echo "it deletes files that may require special tools to rebuild." |
523 | + -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) |
524 | +clean: clean-am |
525 | + |
526 | +clean-am: clean-generic mostlyclean-am |
527 | + |
528 | +distclean: distclean-am |
529 | + -rm -f Makefile |
530 | +distclean-am: clean-am distclean-generic |
531 | + |
532 | +dvi: dvi-am |
533 | + |
534 | +dvi-am: |
535 | + |
536 | +html: html-am |
537 | + |
538 | +info: info-am |
539 | + |
540 | +info-am: |
541 | + |
542 | +install-data-am: install-pluginDATA |
543 | + |
544 | +install-dvi: install-dvi-am |
545 | + |
546 | +install-exec-am: |
547 | + |
548 | +install-html: install-html-am |
549 | + |
550 | +install-info: install-info-am |
551 | + |
552 | +install-man: |
553 | + |
554 | +install-pdf: install-pdf-am |
555 | + |
556 | +install-ps: install-ps-am |
557 | + |
558 | +installcheck-am: |
559 | + |
560 | +maintainer-clean: maintainer-clean-am |
561 | + -rm -f Makefile |
562 | +maintainer-clean-am: distclean-am maintainer-clean-generic |
563 | + |
564 | +mostlyclean: mostlyclean-am |
565 | + |
566 | +mostlyclean-am: mostlyclean-generic |
567 | + |
568 | +pdf: pdf-am |
569 | + |
570 | +pdf-am: |
571 | + |
572 | +ps: ps-am |
573 | + |
574 | +ps-am: |
575 | + |
576 | +uninstall-am: uninstall-pluginDATA |
577 | + |
578 | +.MAKE: install-am install-strip |
579 | + |
580 | +.PHONY: all all-am check check-am clean clean-generic distclean \ |
581 | + distclean-generic distdir dvi dvi-am html html-am info info-am \ |
582 | + install install-am install-data install-data-am install-dvi \ |
583 | + install-dvi-am install-exec install-exec-am install-html \ |
584 | + install-html-am install-info install-info-am install-man \ |
585 | + install-pdf install-pdf-am install-pluginDATA install-ps \ |
586 | + install-ps-am install-strip installcheck installcheck-am \ |
587 | + installdirs maintainer-clean maintainer-clean-generic \ |
588 | + mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \ |
589 | + uninstall-am uninstall-pluginDATA |
590 | + |
591 | + |
592 | +all: $(OUTPUT_FILES) |
593 | + |
594 | +reference-debug: |
595 | + @echo $(BUILD_REFERENCES) $(COMPONENT_REFERENCES) |
596 | + @echo $(RESOURCES_EXPANDED) |
597 | + @echo $(MA_MANIFEST_FILE) |
598 | + |
599 | +$(ASSEMBLY_FILE).mdb: $(ASSEMBLY_FILE) |
600 | + |
601 | +$(ASSEMBLY_FILE): $(SOURCES_BUILD) $(RESOURCES_EXPANDED) $(COMPONENT_DEPS) |
602 | + @mkdir -p $(BUILD_DIR) |
603 | + @colors=no; \ |
604 | + case $$TERM in \ |
605 | + "xterm" | "rxvt" | "rxvt-unicode") \ |
606 | + test "x$$COLORTERM" != "x" && colors=yes ;; \ |
607 | + "xterm-color") colors=yes ;; \ |
608 | + esac; \ |
609 | + if [ "x$$colors" = "xyes" ]; then \ |
610 | + tty -s && true || { colors=no; true; } \ |
611 | + fi; \ |
612 | + test "x$$colors" = "xyes" && \ |
613 | + echo -e "\033[1mCompiling $(notdir $@)...\033[0m" || \ |
614 | + echo "Compiling $(notdir $@)..."; |
615 | + @$(MCS) $(MCS_FLAGS) -target:$(TARGET) -out:$@ $(BUILD_DEFINES) $(BUILD_REFERENCES) $(COMPONENT_REFERENCES) $(RESOURCES_BUILD) $(SOURCES_BUILD) |
616 | + @if [ -e $(srcdir)/$(notdir $@.config) ]; then \ |
617 | + cp $(srcdir)/$(notdir $@.config) $(BUILD_DIR) ; \ |
618 | + fi; |
619 | + |
620 | +$(BUILD_DIR)/$(MA_PACKFILE): $(ASSEMBLY_FILE) |
621 | + cd $(BUILD_DIR) && $(MAUTIL) pack $(ASSEMBLY_FILE) |
622 | +# Tell versions [3.59,3.63) of GNU make to not export all variables. |
623 | +# Otherwise a system limit (for SysV at least) may be exceeded. |
624 | +.NOEXPORT: |
625 | |
626 | === added directory 'CheckSpelling/Resources' |
627 | === added file 'CheckSpelling/Resources/CheckSpelling.addin.xml.in' |
628 | --- CheckSpelling/Resources/CheckSpelling.addin.xml.in 1970-01-01 00:00:00 +0000 |
629 | +++ CheckSpelling/Resources/CheckSpelling.addin.xml.in 2009-08-12 15:00:47 +0000 |
630 | @@ -0,0 +1,26 @@ |
631 | +<Addin |
632 | + id="CheckSpelling" |
633 | + namespace="Do" |
634 | + version="1.0" |
635 | + name="CheckSpelling" |
636 | + description="Fix your spelling" |
637 | + author="Nicholas Marshall" |
638 | + category="Community" |
639 | + defaultEnabled="false" |
640 | + > |
641 | + |
642 | + <Runtime> |
643 | + <Import assembly="CheckSpelling.dll"/> |
644 | + </Runtime> |
645 | + |
646 | + <Localizer type="Gettext" catalog="gnome-do-plugins" location="@expanded_datadir@/locale" /> |
647 | + |
648 | + <Dependencies> |
649 | + <Addin id="Universe" version="1.0" /> |
650 | + </Dependencies> |
651 | + |
652 | + <!-- Extensions included in this assembly --> |
653 | + <Extension path= "/Do/Action"> |
654 | + <Action type="CheckSpelling.CheckSpellingAction" /> |
655 | + </Extension> |
656 | +</Addin> |
657 | |
658 | === added directory 'CheckSpelling/src' |
659 | === added file 'CheckSpelling/src/CheckSpellingAction.cs' |
660 | --- CheckSpelling/src/CheckSpellingAction.cs 1970-01-01 00:00:00 +0000 |
661 | +++ CheckSpelling/src/CheckSpellingAction.cs 2009-08-12 15:00:47 +0000 |
662 | @@ -0,0 +1,78 @@ |
663 | +// |
664 | +// Copyright (C) 2009 Nicholas Marshall |
665 | +// |
666 | +// This program is free software: you can redistribute it and/or modify |
667 | +// it under the terms of the GNU General Public License as published by |
668 | +// the Free Software Foundation, either version 3 of the License, or |
669 | +// (at your option) any later version. |
670 | +// |
671 | +// This program is distributed in the hope that it will be useful, |
672 | +// but WITHOUT ANY WARRANTY; without even the implied warranty of |
673 | +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
674 | +// GNU General Public License for more details. |
675 | +// |
676 | +// You should have received a copy of the GNU General Public License |
677 | +// along with this program. If not, see <http://www.gnu.org/licenses/>. |
678 | +// |
679 | + |
680 | +using System; |
681 | +using System.Collections.Generic; |
682 | +using System.Linq; |
683 | +using System.Text.RegularExpressions; |
684 | + |
685 | +using Enchant; |
686 | +using Mono.Addins; |
687 | + |
688 | +using Do.Universe; |
689 | +using Do.Universe.Common; |
690 | + |
691 | + |
692 | +namespace CheckSpelling |
693 | +{ |
694 | + |
695 | + |
696 | + public class CheckSpellingAction: Act |
697 | + { |
698 | + public override string Name { get { return AddinManager.CurrentLocalizer.GetString ("Check Spelling"); } } |
699 | + public override string Description { get { return AddinManager.CurrentLocalizer.GetString ("Checks Spelling"); } } |
700 | + public override string Icon { get { return "text-editor"; } } |
701 | + |
702 | + private Broker broker; |
703 | + private Enchant.Dictionary dictionary; |
704 | + |
705 | + public override IEnumerable<Type> SupportedItemTypes { |
706 | + get { |
707 | + yield return typeof (ITextItem); |
708 | + } |
709 | + } |
710 | + |
711 | + public override IEnumerable<Item> Perform (IEnumerable<Item> items, IEnumerable<Item> modItems) |
712 | + { |
713 | + broker = new Broker(); |
714 | + dictionary = broker.RequestDictionary("en_US"); |
715 | + |
716 | + //enumerate each Item stoping on the first one that is misspelled |
717 | + //then showing the suggested replacements |
718 | + |
719 | + //string allText = from p in items as ITextItem.Text |
720 | + //// select p ; |
721 | + string text = (items.First () as ITextItem).Text; |
722 | + |
723 | + |
724 | + Regex regex = new Regex(@"\W"); |
725 | + foreach (string sub in regex.Split(text)) |
726 | + { |
727 | + |
728 | + if(!dictionary.Check(sub)) |
729 | + { |
730 | + IEnumerable<Item> suggestedItems = from t in dictionary.Suggest(sub) |
731 | + select new TextItem(t) as Item; |
732 | + |
733 | + return suggestedItems; |
734 | + } |
735 | + } |
736 | + |
737 | + return items; |
738 | + } |
739 | + } |
740 | +} |
741 | |
742 | === modified file 'DoPlugins.mds' |
743 | --- DoPlugins.mds 2009-06-11 07:36:57 +0000 |
744 | +++ DoPlugins.mds 2009-08-12 15:07:14 +0000 |
745 | @@ -73,6 +73,7 @@ |
746 | <Entry build="True" name="Emesene" configuration="Debug" /> |
747 | <Entry build="True" name="Dropbox" configuration="Debug" /> |
748 | <Entry build="True" name="RemindMe" configuration="Debug" /> |
749 | + <Entry build="True" name="CheckSpelling" configuration="Debug" /> |
750 | </Configuration> |
751 | <Configuration name="Release" ctype="CombineConfiguration"> |
752 | <Entry build="True" name="Rhythmbox" configuration="Release" /> |
753 | @@ -147,6 +148,7 @@ |
754 | <Entry build="True" name="Emesene" configuration="Release" /> |
755 | <Entry build="True" name="Dropbox" configuration="Release" /> |
756 | <Entry build="True" name="RemindMe" configuration="Release" /> |
757 | + <Entry build="True" name="CheckSpelling" configuration="Release" /> |
758 | </Configuration> |
759 | </Configurations> |
760 | <StartMode startupentry="Rhythmbox" single="True"> |
761 | @@ -222,6 +224,7 @@ |
762 | <Execute type="None" entry="Emesene" /> |
763 | <Execute type="None" entry="Dropbox" /> |
764 | <Execute type="None" entry="RemindMe" /> |
765 | + <Execute type="None" entry="CheckSpelling" /> |
766 | </StartMode> |
767 | <MonoDevelop.ChangeLogAddIn.ChangeLogInfo policy="UpdateNearestChangeLog" /> |
768 | <Entries> |
769 | @@ -297,5 +300,6 @@ |
770 | <Entry filename="Emesene/Emesene.mdp" /> |
771 | <Entry filename="Dropbox/Dropbox.mdp" /> |
772 | <Entry filename="RemindMe/RemindMe.mdp" /> |
773 | + <Entry filename="CheckSpelling/CheckSpelling.mdp" /> |
774 | </Entries> |
775 | </Combine> |
776 | \ No newline at end of file |
777 | |
778 | === modified file 'Makefile.am' |
779 | --- Makefile.am 2009-05-22 18:34:39 +0000 |
780 | +++ Makefile.am 2009-08-12 15:00:47 +0000 |
781 | @@ -9,6 +9,7 @@ |
782 | Archive \ |
783 | Banshee \ |
784 | Bibtex \ |
785 | + CheckSpelling \ |
786 | Cl.ickable \ |
787 | ClawsMail \ |
788 | Confluence \ |
789 | |
790 | === modified file 'RememberTheMilk/RTM.mdp' |
791 | --- RememberTheMilk/RTM.mdp 2009-06-23 11:37:19 +0000 |
792 | +++ RememberTheMilk/RTM.mdp 2009-08-12 15:07:14 +0000 |
793 | @@ -124,4 +124,4 @@ |
794 | <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> |
795 | </References> |
796 | <GtkDesignInfo gettextClass="Mono.Addins.AddinManager.CurrentLocalizer" /> |
797 | -</Project> |
798 | +</Project> |
799 | \ No newline at end of file |
800 | |
801 | === modified file 'WindowManager/WindowManager.mdp' |
802 | --- WindowManager/WindowManager.mdp 2009-06-23 00:52:54 +0000 |
803 | +++ WindowManager/WindowManager.mdp 2009-08-12 15:07:14 +0000 |
804 | @@ -50,8 +50,8 @@ |
805 | <ProjectReference type="Gac" localcopy="True" refto="Do.Platform, Version=0.9.0.0, Culture=neutral" /> |
806 | <ProjectReference type="Gac" localcopy="True" refto="Do.Universe, Version=0.9.0.0, Culture=neutral" /> |
807 | <ProjectReference type="Gac" localcopy="True" refto="Do.Interface.Wink, Version=0.9.0.0, Culture=neutral" /> |
808 | + <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> |
809 | <ProjectReference type="Gac" localcopy="True" refto="Do.Interface.Wink, Version=1.0.3375.29611, Culture=neutral" /> |
810 | - <ProjectReference type="Gac" localcopy="True" refto="Mono.Addins, Version=0.4.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" /> |
811 | </References> |
812 | <LanguageParameters ApplicationIcon="." ctype="CSharpProjectParameters" /> |
813 | </Project> |
814 | \ No newline at end of file |
815 | |
816 | === modified file 'configure.ac' |
817 | --- configure.ac 2009-06-26 05:58:03 +0000 |
818 | +++ configure.ac 2009-08-12 15:00:47 +0000 |
819 | @@ -80,6 +80,25 @@ |
820 | AC_SUBST([EVOLUTION_SHARP_LIBS]) |
821 | dnl }}} |
822 | |
823 | +dnl {{{ check for Enchant |
824 | +AC_ARG_ENABLE(enchant, |
825 | + AC_HELP_STRING([--enable-enchant], [Build plugin to check spelling using enchant (default: auto)]), |
826 | + enable_enchant=$enableval, |
827 | + enable_enchant=auto) |
828 | + |
829 | +if test "x$enable_enchant" != "xno"; then |
830 | + PKG_CHECK_MODULES([ENCHANTNET], [enchant-net], HAVE_ENCHANT=yes, HAVE_ENCHANT=no) |
831 | + |
832 | + if test "x$enable_enchant" = "xyes" -a "x$HAVE_ENCHANT" = "xno"; then |
833 | + AC_MSG_ERROR([Enchant support explicitly requested but dependencies not found]) |
834 | + fi |
835 | +fi |
836 | + |
837 | +AM_CONDITIONAL(HAVE_ENCHANT, test "x$HAVE_ENCHANT" = "xyes") |
838 | + |
839 | +AC_SUBST([ENCHANTNET_LIBS]) |
840 | +dnl }}} |
841 | + |
842 | dnl {{{ check for Flickr |
843 | AC_ARG_ENABLE(flickr, |
844 | AC_HELP_STRING([--enable-flickr], [Build plugin to interact with flickr using flickrnet (default: auto)]), |
845 | @@ -250,6 +269,8 @@ |
846 | Banshee/Resources/Banshee.addin.xml |
847 | Bibtex/Makefile |
848 | Bibtex/Resources/Bibtex.addin.xml |
849 | +CheckSpelling/Makefile |
850 | +CheckSpelling/Resources/CheckSpelling.addin.xml |
851 | Cl.ickable/Makefile |
852 | Cl.ickable/Resources/Cl.ickable.addin.xml |
853 | ClawsMail/Makefile |
The Spellcheck plugin requires libenchant-cil
I have made a project for that here is the bzr branch, /launchpad. net/libenchantn et/trunk
https:/
and here is the PPA with Ubuntu debs /launchpad. net/~enchant- net-maintainers /+archive/ ppa
https:/