2005-12-02 [paul] 1.9.100cvs55
[claws.git] / src / plugins / spamassassin / spamassassin_gtk.c
index 4f37b3294fe65ed6275f34e7f024215a26223ad0..04644b382ddc29c89abf06364fbb7efc4b8fcc1a 100644 (file)
@@ -14,7 +14,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  */
 
 #ifdef HAVE_CONFIG_H
@@ -26,6 +26,7 @@
 #include <glib.h>
 #include <glib/gi18n.h>
 #include <gtk/gtk.h>
+#include <gtk/gtkutils.h>
 
 #include "common/sylpheed.h"
 #include "common/version.h"
@@ -332,7 +333,7 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
                             ("Folder that will be used to save spam. Leave empty to use the default trash folder"),
                             NULL);
 
-       button4 = gtk_button_new_with_label(_("..."));
+       button4 = gtkut_get_browse_directory_btn(_("_Browse"));
        gtk_widget_show(button4);
        gtk_table_attach(GTK_TABLE(table), button4, 2, 3, 3, 4,
                         (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
@@ -446,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,36 +468,7 @@ gint plugin_init(gchar **error)
        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)
+void spamassassin_gtk_done(void)
 {
-       return "GTK2";
+        prefs_gtk_unregister_page((PrefsPage *) &spamassassin_page);
 }