evolution r35089 - in branches/mbarnes-composer: . composer plugins/print-message



Author: mbarnes
Date: Tue Feb 26 05:01:45 2008
New Revision: 35089
URL: http://svn.gnome.org/viewvc/evolution?rev=35089&view=rev

Log:
IT'S ALIVE!!!  New composer comes up but is unstable.

Obsolete the print-message plugin; print functionality is now built-in.


Removed:
   branches/mbarnes-composer/plugins/print-message/
Modified:
   branches/mbarnes-composer/composer/Makefile.am
   branches/mbarnes-composer/composer/e-composer-actions.c
   branches/mbarnes-composer/composer/e-composer-actions.h
   branches/mbarnes-composer/composer/e-composer-private.h
   branches/mbarnes-composer/composer/e-msg-composer.c
   branches/mbarnes-composer/configure.in

Modified: branches/mbarnes-composer/composer/Makefile.am
==============================================================================
--- branches/mbarnes-composer/composer/Makefile.am	(original)
+++ branches/mbarnes-composer/composer/Makefile.am	Tue Feb 26 05:01:45 2008
@@ -4,8 +4,6 @@
 # provides error rule
 @EVO_PLUGIN_RULE@
 
-idl_DATA = $(IDLS)
-
 noinst_LTLIBRARIES = libcomposer.la
 
 INCLUDES =								\
@@ -44,6 +42,7 @@
 	e-composer-name-header.h		\
 	e-composer-post-header.c		\
 	e-composer-post-header.h		\
+	e-composer-private.c			\
 	e-composer-private.h			\
 	e-composer-text-header.c		\
 	e-composer-text-header.h		\
@@ -54,9 +53,12 @@
 	gconf-bridge.c				\
 	gconf-bridge.h
 
+uidir = $(evolutionuidir)
+ui_DATA = evolution-composer.ui
+
 EXTRA_DIST =					\
+	$(ui_DATA)				\
 	mail-composer.error.xml			\
-	$(IDLS)					\
 	ChangeLog.pre-1-4
 
 BUILT_SOURCES = $(IDL_GENERATED) $(HTML_EDITOR_GENERATED) $(error_DATA)

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	Tue Feb 26 05:01:45 2008
@@ -2,11 +2,77 @@
 #include "e-composer-private.h"
 
 #include <e-util/e-error.h>
+#include <mail/em-format-html-print.h>
 
 static void
 action_attach_cb (GtkAction *action,
                   EMsgComposer *composer)
 {
+	EAttachmentBar *bar;
+	GtkWidget *dialog;
+	GtkWidget *option;
+	GSList *uris, *iter;
+	gboolean active;
+	gint response;
+
+	bar = E_ATTACHMENT_BAR (composer->priv->attachment_bar);
+
+	dialog = gtk_file_chooser_dialog_new (
+		_("Insert Attachment"),
+		GTK_WINDOW (composer),
+		GTK_FILE_CHOOSER_ACTION_OPEN,
+		GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+		_("A_ttach"), 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_file_chooser_set_select_multiple (
+		GTK_FILE_CHOOSER (dialog), TRUE);
+	gtk_window_set_icon_name (
+		GTK_WINDOW (dialog), "mail-message-new");
+
+	option = gtk_check_button_new_with_mnemonic (
+		_("_Suggest automatic display of attachment"));
+	gtk_widget_show (option);
+	gtk_file_chooser_set_extra_widget (
+		GTK_FILE_CHOOSER (dialog), option);
+
+	response = gtkhtml_editor_file_chooser_dialog_run (
+		GTKHTML_EDITOR (composer), dialog);
+
+	if (response != GTK_RESPONSE_OK)
+		goto exit;
+
+	uris = gtk_file_chooser_get_uris (GTK_FILE_CHOOSER (dialog));
+	active = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (option));
+
+	for (iter = uris; iter != NULL; iter = iter->next) {
+		const gchar *disposition;
+		CamelURL *url;
+
+		url = camel_url_new (iter->data, NULL);
+		if (url == NULL)
+			continue;
+
+		disposition = active ? "inline" : "attachment";
+		if (!g_ascii_strcasecmp (url->protocol, "file"))
+			e_attachment_bar_attach (bar, url->path, disposition);
+		else
+			e_attachment_bar_attach (bar, iter->data, disposition);
+
+		camel_url_free (url);
+	}
+
+	e_msg_composer_show_attachments_ui (composer);
+
+	g_slist_foreach (uris, (GFunc) g_free, NULL);
+	g_slist_free (uris);
+
+exit:
+	gtk_widget_destroy (dialog);
 }
 
 static void
