2005-11-13 [colin] 1.9.100cvs10
authorColin Leroy <colin@colino.net>
Sun, 13 Nov 2005 19:50:38 +0000 (19:50 +0000)
committerColin Leroy <colin@colino.net>
Sun, 13 Nov 2005 19:50:38 +0000 (19:50 +0000)
* configure.ac
* src/plugins/spamassassin/Makefile.am
* src/plugins/spamassassin/spamassassin.c
* src/plugins/spamassassin/spamassassin.h
* src/plugins/spamassassin/spamassassin_gtk.c
Merge spamassassin and spamassassin_gtk plugins,
and build it by default.

ChangeLog
PATCHSETS
configure.ac
src/plugins/spamassassin/Makefile.am
src/plugins/spamassassin/spamassassin.c
src/plugins/spamassassin/spamassassin.h
src/plugins/spamassassin/spamassassin_gtk.c

index 0fb8f5ba7ce223cfee533ef0f77752613b1aa1f0..3e6c733249d3c1ee7482e4a98c36af0192696202 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-11-13 [colin]     1.9.100cvs10
+
+       * configure.ac
+       * src/plugins/spamassassin/Makefile.am
+       * src/plugins/spamassassin/spamassassin.c
+       * src/plugins/spamassassin/spamassassin.h
+       * src/plugins/spamassassin/spamassassin_gtk.c
+               Merge spamassassin and spamassassin_gtk plugins,
+               and build it by default.
+
 2005-11-12 [colin]     1.9.100cvs9
 
        * src/etpan/imap-thread.c
index 4972606cb3f7f10ae42c1d0e21cc94ecfa82e221..611227342ba8dbfd8de5d4f7b7e61a80d8a8fd44 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.115.2.67 -r 1.115.2.68 src/main.c;  ) > 1.9.100cvs7.patchset
 ( cvs diff -u -r 1.49.2.68 -r 1.49.2.69 src/procmime.c;  ) > 1.9.100cvs8.patchset
 ( cvs diff -u -r 1.1.4.24 -r 1.1.4.25 src/etpan/imap-thread.c;  ) > 1.9.100cvs9.patchset
+( cvs diff -u -r 1.654.2.1039 -r 1.654.2.1040 configure.ac;  cvs diff -u -r 1.5.2.2 -r 1.5.2.3 src/plugins/spamassassin/Makefile.am;  cvs diff -u -r 1.18.2.11 -r 1.18.2.12 src/plugins/spamassassin/spamassassin.c;  cvs diff -u -r 1.4.2.3 -r 1.4.2.4 src/plugins/spamassassin/spamassassin.h;  cvs diff -u -r 1.23.2.14 -r 1.23.2.15 src/plugins/spamassassin/spamassassin_gtk.c;  ) > 1.9.100cvs10.patchset
index 79f0ec4061e7fb0c581619171da840b8b8442d68..5bb4a1639ac96cd2ac179ece56229b14c1566b3d 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=100
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=9
+EXTRA_VERSION=10
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -581,8 +581,8 @@ AM_CONDITIONAL(BUILD_TRAYICON_PLUGIN, test x"$ac_cv_enable_trayicon_plugin" = xy
 dnl --- SpamAssassin ---
 AC_MSG_CHECKING([whether to build SpamAssassin plugin])
 AC_ARG_ENABLE(spamassassin-plugin,
-       [  --enable-spamassassin-plugin      Build SpamAssassin plugin [default=no]],
-       [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=no])
+       [  --disable-spamassassin-plugin      Build SpamAssassin plugin [default=yes]],
+       [ac_cv_enable_spamassassin_plugin=$enableval], [ac_cv_enable_spamassassin_plugin=yes])
 if test x"$ac_cv_enable_spamassassin_plugin" = xyes; then
        AC_MSG_RESULT(yes)
        AC_SPAMASSASSIN
index 6f87d6f8f17137b60fb6fbb0945bfbb22b60007d..ecdfded7819a784e36b5a06b9fd12ba5f7753bcb 100644 (file)
@@ -1,10 +1,10 @@
 plugindir = $(pkglibdir)/plugins
-plugin_DATA=spamassassin_gtk.deps
 
-plugin_LTLIBRARIES = spamassassin.la spamassassin_gtk.la
+plugin_LTLIBRARIES = spamassassin.la
 
 spamassassin_la_SOURCES = \
        spamassassin.c spamassassin.h \
