*
* 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
#include "defs.h"
#include <glib.h>
+#include <glib/gi18n.h>
#include <gtk/gtk.h>
+#include <gtk/gtkutils.h>
#include "common/sylpheed.h"
#include "common/version.h"
-#include "intl.h"
#include "plugin.h"
#include "common/utils.h"
#include "prefs.h"
default:
break;
}
- gtk_notebook_set_page(GTK_NOTEBOOK(page->transport_notebook), transport->page);
+ gtk_notebook_set_current_page(GTK_NOTEBOOK(page->transport_notebook), transport->page);
}
static void transport_sel_cb(GtkMenuItem *menuitem, gpointer data)
port = gtk_spin_button_new(GTK_ADJUSTMENT(port_adj), 1, 0);
gtk_widget_show(port);
gtk_box_pack_end(GTK_BOX(hbox1), port, FALSE, TRUE, 0);
- gtk_widget_set_usize(port, 64, -2);
+ gtk_widget_set_size_request(port, 64, -2);
gtk_tooltips_set_tip(tooltips, port, _("Port of spamd server"),
NULL);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(port), TRUE);
timeout = gtk_spin_button_new(GTK_ADJUSTMENT(timeout_adj), 1, 0);
gtk_widget_show(timeout);
gtk_box_pack_end(GTK_BOX(hbox6), timeout, FALSE, TRUE, 0);
- gtk_widget_set_usize(timeout, 64, -2);
+ gtk_widget_set_size_request(timeout, 64, -2);
gtk_tooltips_set_tip(tooltips, timeout,
_
("Time that is allowed for checking. If the check takes longer the check will be aborted and the message will be handled as not spam."),
max_size = gtk_spin_button_new(GTK_ADJUSTMENT(max_size_adj), 1, 0);
gtk_widget_show(max_size);
gtk_box_pack_end(GTK_BOX(hbox3), max_size, FALSE, TRUE, 0);
- gtk_widget_set_usize(max_size, 64, -2);
+ gtk_widget_set_size_request(max_size, 64, -2);
gtk_tooltips_set_tip(tooltips, max_size,
_
("Maximum size a message is allowed to have to be checked"),
("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),
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] = _("Filtering");
+ path[0] = _("Plugins");
path[1] = _("SpamAssassin");
path[2] = NULL;
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 Other Preferences window "
- "under Filtering/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);
}