{
PrefsPage page;
- GtkWidget *enable;
+ GtkWidget *transport;
+ GtkWidget *transport_notebook;
GtkWidget *hostname;
+ GtkWidget *colon;
GtkWidget *port;
+ GtkWidget *socket;
GtkWidget *receive_spam;
GtkWidget *save_folder;
GtkWidget *max_size;
GtkWidget *timeout;
+
+ SpamAssassinTransport trans;
+};
+
+struct Transport
+{
+ gchar *name;
+ SpamAssassinTransport transport;
+ guint page;
+ guint pageflags;
+};
+
+enum {
+ PAGE_NETWORK = 0,
+ PAGE_UNIX = 1,
+};
+
+enum {
+ NETWORK_HOSTNAME = 1,
+};
+
+struct Transport transports[] = {
+ { N_("Disabled"), SPAMASSASSIN_DISABLED, PAGE_NETWORK, 0 },
+ { N_("Localhost"), SPAMASSASSIN_TRANSPORT_LOCALHOST, PAGE_NETWORK, 0 },
+ { N_("TCP"), SPAMASSASSIN_TRANSPORT_TCP, PAGE_NETWORK, NETWORK_HOSTNAME },
+ { N_("Unix Socket"), SPAMASSASSIN_TRANSPORT_UNIX, PAGE_UNIX, 0 },
};
static void foldersel_cb(GtkWidget *widget, gpointer data)
}
}
+static void show_transport(struct SpamAssassinPage *page, struct Transport *transport)
+{
+ page->trans = transport->transport;
+
+ switch (transport->page) {
+ case PAGE_NETWORK:
+ if (transport->pageflags & NETWORK_HOSTNAME) {
+ gtk_widget_show(page->hostname);
+ gtk_widget_show(page->colon);
+ } else {
+ gtk_widget_hide(page->hostname);
+ gtk_widget_hide(page->colon);
+ }
+ break;
+ default:
+ break;
+ }
+ gtk_notebook_set_page(GTK_NOTEBOOK(page->transport_notebook), transport->page);
+}
+
+static void transport_sel_cb(GtkMenuItem *menuitem, gpointer data)
+{
+ struct SpamAssassinPage *page = (struct SpamAssassinPage *) data;
+ struct Transport *transport;
+
+ transport = (struct Transport *) gtk_object_get_user_data(GTK_OBJECT(menuitem));
+ show_transport(page, transport);
+}
+
static void spamassassin_create_widget_func(PrefsPage * _page,
GtkWindow * window,
gpointer data)
{
struct SpamAssassinPage *page = (struct SpamAssassinPage *) _page;
SpamAssassinConfig *config;
+ guint i, active;
/*
* BEGIN GLADE CODE
* DO NOT EDIT
*/
- GtkWidget *table1;
+ GtkWidget *table;
GtkWidget *label3;
GtkWidget *label4;
+ GtkWidget *hbox4;
+ GtkWidget *transport;
+ GtkWidget *transport_menu;
+ GtkWidget *transport_notebook;
GtkWidget *hbox1;
GtkWidget *hostname;
- GtkWidget *label5;
+ GtkWidget *colon;
GtkObject *port_adj;
GtkWidget *port;
- GtkWidget *enable;
+ GtkWidget *socket;
+ GtkWidget *label15;
+ GtkWidget *hbox6;
+ GtkObject *timeout_adj;
+ GtkWidget *timeout;
+ GtkWidget *label16;
GtkWidget *label9;
GtkWidget *receive_spam;
- GtkWidget *label8;
- GtkWidget *save_folder;
- GtkWidget *button4;
- GtkWidget *label6;
GtkWidget *hbox3;
GtkObject *max_size_adj;
GtkWidget *max_size;
GtkWidget *label11;
- GtkWidget *label12;
- GtkWidget *label13;
- GtkWidget *hbox4;
- GtkObject *timeout_adj;
- GtkWidget *timeout;
+ GtkWidget *label8;
+ GtkWidget *save_folder;
+ GtkWidget *button4;
+ GtkWidget *label6;
GtkTooltips *tooltips;
tooltips = gtk_tooltips_new();
- table1 = gtk_table_new(6, 3, FALSE);
- gtk_widget_show(table1);
- gtk_container_set_border_width(GTK_CONTAINER(table1), 8);
- gtk_table_set_row_spacings(GTK_TABLE(table1), 4);
- gtk_table_set_col_spacings(GTK_TABLE(table1), 8);
+ table = gtk_table_new(6, 3, FALSE);
+ gtk_widget_show(table);
+ gtk_container_set_border_width(GTK_CONTAINER(table), 8);
+ gtk_table_set_row_spacings(GTK_TABLE(table), 4);
+ gtk_table_set_col_spacings(GTK_TABLE(table), 8);
- label3 = gtk_label_new(_("Enable"));
+ label3 = gtk_label_new(_("Transport"));
gtk_widget_show(label3);
- gtk_table_attach(GTK_TABLE(table1), label3, 0, 1, 0, 1,
+ gtk_table_attach(GTK_TABLE(table), label3, 0, 1, 0, 1,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment(GTK_MISC(label3), 0, 0.5);
label4 = gtk_label_new(_("spamd "));
gtk_widget_show(label4);
- gtk_table_attach(GTK_TABLE(table1), label4, 0, 1, 1, 2,
+ gtk_table_attach(GTK_TABLE(table), label4, 0, 1, 1, 2,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment(GTK_MISC(label4), 0, 0.5);
+ hbox4 = gtk_hbox_new(FALSE, 0);
+ gtk_widget_show(hbox4);
+ gtk_table_attach(GTK_TABLE(table), hbox4, 1, 2, 0, 1,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+ transport = gtk_option_menu_new();
+ gtk_widget_show(transport);
+ gtk_box_pack_start(GTK_BOX(hbox4), transport, FALSE, FALSE, 0);
+ transport_menu = gtk_menu_new();
+
+ transport_notebook = gtk_notebook_new();
+ gtk_widget_show(transport_notebook);
+ gtk_table_attach(GTK_TABLE(table), transport_notebook, 1, 2, 1, 2,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+ GTK_WIDGET_UNSET_FLAGS(transport_notebook, GTK_CAN_FOCUS);
+ gtk_notebook_set_show_tabs(GTK_NOTEBOOK(transport_notebook),
+ FALSE);
+ gtk_notebook_set_show_border(GTK_NOTEBOOK(transport_notebook),
+ FALSE);
+
hbox1 = gtk_hbox_new(FALSE, 0);
gtk_widget_show(hbox1);
- gtk_table_attach(GTK_TABLE(table1), hbox1, 1, 2, 1, 2,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (GTK_FILL), 0, 0);
+ gtk_container_add(GTK_CONTAINER(transport_notebook), hbox1);
hostname = gtk_entry_new();
gtk_widget_show(hostname);
_("Hostname or IP address of spamd server"),
NULL);
- label5 = gtk_label_new(_(":"));
- gtk_widget_show(label5);
- gtk_box_pack_start(GTK_BOX(hbox1), label5, FALSE, FALSE, 0);
- gtk_misc_set_padding(GTK_MISC(label5), 8, 0);
+ colon = gtk_label_new(_(":"));
+ gtk_widget_show(colon);
+ gtk_box_pack_start(GTK_BOX(hbox1), colon, FALSE, FALSE, 0);
+ gtk_misc_set_padding(GTK_MISC(colon), 8, 0);
port_adj = gtk_adjustment_new(783, 1, 65535, 1, 10, 10);
port = gtk_spin_button_new(GTK_ADJUSTMENT(port_adj), 1, 0);
NULL);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(port), TRUE);
- enable = gtk_check_button_new_with_label("");
- gtk_widget_show(enable);
- gtk_table_attach(GTK_TABLE(table1), enable, 1, 2, 0, 1,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+ socket = gtk_entry_new();
+ gtk_widget_show(socket);
+ gtk_container_add(GTK_CONTAINER(transport_notebook), socket);
+ gtk_tooltips_set_tip(tooltips, socket, _("Path of Unix socket"),
+ NULL);
+
+ label15 = gtk_label_new(_("Timeout"));
+ gtk_widget_show(label15);
+ gtk_table_attach(GTK_TABLE(table), label15, 0, 1, 5, 6,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment(GTK_MISC(label15), 0, 0.5);
+
+ hbox6 = gtk_hbox_new(FALSE, 0);
+ gtk_widget_show(hbox6);
+ gtk_table_attach(GTK_TABLE(table), hbox6, 1, 2, 5, 6,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+ timeout_adj = gtk_adjustment_new(60, 0, 10000, 10, 10, 10);
+ 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_tooltips_set_tip(tooltips, timeout,
+ _
+ ("Maximum size a message is allowed to have to be checked"),
+ NULL);
+ gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(timeout), TRUE);
+
+ label16 = gtk_label_new(_("s"));
+ gtk_widget_show(label16);
+ gtk_table_attach(GTK_TABLE(table), label16, 2, 3, 5, 6,
+ (GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- gtk_tooltips_set_tip(tooltips, enable,
- _("Enable SpamAssassin filtering"), NULL);
+ gtk_misc_set_alignment(GTK_MISC(label16), 0, 0.5);
label9 = gtk_label_new(_("Save Spam"));
gtk_widget_show(label9);
- gtk_table_attach(GTK_TABLE(table1), label9, 0, 1, 2, 3,
+ gtk_table_attach(GTK_TABLE(table), label9, 0, 1, 2, 3,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment(GTK_MISC(label9), 0, 0.5);
receive_spam = gtk_check_button_new_with_label("");
gtk_widget_show(receive_spam);
- gtk_table_attach(GTK_TABLE(table1), receive_spam, 1, 2, 2, 3,
+ gtk_table_attach(GTK_TABLE(table), receive_spam, 1, 2, 2, 3,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_tooltips_set_tip(tooltips, receive_spam,
("Save mails that where identified as spam to a folder"),
NULL);
- label8 = gtk_label_new(_("Save Folder"));
- gtk_widget_show(label8);
- gtk_table_attach(GTK_TABLE(table1), label8, 0, 1, 3, 4,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- gtk_label_set_justify(GTK_LABEL(label8), GTK_JUSTIFY_LEFT);
- gtk_misc_set_alignment(GTK_MISC(label8), 0, 0.5);
-
- save_folder = gtk_entry_new();
- gtk_widget_show(save_folder);
- gtk_table_attach(GTK_TABLE(table1), save_folder, 1, 2, 3, 4,
- (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- gtk_tooltips_set_tip(tooltips, save_folder,
- _
- ("Folder that will be used to save spam. Leave empty to use the default trash folder"),
- NULL);
-
- button4 = gtk_button_new_with_label(_("..."));
- gtk_widget_show(button4);
- gtk_table_attach(GTK_TABLE(table1), button4, 2, 3, 3, 4,
- (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
-
- label6 = gtk_label_new(_("Maximum Size"));
- gtk_widget_show(label6);
- gtk_table_attach(GTK_TABLE(table1), label6, 0, 1, 4, 5,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (0), 0, 0);
- gtk_misc_set_alignment(GTK_MISC(label6), 0, 0.5);
-
hbox3 = gtk_hbox_new(FALSE, 0);
gtk_widget_show(hbox3);
- gtk_table_attach(GTK_TABLE(table1), hbox3, 1, 2, 4, 5,
+ gtk_table_attach(GTK_TABLE(table), hbox3, 1, 2, 4, 5,
(GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (GTK_FILL), 0, 0);
label11 = gtk_label_new(_("kB"));
gtk_widget_show(label11);
- gtk_table_attach(GTK_TABLE(table1), label11, 2, 3, 4, 5,
+ gtk_table_attach(GTK_TABLE(table), label11, 2, 3, 4, 5,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
gtk_misc_set_alignment(GTK_MISC(label11), 0, 0.5);
- label12 = gtk_label_new(_("Timeout"));
- gtk_widget_show(label12);
- gtk_table_attach(GTK_TABLE(table1), label12, 0, 1, 5, 6,
+ label8 = gtk_label_new(_("Save Folder"));
+ gtk_widget_show(label8);
+ gtk_table_attach(GTK_TABLE(table), label8, 0, 1, 3, 4,
(GtkAttachOptions) (GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- gtk_misc_set_alignment(GTK_MISC(label12), 0, 0.5);
+ gtk_label_set_justify(GTK_LABEL(label8), GTK_JUSTIFY_LEFT);
+ gtk_misc_set_alignment(GTK_MISC(label8), 0, 0.5);
- label13 = gtk_label_new(_("s"));
- gtk_widget_show(label13);
- gtk_table_attach(GTK_TABLE(table1), label13, 2, 3, 5, 6,
- (GtkAttachOptions) (GTK_FILL),
+ save_folder = gtk_entry_new();
+ gtk_widget_show(save_folder);
+ gtk_table_attach(GTK_TABLE(table), save_folder, 1, 2, 3, 4,
+ (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
(GtkAttachOptions) (0), 0, 0);
- gtk_misc_set_alignment(GTK_MISC(label13), 0, 0.5);
-
- hbox4 = gtk_hbox_new(FALSE, 0);
- gtk_widget_show(hbox4);
- gtk_table_attach(GTK_TABLE(table1), hbox4, 1, 2, 5, 6,
- (GtkAttachOptions) (GTK_FILL),
- (GtkAttachOptions) (GTK_FILL), 0, 0);
-
- timeout_adj = gtk_adjustment_new(30, 5, 300, 1, 1, 1);
- timeout = gtk_spin_button_new(GTK_ADJUSTMENT(timeout_adj), 1, 0);
- gtk_widget_show(timeout);
- gtk_box_pack_end(GTK_BOX(hbox4), timeout, FALSE, TRUE, 0);
- gtk_widget_set_usize(timeout, 64, -2);
- gtk_tooltips_set_tip(tooltips, timeout,
+ gtk_tooltips_set_tip(tooltips, save_folder,
_
- ("Maximum time allowed for the spam check. After the time the check will be aborted and the message delivered as none spam."),
+ ("Folder that will be used to save spam. Leave empty to use the default trash folder"),
NULL);
- gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(timeout), TRUE);
+
+ button4 = gtk_button_new_with_label(_("..."));
+ gtk_widget_show(button4);
+ gtk_table_attach(GTK_TABLE(table), button4, 2, 3, 3, 4,
+ (GtkAttachOptions) (GTK_SHRINK | GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+
+ label6 = gtk_label_new(_("Maximum Size"));
+ gtk_widget_show(label6);
+ gtk_table_attach(GTK_TABLE(table), label6, 0, 1, 4, 5,
+ (GtkAttachOptions) (GTK_FILL),
+ (GtkAttachOptions) (0), 0, 0);
+ gtk_misc_set_alignment(GTK_MISC(label6), 0, 0.5);
/*
* END GLADE CODE
*/
gtk_signal_connect(GTK_OBJECT(button4), "released", GTK_SIGNAL_FUNC(foldersel_cb), page);
- gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(enable), config->enable);
if (config->hostname != NULL)
gtk_entry_set_text(GTK_ENTRY(hostname), config->hostname);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(port), (float) config->port);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(max_size), (float) config->max_size);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(timeout), (float) config->timeout);
- page->enable = enable;
+ page->transport = transport;
+ page->transport_notebook = transport_notebook;
page->hostname = hostname;
+ page->colon = colon;
page->port = port;
+ page->socket = socket;
page->receive_spam = receive_spam;
page->save_folder = save_folder;
page->max_size = max_size;
page->timeout = timeout;
- page->page.widget = table1;
+ active = 0;
+ for (i = 0; i < (sizeof(transports) / sizeof(struct Transport)); i++) {
+ GtkWidget *menuitem;
+
+ menuitem = gtk_menu_item_new_with_label(gettext(transports[i].name));
+ gtk_object_set_user_data(GTK_OBJECT(menuitem), &transports[i]);
+ gtk_signal_connect(GTK_OBJECT(menuitem), "activate",
+ GTK_SIGNAL_FUNC(transport_sel_cb), page);
+ gtk_widget_show(menuitem);
+ gtk_menu_append(GTK_MENU(transport_menu), menuitem);
+
+ if (config->transport == transports[i].transport) {
+ show_transport(page, &transports[i]);
+ active = i;
+ }
+ }
+ gtk_option_menu_set_menu(GTK_OPTION_MENU(transport), transport_menu);
+ gtk_option_menu_set_history(GTK_OPTION_MENU(transport), active);
+
+ page->page.widget = table;
}
static void spamassassin_destroy_widget_func(PrefsPage *_page)
config = spamassassin_get_config();
/* enable */
- config->enable = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->enable));
+ config->transport = page->trans;
/* hostname */
g_free(config->hostname);
/* port */
config->port = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(page->port));
+ /* hostname */
+ g_free(config->socket);
+ config->socket = gtk_editable_get_chars(GTK_EDITABLE(page->socket), 0, -1);
+
/* receive_spam */
config->receive_spam = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->receive_spam));
<widget>
<class>GtkTable</class>
- <name>table1</name>
+ <name>table</name>
<border_width>8</border_width>
- <rows>5</rows>
+ <rows>6</rows>
<columns>3</columns>
<homogeneous>False</homogeneous>
<row_spacing>4</row_spacing>
<widget>
<class>GtkLabel</class>
<name>label3</name>
- <label>Enable</label>
+ <label>Transport</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
</child>
</widget>
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox4</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkOptionMenu</class>
+ <name>transport</name>
+ <can_focus>True</can_focus>
+ <items></items>
+ <initial_choice>0</initial_choice>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>GtkNotebook</class>
+ <name>transport_notebook</name>
+ <show_tabs>False</show_tabs>
+ <show_border>False</show_border>
+ <tab_pos>GTK_POS_TOP</tab_pos>
+ <scrollable>False</scrollable>
+ <tab_hborder>2</tab_hborder>
+ <tab_vborder>2</tab_vborder>
+ <popup_enable>False</popup_enable>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>1</top_attach>
+ <bottom_attach>2</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox1</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>hostname</name>
+ <tooltip>Hostname or IP address of spamd server</tooltip>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>colon</name>
+ <label>:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0.5</xalign>
+ <yalign>0.5</yalign>
+ <xpad>8</xpad>
+ <ypad>0</ypad>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkSpinButton</class>
+ <name>port</name>
+ <width>64</width>
+ <tooltip>Port of spamd server</tooltip>
+ <can_focus>True</can_focus>
+ <climb_rate>1</climb_rate>
+ <digits>0</digits>
+ <numeric>True</numeric>
+ <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+ <snap>False</snap>
+ <wrap>False</wrap>
+ <value>783</value>
+ <lower>1</lower>
+ <upper>65535</upper>
+ <step>1</step>
+ <page>10</page>
+ <page_size>10</page_size>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+ </widget>
+ </widget>
+
+ <widget>
+ <class>Placeholder</class>
+ <child_name>Notebook:tab</child_name>
+ </widget>
+
+ <widget>
+ <class>GtkEntry</class>
+ <name>socket</name>
+ <tooltip>Path of Unix socket</tooltip>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ </widget>
+
+ <widget>
+ <class>Placeholder</class>
+ <child_name>Notebook:tab</child_name>
+ </widget>
+ </widget>
+
<widget>
<class>GtkLabel</class>
- <name>label6</name>
- <label>Maximum Size</label>
+ <name>label15</name>
+ <label>Timeout</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
+ <top_attach>5</top_attach>
+ <bottom_attach>6</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
</child>
</widget>
+ <widget>
+ <class>GtkHBox</class>
+ <name>hbox6</name>
+ <homogeneous>False</homogeneous>
+ <spacing>0</spacing>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>5</top_attach>
+ <bottom_attach>6</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>True</yfill>
+ </child>
+
+ <widget>
+ <class>GtkSpinButton</class>
+ <name>timeout</name>
+ <width>64</width>
+ <tooltip>Maximum size a message is allowed to have to be checked</tooltip>
+ <can_focus>True</can_focus>
+ <climb_rate>1</climb_rate>
+ <digits>0</digits>
+ <numeric>True</numeric>
+ <update_policy>GTK_UPDATE_ALWAYS</update_policy>
+ <snap>False</snap>
+ <wrap>False</wrap>
+ <value>60</value>
+ <lower>0</lower>
+ <upper>10000</upper>
+ <step>10</step>
+ <page>10</page>
+ <page_size>10</page_size>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>True</fill>
+ <pack>GTK_PACK_END</pack>
+ </child>
+ </widget>
+ </widget>
+
<widget>
<class>GtkLabel</class>
- <name>label8</name>
- <label>Save Folder</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
+ <name>label16</name>
+ <label>s</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<yalign>0.5</yalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
- <left_attach>0</left_attach>
- <right_attach>1</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>5</top_attach>
+ <bottom_attach>6</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<child>
<left_attach>0</left_attach>
<right_attach>1</right_attach>
- <top_attach>3</top_attach>
- <bottom_attach>4</bottom_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
</child>
</widget>
+ <widget>
+ <class>GtkCheckButton</class>
+ <name>receive_spam</name>
+ <tooltip>Save mails that where identified as spam to a folder</tooltip>
+ <can_focus>True</can_focus>
+ <label></label>
+ <active>False</active>
+ <draw_indicator>True</draw_indicator>
+ <child>
+ <left_attach>1</left_attach>
+ <right_attach>2</right_attach>
+ <top_attach>2</top_attach>
+ <bottom_attach>3</bottom_attach>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
+
<widget>
<class>GtkHBox</class>
- <name>hbox1</name>
+ <name>hbox3</name>
<homogeneous>False</homogeneous>
<spacing>0</spacing>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
- <top_attach>1</top_attach>
- <bottom_attach>2</bottom_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<yfill>True</yfill>
</child>
- <widget>
- <class>GtkEntry</class>
- <name>hostname</name>
- <tooltip>Hostname or IP address of spamd server</tooltip>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
-
- <widget>
- <class>GtkLabel</class>
- <name>label5</name>
- <label>:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0.5</xalign>
- <yalign>0.5</yalign>
- <xpad>8</xpad>
- <ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
-
<widget>
<class>GtkSpinButton</class>
- <name>port</name>
+ <name>max_size</name>
<width>64</width>
- <tooltip>Port of spamd server</tooltip>
+ <tooltip>Maximum size a message is allowed to have to be checked</tooltip>
<can_focus>True</can_focus>
<climb_rate>1</climb_rate>
<digits>0</digits>
<update_policy>GTK_UPDATE_ALWAYS</update_policy>
<snap>False</snap>
<wrap>False</wrap>
- <value>783</value>
- <lower>1</lower>
- <upper>65535</upper>
- <step>1</step>
+ <value>250</value>
+ <lower>0</lower>
+ <upper>10000</upper>
+ <step>10</step>
<page>10</page>
<page_size>10</page_size>
<child>
</widget>
<widget>
- <class>GtkCheckButton</class>
- <name>enable</name>
- <tooltip>Enable SpamAssassin filtering</tooltip>
- <can_focus>True</can_focus>
- <label></label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
+ <class>GtkLabel</class>
+ <name>label11</name>
+ <label>kB</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>0</top_attach>
- <bottom_attach>1</bottom_attach>
+ <left_attach>2</left_attach>
+ <right_attach>3</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
- <xexpand>True</xexpand>
+ <xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
</widget>
<widget>
- <class>GtkCheckButton</class>
- <name>receive_spam</name>
- <tooltip>Save mails that where identified as spam to a folder</tooltip>
- <can_focus>True</can_focus>
- <label></label>
- <active>False</active>
- <draw_indicator>True</draw_indicator>
+ <class>GtkLabel</class>
+ <name>label8</name>
+ <label>Save Folder</label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
<top_attach>3</top_attach>
<bottom_attach>4</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
- <xexpand>True</xexpand>
+ <xexpand>False</xexpand>
<yexpand>False</yexpand>
<xshrink>False</xshrink>
<yshrink>False</yshrink>
<child>
<left_attach>1</left_attach>
<right_attach>2</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>True</xexpand>
<child>
<left_attach>2</left_attach>
<right_attach>3</right_attach>
- <top_attach>4</top_attach>
- <bottom_attach>5</bottom_attach>
+ <top_attach>3</top_attach>
+ <bottom_attach>4</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<widget>
<class>GtkLabel</class>
- <name>label11</name>
- <label>kB</label>
+ <name>label6</name>
+ <label>Maximum Size</label>
<justify>GTK_JUSTIFY_CENTER</justify>
<wrap>False</wrap>
<xalign>0</xalign>
<xpad>0</xpad>
<ypad>0</ypad>
<child>
- <left_attach>2</left_attach>
- <right_attach>3</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>4</top_attach>
+ <bottom_attach>5</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
<xexpand>False</xexpand>
<yfill>False</yfill>
</child>
</widget>
-
- <widget>
- <class>GtkHBox</class>
- <name>hbox3</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
- <child>
- <left_attach>1</left_attach>
- <right_attach>2</right_attach>
- <top_attach>2</top_attach>
- <bottom_attach>3</bottom_attach>
- <xpad>0</xpad>
- <ypad>0</ypad>
- <xexpand>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>True</yfill>
- </child>
-
- <widget>
- <class>GtkSpinButton</class>
- <name>max_size</name>
- <width>64</width>
- <tooltip>Maximum size a message is allowed to have to be checked</tooltip>
- <can_focus>True</can_focus>
- <climb_rate>1</climb_rate>
- <digits>0</digits>
- <numeric>True</numeric>
- <update_policy>GTK_UPDATE_ALWAYS</update_policy>
- <snap>False</snap>
- <wrap>False</wrap>
- <value>250</value>
- <lower>0</lower>
- <upper>10000</upper>
- <step>10</step>
- <page>10</page>
- <page_size>10</page_size>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>True</fill>
- <pack>GTK_PACK_END</pack>
- </child>
- </widget>
- </widget>
</widget>
</widget>