+       spamassassin_gtk.c spamassassin.h \
        libspamc.c libspamc.h \
        utils.c utils.h
 
@@ -12,14 +12,6 @@ spamassassin_la_LDFLAGS = \
        -avoid-version -module \
        $(GTK_LIBS)
 
-spamassassin_gtk_la_SOURCES = \
-       spamassassin_gtk.c spamassassin.h
-
-spamassassin_gtk_la_LDFLAGS = \
-       -avoid-version -module \
-       $(GTK_LIBS) \
-       $(OPENSSL_LIBS)
-
 INCLUDES = \
        -I../.. \
        -I../../common \
@@ -32,4 +24,4 @@ AM_CPPFLAGS = \
        $(OPENSSL_CFLAGS)
 
 EXTRA_DIST = \
-       README spamassassin_gtk.deps
+       README
index f88a911ecf26a8c056b3a9fbc2f160c4fa8bf5fc..4d58e3494a1ac76feb195d1204cdb7ea3a7cc642 100644 (file)
@@ -307,6 +307,7 @@ gint plugin_init(gchar **error)
        rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL);
        prefs_read_config(param, "SpamAssassin", rcpath, NULL);
        g_free(rcpath);
+       spamassassin_gtk_init();
 
        debug_print("Spamassassin plugin loaded\n");
 
@@ -337,11 +338,7 @@ const gchar *plugin_desc(void)
                 "\n"
                 "When a message is identified as spam it can be deleted or "
                 "saved into a special folder.\n"
-                "\n"
-                "This plugin only contains the actual function for filtering "
-                "and deleting or moving the message. You probably want to load "
-                "a User Interface plugin too, otherwise you will have to "
-                "manually write the plugin configuration.\n");
+                "\n");
 }
 
 const gchar *plugin_type(void)
index ea2aea602ddfc361033a3c6a5fe7370784866992..466f373ea2ac2286b66bc300f28462db8d47def0 100644 (file)
@@ -48,5 +48,6 @@ struct _SpamAssassinConfig
 SpamAssassinConfig *spamassassin_get_config          (void);
 void               spamassassin_save_config          (void);
 void               spamassassin_set_message_callback (MessageCallback callback);
+gint spamassassin_gtk_init(void);
 
 #endif
index 25ed707020d94c4b79ff066411df1446ab6a38cf..ec6e3083a6357e1a62edb7d0d3b7a3be47594b51 100644 (file)
@@ -447,20 +447,10 @@ static void gtk_message_callback(gchar *message)
 
 static struct SpamAssassinPage spamassassin_page;
 
-gint plugin_init(gchar **error)
+gint spamassassin_gtk_init(void)
 {
        static gchar *path[3];
 
-       if ((sylpheed_get_version() > VERSION_NUMERIC)) {
-               *error = g_strdup("Your sylpheed version is newer than the version the plugin was built with");
-               return -1;
-       }
-
-       if ((sylpheed_get_version() < MAKE_NUMERIC_VERSION(0, 9, 3, 86))) {
-               *error = g_strdup("Your sylpheed version is too old");
-               return -1;
-       }
-    
        path[0] = _("Plugins");
        path[1] = _("SpamAssassin");
        path[2] = NULL;
@@ -477,37 +467,3 @@ gint plugin_init(gchar **error)
        debug_print("SpamAssassin GTK plugin loaded\n");
        return 0;       
 }
-
-void plugin_done(void)
-{
-       spamassassin_set_message_callback(NULL);
-       prefs_gtk_unregister_page((PrefsPage *) &spamassassin_page);
-
-       debug_print("SpamAssassin GTK plugin unloaded\n");
-}
-
-const gchar *plugin_name(void)
-{
-       return _("SpamAssassin GTK");
-}
-
-const gchar *plugin_desc(void)
-{
-       return _("This plugin provides a Preferences page for the SpamAssassin "
-                "plugin.\n"
-                "\n"
-                "You will find the options in the Preferences window "
-                "under Plugins/SpamAssassin.\n"
-                "\n"
-                "With this plugin you can enable the filtering, change the "
-                "SpamAssassin server host and port, set the maximum size of "
-                "messages to be checked, (if the message is larger it will "
-                "not be checked), configure whether spam mail should be received "
-                "(default: Yes) and select the folder where spam mail will be "
-                "saved.\n");
-}
-
-const gchar *plugin_type(void)
-{
-       return "GTK2";
-}