diff options
author | Matthew Barnes <mbarnes@src.gnome.org> | 2009-02-10 10:51:52 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@src.gnome.org> | 2009-02-10 10:51:52 +0800 |
commit | de169b4feeeaf2013aa256ddf70276bacbd6542a (patch) | |
tree | 8c159911c1aa8a7bbd476f460fce436bfbdcdf36 /mail/mail-config.c | |
parent | 566f8f6208f1e12ad342517abf550df870f07f2e (diff) | |
download | gsoc2013-evolution-de169b4feeeaf2013aa256ddf70276bacbd6542a.tar.gz gsoc2013-evolution-de169b4feeeaf2013aa256ddf70276bacbd6542a.tar.zst gsoc2013-evolution-de169b4feeeaf2013aa256ddf70276bacbd6542a.zip |
Rewrite the signature management UI from top to bottom.
- Break the UI out of Glade and into small, manageable widgets:
ESignatureEditor (moved from mail to widgets/misc)
ESignatureManager
ESignatureTreeView
ESignatureScriptDialog
- Move several signature utilities to e-util/e-signature-utils.c so
they're accessible from widgets/misc without introducing circular
dependences.
- Have EMailShellModule listen for new GtkhtmlEditor windows (from which
EMsgComposer and ESignatureEditor are derived) and configure the window
with spelling and HTML editing user preferences.
- Drastically simplifies em-composer-prefs.c.
svn path=/branches/kill-bonobo/; revision=37239
Diffstat (limited to 'mail/mail-config.c')
-rw-r--r-- | mail/mail-config.c | 60 |
1 files changed, 0 insertions, 60 deletions
diff --git a/mail/mail-config.c b/mail/mail-config.c index 2186ce0e21..a7e8bb908c 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -953,66 +953,6 @@ mail_config_folder_to_cachename (CamelFolder *folder, const char *prefix) return filename; } -static char * -get_new_signature_filename (void) -{ - const char *base_directory; - char *filename, *id; - struct stat st; - int i; - - base_directory = e_get_user_data_dir (); - filename = g_build_filename (base_directory, "signatures", NULL); - if (g_lstat (filename, &st)) { - if (errno == ENOENT) { - if (g_mkdir (filename, 0700)) - g_warning ("Fatal problem creating %s directory.", filename); - } else - g_warning ("Fatal problem with %s directory.", filename); - } - g_free (filename); - - filename = g_malloc (strlen (base_directory) + sizeof ("/signatures/signature-") + 12); - id = g_stpcpy (filename, base_directory); - id = g_stpcpy (id, "/signatures/signature-"); - - for (i = 0; i < (INT_MAX - 1); i++) { - sprintf (id, "%d", i); - if (g_lstat (filename, &st) == -1 && errno == ENOENT) { - int fd; - - fd = g_creat (filename, 0600); - if (fd >= 0) { - close (fd); - return filename; - } - } - } - - g_free (filename); - - return NULL; -} - - -ESignature * -mail_config_signature_new (const char *filename, gboolean script, gboolean html) -{ - ESignature *sig; - - sig = e_signature_new (); - sig->name = g_strdup (_("Unnamed")); - sig->script = script; - sig->html = html; - - if (filename == NULL) - sig->filename = get_new_signature_filename (); - else - sig->filename = g_strdup (filename); - - return sig; -} - void mail_config_reload_junk_headers (void) { |