diff options
author | Radek Doulik <rodo@ximian.com> | 2002-03-09 05:36:47 +0800 |
---|---|---|
committer | Radek Doulik <rodo@src.gnome.org> | 2002-03-09 05:36:47 +0800 |
commit | e4e819b0ae44665678aa2ff08635be6e5090c004 (patch) | |
tree | e615516ced80829d725cfaa246369ad3dd1cfa1e /mail/mail-signature-editor.c | |
parent | 8e3b9f653a1ef264d43f2855ee13c752c2c78b52 (diff) | |
download | gsoc2013-evolution-e4e819b0ae44665678aa2ff08635be6e5090c004.tar.gz gsoc2013-evolution-e4e819b0ae44665678aa2ff08635be6e5090c004.tar.zst gsoc2013-evolution-e4e819b0ae44665678aa2ff08635be6e5090c004.zip |
handle name changed event (sig_load_preview): don't run script before each
2002-03-08 Radek Doulik <rodo@ximian.com>
* mail-accounts.c (sig_event_client): handle name changed event
(sig_load_preview): don't run script before each reload
(sig_script_activate): run script only if script entry is
activated
* mail-signature-editor.c (mail_signature_editor): added signature
name entry
svn path=/trunk/; revision=15989
Diffstat (limited to 'mail/mail-signature-editor.c')
-rw-r--r-- | mail/mail-signature-editor.c | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/mail/mail-signature-editor.c b/mail/mail-signature-editor.c index 45821a1028..58c18639c7 100644 --- a/mail/mail-signature-editor.c +++ b/mail/mail-signature-editor.c @@ -2,6 +2,7 @@ #include <bonobo/bonobo-stream-memory.h> #include <gal/widgets/e-gui-utils.h> +#include <gal/widgets/e-unicode.h> #include "e-msg-composer.h" #include "mail-signature-editor.h" @@ -14,6 +15,7 @@ struct _ESignatureEditor { GtkWidget *win; GtkWidget *control; + GtkWidget *name_entry; MailConfigSignature *sig; @@ -225,6 +227,12 @@ load_signature (ESignatureEditor *editor) } } +static void +sig_name_changed (GtkWidget *w, ESignatureEditor *editor) +{ + mail_config_signature_set_name (editor->sig, e_utf8_gtk_entry_get_text (GTK_ENTRY (editor->name_entry))); +} + void mail_signature_editor (MailConfigSignature *sig) { @@ -232,6 +240,7 @@ mail_signature_editor (MailConfigSignature *sig) ESignatureEditor *editor; BonoboUIComponent *component; BonoboUIContainer *container; + GtkWidget *vbox, *hbox, *label; gchar *title; if (!sig->filename || !*sig->filename) @@ -274,7 +283,19 @@ mail_signature_editor (MailConfigSignature *sig) gtk_signal_connect (GTK_OBJECT (editor->win), "delete_event", GTK_SIGNAL_FUNC (delete_event_cb), editor); - bonobo_window_set_contents (BONOBO_WINDOW (editor->win), editor->control); + vbox = gtk_vbox_new (FALSE, 0); + hbox = gtk_hbox_new (FALSE, 0); + label = gtk_label_new (_("Signature name:")); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, TRUE, 4); + editor->name_entry = gtk_entry_new (); + e_utf8_gtk_entry_set_text (GTK_ENTRY (editor->name_entry), sig->name); + gtk_signal_connect (GTK_OBJECT (editor->name_entry), "changed", GTK_SIGNAL_FUNC (sig_name_changed), editor); + gtk_box_pack_start_defaults (GTK_BOX (hbox), editor->name_entry); + gtk_box_pack_start (GTK_BOX (vbox), hbox, FALSE, TRUE, 3); + gtk_widget_show_all (vbox); + gtk_box_pack_start_defaults (GTK_BOX (vbox), editor->control); + + bonobo_window_set_contents (BONOBO_WINDOW (editor->win), vbox); bonobo_widget_set_property (BONOBO_WIDGET (editor->control), "FormatHTML", sig->html, NULL); gtk_widget_show (GTK_WIDGET (editor->win)); gtk_widget_show (GTK_WIDGET (editor->control)); |