Hi,

This simple patch makes the gtkspell dependency optional, and removes the enable spell-checking checkbox in the Prefrences depending on gtkspell's availability.

I could probably just commit this as it basically counts as a build fix, but I thought I'd take the safe route since I'm new to all this. Besides, it gives docs people a heads up.

Speaking of this, I'm not really sure how the docs should handle it. Most people will have distros with gtkspell and will see the checkbox, but since it's optional, some people will not. What should the docs reflect?

-Alex
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/tomboy/ChangeLog,v
retrieving revision 1.289
diff -u -b -r1.289 ChangeLog
--- ChangeLog   3 Sep 2006 01:05:56 -0000       1.289
+++ ChangeLog   3 Sep 2006 04:49:42 -0000
@@ -1,3 +1,16 @@
+2006-09-02  Alex Graveley  <[EMAIL PROTECTED]>
+
+       * configure.in: Set $ENABLE_GTKSPELL if gtkspell-2.0 is installed.
+       This makes gtkspell optional as required for GNOME release.
+
+       * Tomboy/Makefile.am: Pass -define:ENABLE_DBUS if it's enabled.
+
+       If gtkspell isn't enabled...
+       * Tomboy/Watchers.cs: Conditionally include NoteSpellChecker.
+       * Tomboy/Preferences.cs: Don't show spell check enable checkbox,
+       and don't pack the font button to fill the extra space.
+       * Tomboy/PluginManager.cs: Don't create NoteSpellChecker objects.
+
 2006-09-02  Brent Smith  <[EMAIL PROTECTED]>
 
        * help/C/figures/tomboy-new-note.png:
Index: configure.in
===================================================================
RCS file: /cvs/gnome/tomboy/configure.in,v
retrieving revision 1.98
diff -u -b -r1.98 configure.in
--- configure.in        31 Aug 2006 17:41:54 -0000      1.98
+++ configure.in        3 Sep 2006 04:49:42 -0000
@@ -84,7 +84,8 @@
 # Check for GtkSpell here, as we call into it from C#.
 # http://gtkspell.sourceforge.net/
 #
-PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0)
+PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0, ENABLE_GTKSPELL="yes", 
ENABLE_GTKSPELL="no")
+AM_CONDITIONAL(ENABLE_GTKSPELL, test "$ENABLE_GTKSPELL" = "yes")
 PKG_CHECK_MODULES(GTKSPELL, gtkspell-2.0 >= 2.0.9, FIXED_GTKSPELL="yes", 
FIXED_GTKSPELL="no")
 AM_CONDITIONAL(FIXED_GTKSPELL, test "$FIXED_GTKSPELL" = "yes")
 
Index: Tomboy/Watchers.cs
===================================================================
RCS file: /cvs/gnome/tomboy/Tomboy/Watchers.cs,v
retrieving revision 1.50
diff -u -b -r1.50 Watchers.cs
--- Tomboy/Watchers.cs  9 Aug 2006 06:17:11 -0000       1.50
+++ Tomboy/Watchers.cs  3 Sep 2006 04:49:42 -0000
@@ -186,6 +186,7 @@
                }
        }
 
+#if ENABLE_GTKSPELL
        public class NoteSpellChecker : NotePlugin
        {
                IntPtr obj_ptr = IntPtr.Zero;
@@ -281,6 +282,7 @@
                        }
                }
        }
+#endif // ENABLE_GTKSPELL
 
        public class NoteUrlWatcher : NotePlugin
        {
Index: Tomboy/Preferences.cs
===================================================================
RCS file: /cvs/gnome/tomboy/Tomboy/Preferences.cs,v
retrieving revision 1.9
diff -u -b -r1.9 Preferences.cs
--- Tomboy/Preferences.cs       28 Aug 2006 03:14:07 -0000      1.9
+++ Tomboy/Preferences.cs       3 Sep 2006 04:49:42 -0000
@@ -177,6 +177,7 @@
                        options_list.Show ();
 
 
+#if ENABLE_GTKSPELL
                        // Spell checking...
 
                        check = MakeCheckButton (Catalog.GetString ("_Spell 
check while typing"));
@@ -191,6 +192,7 @@
                                                                 "suggestions 
shown in the right-click " +
                                                                 "menu."));
                        options_list.PackStart (label, false, false, 0);
+#endif // ENABLE_GTKSPELL
 
 
                        // WikiWords...
@@ -221,7 +223,7 @@
 
                        align = new Gtk.Alignment (0.5f, 0.5f, 0.4f, 1.0f);
                        align.Show ();
-                       options_list.PackStart (align, true, true, 0);
+                       options_list.PackStart (align, false, false, 0);
 
                        font_button = MakeFontButton ();
                        font_button.Sensitive = check.Active;
Index: Tomboy/PluginManager.cs
===================================================================
RCS file: /cvs/gnome/tomboy/Tomboy/PluginManager.cs,v
retrieving revision 1.16
diff -u -b -r1.16 PluginManager.cs
--- Tomboy/PluginManager.cs     27 Jul 2006 08:27:22 -0000      1.16
+++ Tomboy/PluginManager.cs     3 Sep 2006 04:49:43 -0000
@@ -127,7 +127,9 @@
                static Type [] stock_plugins = 
                        new Type [] {
                                typeof (NoteRenameWatcher),
+#if ENABLE_GTKSPELL
                                typeof (NoteSpellChecker),
+#endif // ENABLE_GTKSPELL
                                typeof (NoteUrlWatcher),
                                typeof (NoteLinkWatcher),
                                typeof (NoteWikiWatcher),
Index: Tomboy/Makefile.am
===================================================================
RCS file: /cvs/gnome/tomboy/Tomboy/Makefile.am,v
retrieving revision 1.40
diff -u -b -r1.40 Makefile.am
--- Tomboy/Makefile.am  19 Aug 2006 21:20:04 -0000      1.40
+++ Tomboy/Makefile.am  3 Sep 2006 04:49:43 -0000
@@ -14,6 +14,10 @@
        $(srcdir)/RemoteControlProxy.cs
 endif
 
+if ENABLE_GTKSPELL
+ENABLE_GTKSPELL_CSFLAGS = -define:ENABLE_GTKSPELL
+endif
+
 if FIXED_GTKSPELL
 FIXED_GTKSPELL_CSFLAGS = -define:FIXED_GTKSPELL
 endif
@@ -24,6 +28,7 @@
        -unsafe                         \
        -target:exe                     \
        $(DBUS_CSFLAGS)                 \
+       $(ENABLE_GTKSPELL_CSFLAGS)      \
        $(FIXED_GTKSPELL_CSFLAGS)
 
 CSFILES =                                      \
_______________________________________________
gnome-i18n mailing list
gnome-i18n@gnome.org
http://mail.gnome.org/mailman/listinfo/gnome-i18n

Reply via email to