evolution r35279 - branches/mbarnes-composer/composer
- From: mbarnes svn gnome org
- To: svn-commits-list gnome org
- Subject: evolution r35279 - branches/mbarnes-composer/composer
- Date: Thu, 27 Mar 2008 21:29:07 +0000 (GMT)
Author: mbarnes
Date: Thu Mar 27 21:29:07 2008
New Revision: 35279
URL: http://svn.gnome.org/viewvc/evolution?rev=35279&view=rev
Log:
More bugfixes and code cleanup.
Add composer-specific Insert menu items.
Modified:
branches/mbarnes-composer/composer/e-composer-actions.c
branches/mbarnes-composer/composer/e-composer-actions.h
branches/mbarnes-composer/composer/e-composer-autosave.c
branches/mbarnes-composer/composer/e-composer-private.h
branches/mbarnes-composer/composer/e-msg-composer.c
branches/mbarnes-composer/composer/e-msg-composer.h
branches/mbarnes-composer/composer/evolution-composer.ui
Modified: branches/mbarnes-composer/composer/e-composer-actions.c
==============================================================================
--- branches/mbarnes-composer/composer/e-composer-actions.c (original)
+++ branches/mbarnes-composer/composer/e-composer-actions.c Thu Mar 27 21:29:07 2008
@@ -1,7 +1,10 @@
#include "e-composer-actions.h"
#include "e-composer-private.h"
+#include <errno.h>
+#include <fcntl.h>
#include <e-util/e-error.h>
+#include <mail/em-event.h>
#include <mail/em-format-html-print.h>
static void
@@ -106,7 +109,7 @@
switch (response) {
case GTK_RESPONSE_YES:
gtk_action_activate (ACTION (SAVE_DRAFT));
- /* fall through */
+ break;
case GTK_RESPONSE_NO:
gtk_widget_destroy (GTK_WIDGET (composer));
@@ -169,18 +172,70 @@
{
GtkhtmlEditor *editor = GTKHTML_EDITOR (composer);
const gchar *filename;
+ gint fd;
filename = gtkhtml_editor_get_filename (editor);
if (filename == NULL) {
gtk_action_activate (ACTION (SAVE_AS));
return;
}
+
+ /* Check if the file already exists and we can create it. */
+ fd = g_open (filename, O_RDONLY | O_CREAT | O_EXCL, 0777);
+ if (fd < 0) {
+ gint errno_saved = errno;
+
+ if (g_file_test (filename, G_FILE_TEST_IS_REGULAR)) {
+ gint response;
+
+ response = e_error_run (
+ GTK_WINDOW (composer),
+ E_ERROR_ASK_FILE_EXISTS_OVERWRITE,
+ filename, NULL);
+ if (response != GTK_RESPONSE_OK)
+ return;
+ } else {
+ e_error_run (
+ GTK_WINDOW (composer),
+ E_ERROR_NO_SAVE_FILE, filename,
+ g_strerror (errno_saved));
+ return;
+ }
+ } else
+ close (fd);
+
+ gtkhtml_editor_run_command (GTKHTML_EDITOR (composer), "saved");
+ e_composer_autosave_set_saved (composer, FALSE);
}
static void
action_save_as_cb (GtkAction *action,
EMsgComposer *composer)
{
+ GtkWidget *dialog;
+ gint response;
+
+ dialog = gtk_file_chooser_dialog_new (
+ _("Save as..."), GTK_WINDOW (composer),
+ GTK_FILE_CHOOSER_ACTION_SAVE,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_SAVE, GTK_RESPONSE_OK,
+ NULL);
+
+ gtk_dialog_set_default_response (
+ GTK_DIALOG (dialog), GTK_RESPONSE_OK);
+ gtk_file_chooser_set_local_only (
+ GTK_FILE_CHOOSER (dialog), FALSE);
+ gtk_window_set_icon_name (
+ GTK_WINDOW (dialog), "mail-message-new");
+
+ response = gtkhtml_editor_file_chooser_dialog_run (
+ GTKHTML_EDITOR (composer), dialog);
+
+ if (response == GTK_RESPONSE_OK)
+ gtk_action_activate (ACTION (SAVE));
+
+ gtk_widget_destroy (dialog);
}
static void
@@ -198,6 +253,28 @@
}
static void
+action_send_options_cb (GtkAction *action,
+ EMsgComposer *composer)
+{
+ EMEvent *event = em_event_peek ();
+ EMEventTargetComposer *target;
+
+ target = em_event_target_new_composer (
+ event, composer, EM_EVENT_COMPOSER_SEND_OPTION);
+ e_msg_composer_set_send_options (composer, FALSE);
+
+ e_event_emit (
+ (EEvent *) event,
+ "composer.selectsendoption",
+ (EEventTarget *) target);
+
+ if (!composer->priv->send_invoked)
+ e_error_run (
+ GTK_WINDOW (composer),
+ "mail-component:send-options-support", NULL);
+}
+
+static void
action_smime_encrypt_cb (GtkToggleAction *action,
EMsgComposer *composer)
{
@@ -367,6 +444,13 @@
N_("Send this message"),
G_CALLBACK (action_send_cb) },
+ { "send-options",
+ NULL,
+ N_("_Send Options"),
+ NULL,
+ N_("Insert Send options"),
+ G_CALLBACK (action_send_options_cb) },
+
/* Menus */
{ "security-menu",
@@ -395,6 +479,22 @@
G_CALLBACK (action_pgp_sign_cb),
FALSE },
+ { "prioritize-message",
+ NULL,
+ N_("_Prioritize Message"),
+ NULL,
+ N_("Set the message priority to high"),
+ NULL, /* no callback */
+ FALSE },
+
+ { "request-read-receipt",
+ NULL,
+ N_("R_equest Read Receipt"),
+ NULL,
+ N_("Get delivery notification when your message is read"),
+ NULL, /* no callback */
+ FALSE },
+
{ "smime-encrypt",
NULL,
N_("S/MIME En_crypt"),
Modified: branches/mbarnes-composer/composer/e-composer-actions.h
==============================================================================
--- branches/mbarnes-composer/composer/e-composer-actions.h (original)
+++ branches/mbarnes-composer/composer/e-composer-actions.h Thu Mar 27 21:29:07 2008
@@ -16,6 +16,10 @@
E_COMPOSER_ACTION ((composer), "print")
#define E_COMPOSER_ACTION_PRINT_PREVIEW(composer) \
E_COMPOSER_ACTION ((composer), "print-preview")
+#define E_COMPOSER_ACTION_PRIORITIZE_MESSAGE(composer) \
+ E_COMPOSER_ACTION ((composer), "prioritize-message")
+#define E_COMPOSER_ACTION_REQUEST_READ_RECEIPT(composer) \
+ E_COMPOSER_ACTION ((composer), "request-read-receipt")
#define E_COMPOSER_ACTION_SAVE(composer) \
E_COMPOSER_ACTION ((composer), "save")
#define E_COMPOSER_ACTION_SAVE_AS(composer) \
Modified: branches/mbarnes-composer/composer/e-composer-autosave.c
==============================================================================
--- branches/mbarnes-composer/composer/e-composer-autosave.c (original)
+++ branches/mbarnes-composer/composer/e-composer-autosave.c Thu Mar 27 21:29:07 2008
@@ -9,7 +9,8 @@
#include <e-util/e-util.h>
#include <camel/camel-stream-fs.h>
-#define AUTOSAVE_SEED ".evolution-composer.autosave-XXXXXX"
+#define AUTOSAVE_PREFIX ".evolution-composer.autosave"
+#define AUTOSAVE_SEED AUTOSAVE_PREFIX "-XXXXXX"
#define AUTOSAVE_INTERVAL 60000 /* 60 seconds */
typedef struct _AutosaveState AutosaveState;
@@ -148,7 +149,7 @@
struct stat st;
/* Is this an autosave file? */
- if (!g_str_has_prefix (basename, AUTOSAVE_SEED))
+ if (!g_str_has_prefix (basename, AUTOSAVE_PREFIX))
continue;
/* Is this an orphaned autosave file? */
Modified: branches/mbarnes-composer/composer/e-composer-private.h
==============================================================================
--- branches/mbarnes-composer/composer/e-composer-private.h (original)
+++ branches/mbarnes-composer/composer/e-composer-private.h Thu Mar 27 21:29:07 2008
@@ -4,6 +4,7 @@
#include "e-msg-composer.h"
#include <glib/gi18n.h>
+#include <glib/gstdio.h>
#include "gconf-bridge.h"
#include "e-attachment-bar.h"
@@ -58,8 +59,6 @@
guint32 attachment_bar_visible : 1;
guint32 send_html : 1;
guint32 is_alternative : 1;
- guint32 request_receipt : 1;
- guint32 set_priority : 1;
guint32 has_changed : 1;
guint32 autosaved : 1;
Modified: branches/mbarnes-composer/composer/e-msg-composer.c
==============================================================================
--- branches/mbarnes-composer/composer/e-msg-composer.c (original)
+++ branches/mbarnes-composer/composer/e-msg-composer.c Thu Mar 27 21:29:07 2008
@@ -43,31 +43,25 @@
#define SMIME_SUPPORTED 1
-#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
#include <sys/time.h>
#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
#include <unistd.h>
-#include <errno.h>
-#include <ctype.h>
#include <glib.h>
-#include <glib/gstdio.h>
#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
#include <gconf/gconf.h>
#include <gconf/gconf-client.h>
-#include <libgnome/gnome-exec.h>
-#include <libgnome/gnome-help.h>
#include <libgnome/gnome-url.h>
-#include <glib/gi18n.h>
-#include <libgnomeui/gnome-uidefs.h>
-#include <libgnomeui/gnome-window-icon.h>
-
#include <libgnomevfs/gnome-vfs.h>
#include <glade/glade.h>
@@ -246,7 +240,6 @@
/* All the composer windows open, for bookkeeping purposes. */
static GSList *all_composers = NULL;
-
/* local prototypes */
static GList *add_recipients (GList *list, const gchar *recips);
@@ -264,11 +257,7 @@
static void handle_multipart_signed (EMsgComposer *composer, CamelMultipart *multipart, gint depth);
static void set_editor_signature (EMsgComposer *composer);
-static void do_exit (EMsgComposer *composer);
-/* used by e_msg_composer for showing the help menu item */
-static void e_msg_composer_show_help (EMsgComposer *composer);
-
static EDestination**
destination_list_to_vector_sized (GList *list, gint n)
{
@@ -305,7 +294,7 @@
best_encoding (GByteArray *buf, const gchar *charset)
{
gchar *in, *out, outbuf[256], *ch;
- size_t inlen, outlen;
+ gsize inlen, outlen;
gint status, count = 0;
iconv_t cd;
@@ -326,10 +315,10 @@
if ((guchar) *ch > 127)
count++;
}
- } while (status == (size_t) -1 && errno == E2BIG);
+ } while (status == (gsize) -1 && errno == E2BIG);
e_iconv_close (cd);
- if (status == (size_t) -1 || status > 0)
+ if (status == (gsize) -1 || status > 0)
return -1;
if (count == 0)
@@ -620,8 +609,7 @@
GtkhtmlEditor *editor;
EMsgComposerPrivate *p = composer->priv;
- EAttachmentBar *attachment_bar =
- E_ATTACHMENT_BAR (p->attachment_bar);
+ EAttachmentBar *attachment_bar;
EComposerHeaderTable *table;
GtkToggleAction *action;
CamelDataWrapper *plain, *html, *current;
@@ -648,6 +636,7 @@
editor = GTKHTML_EDITOR (composer);
table = e_msg_composer_get_header_table (composer);
account = e_composer_header_table_get_account (table);
+ attachment_bar = E_ATTACHMENT_BAR (p->attachment_bar);
/* evil kludgy hack for Redirect */
if (p->redirect) {
@@ -665,17 +654,22 @@
}
/* Message Disposition Notification */
- if (p->request_receipt) {
+ action = GTK_TOGGLE_ACTION (ACTION (REQUEST_READ_RECEIPT));
+ if (gtk_toggle_action_get_active (action)) {
gchar *mdn_address = account->id->reply_to;
if (!mdn_address || !*mdn_address)
mdn_address = account->id->address;
- camel_medium_add_header (CAMEL_MEDIUM (new), "Disposition-Notification-To", mdn_address);
+ camel_medium_add_header (
+ CAMEL_MEDIUM (new),
+ "Disposition-Notification-To", mdn_address);
}
/* Message Priority */
- if (p->set_priority)
- camel_medium_add_header (CAMEL_MEDIUM (new), "X-Priority", "1");
+ action = GTK_TOGGLE_ACTION (ACTION (PRIORITIZE_MESSAGE));
+ if (gtk_toggle_action_get_active (action))
+ camel_medium_add_header (
+ CAMEL_MEDIUM (new), "X-Priority", "1");
if (p->mime_body) {
plain_encoding = CAMEL_TRANSFER_ENCODING_7BIT;
@@ -1065,7 +1059,11 @@
static gchar *
-get_file_content (EMsgComposer *composer, const gchar *file_name, gboolean want_html, guint flags, gboolean warn)
+get_file_content (EMsgComposer *composer,
+ const gchar *filename,
+ gboolean want_html,
+ guint flags,
+ gboolean warn)
{
CamelStreamFilter *filtered_stream;
CamelStreamMem *memstream;
@@ -1076,11 +1074,11 @@
gchar *content;
gint fd;
- fd = g_open (file_name, O_RDONLY, 0);
+ fd = g_open (filename, O_RDONLY, 0);
if (fd == -1) {
if (warn)
e_error_run ((GtkWindow *)composer, "mail-composer:no-sig-file",
- file_name, g_strerror (errno), NULL);
+ filename, g_strerror (errno), NULL);
return g_strdup ("");
}
@@ -1409,89 +1407,6 @@
_("Show _Attachment Bar"));
}
-static void
-save (EMsgComposer *composer, const gchar *filename)
-{
-#if 0 /* GTKHTML-EDITOR */
- gint fd;
-
- /* check to see if we already have the file and that we can create it */
- if ((fd = g_open (filename, O_RDONLY | O_CREAT | O_EXCL, 0777)) == -1) {
- gint resp, errnosav = errno;
- struct stat st;
-
- if (g_stat (filename, &st) == 0 && S_ISREG (st.st_mode)) {
- resp = e_error_run ((GtkWindow *)composer, E_ERROR_ASK_FILE_EXISTS_OVERWRITE, filename, NULL);
- if (resp != GTK_RESPONSE_OK)
- return;
- } else {
- e_error_run ((GtkWindow *)composer, E_ERROR_NO_SAVE_FILE, filename, g_strerror (errnosav));
- return;
- }
- } else
- close (fd);
-
- gtkhtml_editor_run_command (GTKHTML_EDITOR (composer), "saved");
- e_composer_autosave_set_saved (composer, FALSE);
-#endif /* GTKHTML-EDITOR */
-}
-
-static void
-saveas (EMsgComposer *composer)
-{
- GtkWidget *dialog;
- gchar *filename;
- gint response;
-
- dialog = gtk_file_chooser_dialog_new (
- _("Save as..."), GTK_WINDOW (composer),
- GTK_FILE_CHOOSER_ACTION_SAVE,
- GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_SAVE, GTK_RESPONSE_OK,
- NULL);
-
- gtk_dialog_set_default_response (
- GTK_DIALOG (dialog), GTK_RESPONSE_OK);
- gtk_file_chooser_set_local_only (
- GTK_FILE_CHOOSER (dialog), FALSE);
- gtk_window_set_icon_name (
- GTK_WINDOW (dialog), "mail-message-new");
-
- response = gtkhtml_editor_file_chooser_dialog_run (
- GTKHTML_EDITOR (composer), dialog);
-
- if (response != GTK_RESPONSE_OK)
- goto exit;
-
- filename = gtk_file_chooser_get_filename (
- GTK_FILE_CHOOSER (dialog));
-
- save (composer, filename);
-
- g_free (filename);
-
-exit:
- gtk_widget_destroy (dialog);
-}
-
-static void
-load (EMsgComposer *composer, const gchar *filename)
-{
- GtkhtmlEditor *editor = GTKHTML_EDITOR (composer);
- gchar *contents;
- gsize length;
- GError *error = NULL;
-
- if (g_file_get_contents (filename, &contents, &length, &error))
- gtkhtml_editor_set_text_html (editor, contents, length);
- else {
- e_error_run (
- GTK_WINDOW (editor), E_ERROR_NO_LOAD_FILE,
- filename, error->message, NULL);
- g_error_free (error);
- }
-}
-
static EMsgComposer *
autosave_load_draft (const gchar *filename)
{
@@ -1527,104 +1442,6 @@
return composer;
}
-/* Menu callbacks. */
-static void
-menu_file_save_cb (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
-#if 0 /* GTKHTML-EDITOR */
- EMsgComposer *composer = E_MSG_COMPOSER (data);
- EMsgComposerPrivate *p = composer->priv;
- CORBA_char *file_name;
- CORBA_Environment ev;
-
- CORBA_exception_init (&ev);
-
- file_name = Bonobo_PersistFile_getCurrentFile (p->persist_file_interface, &ev);
-
- if (ev._major != CORBA_NO_EXCEPTION) {
- saveas (composer);
- } else {
- save (composer, file_name);
- CORBA_free (file_name);
- }
- CORBA_exception_free (&ev);
-#endif /* GTKHTML-EDITOR */
-}
-
-static void
-menu_file_save_as_cb (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- saveas (E_MSG_COMPOSER(data));
-}
-
-static void
-menu_file_close_cb (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- EMsgComposer *composer;
-
- composer = E_MSG_COMPOSER (data);
- do_exit (composer);
-}
-
-/* this is the callback for the help menu */
-static void
-menu_help_cb (BonoboUIComponent *uic,
- gpointer data,
- const char *path)
-{
- EMsgComposer *composer = (EMsgComposer *) data;
-
- e_msg_composer_show_help (composer);
-}
-
-
-static void
-menu_send_options_cb (BonoboUIComponent *component, gpointer data, const char *path)
-{
- EMEvent *e = em_event_peek ();
- EMEventTargetComposer *target;
- EMsgComposer *composer = data;
-
- target = em_event_target_new_composer (e, composer, EM_EVENT_COMPOSER_SEND_OPTION);
- e_msg_composer_set_send_options (composer, FALSE);
- e_event_emit ((EEvent *)e, "composer.selectsendoption", (EEventTarget *)target);
- if (!composer->priv->send_invoked) {
- e_error_run ((GtkWindow *)composer, "mail-composer:send-options-support", NULL);
- }
-}
-
-static void
-menu_insert_receipt_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- e_msg_composer_set_request_receipt (E_MSG_COMPOSER (user_data), atoi (state));
-}
-
-static void
-menu_insert_priority_cb (BonoboUIComponent *component,
- const char *path,
- Bonobo_UIComponent_EventType type,
- const char *state,
- gpointer user_data)
-{
- if (type != Bonobo_UIComponent_STATE_CHANGED)
- return;
-
- e_msg_composer_set_priority (E_MSG_COMPOSER (user_data), atoi (state));
-}
-
static void
menu_changed_charset_cb (BonoboUIComponent *component,
const char *path,
@@ -1644,35 +1461,6 @@
}
}
-
-static BonoboUIVerb verbs [] = {
-
- BONOBO_UI_VERB ("FileSave", menu_file_save_cb),
- BONOBO_UI_VERB ("FileSaveAs", menu_file_save_as_cb),
- BONOBO_UI_VERB ("FileClose", menu_file_close_cb),
- BONOBO_UI_VERB ("Help", menu_help_cb),
-
- BONOBO_UI_VERB ("InsertXSendOptions", menu_send_options_cb),
-
- BONOBO_UI_VERB_END
-};
-
-static EPixmap pixcache [] = {
- E_PIXMAP ("/commands/FileAttach", "mail-attachment", E_ICON_SIZE_MENU),
- E_PIXMAP ("/commands/FileClose", "window-close", E_ICON_SIZE_MENU),
- E_PIXMAP ("/commands/FileOpen", "document-open", E_ICON_SIZE_MENU),
- E_PIXMAP ("/commands/FileSave", "document-save", E_ICON_SIZE_MENU),
- E_PIXMAP ("/commands/FileSaveAs", "document-save-as", E_ICON_SIZE_MENU),
- E_PIXMAP ("/commands/FileSend", "mail-send", E_ICON_SIZE_MENU),
-
- E_PIXMAP ("/Toolbar/FileSend", "mail-send", E_ICON_SIZE_LARGE_TOOLBAR),
- E_PIXMAP ("/Toolbar/FileSaveDraft", "document-save", E_ICON_SIZE_LARGE_TOOLBAR) ,
- E_PIXMAP ("/Toolbar/FileAttach", "mail-attachment", E_ICON_SIZE_LARGE_TOOLBAR),
-
- E_PIXMAP_END
-};
-
-
static void
setup_ui (EMsgComposer *composer)
{
@@ -1692,32 +1480,6 @@
composer);
g_free (charset);
- /* Insert/Request Receipt */
- bonobo_ui_component_set_prop (
- p->uic, "/commands/RequestReceipt",
- "state", p->request_receipt ? "1" : "0", NULL);
- bonobo_ui_component_add_listener (
- p->uic, "RequestReceipt",
- menu_insert_receipt_cb, composer);
-
- /* Insert/Exchange Send Options */
-/* bonobo_ui_component_set_prop (
- p->uic, "/commands/XSendOptions",
- "state", "1", NULL);
- bonobo_ui_component_add_listener (
- p->uic, "XSendOptions",
- menu_send_options_cb, composer);*/
-
- /* Insert/Set Priority*/
- bonobo_ui_component_set_prop (
- p->uic, "/commands/SetPriority",
- "state", p->set_priority? "1" : "0", NULL);
- bonobo_ui_component_add_listener (
- p->uic, "SetPriority",
- menu_insert_priority_cb, composer);
-
- bonobo_ui_component_thaw (p->uic, NULL);
-
/* Setup main menu plugin mechanism */
target = em_menu_target_new_widget (p->menu, (GtkWidget *)composer);
e_menu_update_target ((EMenu *)p->menu, target);
@@ -1932,22 +1694,6 @@
e_msg_composer_show_sig_file (composer);
}
-
-/* show the help menu item of the composer */
-static void
-e_msg_composer_show_help (EMsgComposer *composer)
-{
- GError *error = NULL;
-
- gnome_help_display (
- "evolution.xml", "usage-composer", &error);
- if (error != NULL) {
- g_warning ("%s", error->message);
- g_error_free (error);
- }
-}
-
-
static void
attach_message (EMsgComposer *composer, CamelMimeMessage *msg)
{
@@ -1997,14 +1743,14 @@
}
static gchar *
-attachment_guess_mime_type (const char *file_name)
+attachment_guess_mime_type (const char *filename)
{
GnomeVFSFileInfo *info;
GnomeVFSResult result;
gchar *type = NULL;
info = gnome_vfs_file_info_new ();
- result = gnome_vfs_get_file_info (file_name, info,
+ result = gnome_vfs_get_file_info (filename, info,
GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE |
GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
@@ -2355,7 +2101,9 @@
msg_composer_delete_event (GtkWidget *widget,
GdkEventAny *event)
{
- do_exit (E_MSG_COMPOSER (widget));
+ EMsgComposer *composer = E_MSG_COMPOSER (widget);
+
+ gtk_action_activate (ACTION (CLOSE));
return TRUE;
}
@@ -2620,51 +2368,6 @@
gtk_toggle_action_set_active (action, TRUE);
}
-static int
-e_msg_composer_get_visible_flags (EMsgComposer *composer)
-{
- GtkToggleAction *action;
- gint flags = 0;
-
- action = GTK_TOGGLE_ACTION (ACTION (VIEW_FROM));
- if (gtk_toggle_action_get_active (action))
- flags |= E_MSG_COMPOSER_VISIBLE_FROM;
-
- action = GTK_TOGGLE_ACTION (ACTION (VIEW_REPLY_TO));
- if (gtk_toggle_action_get_active (action))
- flags |= E_MSG_COMPOSER_VISIBLE_REPLYTO;
-
- action = GTK_TOGGLE_ACTION (ACTION (VIEW_TO));
- if (gtk_toggle_action_get_active (action))
- flags |= E_MSG_COMPOSER_VISIBLE_TO;
-
- action = GTK_TOGGLE_ACTION (ACTION (VIEW_POST_TO));
- if (gtk_toggle_action_get_active (action))
- flags |= E_MSG_COMPOSER_VISIBLE_POSTTO;
-
- action = GTK_TOGGLE_ACTION (ACTION (VIEW_CC));
- if (gtk_toggle_action_get_active (action))
- flags |= E_MSG_COMPOSER_VISIBLE_CC;
-
- action = GTK_TOGGLE_ACTION (ACTION (VIEW_BCC));
- if (gtk_toggle_action_get_active (action))
- flags |= E_MSG_COMPOSER_VISIBLE_BCC;
-
- action = GTK_TOGGLE_ACTION (ACTION (VIEW_SUBJECT));
- if (gtk_toggle_action_get_active (action))
- flags |= E_MSG_COMPOSER_VISIBLE_SUBJECT;
-
- /*
- * Until we have a GUI way, lets make sure that
- * even if the user screws up, we will do the right
- * thing (screws up == edit the config file manually
- * and screw up).
- */
- flags |= E_MSG_COMPOSER_VISIBLE_SUBJECT;
- return flags;
-}
-
-
static void
map_default_cb (EMsgComposer *composer, gpointer user_data)
{
@@ -2710,7 +2413,8 @@
}
static int
-composer_key_pressed (EMsgComposer *composer, GdkEventKey *event, gpointer user_data)
+composer_key_pressed (EMsgComposer *composer,
+ GdkEventKey *event)
{
GtkWidget *widget;
EComposerHeaderTable *table;
@@ -2728,22 +2432,26 @@
#endif /* HAVE_XFREE */
if (event->keyval == GDK_Escape) {
- do_exit (composer);
+ gtk_action_activate (ACTION (CLOSE));
g_signal_stop_emission_by_name (composer, "key-press-event");
return TRUE;
- } else if ((event->keyval == GDK_Tab) && (gtk_widget_is_focus (widget))) {
- gtkhtml_editor_run_command (GTKHTML_EDITOR (composer), "grab-focus");
+ }
+
+ if (event->keyval == GDK_Tab && gtk_widget_is_focus (widget)) {
+ gtkhtml_editor_run_command (
+ GTKHTML_EDITOR (composer), "grab-focus");
g_signal_stop_emission_by_name (composer, "key-press-event");
return TRUE;
}
+
return FALSE;
}
static void
msg_composer_update_preferences (GConfClient *client,
- guint cnxn_id,
- GConfEntry *entry,
- EMsgComposer *composer)
+ guint cnxn_id,
+ GConfEntry *entry,
+ EMsgComposer *composer)
{
GtkhtmlEditor *editor;
gboolean enable;
@@ -2921,58 +2629,15 @@
return FALSE;
}
-/* Exit dialog. (Displays a "Save composition to 'Drafts' before exiting?" warning before actually exiting.) */
-
-static void
-do_exit (EMsgComposer *composer)
-{
- EComposerHeaderTable *table;
- const gchar *subject;
- gint response;
-
- if (!e_msg_composer_is_dirty (composer) &&
- !e_composer_autosave_get_saved (composer)) {
-
- gtk_widget_destroy (GTK_WIDGET (composer));
- return;
- }
-
- gdk_window_raise (GTK_WIDGET (composer)->window);
-
- table = e_msg_composer_get_header_table (composer);
- subject = e_composer_header_table_get_subject (table);
-
- if (subject == NULL || *subject == '\0')
- subject = _("Untitled Message");
-
- response = e_error_run (
- GTK_WINDOW (composer),
- "mail-composer:exit-unsaved",
- subject, NULL);
-
- switch (response) {
- case GTK_RESPONSE_YES:
- g_signal_emit (composer, signals[SAVE_DRAFT], 0, TRUE);
- e_composer_autosave_set_saved (composer, FALSE);
- e_msg_composer_unset_changed (composer);
- break;
-
- case GTK_RESPONSE_NO:
- gtk_widget_destroy (GTK_WIDGET (composer));
- break;
-
- case GTK_RESPONSE_CANCEL:
- break;
- }
-}
-
static EMsgComposer *
create_composer (int visible_mask)
{
EMsgComposer *composer;
EComposerHeaderTable *table;
GConfClient *client;
+ GtkToggleAction *action;
EMsgComposerPrivate *p;
+ gboolean active;
composer = g_object_new (E_TYPE_MSG_COMPOSER, NULL);
p = composer->priv;
@@ -3044,7 +2709,10 @@
/* Listen for user preference updates. */
client = gconf_client_get_default ();
msg_composer_update_preferences (client, 0, NULL, composer);
- e_msg_composer_set_request_receipt (composer, gconf_client_get_bool (client, COMPOSER_GCONF_REQUEST_RECEIPT_KEY, NULL));
+ action = GTK_TOGGLE_ACTION (ACTION (REQUEST_READ_RECEIPT));
+ active = gconf_client_get_bool (
+ client, COMPOSER_GCONF_REQUEST_RECEIPT_KEY, NULL);
+ gtk_toggle_action_set_active (action, active);
gconf_client_add_dir (
client, COMPOSER_GCONF_PREFIX,
GCONF_CLIENT_PRELOAD_ONELEVEL, NULL);
@@ -3168,7 +2836,7 @@
}
static void
-e_msg_composer_set_pending_body (EMsgComposer *composer, gchar *text, ssize_t len)
+e_msg_composer_set_pending_body (EMsgComposer *composer, gchar *text, gssize len)
{
gchar *old;
@@ -3182,7 +2850,7 @@
e_msg_composer_flush_pending_body (EMsgComposer *composer, gboolean apply)
{
gchar *body;
- ssize_t len;
+ gssize len;
body = g_object_get_data ((GObject *) composer, "body:text");
len = GPOINTER_TO_SIZE (g_object_get_data ((GObject *) composer, "body:len"));
@@ -3323,7 +2991,7 @@
handle_multipart (composer, multipart, depth);
}
} else if (camel_content_type_is (content_type, "text", "*")) {
- ssize_t len;
+ gssize len;
gchar *html;
html = em_utils_part_to_html (mime_part, &len, NULL);
@@ -3384,7 +3052,7 @@
handle_multipart (composer, content_multipart, depth);
}
} else if (camel_content_type_is (content_type, "text", "*")) {
- ssize_t len;
+ gssize len;
gchar *html;
html = em_utils_part_to_html (mime_part, &len, NULL);
@@ -3448,7 +3116,7 @@
}
if (text_part) {
- ssize_t len;
+ gssize len;
gchar *html;
html = em_utils_part_to_html (text_part, &len, NULL);
@@ -3494,7 +3162,7 @@
handle_multipart (composer, mp, depth + 1);
}
} else if (depth == 0 && i == 0) {
- ssize_t len;
+ gssize len;
gchar *html;
/* Since the first part is not multipart/alternative, then this must be the body */
@@ -3565,6 +3233,7 @@
gchar *account_name;
EMsgComposer *composer;
EComposerHeaderTable *table;
+ GtkToggleAction *action;
struct _camel_header_raw *xev;
gint len, i;
EMsgComposerPrivate *p;
@@ -3740,8 +3409,6 @@
flags = g_strsplit (format, ", ", 0);
for (i=0;flags[i];i++) {
- GtkToggleAction *action;
-
printf ("restoring draft flag '%s'\n", flags[i]);
if (g_ascii_strcasecmp (flags[i], "text/html") == 0)
@@ -3773,12 +3440,14 @@
/* Check for receipt request */
if (camel_medium_get_header (CAMEL_MEDIUM (message), "Disposition-Notification-To")) {
- e_msg_composer_set_request_receipt (composer, TRUE);
+ action = GTK_TOGGLE_ACTION (ACTION (REQUEST_READ_RECEIPT));
+ gtk_toggle_action_set_active (action, TRUE);
}
/* Check for mail priority */
if (camel_medium_get_header (CAMEL_MEDIUM (message), "X-Priority")) {
- e_msg_composer_set_priority (composer, TRUE);
+ action = GTK_TOGGLE_ACTION (ACTION (PRIORITIZE_MESSAGE));
+ gtk_toggle_action_set_active (action, TRUE);
}
/* set extra headers */
@@ -3816,7 +3485,7 @@
handle_multipart (composer, multipart, 0);
}
} else {
- ssize_t length;
+ gssize length;
gchar *html;
html = em_utils_part_to_html ((CamelMimePart *)message, &length, NULL);
@@ -3954,7 +3623,7 @@
EDestination **tov, **ccv, **bccv;
gchar *subject = NULL, *body = NULL;
gchar *header, *content, *buf;
- size_t nread, nwritten;
+ gsize nread, nwritten;
const gchar *p;
gint len, clen;
CamelURL *url;
@@ -4151,10 +3820,12 @@
* @composer: a composer object
* @text: the HTML text to initialize the editor with
*
- * Loads the given HTML text ginto the editor.
+ * Loads the given HTML text into the editor.
**/
void
-e_msg_composer_set_body_text (EMsgComposer *composer, const gchar *text, ssize_t len)
+e_msg_composer_set_body_text (EMsgComposer *composer,
+ const gchar *text,
+ gssize len)
{
g_return_if_fail (E_IS_MSG_COMPOSER (composer));
g_return_if_fail (text != NULL);
@@ -4303,9 +3974,9 @@
/**
* e_msg_composer_add_inline_image_from_file:
* @composer: a composer object
- * @file_name: the name of the file containing the image
+ * @filename: the name of the file containing the image
*
- * This reads in the image in @file_name and adds it to @composer
+ * This reads in the image in @filename and adds it to @composer
* as an inline image, to be wrapped in a multipart/related.
*
* Return value: the newly-created CamelMimePart (which must be reffed
@@ -4313,7 +3984,7 @@
**/
CamelMimePart *
e_msg_composer_add_inline_image_from_file (EMsgComposer *composer,
- const gchar *file_name)
+ const gchar *filename)
{
gchar *mime_type, *cid, *url, *name, *dec_file_name;
CamelStream *stream;
@@ -4322,7 +3993,7 @@
struct stat statbuf;
EMsgComposerPrivate *p = composer->priv;
- dec_file_name = g_strdup (file_name);
+ dec_file_name = g_strdup (filename);
camel_url_decode (dec_file_name);
/* check for regular file */
@@ -4627,91 +4298,6 @@
composer->priv->in_signature_insert = FALSE;
}
-/**
- * e_msg_composer_get_request_receipt
- * @composer: A message composer widget
- *
- * Get the status of the "Request receipt" flag.
- *
- * Return value: The status of the "Request receipt" flag.
- **/
-gboolean
-e_msg_composer_get_request_receipt (EMsgComposer *composer)
-{
- EMsgComposerPrivate *p = composer->priv;
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return p->request_receipt;
-}
-
-
-/**
- * e_msg_composer_set_request_receipt:
- * @composer: A message composer widget
- * @state: whether to request or not a receipt
- *
- * If set, a message delivery notification request will be sent to the recipient
- */
-void
-e_msg_composer_set_request_receipt (EMsgComposer *composer, gboolean request_receipt)
-{
-#if 0 /* GTKHTML-EDITOR */
- EMsgComposerPrivate *p = composer->priv;
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if ((p->request_receipt && request_receipt) ||
- (!p->request_receipt && !request_receipt))
- return;
-
- p->request_receipt = request_receipt;
- bonobo_ui_component_set_prop (p->uic, "/commands/RequestReceipt",
- "state", p->request_receipt ? "1" : "0", NULL);
-#endif /* GTKHTML-EDITOR */
-}
-
-
-/**
- * e_msg_composer_get_priority
- * @composer: A message composer widget
- *
- * Get the status of the "Priority" flag.
- *
- * Return value: The status of the "Priority" flag.
- **/
-gboolean
-e_msg_composer_get_priority (EMsgComposer *composer)
-{
- EMsgComposerPrivate *p = composer->priv;
- g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
-
- return p->set_priority;
-}
-
-
-/**
- * e_msg_composer_set_priority:
- * @composer: A message composer widget
- * @state: whether to set priority or not
- *
- * If set, a message is sent with a high priority
- */
-void
-e_msg_composer_set_priority (EMsgComposer *composer, gboolean set_priority)
-{
-#if 0 /* GTKHTML-EDITOR */
- EMsgComposerPrivate *p = composer->priv;
- g_return_if_fail (E_IS_MSG_COMPOSER (composer));
-
- if ((p->set_priority && set_priority) ||
- (!p->set_priority && !set_priority))
- return;
-
- p->set_priority= set_priority;
- bonobo_ui_component_set_prop (p->uic, "/commands/SetPriority",
- "state", p->set_priority ? "1" : "0", NULL);
-#endif /* GTKHTML-EDITOR */
-}
-
CamelInternetAddress *
e_msg_composer_get_from (EMsgComposer *composer)
{
@@ -4760,19 +4346,19 @@
/**
* e_msg_composer_guess_mime_type:
- * @file_name: filename
+ * @filename: filename
*
- * Returns the guessed mime type of the file given by #file_name.
+ * Returns the guessed mime type of the file given by @filename.
**/
gchar *
-e_msg_composer_guess_mime_type (const gchar *file_name)
+e_msg_composer_guess_mime_type (const gchar *filename)
{
GnomeVFSFileInfo *info;
GnomeVFSResult result;
gchar *type = NULL;
info = gnome_vfs_file_info_new ();
- result = gnome_vfs_get_file_info (file_name, info,
+ result = gnome_vfs_get_file_info (filename, info,
GNOME_VFS_FILE_INFO_GET_MIME_TYPE |
GNOME_VFS_FILE_INFO_FORCE_SLOW_MIME_TYPE |
GNOME_VFS_FILE_INFO_FOLLOW_LINKS);
@@ -5136,8 +4722,9 @@
return g_strconcat ("cid:", cid, NULL);
}
-CamelMimePart*
-e_msg_composer_url_requested (EMsgComposer *composer, gchar *url)
+CamelMimePart *
+e_msg_composer_url_requested (EMsgComposer *composer,
+ const gchar *url)
{
EMsgComposerPrivate *p = composer->priv;
CamelMimePart *part = NULL;
@@ -5152,22 +4739,30 @@
}
void
-e_msg_composer_link_clicked (EMsgComposer *composer, const gchar *url)
+e_msg_composer_link_clicked (EMsgComposer *composer,
+ const gchar *url)
{
+ GError *error = NULL;
+
g_return_if_fail (composer != NULL);
- if (url && *url &&
- g_ascii_strncasecmp (url, "mailto:", 7) &&
- g_ascii_strncasecmp (url, "thismessage:", 12) &&
- g_ascii_strncasecmp (url, "cid:", 4)) {
- GError *err = NULL;
-
- gnome_url_show (url, &err);
-
- if (err) {
- g_warning ("gnome_url_show: %s", err->message);
- g_error_free (err);
- }
+ if (url == NULL || *url == '\0')
+ return;
+
+ if (g_ascii_strncasecmp (url, "mailto:", 7) == 0)
+ return;
+
+ if (g_ascii_strncasecmp (url, "thismessage:", 12) == 0)
+ return;
+
+ if (g_ascii_strncasecmp (url, "cid:", 4) == 0)
+ return;
+
+ gnome_url_show (url, &error);
+
+ if (error) {
+ g_warning ("gnome_url_show: %s", error->message);
+ g_error_free (error);
}
}
@@ -5191,10 +4786,10 @@
}
void
-e_msg_composer_set_send_options (EMsgComposer *composer, gboolean send_enable)
+e_msg_composer_set_send_options (EMsgComposer *composer,
+ gboolean send_enable)
{
- EMsgComposerPrivate *priv;
- priv = composer->priv;
+ g_return_if_fail (E_IS_MSG_COMPOSER (composer));
- priv->send_invoked = send_enable;
+ composer->priv->send_invoked = send_enable;
}
Modified: branches/mbarnes-composer/composer/e-msg-composer.h
==============================================================================
--- branches/mbarnes-composer/composer/e-msg-composer.h (original)
+++ branches/mbarnes-composer/composer/e-msg-composer.h Thu Mar 27 21:29:07 2008
@@ -21,8 +21,8 @@
* Author: Ettore Perazzoli
*/
-#ifndef ___E_MSG_COMPOSER_H__
-#define ___E_MSG_COMPOSER_H__
+#ifndef E_MSG_COMPOSER_H
+#define E_MSG_COMPOSER_H
#include <camel/camel-internet-address.h>
#include <camel/camel-mime-message.h>
@@ -68,106 +68,115 @@
struct _EAttachmentBar;
-GType e_msg_composer_get_type (void);
-
-EMsgComposer * e_msg_composer_new (void);
-
#define E_MSG_COMPOSER_MAIL 1
#define E_MSG_COMPOSER_POST 2
#define E_MSG_COMPOSER_MAIL_POST E_MSG_COMPOSER_MAIL|E_MSG_COMPOSER_POST
-EMsgComposer *e_msg_composer_new_with_type (gint type);
-
-EMsgComposer *e_msg_composer_new_with_message (CamelMimeMessage *msg);
-EMsgComposer *e_msg_composer_new_from_url (const gchar *url);
-EMsgComposer *e_msg_composer_new_redirect (CamelMimeMessage *message,
- const gchar *resent_from);
+GType e_msg_composer_get_type (void);
+EMsgComposer * e_msg_composer_new (void);
+EMsgComposer * e_msg_composer_new_with_type (gint type);
+EMsgComposer * e_msg_composer_new_with_message (CamelMimeMessage *msg);
+EMsgComposer * e_msg_composer_new_from_url (const gchar *url);
+EMsgComposer * e_msg_composer_new_redirect (CamelMimeMessage *message,
+ const gchar *resent_from);
void e_msg_composer_send (EMsgComposer *composer);
void e_msg_composer_save_draft (EMsgComposer *composer);
-void e_msg_composer_show_attachments_ui (EMsgComposer *composer);
-
-void e_msg_composer_set_alternative (EMsgComposer *composer,
- gboolean alt);
+void e_msg_composer_show_attachments_ui
+ (EMsgComposer *composer);
-void e_msg_composer_set_body_text (EMsgComposer *composer,
- const gchar *text,
- ssize_t len);
-void e_msg_composer_set_body (EMsgComposer *composer,
- const gchar *body,
- const gchar *mime_type);
-void e_msg_composer_add_header (EMsgComposer *composer,
- const gchar *name,
- const gchar *value);
-void e_msg_composer_modify_header (EMsgComposer *composer,
- const gchar *name,
- const gchar *value);
-void e_msg_composer_remove_header (EMsgComposer *composer,
- const gchar *name);
-void e_msg_composer_attach (EMsgComposer *composer,
- CamelMimePart *attachment);
-CamelMimePart *e_msg_composer_add_inline_image_from_file (EMsgComposer *composer,
- const gchar *filename);
-void e_msg_composer_add_inline_image_from_mime_part (EMsgComposer *composer,
- CamelMimePart *part);
-CamelMimeMessage *e_msg_composer_get_message (EMsgComposer *composer,
- gboolean save_html_object_data);
-CamelMimeMessage *e_msg_composer_get_message_print (EMsgComposer *composer,
- gboolean save_html_object_data);
-CamelMimeMessage *e_msg_composer_get_message_draft (EMsgComposer *composer);
-void e_msg_composer_show_sig_file (EMsgComposer *composer);
-
-gboolean e_msg_composer_get_request_receipt (EMsgComposer *composer);
-void e_msg_composer_set_request_receipt (EMsgComposer *composer,
- gboolean request_receipt);
-
-gboolean e_msg_composer_get_priority (EMsgComposer *composer);
-void e_msg_composer_set_priority (EMsgComposer *composer,
- gboolean set_priority);
-
-CamelInternetAddress *e_msg_composer_get_from (EMsgComposer *composer);
-CamelInternetAddress *e_msg_composer_get_reply_to (EMsgComposer *composer);
-
-void e_msg_composer_clear_inlined_table (EMsgComposer *composer);
-gchar *e_msg_composer_guess_mime_type (const gchar *file_name);
-void e_msg_composer_set_changed (EMsgComposer *composer);
-void e_msg_composer_unset_changed (EMsgComposer *composer);
-gboolean e_msg_composer_is_dirty (EMsgComposer *composer);
-void e_msg_composer_set_enable_autosave (EMsgComposer *composer,
- gboolean enabled);
-
-gchar *e_msg_composer_get_sig_file_content (const gchar *sigfile,
- gboolean in_html);
-void e_msg_composer_add_message_attachments (EMsgComposer *composer,
- CamelMimeMessage *message,
- gboolean just_inlines);
-void e_msg_composer_ignore (EMsgComposer *composer,
- const gchar *str);
-void e_msg_composer_drop_editor_undo (EMsgComposer *composer);
-
-gboolean e_msg_composer_request_close_all (void);
-void e_msg_composer_check_autosave (GtkWindow *parent);
-gint e_msg_composer_get_remote_download_count (EMsgComposer *composer);
-
-
-void e_msg_composer_reply_indent (EMsgComposer *composer);
-void e_msg_composer_insert_paragraph_before (EMsgComposer *composer);
-void e_msg_composer_insert_paragraph_after (EMsgComposer *composer);
-void e_msg_composer_delete (EMsgComposer *composer);
-gchar* e_msg_composer_resolve_image_url (EMsgComposer *composer, gchar *url);
-CamelMimePart* e_msg_composer_url_requested (EMsgComposer *composer, gchar *url);
-
-void e_msg_composer_link_clicked (EMsgComposer *composer, const gchar *url);
-
-EComposerHeaderTable * e_msg_composer_get_header_table (EMsgComposer *composer);
-void e_msg_composer_set_saved (EMsgComposer *composer);
-void e_msg_composer_set_send_options (EMsgComposer *composer,
- gboolean send_enable);
-GByteArray * e_msg_composer_get_raw_message_text (EMsgComposer *composer);
+void e_msg_composer_set_alternative (EMsgComposer *composer,
+ gboolean alt);
-struct _EAttachmentBar* e_msg_composer_get_attachment_bar (EMsgComposer *composer);
+void e_msg_composer_set_body_text (EMsgComposer *composer,
+ const gchar *text,
+ gssize len);
+void e_msg_composer_set_body (EMsgComposer *composer,
+ const gchar *body,
+ const gchar *mime_type);
+void e_msg_composer_add_header (EMsgComposer *composer,
+ const gchar *name,
+ const gchar *value);
+void e_msg_composer_modify_header (EMsgComposer *composer,
+ const gchar *name,
+ const gchar *value);
+void e_msg_composer_remove_header (EMsgComposer *composer,
+ const gchar *name);
+void e_msg_composer_attach (EMsgComposer *composer,
+ CamelMimePart *attachment);
+CamelMimePart * e_msg_composer_add_inline_image_from_file
+ (EMsgComposer *composer,
+ const gchar *filename);
+void e_msg_composer_add_inline_image_from_mime_part
+ (EMsgComposer *composer,
+ CamelMimePart *part);
+CamelMimeMessage *
+ e_msg_composer_get_message (EMsgComposer *composer,
+ gboolean save_html_object_data);
+CamelMimeMessage *
+ e_msg_composer_get_message_print(EMsgComposer *composer,
+ gboolean save_html_object_data);
+CamelMimeMessage *
+ e_msg_composer_get_message_draft(EMsgComposer *composer);
+void e_msg_composer_show_sig_file (EMsgComposer *composer);
+
+CamelInternetAddress *
+ e_msg_composer_get_from (EMsgComposer *composer);
+CamelInternetAddress *
+ e_msg_composer_get_reply_to (EMsgComposer *composer);
+
+void e_msg_composer_clear_inlined_table
+ (EMsgComposer *composer);
+gchar * e_msg_composer_guess_mime_type (const gchar *filename);
+void e_msg_composer_set_changed (EMsgComposer *composer);
+void e_msg_composer_unset_changed (EMsgComposer *composer);
+gboolean e_msg_composer_is_dirty (EMsgComposer *composer);
+void e_msg_composer_set_enable_autosave
+ (EMsgComposer *composer,
+ gboolean enabled);
+
+gchar * e_msg_composer_get_sig_file_content
+ (const gchar *sigfile,
+ gboolean in_html);
+void e_msg_composer_add_message_attachments
+ (EMsgComposer *composer,
+ CamelMimeMessage *message,
+ gboolean just_inlines);
+void e_msg_composer_drop_editor_undo (EMsgComposer *composer);
+
+gboolean e_msg_composer_request_close_all(void);
+EMsgComposer * e_msg_composer_load_from_file (const gchar *filename);
+void e_msg_composer_check_autosave (GtkWindow *parent);
+gint e_msg_composer_get_remote_download_count
+ (EMsgComposer *composer);
+
+void e_msg_composer_reply_indent (EMsgComposer *composer);
+void e_msg_composer_insert_paragraph_before
+ (EMsgComposer *composer);
+void e_msg_composer_insert_paragraph_after
+ (EMsgComposer *composer);
+void e_msg_composer_delete (EMsgComposer *composer);
+gchar* e_msg_composer_resolve_image_url(EMsgComposer *composer,
+ gchar *url);
+CamelMimePart * e_msg_composer_url_requested (EMsgComposer *composer,
+ const gchar *url);
+
+void e_msg_composer_link_clicked (EMsgComposer *composer,
+ const gchar *url);
+
+EComposerHeaderTable *
+ e_msg_composer_get_header_table (EMsgComposer *composer);
+void e_msg_composer_set_saved (EMsgComposer *composer);
+void e_msg_composer_set_send_options (EMsgComposer *composer,
+ gboolean send_enable);
+GByteArray * e_msg_composer_get_raw_message_text
+ (EMsgComposer *composer);
+
+struct _EAttachmentBar *
+ e_msg_composer_get_attachment_bar
+ (EMsgComposer *composer);
G_END_DECLS
-#endif /* ___E_MSG_COMPOSER_H__ */
+#endif /* E_MSG_COMPOSER_H */
Modified: branches/mbarnes-composer/composer/evolution-composer.ui
==============================================================================
--- branches/mbarnes-composer/composer/evolution-composer.ui (original)
+++ branches/mbarnes-composer/composer/evolution-composer.ui Thu Mar 27 21:29:07 2008
@@ -25,6 +25,17 @@
<menuitem action='view-subject'/>
</menu>
</placeholder>
+ <menu action='insert-menu'>
+ <placeholder name='insert-menu-top'>
+ <menuitem action='attach'/>
+ <separator/>
+ <menuitem action='send-options'/>
+ <separator/>
+ </placeholder>
+ <separator/>
+ <menuitem action='request-read-receipt'/>
+ <menuitem action='prioritize-message'/>
+ </menu>
<menu action='security-menu'>
<menuitem action='pgp-sign'/>
<menuitem action='pgp-encrypt'/>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]