@@ -69,12 +135,32 @@
 action_print_cb (GtkAction *action,
                  EMsgComposer *composer)
 {
+	GtkPrintOperationAction print_action;
+	CamelMimeMessage *message;
+	EMFormatHTMLPrint *efhp;
+
+	print_action = GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG;
+	message = e_msg_composer_get_message (composer, 1);
+
+	efhp = em_format_html_print_new (NULL, print_action);
+	em_format_html_print_raw_message (efhp, message);
+	g_object_unref (efhp);
 }
 
 static void
 action_print_preview_cb (GtkAction *action,
                          EMsgComposer *composer)
 {
+	GtkPrintOperationAction print_action;
+	CamelMimeMessage *message;
+	EMFormatHTMLPrint *efhp;
+
+	print_action = GTK_PRINT_OPERATION_ACTION_PREVIEW;
+	message = e_msg_composer_get_message_print (composer, 1);
+
+	efhp = em_format_html_print_new (NULL, print_action);
+	em_format_html_print_raw_message (efhp, message);
+	g_object_unref (efhp);
 }
 
 static void
@@ -84,7 +170,7 @@
 	GtkhtmlEditor *editor = GTKHTML_EDITOR (composer);
 	const gchar *filename;
 
-	filename = gtkhtml_editor_get_current_filename (editor);
+	filename = gtkhtml_editor_get_filename (editor);
 	if (filename == NULL) {
 		gtk_action_activate (ACTION (SAVE_AS));
 		return;
@@ -196,6 +282,20 @@
 }
 
 static void
+action_view_subject_cb (GtkToggleAction *action,
+                        EMsgComposer *composer)
+{
+	EComposerHeaderTable *table;
+	gboolean active;
+
+	table = e_msg_composer_get_header_table (composer);
+	active = gtk_toggle_action_get_active (action);
+
+	e_composer_header_table_set_header_visible (
+		table, E_COMPOSER_HEADER_SUBJECT, active);
+}
+
+static void
 action_view_to_cb (GtkToggleAction *action,
                    EMsgComposer *composer)
 {
@@ -254,7 +354,7 @@
 	  G_CALLBACK (action_save_as_cb) },
 
 	{ "save-draft",
-	  NULL,
+	  GTK_STOCK_SAVE,
 	  N_("Save _Draft"),
 	  "<Shift><Control>s",
 	  N_("Save as draft"),
@@ -263,9 +363,18 @@
 	{ "send",
 	  "mail-send",
 	  N_("S_end"),
-	  "<Control><Return>",
+	  "<Control>Return",
 	  N_("Send this message"),
-	  G_CALLBACK (action_send_cb) }
+	  G_CALLBACK (action_send_cb) },
+
+	/* Menus */
+
+	{ "security-menu",
+	  NULL,
+	  N_("_Security"),
+	  NULL,
+	  NULL,
+	  NULL }
 };
 
 static GtkToggleActionEntry toggle_entries[] = {
@@ -342,6 +451,14 @@
 	  G_CALLBACK (action_view_reply_to_cb),
 	  FALSE },
 
+	{ "view-subject",
+	  NULL,
+	  N_("_Subject Field"),
+	  NULL,
+	  N_("Toggles whether the Subject field is displayed"),
+	  G_CALLBACK (action_view_subject_cb),
+	  TRUE },
+
 	{ "view-to",
 	  NULL,
 	  N_("_To Field"),
@@ -352,7 +469,7 @@
 };
 
 void
