[Evolution-hackers] Questions for bug #127529
- From: Matthew Martin <mtt martin gmail com>
- To: evolution-hackers gnome org
- Subject: [Evolution-hackers] Questions for bug #127529
- Date: Mon, 01 Jan 2007 21:55:15 -0600
I'm working on bug #127529. I have a couple of questions. The first one
is where to put the menu items. The other one is how I should save the
settings for the default new message and default reply
reply(http://www.gnome.org/bounties/Mailer.html#127529). I have a
patch of what I've done so far attached to this email. It makes three
items on the popup menu, and a save template option in the composer. The
popup items don't do anything.
diff -upr .orig/evolution/composer/e-msg-composer.c evolution/composer/e-msg-composer.c
--- .orig/evolution/composer/e-msg-composer.c 2006-09-18 12:21:36.000000000 -0500
+++ evolution/composer/e-msg-composer.c 2007-01-01 16:22:02.000000000 -0600
@@ -142,6 +142,7 @@ struct _EMsgComposerClass {
void (* send) (EMsgComposer *composer);
void (* save_draft) (EMsgComposer *composer, int quit);
+ void (* save_template) (EMsgComposer *composer, int quit);
};
@@ -226,6 +227,7 @@ struct _EMsgComposerPrivate {
enum {
SEND,
SAVE_DRAFT,
+ SAVE_TEMPLATE,
LAST_SIGNAL
};
@@ -1471,6 +1473,9 @@ autosave_load_draft (const char *filenam
g_signal_connect (GTK_OBJECT (composer), "save-draft",
G_CALLBACK (em_utils_composer_save_draft_cb), NULL);
+
+ g_signal_connect (GTK_OBJECT (composer), "save-template",
+ G_CALLBACK (em_utils_composer_save_template_cb), NULL);
gtk_widget_show (GTK_WIDGET (composer));
}
@@ -1667,6 +1672,14 @@ menu_file_save_draft_cb (BonoboUICompone
e_msg_composer_unset_autosaved (E_MSG_COMPOSER (data));
}
+static void
+menu_file_save_template_cb (BonoboUIComponent *uic, void *data, const char *path)
+{
+ g_signal_emit (data, signals[SAVE_TEMPLATE], 0, FALSE);
+ e_msg_composer_unset_changed (E_MSG_COMPOSER (data));
+ e_msg_composer_unset_autosaved (E_MSG_COMPOSER (data));
+}
+
/* Exit dialog. (Displays a "Save composition to 'Drafts' before exiting?" warning before actually exiting.) */
static void
@@ -2121,6 +2134,7 @@ static BonoboUIVerb verbs [] = {
BONOBO_UI_VERB ("FileSave", menu_file_save_cb),
BONOBO_UI_VERB ("FileSaveAs", menu_file_save_as_cb),
BONOBO_UI_VERB ("FileSaveDraft", menu_file_save_draft_cb),
+ BONOBO_UI_VERB ("FileSaveTemplate", menu_file_save_template_cb),
BONOBO_UI_VERB ("FileClose", menu_file_close_cb),
BONOBO_UI_VERB ("Help", menu_help_cb),
BONOBO_UI_VERB ("FileAttach", menu_file_add_attachment_cb),
@@ -3276,6 +3290,18 @@ class_init (EMsgComposerClass *klass)
g_cclosure_marshal_VOID__BOOLEAN,
G_TYPE_NONE,
1, G_TYPE_BOOLEAN);
+
+ signals[SAVE_TEMPLATE] =
+ g_signal_new ("save-template",
+ E_TYPE_MSG_COMPOSER,
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (EMsgComposerClass, save_template),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__BOOLEAN,
+ G_TYPE_NONE,
+ 1, G_TYPE_BOOLEAN);
+
+
}
static void
diff -upr .orig/evolution/mail/em-composer-utils.c evolution/mail/em-composer-utils.c
--- .orig/evolution/mail/em-composer-utils.c 2006-04-18 15:56:36.000000000 -0500
+++ evolution/mail/em-composer-utils.c 2007-01-01 17:24:53.000000000 -0600
@@ -72,7 +72,9 @@ struct emcs_t {
unsigned int ref_count;
CamelFolder *drafts_folder;
+ CamelFolder *templates_folder;
char *drafts_uid;
+ char *templates_uid;
CamelFolder *folder;
guint32 flags, set;
@@ -87,7 +89,9 @@ emcs_new (void)
emcs = g_new (struct emcs_t, 1);
emcs->ref_count = 1;
emcs->drafts_folder = NULL;
+ emcs->templates_folder = NULL;
emcs->drafts_uid = NULL;
+ emcs->templates_uid = NULL;
emcs->folder = NULL;
emcs->flags = 0;
emcs->set = 0;
@@ -103,6 +107,10 @@ free_emcs (struct emcs_t *emcs)
camel_object_unref (emcs->drafts_folder);
g_free (emcs->drafts_uid);
+ if (emcs->templates_folder)
+ camel_object_unref (emcs->templates_folder);
+ g_free (emcs->templates_uid);
+
if (emcs->folder)
camel_object_unref (emcs->folder);
g_free (emcs->uid);
@@ -187,6 +195,7 @@ composer_send_queued_cb (CamelFolder *fo
struct emcs_t *emcs;
struct _send_data *send = data;
+
emcs = send->emcs;
if (queued) {
@@ -201,6 +210,17 @@ composer_send_queued_cb (CamelFolder *fo
emcs->drafts_uid = NULL;
}
+ if (emcs && emcs->templates_folder) {
+ /* keep the message if it's a template */
+ camel_folder_set_message_flags (emcs->templates_folder, emcs->templates_uid,
+ CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
+
+ camel_object_unref (emcs->templates_folder);
+ emcs->templates_folder = NULL;
+ g_free (emcs->templates_uid);
+ emcs->templates_uid = NULL;
+ }
+
if (emcs && emcs->folder) {
/* set any replied flags etc */
camel_folder_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
@@ -434,6 +454,62 @@ struct _save_draft_info {
};
static void
+save_template_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok,
+ const char *appended_uid, void *user_data)
+{
+ struct _save_draft_info *sdi = user_data;
+ struct emcs_t *emcs;
+
+ if (!ok)
+ goto done;
+
+ e_msg_composer_set_saved (sdi->composer);
+
+ if ((emcs = sdi->emcs) == NULL) {
+ emcs = emcs_new ();
+
+ g_signal_handlers_disconnect_by_func (sdi->composer, G_CALLBACK (em_utils_composer_send_cb), NULL);
+ g_signal_handlers_disconnect_by_func (sdi->composer, G_CALLBACK (em_utils_composer_save_template_cb), NULL);
+
+ em_composer_utils_setup_default_callbacks (sdi->composer);
+ }
+
+ if (emcs->templates_folder) {
+ camel_folder_set_message_flags (emcs->templates_folder, emcs->templates_uid,
+ CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
+
+ camel_object_unref (emcs->templates_folder);
+ camel_object_unref (emcs->templates_uid);
+ emcs->templates_folder = NULL;
+ emcs->templates_uid = NULL;
+ }
+
+ if (emcs->folder) {
+ camel_folder_set_message_flags (emcs->folder, emcs->uid, emcs->flags, emcs->set);
+ camel_object_unref (emcs->folder);
+ emcs->folder = NULL;
+ g_free (emcs->uid);
+ emcs->uid = NULL;
+ }
+
+ if (appended_uid) {
+ camel_object_ref (folder);
+ emcs->templates_folder = folder;
+ emcs->templates_uid = g_strdup (appended_uid);
+ }
+
+ if (sdi->quit)
+ gtk_widget_destroy (GTK_WIDGET (sdi->composer));
+
+ done:
+ g_object_unref (sdi->composer);
+ if (sdi->emcs)
+ emcs_unref (sdi->emcs);
+ camel_message_info_free(info);
+ g_free (sdi);
+}
+
+static void
save_draft_done (CamelFolder *folder, CamelMimeMessage *msg, CamelMessageInfo *info, int ok,
const char *appended_uid, void *user_data)
{
@@ -564,8 +640,66 @@ em_utils_composer_save_draft_cb (EMsgCom
}
void
+em_utils_composer_save_template_cb (EMsgComposer *composer, int quit, gpointer user_data)
+{
+ const char *default_templates_folder_uri = mail_component_get_folder_uri (NULL, MAIL_COMPONENT_FOLDER_TEMPLATES);
+ CamelFolder *templates_folder = mail_component_get_folder (NULL, MAIL_COMPONENT_FOLDER_TEMPLATES);
+ struct _save_draft_info *sdi;
+ CamelFolder *folder = NULL;
+ CamelMimeMessage *msg;
+ CamelMessageInfo *info;
+ EAccount *account;
+
+ g_object_ref (composer);
+ msg = e_msg_composer_get_message (composer, TRUE);
+ account = e_msg_composer_get_preferred_account (composer);
+
+ sdi = g_malloc (sizeof (struct _save_draft_info));
+ sdi->composer = composer;
+ sdi->emcs = user_data;
+ if (sdi->emcs)
+ emcs_ref (sdi->emcs);
+ sdi->quit = quit;
+
+ if (account && account->templates_folder_uri &&
+ strcmp (account->templates_folder_uri, default_templates_folder_uri) != 0) {
+ int id;
+
+ id = mail_get_folder (account->templates_folder_uri, 0, save_draft_folder, &folder, mail_thread_new);
+ mail_msg_wait (id);
+
+ if (!folder || !account->enabled) {
+ if (e_error_run((GtkWindow *)composer, "mail:ask-default-templates", NULL) != GTK_RESPONSE_YES) {
+ g_object_unref(composer);
+ camel_object_unref(msg);
+ if (sdi->emcs)
+ emcs_unref(sdi->emcs);
+ g_free(sdi);
+ return;
+ }
+
+ folder = templates_folder;
+ camel_object_ref (templates_folder);
+ }
+ } else {
+ folder = templates_folder;
+ camel_object_ref (folder);
+ }
+
+ info = camel_message_info_new (NULL);
+ camel_message_info_set_flags (info, CAMEL_MESSAGE_SEEN, ~0);
+
+ mail_append_mail (folder, msg, info, save_template_done, sdi);
+
+ camel_object_unref(folder);
+ camel_object_unref(msg);
+}
+
+
+void
em_composer_utils_setup_callbacks (EMsgComposer *composer, CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set, CamelFolder *drafts, const char *drafts_uid)
+ guint32 flags, guint32 set, CamelFolder *drafts, const char *drafts_uid,
+ CamelFolder *templates, const char *templates_uid)
{
struct emcs_t *emcs;
@@ -585,8 +719,15 @@ em_composer_utils_setup_callbacks (EMsgC
emcs->drafts_uid = g_strdup (drafts_uid);
}
+ if (templates && templates_uid) {
+ camel_object_ref (templates);
+ emcs->templates_folder = templates;
+ emcs->templates_uid = g_strdup (templates_uid);
+ }
+
g_signal_connect (composer, "send", G_CALLBACK (em_utils_composer_send_cb), emcs);
g_signal_connect (composer, "save-draft", G_CALLBACK (em_utils_composer_save_draft_cb), emcs);
+ g_signal_connect (composer, "save-template", G_CALLBACK (em_utils_composer_save_template_cb), emcs);
g_object_weak_ref ((GObject *) composer, (GWeakNotify) composer_destroy_cb, emcs);
}
@@ -745,7 +886,12 @@ edit_message (CamelMimeMessage *message,
EMsgComposer *composer;
composer = e_msg_composer_new_with_message (message);
- em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, drafts, uid);
+
+ if (em_utils_folder_is_templates(drafts, NULL) == TRUE)
+ em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, NULL, NULL, drafts, uid);
+ else
+ em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, drafts, uid, NULL, NULL);
+
e_msg_composer_unset_changed (composer);
e_msg_composer_drop_editor_undo (composer);
@@ -1972,7 +2118,7 @@ em_utils_reply_to_message(CamelFolder *f
composer_set_body (composer, message, source);
- em_composer_utils_setup_callbacks (composer, folder, uid, flags, flags, NULL, NULL);
+ em_composer_utils_setup_callbacks (composer, folder, uid, flags, flags, NULL, NULL, NULL, NULL);
gtk_widget_show (GTK_WIDGET (composer));
e_msg_composer_unset_changed (composer);
@@ -2063,7 +2209,7 @@ post_reply_to_message (CamelFolder *fold
composer_set_body (composer, message, NULL);
- em_composer_utils_setup_callbacks (composer, real_folder, real_uid, flags, flags, NULL, NULL);
+ em_composer_utils_setup_callbacks (composer, real_folder, real_uid, flags, flags, NULL, NULL, NULL, NULL);
gtk_widget_show (GTK_WIDGET (composer));
e_msg_composer_unset_changed (composer);
diff -upr .orig/evolution/mail/em-composer-utils.h evolution/mail/em-composer-utils.h
--- .orig/evolution/mail/em-composer-utils.h 2005-04-07 23:34:25.000000000 -0500
+++ evolution/mail/em-composer-utils.h 2007-01-01 15:55:48.000000000 -0600
@@ -37,12 +37,14 @@ struct _EMFormat;
struct _EAccount;
void em_composer_utils_setup_callbacks (struct _EMsgComposer *composer, struct _CamelFolder *folder, const char *uid,
- guint32 flags, guint32 set, struct _CamelFolder *drafts, const char *drafts_uid);
+ guint32 flags, guint32 set, struct _CamelFolder *drafts, const char *drafts_uid,
+ struct _CamelFolder *templates, const char *templates_uid);
-#define em_composer_utils_setup_default_callbacks(composer) em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, NULL, NULL)
+#define em_composer_utils_setup_default_callbacks(composer) em_composer_utils_setup_callbacks (composer, NULL, NULL, 0, 0, NULL, NULL, NULL, NULL);
void em_utils_composer_send_cb(struct _EMsgComposer *composer, gpointer user_data);
void em_utils_composer_save_draft_cb(struct _EMsgComposer *composer, int quit, gpointer user_data);
+void em_utils_composer_save_template_cb (struct _EMsgComposer *composer, int quit, gpointer user_data);
void em_utils_compose_new_message (const char *fromuri);
diff -upr .orig/evolution/mail/em-folder-view.c evolution/mail/em-folder-view.c
--- .orig/evolution/mail/em-folder-view.c 2006-12-04 09:42:22.000000000 -0600
+++ evolution/mail/em-folder-view.c 2007-01-01 17:04:49.000000000 -0600
@@ -19,7 +19,6 @@
* Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
*
*/
-
#include <config.h>
#include <string.h>
@@ -435,6 +434,7 @@ em_folder_view_open_selected(EMFolderVie
}
if (em_utils_folder_is_drafts(emfv->folder, emfv->folder_uri)
+ || em_utils_folder_is_templates(emfv->folder, emfv->folder_uri)
|| em_utils_folder_is_outbox(emfv->folder, emfv->folder_uri)) {
em_utils_edit_messages(emfv->folder, uids, TRUE);
return uids->len;
@@ -916,6 +916,24 @@ emfv_popup_mark_important(EPopup *ep, EP
}
static void
+emfv_popup_make_default_new (EPopup *ep, EPopupItem *pitem, void *data)
+{
+
+}
+
+static void
+emfv_popup_make_default_reply (EPopup *ep, EPopupItem *pitem, void *data)
+{
+
+}
+
+static void
+emfv_popup_reset_templates (EPopup *ep, EPopupItem *pitem, void *data)
+{
+
+}
+
+static void
emfv_popup_mark_unimportant(EPopup *ep, EPopupItem *pitem, void *data)
{
EMFolderView *emfv = data;
@@ -1158,6 +1176,7 @@ static EPopupItem emfv_popup_items[] = {
{ E_POPUP_ITEM, "50.emfv.03", N_("Mark as Un_important"), emfv_popup_mark_unimportant, NULL, NULL, EM_POPUP_SELECT_MARK_UNIMPORTANT|EM_FOLDER_VIEW_SELECT_LISTONLY },
{ E_POPUP_ITEM, "50.emfv.04", N_("Mark as _Junk"), emfv_popup_mark_junk, NULL, "stock_spam", EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY|EM_POPUP_SELECT_JUNK },
{ E_POPUP_ITEM, "50.emfv.05", N_("Mark as _Not Junk"), emfv_popup_mark_nojunk, NULL, "stock_not-spam", EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY|EM_POPUP_SELECT_NOT_JUNK },
+
{ E_POPUP_ITEM, "50.emfv.06", N_("Mark for Follo_w Up..."), emfv_popup_flag_followup, NULL, "stock_mail-flag-for-followup", EM_POPUP_SELECT_FLAG_FOLLOWUP|EM_FOLDER_VIEW_SELECT_LISTONLY },
{ E_POPUP_SUBMENU, "60.label.00", N_("_Label"), NULL, NULL, NULL, EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY },
@@ -1183,6 +1202,11 @@ static EPopupItem emfv_popup_items[] = {
{ E_POPUP_ITEM, "90.filter.00/10.02", N_("Filter on Re_cipients"), emfv_popup_filter_recipients, NULL, NULL, EM_POPUP_SELECT_ONE|EM_FOLDER_VIEW_SELECT_LISTONLY },
{ E_POPUP_ITEM, "90.filter.00/10.03", N_("Filter on _Mailing List"),
emfv_popup_filter_mlist, NULL, NULL, EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST|EM_FOLDER_VIEW_SELECT_LISTONLY },
+
+ { E_POPUP_BAR, "100.emfv", NULL, NULL, NULL, NULL },
+ { E_POPUP_ITEM, "100.emfv.00", N_("Make Default New Message"), emfv_popup_make_default_new, NULL, NULL, EM_FOLDER_VIEW_SELECT_LISTONLY | EM_POPUP_SELECT_TEMPLATES },
+ { E_POPUP_ITEM, "100.emfv.01", N_("Make Default Reply"), emfv_popup_make_default_reply, NULL, NULL, EM_FOLDER_VIEW_SELECT_LISTONLY | EM_POPUP_SELECT_TEMPLATES },
+ { E_POPUP_ITEM, "100.emfv.02", N_("Reset Templates"), emfv_popup_reset_templates, NULL, NULL, EM_FOLDER_VIEW_SELECT_LISTONLY | EM_POPUP_SELECT_TEMPLATES},
};
static void
diff -upr .orig/evolution/mail/em-popup.c evolution/mail/em-popup.c
--- .orig/evolution/mail/em-popup.c 2006-08-23 02:59:00.000000000 -0500
+++ evolution/mail/em-popup.c 2007-01-01 16:28:17.000000000 -0600
@@ -207,6 +207,8 @@ em_popup_target_new_select(EMPopup *emp,
if (uids->len >= 1)
mask &= ~EM_POPUP_SELECT_MANY;
+ if (em_utils_folder_is_templates(folder, folder_uri))
+ mask &= ~EM_POPUP_SELECT_TEMPLATES;
for (i = 0; i < uids->len; i++) {
CamelMessageInfo *info = camel_folder_get_message_info(folder, uids->pdata[i]);
@@ -845,7 +847,8 @@ static const EPopupHookTargetMask emph_s
{ "add_sender", EM_POPUP_SELECT_ADD_SENDER },
{ "folder", EM_POPUP_SELECT_FOLDER },
{ "junk", EM_POPUP_SELECT_JUNK },
- { "not_junk", EM_POPUP_SELECT_NOT_JUNK },
+ { "not_junk", EM_POPUP_SELECT_NOT_JUNK },
+ { "templates_folder", EM_POPUP_SELECT_TEMPLATES },
{ 0 }
};
Only in evolution/mail: em-popup.c~
diff -upr .orig/evolution/mail/em-popup.h evolution/mail/em-popup.h
--- .orig/evolution/mail/em-popup.h 2005-10-18 03:31:39.000000000 -0500
+++ evolution/mail/em-popup.h 2006-12-31 09:41:35.000000000 -0600
@@ -105,7 +105,8 @@ enum _em_popup_target_select_t {
EM_POPUP_SELECT_FOLDER = 1<<15, /* do we have any folder at all? */
EM_POPUP_SELECT_JUNK = 1<<16,
EM_POPUP_SELECT_NOT_JUNK = 1<<17,
- EM_POPUP_SELECT_LAST = 1<<18,
+ EM_POPUP_SELECT_TEMPLATES = 1<<18,
+ EM_POPUP_SELECT_LAST = 1<<19,
};
/**
diff -upr .orig/evolution/mail/em-utils.c evolution/mail/em-utils.c
--- .orig/evolution/mail/em-utils.c 2006-11-27 12:49:05.000000000 -0600
+++ evolution/mail/em-utils.c 2006-12-31 09:41:35.000000000 -0600
@@ -1239,6 +1239,54 @@ em_utils_temp_save_part(GtkWidget *paren
/**
+ * em_utils_folder_is_templates:
+ * @folder: folder
+ * @uri: uri for this folder, if known
+ *
+ * Decides if @folder is a Templates folder.
+ *
+ * Returns %TRUE if this is a Drafts folder or %FALSE otherwise.
+ **/
+gboolean
+em_utils_folder_is_templates (CamelFolder *folder, const char *uri)
+{
+ EAccountList *accounts;
+ EAccount *account;
+ EIterator *iter;
+ int is = FALSE;
+ char *templates_uri;
+
+ if (folder == mail_component_get_folder (NULL, MAIL_COMPONENT_FOLDER_TEMPLATES))
+ return TRUE;
+
+ if (uri == NULL)
+ return FALSE;
+
+ accounts = mail_config_get_accounts();
+ iter = e_list_get_iterator ((EList *)accounts);
+ while (e_iterator_is_valid (iter)) {
+ account = (EAccount *)e_iterator_get (iter);
+
+ if (account->templates_folder_uri) {
+ templates_uri = em_uri_to_camel (account->templates_folder_uri);
+ if (camel_store_folder_uri_equal (folder->parent_store, templates_uri, uri)) {
+ g_free (templates_uri);
+ is = TRUE;
+ break;
+ }
+ g_free (templates_uri);
+ }
+
+ e_iterator_next (iter);
+ }
+
+ g_object_unref (iter);
+
+
+ return is;
+}
+
+/**
* em_utils_folder_is_drafts:
* @folder: folder
* @uri: uri for this folder, if known
diff -upr .orig/evolution/mail/em-utils.h evolution/mail/em-utils.h
--- .orig/evolution/mail/em-utils.h 2006-08-23 02:59:00.000000000 -0500
+++ evolution/mail/em-utils.h 2006-12-31 09:41:35.000000000 -0600
@@ -80,6 +80,7 @@ char *em_utils_temp_save_part(struct _Gt
void em_utils_save_parts (struct _GtkWidget *parent, const char *prompt, GSList * parts);
gboolean em_utils_folder_is_drafts(struct _CamelFolder *folder, const char *uri);
+gboolean em_utils_folder_is_templates(struct _CamelFolder *folder, const char *uri);
gboolean em_utils_folder_is_sent(struct _CamelFolder *folder, const char *uri);
gboolean em_utils_folder_is_outbox(struct _CamelFolder *folder, const char *uri);
diff -upr .orig/evolution/mail/mail-component.c evolution/mail/mail-component.c
--- .orig/evolution/mail/mail-component.c 2006-12-03 11:43:08.000000000 -0600
+++ evolution/mail/mail-component.c 2006-12-31 09:41:35.000000000 -0600
@@ -152,6 +152,7 @@ static struct {
{ N_("Drafts"), },
{ N_("Outbox"), },
{ N_("Sent"), },
+ {N_("Templates"),},
{ "Inbox", }, /* 'always local' inbox */
};
diff -upr .orig/evolution/mail/mail-component.h evolution/mail/mail-component.h
--- .orig/evolution/mail/mail-component.h 2005-12-21 20:12:33.000000000 -0600
+++ evolution/mail/mail-component.h 2006-12-31 09:41:35.000000000 -0600
@@ -47,6 +47,7 @@ enum _mail_component_folder_t {
MAIL_COMPONENT_FOLDER_DRAFTS,
MAIL_COMPONENT_FOLDER_OUTBOX,
MAIL_COMPONENT_FOLDER_SENT,
+ MAIL_COMPONENT_FOLDER_TEMPLATES,
MAIL_COMPONENT_FOLDER_LOCAL_INBOX,
};
diff -upr .orig/evolution/ui/evolution-message-composer.xml evolution/ui/evolution-message-composer.xml
--- .orig/evolution/ui/evolution-message-composer.xml 2006-07-08 07:22:31.000000000 -0500
+++ evolution/ui/evolution-message-composer.xml 2006-12-31 09:41:35.000000000 -0600
@@ -11,6 +11,10 @@
<cmd name="FileSaveDraft" _label="Save Draft"
_tip="Save as draft" pixtype="pixbuf"
accel="*Ctrl**Shift*s"/>
+
+ <cmd name="FileSaveTemplate" _label="Save Template"
+ _tip="Save as template" pixtype="pixbuf"/>
+
<cmd name="FileSaveAs" _label="Save As"
_tip="Save the current file with a different name"
@@ -101,6 +105,7 @@
<menuitem name="FileSave" verb="" _label="_Save" pixtype="stock" pixname="gtk-save"/>
<menuitem name="FileSaveAs" verb="" _label="Save _As..." pixtype="stock" pixname="gtk-save-as"/>
<menuitem name="FileSaveDraft" verb="" _label="Save _Draft"/>
+ <menuitem name="FileSaveTemplate" verb="" _label="Save Template"/>
<placeholder name="Print" delimit="top"/>
<separator f="" name="emailcomposer2"/>
--- ../.cvs/evolution-data-server/libedataserver/e-account.h 2006-12-19 21:51:48.000000000 -0600
+++ evolution-data-server/libedataserver/e-account.h 2006-12-23 18:30:32.000000000 -0600
@@ -115,7 +115,7 @@ typedef struct _EAccount {
EAccountService *source;
EAccountService *transport;
- char *drafts_folder_uri, *sent_folder_uri;
+ char *drafts_folder_uri, *sent_folder_uri, char *template_folder_uri;
gboolean always_cc;
char *cc_addrs;
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]