aboutsummaryrefslogtreecommitdiffstats
path: root/modules/mail-config
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-10-18 01:48:17 +0800
committerMilan Crha <mcrha@redhat.com>2012-10-18 01:48:17 +0800
commitf2642ef7074669502325f8f9210ad04d29432190 (patch)
tree8d63cc5cf772ca80992e9e532853762c2fffc326 /modules/mail-config
parent9eebb9509730bb740ee5625699954ba473fdc8e7 (diff)
downloadgsoc2013-evolution-f2642ef7074669502325f8f9210ad04d29432190.tar
gsoc2013-evolution-f2642ef7074669502325f8f9210ad04d29432190.tar.gz
gsoc2013-evolution-f2642ef7074669502325f8f9210ad04d29432190.tar.bz2
gsoc2013-evolution-f2642ef7074669502325f8f9210ad04d29432190.tar.lz
gsoc2013-evolution-f2642ef7074669502325f8f9210ad04d29432190.tar.xz
gsoc2013-evolution-f2642ef7074669502325f8f9210ad04d29432190.tar.zst
gsoc2013-evolution-f2642ef7074669502325f8f9210ad04d29432190.zip
Bug #201807 - Cannot specify sendmail parameters
Diffstat (limited to 'modules/mail-config')
-rw-r--r--modules/mail-config/e-mail-config-sendmail-backend.c58
1 files changed, 58 insertions, 0 deletions
diff --git a/modules/mail-config/e-mail-config-sendmail-backend.c b/modules/mail-config/e-mail-config-sendmail-backend.c
index 969e710d07..4487406811 100644
--- a/modules/mail-config/e-mail-config-sendmail-backend.c
+++ b/modules/mail-config/e-mail-config-sendmail-backend.c
@@ -42,7 +42,11 @@ mail_config_sendmail_backend_insert_widgets (EMailConfigServiceBackend *backend,
GtkWidget *container;
GtkWidget *use_custom_binary_check;
GtkWidget *custom_binary_entry;
+ GtkWidget *use_custom_args_check;
+ GtkWidget *custom_args_entry;
gchar *markup;
+ PangoAttribute *attr;
+ PangoAttrList *attr_list;
settings = e_mail_config_service_backend_get_settings (backend);
@@ -83,6 +87,43 @@ mail_config_sendmail_backend_insert_widgets (EMailConfigServiceBackend *backend,
label, "sensitive",
G_BINDING_SYNC_CREATE);
+ widget = gtk_check_button_new_with_mnemonic (_("U_se custom arguments"));
+ gtk_grid_attach (GTK_GRID (container), widget, 0, 2, 2, 1);
+ use_custom_args_check = widget;
+
+ widget = gtk_label_new_with_mnemonic (_("Cus_tom arguments:"));
+ gtk_widget_set_margin_left (widget, 12);
+ gtk_grid_attach (GTK_GRID (container), widget, 0, 3, 1, 1);
+ label = GTK_LABEL (widget);
+
+ widget = gtk_entry_new ();
+ gtk_label_set_mnemonic_widget (label, widget);
+ gtk_widget_set_halign (widget, GTK_ALIGN_FILL);
+ gtk_widget_set_hexpand (widget, TRUE);
+ gtk_grid_attach (GTK_GRID (container), widget, 1, 3, 1, 1);
+ custom_args_entry = widget;
+
+ g_object_bind_property (
+ use_custom_args_check, "active",
+ label, "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ widget = gtk_label_new (_(
+ "Default arguments are '-i -f %F -- %R', where\n"
+ " %F - stands for the From address\n"
+ " %R - stands for the recipient addresses"));
+ gtk_widget_set_halign (widget, GTK_ALIGN_FILL);
+ gtk_widget_set_hexpand (widget, TRUE);
+ gtk_misc_set_alignment (GTK_MISC (widget), 0.0, 0.0);
+ gtk_label_set_selectable (GTK_LABEL (widget), TRUE);
+ gtk_grid_attach (GTK_GRID (container), widget, 1, 4, 1, 1);
+
+ attr_list = pango_attr_list_new ();
+ attr = pango_attr_style_new (PANGO_STYLE_ITALIC);
+ pango_attr_list_insert (attr_list, attr);
+ gtk_label_set_attributes (GTK_LABEL (widget), attr_list);
+ pango_attr_list_unref (attr_list);
+
g_object_bind_property (
use_custom_binary_check, "active",
custom_binary_entry, "sensitive",
@@ -100,6 +141,23 @@ mail_config_sendmail_backend_insert_widgets (EMailConfigServiceBackend *backend,
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
+ g_object_bind_property (
+ use_custom_args_check, "active",
+ custom_args_entry, "sensitive",
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ settings, "use-custom-args",
+ use_custom_args_check, "active",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+
+ g_object_bind_property (
+ settings, "custom-args",
+ custom_args_entry, "text",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+
gtk_widget_show_all (container);
}