-e_msg_composer_actions_init (EMsgComposer *composer)
+e_composer_actions_init (EMsgComposer *composer)
 {
 	GtkActionGroup *action_group;
 	GtkUIManager *manager;

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	Tue Feb 26 05:01:45 2008
@@ -40,6 +40,8 @@
 	E_COMPOSER_ACTION ((composer), "view-post-to")
 #define E_COMPOSER_ACTION_VIEW_REPLY_TO(composer) \
 	E_COMPOSER_ACTION ((composer), "view-reply-to")
+#define E_COMPOSER_ACTION_VIEW_SUBJECT(composer) \
+	E_COMPOSER_ACTION ((composer), "view-subject")
 #define E_COMPOSER_ACTION_VIEW_TO(composer) \
 	E_COMPOSER_ACTION ((composer), "view-to")
 

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	Tue Feb 26 05:01:45 2008
@@ -1,12 +1,11 @@
 #ifndef E_COMPOSER_PRIVATE_H
 #define E_COMPOSER_PRIVATE_H
 
-#include "e-composer-common.h"
+#include "e-msg-composer.h"
 
 #include <glib/gi18n.h>
-#include <gtkhtml-editor.h>
 
-#include "e-msg-composer.h"
+#include "e-attachment-bar.h"
 #include "e-composer-actions.h"
 #include "e-composer-autosave.h"
 #include "e-composer-header-table.h"
@@ -18,6 +17,12 @@
 /* Shorthand, requires a variable named "composer". */
 #define ACTION(name)	(E_COMPOSER_ACTION_##name (composer))
 
+/* For use in dispose() methods. */
+#define DISPOSE(obj) \
+	G_STMT_START { \
+	if ((obj) != NULL) { g_object_unref (obj); (obj) = NULL; } \
+	} G_STMT_END
+
 G_BEGIN_DECLS
 
 struct _EMsgComposerPrivate {
@@ -67,6 +72,15 @@
 	gboolean send_invoked;
 };
 
+void		e_composer_private_init		(EMsgComposer *composer);
+void		e_composer_private_dispose	(EMsgComposer *composer);
+void		e_composer_private_finalize	(EMsgComposer *composer);
+
+/* Private Utilities */
+
+void		e_composer_actions_init		(EMsgComposer *composer);
+gchar *		e_composer_find_data_file	(const gchar *basename);
+
 G_END_DECLS
 
 #endif /* E_COMPOSER_PRIVATE_H */

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	Tue Feb 26 05:01:45 2008
@@ -1401,7 +1401,7 @@
 {
 	EMsgComposerPrivate *p = composer->priv;
 
-	e_expander_set_expanded (E_EXPANDER (p->attachment_expander), show);
+	gtk_expander_set_expanded (GTK_EXPANDER (p->attachment_expander), show);
 	if (show)
 		gtk_label_set_text_with_mnemonic (GTK_LABEL (composer->priv->attachment_expander_label),
 		_("Hide _Attachment Bar"));
@@ -1609,40 +1609,6 @@
 
 
 static void
-add_to_bar (EMsgComposer *composer, GSList *names, int is_inline)
-{
-	EMsgComposerPrivate *p = composer->priv;
-
-	while (names) {
-		CamelURL *url;
-
-		if (!(url = camel_url_new (names->data, NULL)))
-			continue;
-
-		if (!g_ascii_strcasecmp (url->protocol, "file")) {
-			e_attachment_bar_attach ((EAttachmentBar *)p->attachment_bar, url->path, is_inline ? "inline" : "attachment");
-		} else {
-			e_attachment_bar_attach_remote_file ((EAttachmentBar *)p->attachment_bar, names->data, is_inline ? "inline" : "attachment");
-		}
-
-		camel_url_free (url);
-		names = names->next;
-	}
-}
-
-static void
-menu_file_add_attachment_cb (BonoboUIComponent *uic,
-			     gpointer data,
-			     const char *path)
-{
-	EMsgComposer *composer = E_MSG_COMPOSER (data);
-	EMsgComposerPrivate *p = composer->priv;
-	EMsgComposer *toplevel = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (p->attachment_bar)));
-
-	e_msg_composer_select_file_attachments (toplevel, add_to_bar);
-}
-
-static void
 menu_send_options_cb (BonoboUIComponent *component, gpointer data, const char *path)
 {
 	EMEvent *e = em_event_peek ();
@@ -1709,7 +1675,6 @@
 	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 ("FileAttach", menu_file_add_attachment_cb),
 
 	BONOBO_UI_VERB ("InsertXSendOptions", menu_send_options_cb),
 
@@ -1742,24 +1707,6 @@
 	char *charset;
 	char *xmlfile;
 
-	container = bonobo_window_get_ui_container (BONOBO_WINDOW (composer));
-
-	p->uic = bonobo_ui_component_new_default ();
-	/* FIXME: handle bonobo exceptions */
-	bonobo_ui_component_set_container (p->uic, bonobo_object_corba_objref (BONOBO_OBJECT (container)), NULL);
-
-	bonobo_ui_component_add_verb_list_with_data (p->uic, verbs, composer);
-
-	bonobo_ui_component_freeze (p->uic, NULL);
-
-	xmlfile = g_build_filename (EVOLUTION_UIDIR, "evolution-message-composer.xml", NULL);
-	bonobo_ui_util_set_ui (p->uic, PREFIX,
-			       xmlfile,
-			       "evolution-message-composer", NULL);
-	g_free (xmlfile);
-
-	e_pixmaps_update (p->uic, pixcache);
-
 	/* Populate the Charset Encoding menu and default it to whatever the user
 	   chose as his default charset in the mailer */
 	charset = composer_get_default_charset_setting ();
@@ -1837,11 +1784,11 @@
 }
 
 static void
