aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorRadek Doulik <rodo@src.gnome.org>2002-06-08 02:10:39 +0800
committerRadek Doulik <rodo@src.gnome.org>2002-06-08 02:10:39 +0800
commitf2db905c7b375202e631278d92882cd3bbe16c25 (patch)
tree9d82a31a80575f0f9f03fdf581ca63d4513f3783 /mail
parentb84f0a894bcdd5487fc678d1ea036945508278ad (diff)
downloadgsoc2013-evolution-f2db905c7b375202e631278d92882cd3bbe16c25.tar.gz
gsoc2013-evolution-f2db905c7b375202e631278d92882cd3bbe16c25.tar.zst
gsoc2013-evolution-f2db905c7b375202e631278d92882cd3bbe16c25.zip
script signatures
svn path=/trunk/; revision=17144
Diffstat (limited to 'mail')
-rw-r--r--mail/mail-account-gui.c2
-rw-r--r--mail/mail-composer-prefs.c113
-rw-r--r--mail/mail-composer-prefs.h4
-rw-r--r--mail/mail-config.c90
-rw-r--r--mail/mail-config.glade288
-rw-r--r--mail/mail-config.h4
6 files changed, 310 insertions, 191 deletions
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 914b7d1cdf..c89c71180f 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -1253,7 +1253,7 @@ sig_add_new_signature (GtkWidget *w, MailAccountGui *gui)
sig_switch_to_list (w, gui);
- gui->def_signature = mail_composer_prefs_new_signature (NULL, FALSE);
+ gui->def_signature = mail_composer_prefs_new_signature (NULL, TRUE, NULL);
gui->auto_signature = FALSE;
gtk_option_menu_set_history (GTK_OPTION_MENU (gui->sig_option_menu), sig_gui_get_index (gui));
diff --git a/mail/mail-composer-prefs.c b/mail/mail-composer-prefs.c
index dad26a0b13..88b4b58405 100644
--- a/mail/mail-composer-prefs.c
+++ b/mail/mail-composer-prefs.c
@@ -167,20 +167,6 @@ option_menu_connect (GtkOptionMenu *omenu, gpointer user_data)
}
static void
-run_script (char *script)
-{
- struct stat st;
-
- if (stat (script, &st))
- return;
-
- if (!S_ISREG (st.st_mode) || !(st.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR)))
- return;
-
- mail_config_signature_run_script (script);
-}
-
-static void
sig_load_preview (MailComposerPrefs *prefs, MailConfigSignature *sig)
{
char *str;
@@ -189,8 +175,11 @@ sig_load_preview (MailComposerPrefs *prefs, MailConfigSignature *sig)
gtk_html_load_from_string (GTK_HTML (prefs->sig_preview), " ", 1);
return;
}
-
- str = e_msg_composer_get_sig_file_content (sig->filename, sig->html);
+
+ if (sig->script)
+ str = mail_config_signature_run_script (sig->script);
+ else
+ str = e_msg_composer_get_sig_file_content (sig->filename, sig->html);
if (!str)
str = g_strdup (" ");
@@ -213,13 +202,6 @@ sig_load_preview (MailComposerPrefs *prefs, MailConfigSignature *sig)
g_free (str);
}
-static void
-sig_write_and_update_preview (MailComposerPrefs *prefs, MailConfigSignature *sig)
-{
- sig_load_preview (prefs, sig);
- mail_config_signature_write (sig);
-}
-
static MailConfigSignature *
sig_current_sig (MailComposerPrefs *prefs)
{
@@ -239,16 +221,23 @@ sig_edit (GtkWidget *widget, MailComposerPrefs *prefs)
}
MailConfigSignature *
-mail_composer_prefs_new_signature (MailComposerPrefs *prefs, gboolean html)
+mail_composer_prefs_new_signature (MailComposerPrefs *prefs, gboolean html, const gchar *script)
{
MailConfigSignature *sig;
char *name [1];
int row;
- sig = mail_config_signature_add (html);
+ sig = mail_config_signature_add (html, script);
if (prefs) {
name [0] = e_utf8_to_gtk_string (GTK_WIDGET (prefs->sig_clist), sig->name);
+ if (sig->script) {
+ gchar *tmp;
+
+ tmp = name [0];
+ name [0] = g_strconcat (name [0], _(" [script]"), NULL);
+ g_free (tmp);
+ }
row = gtk_clist_append (prefs->sig_clist, name);
gtk_clist_set_row_data (prefs->sig_clist, row, sig);
gtk_clist_select_row (GTK_CLIST (prefs->sig_clist), row, 0);
@@ -282,7 +271,47 @@ sig_delete (GtkWidget *widget, MailComposerPrefs *prefs)
static void
sig_add (GtkWidget *widget, MailComposerPrefs *prefs)
{
- mail_composer_prefs_new_signature (prefs, FALSE);
+ mail_composer_prefs_new_signature (prefs, TRUE, NULL);
+}
+
+static void
+sig_add_script_add (GtkWidget *widget, MailComposerPrefs *prefs)
+{
+ gchar *script, *name;
+
+ script = gtk_entry_get_text (GTK_ENTRY (gnome_file_entry_gtk_entry
+ (GNOME_FILE_ENTRY (glade_xml_get_widget (prefs->sig_script_gui,
+ "fileentry_add_script_script")))));
+ name = e_utf8_gtk_entry_get_text (GTK_ENTRY (glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name")));
+ if (script && *script) {
+ struct stat st;
+
+ if (!stat (script, &st)
+ && S_ISREG (st.st_mode) && (st.st_mode & (S_IXOTH | S_IXGRP | S_IXUSR))) {
+ MailConfigSignature *sig;
+
+ sig = mail_composer_prefs_new_signature (prefs, TRUE, script);
+ mail_config_signature_set_name (sig, name);
+ g_free (name);
+ gtk_widget_hide (prefs->sig_script_dialog);
+
+ return;
+ }
+ }
+ gnome_dialog_run_and_close (GNOME_DIALOG (gnome_ok_dialog_parented (_("Please specify a valid script name"),
+ GTK_WINDOW (prefs->sig_script_dialog))));
+}
+
+static void
+sig_add_script (GtkWidget *widget, MailComposerPrefs *prefs)
+{
+ GtkWidget *entry;
+
+ entry = glade_xml_get_widget (prefs->sig_script_gui, "entry_add_script_name");
+ gtk_entry_set_text (GTK_ENTRY (entry), _("Unnamed"));
+
+ gtk_widget_show_all (prefs->sig_script_dialog);
+ gdk_window_raise (prefs->sig_script_dialog->window);
}
static void
@@ -312,12 +341,19 @@ static void
sig_fill_clist (GtkCList *clist)
{
GList *l;
- char *name [1];
+ gchar *name [1];
int row;
gtk_clist_freeze (clist);
for (l = mail_config_get_signature_list (); l; l = l->next) {
name [0] = e_utf8_to_gtk_string (GTK_WIDGET (clist), ((MailConfigSignature *) l->data)->name);
+ if (((MailConfigSignature *) l->data)->script) {
+ gchar *tmp;
+
+ tmp = name [0];
+ name [0] = g_strconcat (name [0], _(" [script]"), NULL);
+ g_free (tmp);
+ }
row = gtk_clist_append (clist, name);
gtk_clist_set_row_data (clist, row, l->data);
g_free (name [0]);
@@ -355,10 +391,19 @@ url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle)
static void
sig_event_client (MailConfigSigEvent event, MailConfigSignature *sig, MailComposerPrefs *prefs)
{
+ gchar *tmp, *tmp1;
+
switch (event) {
case MAIL_CONFIG_SIG_EVENT_NAME_CHANGED:
printf ("accounts NAME CHANGED\n");
- gtk_clist_set_text (GTK_CLIST (prefs->sig_clist), sig->id, 0, sig->name);
+ tmp = e_utf8_to_gtk_string (GTK_WIDGET (prefs->sig_clist), sig->name);
+ if (sig->script) {
+ tmp1 = tmp;
+ tmp = g_strconcat (tmp, _(" [script]"), NULL);
+ g_free (tmp1);
+ }
+ gtk_clist_set_text (GTK_CLIST (prefs->sig_clist), sig->id, 0, tmp);
+ g_free (tmp);
if (sig == sig_current_sig (prefs)) {
prefs->sig_switch = TRUE;
/*e_utf8_gtk_entry_set_text (GTK_ENTRY (prefs->sig_name), sig->name);*/
@@ -727,6 +772,7 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs)
gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "composer_tab");
prefs->gui = gui;
+ prefs->sig_script_gui = glade_xml_new (EVOLUTION_GLADEDIR "/mail-config.glade", "vbox_add_script_signature");
/* get our toplevel widget */
toplevel = glade_xml_get_widget (gui, "toplevel");
@@ -805,7 +851,16 @@ mail_composer_prefs_construct (MailComposerPrefs *prefs)
prefs->sig_add = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureAdd"));
gtk_signal_connect (GTK_OBJECT (prefs->sig_add), "clicked",
GTK_SIGNAL_FUNC (sig_add), prefs);
-
+
+ prefs->sig_script_dialog = gnome_dialog_new (_("Add script signature"),
+ _("Add Signature"), GNOME_STOCK_BUTTON_CANCEL, NULL);
+ gnome_dialog_close_hides (GNOME_DIALOG (prefs->sig_script_dialog), TRUE);
+ gtk_box_pack_start_defaults (GTK_BOX (GNOME_DIALOG (prefs->sig_script_dialog)->vbox),
+ glade_xml_get_widget (prefs->sig_script_gui, "vbox_add_script_signature"));
+ gnome_dialog_button_connect (GNOME_DIALOG (prefs->sig_script_dialog), 0, sig_add_script_add, prefs);
+
+ glade_xml_signal_connect_data (gui, "cmdSignatureAddScriptClicked", sig_add_script, prefs);
+
prefs->sig_edit = GTK_BUTTON (glade_xml_get_widget (gui, "cmdSignatureEdit"));
gtk_signal_connect (GTK_OBJECT (prefs->sig_edit), "clicked",
GTK_SIGNAL_FUNC (sig_edit), prefs);
diff --git a/mail/mail-composer-prefs.h b/mail/mail-composer-prefs.h
index 885baa6f9c..2eb1a7b166 100644
--- a/mail/mail-composer-prefs.h
+++ b/mail/mail-composer-prefs.h
@@ -105,6 +105,8 @@ struct _MailComposerPrefs {
GtkHTML *sig_preview;
gboolean sig_switch;
int sig_row;
+ GladeXML *sig_script_gui;
+ GtkWidget *sig_script_dialog;
};
struct _MailComposerPrefsClass {
@@ -122,7 +124,7 @@ GtkWidget *mail_composer_prefs_new (void);
void mail_composer_prefs_apply (MailComposerPrefs *prefs);
-MailConfigSignature *mail_composer_prefs_new_signature (MailComposerPrefs *prefs, gboolean html);
+MailConfigSignature *mail_composer_prefs_new_signature (MailComposerPrefs *prefs, gboolean html, const gchar *script);
/* needed by global config */
#define MAIL_COMPOSER_PREFS_CONTROL_ID "OAFIID:GNOME_Evolution_Mail_ComposerPrefs_ConfigControl"
diff --git a/mail/mail-config.c b/mail/mail-config.c
index 7e0d4095d6..0a6bf6ed95 100644
--- a/mail/mail-config.c
+++ b/mail/mail-config.c
@@ -2801,7 +2801,7 @@ get_new_signature_filename ()
}
MailConfigSignature *
-mail_config_signature_add (gboolean html)
+mail_config_signature_add (gboolean html, const gchar *script)
{
MailConfigSignature *sig;
@@ -2809,8 +2809,11 @@ mail_config_signature_add (gboolean html)
/* printf ("mail_config_signature_add %d\n", config->signatures); */
sig->id = config->signatures;
- sig->name = g_strdup (_("Unnamed"));
- sig->filename = get_new_signature_filename ();
+ sig->name = g_strdup (U_("Unnamed"));
+ if (script)
+ sig->script = g_strdup (script);
+ else
+ sig->filename = get_new_signature_filename ();
sig->html = html;
config->signature_list = g_list_append (config->signature_list, sig);
@@ -2947,21 +2950,78 @@ mail_config_signature_emit_event (MailConfigSigEvent event, MailConfigSignature
}
}
-void
+gchar *
mail_config_signature_run_script (gchar *script)
{
- if (script) {
- gchar *argv[2];
- gint pid, status;
+ int result, status;
+ int in_fds[2];
+ pid_t pid;
+
+ if (pipe (in_fds) == -1) {
+ g_warning ("Failed to create pipe to '%s': %s", script, g_strerror (errno));
+ return NULL;
+ }
+
+ if (!(pid = fork ())) {
+ /* child process */
+ int maxfd, i;
- printf ("running script %s\n", script);
- argv [0] = script;
- argv [1] = NULL;
- pid = gnome_execute_async (NULL, 1, argv);
- if (pid < 0)
- gnome_error_dialog (_("Cannot execute signature script"));
- else
- waitpid (pid, &status, 0);
+ close (in_fds [0]);
+ if (dup2 (in_fds[1], STDOUT_FILENO) < 0)
+ _exit (255);
+ close (in_fds [1]);
+
+ setsid ();
+
+ maxfd = sysconf (_SC_OPEN_MAX);
+ if (maxfd > 0) {
+ for (i = 0; i < maxfd; i++) {
+ if (i != STDIN_FILENO && i != STDOUT_FILENO && i != STDERR_FILENO)
+ close (i);
+ }
+ }
+
+
+ execlp (script, NULL);
+ g_warning ("Could not execute %s: %s\n", script, g_strerror (errno));
+ _exit (255);
+ } else if (pid < 0) {
+ g_warning ("Failed to create create child process '%s': %s", script, g_strerror (errno));
+ return NULL;
+ } else {
+#define BUFFER_SIZE 4096
+ GString *str = g_string_new (NULL);
+ gchar *rv;
+ gchar buffer [BUFFER_SIZE];
+ ssize_t rb;
+
+ /* parent process */
+ close (in_fds[1]);
+ while ((rb = read (in_fds [0], buffer, BUFFER_SIZE - 1)) > 0) {
+ buffer [rb] = 0;
+ g_string_append (str, buffer);
+ }
+
+ close (in_fds [0]);
+ result = waitpid (pid, &status, 0);
+
+ if (result == -1 && errno == EINTR) {
+ /* child process is hanging... */
+ kill (pid, SIGTERM);
+ sleep (1);
+ result = waitpid (pid, &status, WNOHANG);
+ if (result == 0) {
+ /* ...still hanging, set phasers to KILL */
+ kill (pid, SIGKILL);
+ sleep (1);
+ result = waitpid (pid, &status, WNOHANG);
+ }
+ }
+
+ rv = str->str;
+ g_string_free (str, FALSE);
+
+ return rv;
}
}
diff --git a/mail/mail-config.glade b/mail/mail-config.glade
index 1dc55654f1..ef84672b4a 100644
--- a/mail/mail-config.glade
+++ b/mail/mail-config.glade
@@ -4207,6 +4207,11 @@ Baltic (ISO-8859-4)
<name>cmdSignatureAddScript</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
+ <signal>
+ <name>clicked</name>
+ <handler>cmdSignatureAddScriptClicked</handler>
+ <last_modification_time>Thu, 06 Jun 2002 18:28:43 GMT</last_modification_time>
+ </signal>
<label>Add Sc_ript</label>
<relief>GTK_RELIEF_NORMAL</relief>
</widget>
@@ -4918,15 +4923,15 @@ Baltic (ISO-8859-4)
<widget>
<class>GtkButton</class>
- <name>button4</name>
+ <name>button_add_script_add</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
- <label>Add signature</label>
+ <label>_Add Signature</label>
</widget>
<widget>
<class>GtkButton</class>
- <name>button5</name>
+ <name>button_add_script_cancel</name>
<can_default>True</can_default>
<can_focus>True</can_focus>
<stock_button>GNOME_STOCK_BUTTON_CANCEL</stock_button>
@@ -4945,12 +4950,11 @@ Baltic (ISO-8859-4)
</child>
<widget>
- <class>GtkFrame</class>
- <name>frame5</name>
+ <class>GtkVBox</class>
+ <name>vbox_add_script_signature</name>
<border_width>3</border_width>
- <label>Signature information</label>
- <label_xalign>0</label_xalign>
- <shadow_type>GTK_SHADOW_ETCHED_IN</shadow_type>
+ <homogeneous>False</homogeneous>
+ <spacing>7</spacing>
<child>
<padding>0</padding>
<expand>True</expand>
@@ -4958,174 +4962,172 @@ Baltic (ISO-8859-4)
</child>
<widget>
- <class>GtkVBox</class>
- <name>vbox161</name>
+ <class>GtkHBox</class>
+ <name>hbox171</name>
<border_width>3</border_width>
<homogeneous>False</homogeneous>
<spacing>3</spacing>
+ <child>
+ <padding>0</padding>
+ <expand>False</expand>
+ <fill>False</fill>
+ </child>
<widget>
- <class>GtkHBox</class>
- <name>hbox171</name>
- <homogeneous>False</homogeneous>
- <spacing>0</spacing>
+ <class>GnomePixmap</class>
+ <name>pixmap1</name>
+ <filename>info.png</filename>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
+ </widget>
+
+ <widget>
+ <class>GtkLabel</class>
+ <name>label456</name>
+ <label>The output of this script will be used as your
+signature. The name you specify will be used
+for display purposes only. </label>
+ <justify>GTK_JUSTIFY_LEFT</justify>
+ <wrap>True</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
<child>
<padding>0</padding>
<expand>False</expand>
<fill>False</fill>
</child>
+ </widget>
+ </widget>
- <widget>
- <class>GnomePixmap</class>
- <name>pixmap1</name>
- <filename>info.png</filename>
- <child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
- </child>
- </widget>
+ <widget>
+ <class>GtkTable</class>
+ <name>table9</name>
+ <border_width>3</border_width>
+ <rows>2</rows>
+ <columns>2</columns>
+ <homogeneous>False</homogeneous>
+ <row_spacing>3</row_spacing>
+ <column_spacing>3</column_spacing>
+ <child>
+ <padding>0</padding>
+ <expand>True</expand>
+ <fill>True</fill>
+ </child>
- <widget>
- <class>GtkLabel</class>
- <name>label456</name>
- <label>Type the name to which you would like to refer to this signature into Name entry.
-Enter the filename of the script which you want to use to generate your signature into Script entry. Standard output of this script will be used.</label>
- <justify>GTK_JUSTIFY_LEFT</justify>
- <wrap>True</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
+ <widget>
+ <class>GtkLabel</class>
+ <name>label459</name>
+ <label>_Name:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>entry_add_script_name</default_focus_target>
+ <child>
+ <left_attach>0</left_attach>
+ <right_attach>1</right_attach>
+ <top_attach>0</top_attach>
+ <bottom_attach>1</bottom_attach>
<xpad>0</xpad>
<ypad>0</ypad>
- <child>
- <padding>0</padding>
- <expand>False</expand>
- <fill>False</fill>
- </child>
- </widget>
+ <xexpand>False</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
</widget>
<widget>
- <class>GtkTable</class>
- <name>table9</name>
- <rows>2</rows>
- <columns>2</columns>
- <homogeneous>False</homogeneous>
- <row_spacing>3</row_spacing>
- <column_spacing>3</column_spacing>
+ <class>GtkLabel</class>
+ <name>label460</name>
+ <label>_Script:</label>
+ <justify>GTK_JUSTIFY_CENTER</justify>
+ <wrap>False</wrap>
+ <xalign>0</xalign>
+ <yalign>0.5</yalign>
+ <xpad>0</xpad>
+ <ypad>0</ypad>
+ <default_focus_target>combo-entry2</default_focus_target>
<child>
- <padding>0</padding>
- <expand>True</expand>
- <fill>True</fill>
+ <left_attach>0</left_attach>
+ <right_attach>1</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>False</yfill>
</child>
+ </widget>
- <widget>
- <class>GtkLabel</class>
- <name>label459</name>
- <label>Name:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
+ <widget>
+ <class>GtkEntry</class>
+ <name>entry_add_script_name</name>
+ <can_focus>True</can_focus>
+ <editable>True</editable>
+ <text_visible>True</text_visible>
+ <text_max_length>0</text_max_length>
+ <text></text>
+ <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>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</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>False</yfill>
- </child>
- </widget>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
+ </widget>
- <widget>
- <class>GtkLabel</class>
- <name>label460</name>
- <label>Script:</label>
- <justify>GTK_JUSTIFY_CENTER</justify>
- <wrap>False</wrap>
- <xalign>0</xalign>
- <yalign>0.5</yalign>
+ <widget>
+ <class>GnomeFileEntry</class>
+ <name>fileentry_add_script_script</name>
+ <history_id>evolution_script_signature</history_id>
+ <max_saved>10</max_saved>
+ <directory>False</directory>
+ <modal>False</modal>
+ <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>
- <child>
- <left_attach>0</left_attach>
- <right_attach>1</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>False</yfill>
- </child>
- </widget>
+ <xexpand>True</xexpand>
+ <yexpand>False</yexpand>
+ <xshrink>False</xshrink>
+ <yshrink>False</yshrink>
+ <xfill>True</xfill>
+ <yfill>False</yfill>
+ </child>
<widget>
<class>GtkEntry</class>
- <name>entry1</name>
+ <child_name>GnomeEntry:entry</child_name>
+ <name>combo-entry2</name>
<can_focus>True</can_focus>
<editable>True</editable>
<text_visible>True</text_visible>
<text_max_length>0</text_max_length>
<text></text>
- <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>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
- </widget>
-
- <widget>
- <class>GnomeFileEntry</class>
- <name>fileentry1</name>
- <max_saved>10</max_saved>
- <directory>False</directory>
- <modal>False</modal>
- <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>True</xexpand>
- <yexpand>False</yexpand>
- <xshrink>False</xshrink>
- <yshrink>False</yshrink>
- <xfill>True</xfill>
- <yfill>False</yfill>
- </child>
-
- <widget>
- <class>GtkEntry</class>
- <child_name>GnomeEntry:entry</child_name>
- <name>combo-entry2</name>
- <can_focus>True</can_focus>
- <editable>True</editable>
- <text_visible>True</text_visible>
- <text_max_length>0</text_max_length>
- <text></text>
- </widget>
</widget>
</widget>
</widget>
diff --git a/mail/mail-config.h b/mail/mail-config.h
index b92d917bd4..0a100be221 100644
--- a/mail/mail-config.h
+++ b/mail/mail-config.h
@@ -284,7 +284,7 @@ gboolean mail_config_check_service (const char *url, CamelProviderType type, GLi
gboolean evolution_mail_config_factory_init (void);
GList * mail_config_get_signature_list (void);
-MailConfigSignature *mail_config_signature_add (gboolean html);
+MailConfigSignature *mail_config_signature_add (gboolean html, const gchar *script);
void mail_config_signature_delete (MailConfigSignature *sig);
void mail_config_signature_write (MailConfigSignature *sig);
void mail_config_signature_set_name (MailConfigSignature *sig, const gchar *name);
@@ -306,7 +306,7 @@ void mail_config_signature_unregister_client (MailConfigSignatureClient client,
void mail_config_signature_emit_event (MailConfigSigEvent event, MailConfigSignature *sig);
void mail_config_write_account_sig (MailConfigAccount *account, gint i);
-void mail_config_signature_run_script (gchar *script);
+gchar * mail_config_signature_run_script (gchar *script);
gboolean mail_config_get_show_signature_info (void);
void mail_config_set_show_signature_info (gboolean show);