-attachment_expander_activate_cb (EExpander *expander,
-				void      *data)
+attachment_expander_activate_cb (GtkExpander *expander,
+				 void      *data)
 {
 	EMsgComposer *composer = E_MSG_COMPOSER (data);
-	gboolean show = e_expander_get_expanded (expander);
+	gboolean show = gtk_expander_get_expanded (expander);
 
 	/* Update the expander label */
 	if (show)
@@ -2607,26 +2554,18 @@
 static void
 msg_composer_init (EMsgComposer *composer)
 {
-	GHashTable *inline_images;
-	GHashTable *inline_images_by_url;
-
 	composer->priv = E_MSG_COMPOSER_GET_PRIVATE (composer);
+	all_composers = g_slist_prepend (all_composers, composer);
 
-	inline_images = g_hash_table_new_full (
-		g_str_hash, g_str_equal,
-		(GDestroyNotify) g_free,
-		(GDestroyNotify) NULL);
-
-	inline_images_by_url = g_hash_table_new_full (
-		g_str_hash, g_str_equal,
-		(GDestroyNotify) g_free,
-		(GDestroyNotify) camel_object_unref);
+	e_composer_private_init (composer);
 
-	composer->priv->extra_hdr_names = g_ptr_array_new ();
-	composer->priv->extra_hdr_values = g_ptr_array_new ();
+	gtk_window_set_title (GTK_WINDOW (composer), _("Compose Message"));
+	gtk_window_set_icon_name (GTK_WINDOW (composer), "mail-message-new");
 
-	composer->priv->inline_images = inline_images;
-	composer->priv->inline_images_by_url = inline_images_by_url;
+	gconf_bridge_bind_property (
+		gconf_bridge_get (),
+		COMPOSER_GCONF_CURRENT_FOLDER_KEY,
+		G_OBJECT (composer), "current-folder");
 
 	gconf_bridge_bind_property (
 		gconf_bridge_get (),
@@ -2726,6 +2665,9 @@
 		action = GTK_TOGGLE_ACTION (ACTION (VIEW_BCC));
 		gtk_toggle_action_set_active (action, FALSE);
 	}
+
+	action = GTK_TOGGLE_ACTION (ACTION (VIEW_SUBJECT));
+	gtk_toggle_action_set_active (action, TRUE);
 }
 
 static int
@@ -2893,9 +2835,10 @@
 emcab_add (EPopup *ep, EPopupItem *item, gpointer data)
 {
 	EAttachmentBar *bar = data;
-	EMsgComposer *toplevel = E_MSG_COMPOSER (gtk_widget_get_toplevel (GTK_WIDGET (bar)));
+	GtkWidget *composer;
 
-	e_msg_composer_select_file_attachments (toplevel, add_to_bar);
+	composer = gtk_widget_get_toplevel (GTK_WIDGET (bar));
+	gtk_action_activate (ACTION (ATTACH));
 }
 
 static void
@@ -3060,18 +3003,12 @@
 {
 	EMsgComposer *composer;
 	EComposerHeaderTable *table;
-	GtkWidget *vbox, *expander_hbox;
 	GConfClient *client;
-	GList *icon_list;
 	EMsgComposerPrivate *p;
 
-	composer = g_object_new (E_TYPE_MSG_COMPOSER, "win_name", _("Compose Message"), NULL);
+	composer = g_object_new (E_TYPE_MSG_COMPOSER, NULL);
 	p = composer->priv;
 
-	gtk_window_set_title ((GtkWindow *) composer, _("Compose Message"));
-
-	all_composers = g_slist_prepend (all_composers, composer);
-
 	g_signal_connect (composer, "key-press-event",
 			  G_CALLBACK (composer_key_pressed),
 			  NULL);
@@ -3080,13 +3017,6 @@
 			  G_CALLBACK (msg_composer_destroy_notify),
 			  NULL);
 
-	icon_list = e_icon_factory_get_icon_list ("mail-message-new");
-	if (icon_list) {
-		gtk_window_set_icon_list (GTK_WINDOW (composer), icon_list);
-		g_list_foreach (icon_list, (GFunc) g_object_unref, NULL);
-		g_list_free (icon_list);
-	}
-
 	/* DND support */
 	gtk_drag_dest_set (GTK_WIDGET (composer), GTK_DEST_DEFAULT_ALL,  drop_types, G_N_ELEMENTS (drop_types), GDK_ACTION_COPY|GDK_ACTION_ASK|GDK_ACTION_MOVE);
 	g_signal_connect (composer, "drag_data_received", G_CALLBACK (drag_data_received), composer);
@@ -3095,12 +3025,9 @@
 
 	setup_ui (composer);
 
-	vbox = gtk_vbox_new (FALSE, 0);
-
 	/* Headers */
 
 	p->visible_mask = visible_mask;
-	p->header_table = e_composer_header_table_new ();
 	table = E_COMPOSER_HEADER_TABLE (p->header_table);
 
 	e_composer_header_table_set_account_list (
@@ -3110,18 +3037,13 @@
 
 	/* Configure header visibility / sensitivity */
 
-#if 0 /* GTKHTML-EDITOR */
-	bonobo_ui_component_set_prop (
-		p->uic, "/commands/ViewTo", "sensitive",
-		visible_mask & E_MSG_COMPOSER_VISIBLE_TO ? "0" : "1", NULL);
-	bonobo_ui_component_set_prop (
-		p->uic, "/commands/ViewPostTo", "sensitive",
-		visible_mask & E_MSG_COMPOSER_VISIBLE_POSTTO ? "0" : "1", NULL);
-	update_header_visibility (composer);
-#endif /* GTKHTML-EDITOR */
+	gtk_action_set_sensitive (
+		ACTION (VIEW_TO),
+		visible_mask & E_MSG_COMPOSER_VISIBLE_TO);
+	gtk_action_set_sensitive (
+		ACTION (VIEW_POST_TO),
+		visible_mask & E_MSG_COMPOSER_VISIBLE_POSTTO);
 
-	gtk_box_set_spacing (GTK_BOX (vbox), 6);
-	gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (table), FALSE, FALSE, 0);
 	g_signal_connect_swapped (
 		table, "notify::account",
 		G_CALLBACK (account_changed_cb), composer);
@@ -3149,7 +3071,6 @@
 	g_signal_connect_swapped (
 		table, "notify::signature",
 		G_CALLBACK (e_msg_composer_show_sig_file), composer);
-	gtk_widget_show (GTK_WIDGET (table));
 
 	account_changed_cb (composer);
 
@@ -3167,70 +3088,17 @@
 		msg_composer_update_preferences, composer, NULL, NULL);
 	g_object_unref (client);
 
-	/* Attachment editor, wrapped into an EScrollFrame.  It's
-	   hidden in an EExpander. */
-
-	p->attachment_scrolled_window = gtk_scrolled_window_new (NULL, NULL);
-	gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (p->attachment_scrolled_window),
-					     GTK_SHADOW_IN);
-	gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (p->attachment_scrolled_window),
-					GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
-
-	p->attachment_bar = e_attachment_bar_new (NULL);
-
 	g_signal_connect (p->attachment_bar, "button_press_event", G_CALLBACK (button_press_event), NULL);
 	g_signal_connect (p->attachment_bar, "key_press_event", G_CALLBACK (key_press_event), NULL);
 	g_signal_connect (p->attachment_bar, "popup-menu", G_CALLBACK (popup_menu_event), NULL);
 
-	GTK_WIDGET_SET_FLAGS (p->attachment_bar, GTK_CAN_FOCUS);
-	gtk_container_add (GTK_CONTAINER (p->attachment_scrolled_window),
-			   p->attachment_bar);
-	gtk_widget_show (p->attachment_bar);
 	g_signal_connect (p->attachment_bar, "changed",
 			  G_CALLBACK (attachment_bar_changed_cb), composer);
 
-	p->attachment_expander_label =
-		gtk_label_new_with_mnemonic (_("Show _Attachment Bar"));
-	p->attachment_expander_num = gtk_label_new ("");
-	gtk_label_set_use_markup (GTK_LABEL (p->attachment_expander_num), TRUE);
-	gtk_misc_set_alignment (GTK_MISC (p->attachment_expander_label), 0.0, 0.5);
-	gtk_misc_set_alignment (GTK_MISC (p->attachment_expander_num), 1.0, 0.5);
-	expander_hbox = gtk_hbox_new (FALSE, 0);
-
-	p->attachment_expander_icon = e_icon_factory_get_image ("mail-attachment", E_ICON_SIZE_MENU);
-	gtk_misc_set_alignment (GTK_MISC (p->attachment_expander_icon), 1, 0.5);
-	gtk_widget_set_size_request (p->attachment_expander_icon, 100, -1);
-
-	gtk_box_pack_start (GTK_BOX (expander_hbox), p->attachment_expander_label,
-			    TRUE, TRUE, GNOME_PAD_SMALL);
-	gtk_box_pack_start (GTK_BOX (expander_hbox), p->attachment_expander_icon,
-			    TRUE, TRUE, 0);
-	gtk_box_pack_start (GTK_BOX (expander_hbox), p->attachment_expander_num,
-			    FALSE, FALSE, GNOME_PAD_SMALL);
-	gtk_widget_show_all (expander_hbox);
-	gtk_widget_hide (p->attachment_expander_icon);
-
-	p->attachment_expander = e_expander_new ("");
-	e_expander_set_label_widget (E_EXPANDER (p->attachment_expander), expander_hbox);
-	gtk_container_add (GTK_CONTAINER (p->attachment_expander), p->attachment_scrolled_window);
-
-	gtk_box_pack_start (GTK_BOX (vbox), p->attachment_expander, FALSE, FALSE, GNOME_PAD_SMALL);
-	gtk_widget_show (p->attachment_expander);
-	e_expander_set_expanded (E_EXPANDER (p->attachment_expander), FALSE);
 	g_signal_connect_after (p->attachment_expander, "activate",
 				G_CALLBACK (attachment_expander_activate_cb), composer);
 
 #if 0 /* GTKHTML-EDITOR */
-	bonobo_window_set_contents (BONOBO_WINDOW (composer), vbox);
-#endif /* GTKHTML-EDITOR */
-	gtk_widget_show (vbox);
-
-	gconf_bridge_bind_property (
-		gconf_bridge_get (),
-		COMPOSER_GCONF_CURRENT_FOLDER_KEY,
-		G_OBJECT (composer), "current-folder");
-
-#if 0 /* GTKHTML-EDITOR */
 	/* The engine would have the GtkHTML widget stored in "html-widget"
 	 * We'll use that to listen for DnD signals
 	 */
@@ -3252,6 +3120,7 @@
 
 	return composer;
 }
+
 static void
 set_editor_signature (EMsgComposer *composer)
 {
@@ -5006,6 +4875,8 @@
 
 	g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
 
+	editor = GTKHTML_EDITOR (composer);
+
 	return composer->priv->has_changed ||
 		(gtkhtml_editor_has_undo (editor) &&
 		!gtkhtml_editor_run_command (editor, "is-saved"));

Modified: branches/mbarnes-composer/configure.in
==============================================================================
--- branches/mbarnes-composer/configure.in	(original)
+++ branches/mbarnes-composer/configure.in	Tue Feb 26 05:01:45 2008
@@ -1686,7 +1686,7 @@
 	      [enable_plugins="$enableval"],[enable_plugins=all])
 
 dnl Add any new plugins here
-plugins_base_always="calendar-file calendar-http calendar-weather itip-formatter plugin-manager default-source addressbook-file startup-wizard print-message mark-all-read groupwise-features groupwise-account-setup hula-account-setup mail-account-disable publish-calendar caldav imap-features google-account-setup"
+plugins_base_always="calendar-file calendar-http calendar-weather itip-formatter plugin-manager default-source addressbook-file startup-wizard mark-all-read groupwise-features groupwise-account-setup hula-account-setup mail-account-disable publish-calendar caldav imap-features google-account-setup"
 plugins_base="$plugins_base_always $SA_JUNK_PLUGIN $BF_JUNK_PLUGIN $EXCHANGE_PLUGIN $MONO_PLUGIN" 
 all_plugins_base="$plugins_base_always sa-junk-plugin bogo-junk-plugin exchange-operations mono"
 
@@ -1978,7 +1978,6 @@
 plugins/default-mailer/Makefile
 plugins/addressbook-file/Makefile
 plugins/startup-wizard/Makefile
-plugins/print-message/Makefile
 plugins/groupwise-account-setup/Makefile
 plugins/hula-account-setup/Makefile
 plugins/groupwise-features/Makefile



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]