[evolution/webkit-composer: 77/181] Move EActionComboBox from widgets/misc to widgets/editor



commit e556444681461bc52dddb66d4c2463495b911bcf
Author: Dan VrÃtil <dvratil redhat com>
Date:   Tue Sep 11 10:16:47 2012 +0200

    Move EActionComboBox from widgets/misc to widgets/editor

 e-util/e-editor-actions.c           |    1 -
 e-util/test-editor.c                |   21 ++++++++++++++-------
 modules/mail/e-mail-shell-backend.c |    3 ++-
 3 files changed, 16 insertions(+), 9 deletions(-)
---
diff --git a/e-util/e-editor-actions.c b/e-util/e-editor-actions.c
index 8121c59..99c5ea3 100644
--- a/e-util/e-editor-actions.c
+++ b/e-util/e-editor-actions.c
@@ -1985,5 +1985,4 @@ editor_actions_init (EEditor *editor)
 		editor->priv->selection, "underline",
 		ACTION (UNDERLINE), "active",
 		G_BINDING_SYNC_CREATE | G_BINDING_BIDIRECTIONAL);
-
 }
diff --git a/e-util/test-editor.c b/e-util/test-editor.c
index febfee4..5e4136c 100644
--- a/e-util/test-editor.c
+++ b/e-util/test-editor.c
@@ -128,7 +128,7 @@ save_dialog (EEditor *editor)
 static void
 view_source_dialog (EEditor *editor,
                     const gchar *title,
-                    const gchar *content_type,
+                    gboolean plain_text,
 		    gboolean show_source)
 {
 	GtkWidget *dialog;
@@ -160,9 +160,16 @@ view_source_dialog (EEditor *editor,
 	gtk_container_set_border_width (GTK_CONTAINER (scrolled_window), 6);
 	gtk_window_set_default_size (GTK_WINDOW (dialog), 400, 300);
 
-	html = e_editor_widget_get_text_html (
-		e_editor_get_editor_widget (editor));
-	if (show_source) {
+
+	if (plain_text) {
+		html = e_editor_widget_get_text_plain (
+				e_editor_get_editor_widget (editor));
+	} else {
+		html = e_editor_widget_get_text_html (
+			e_editor_get_editor_widget (editor));
+	}
+
+	if (show_source || plain_text) {
 		GtkTextBuffer *buffer;
 
 
@@ -248,21 +255,21 @@ static void
 action_view_html_output (GtkAction *action,
                          EEditor *editor)
 {
-	view_source_dialog (editor, _("HTML Output"), "text/html", FALSE);
+	view_source_dialog (editor, _("HTML Output"), FALSE, FALSE);
 }
 
 static void
 action_view_html_source (GtkAction *action,
                          EEditor *editor)
 {
-	view_source_dialog (editor, _("HTML Source"), "text/html", TRUE);
+	view_source_dialog (editor, _("HTML Source"), FALSE, TRUE);
 }
 
 static void
 action_view_plain_source (GtkAction *action,
                           EEditor *editor)
 {
-	view_source_dialog (editor, _("Plain Source"), "text/plain", FALSE);
+	view_source_dialog (editor, _("Plain Source"), TRUE, FALSE);
 }
 
 static void
diff --git a/modules/mail/e-mail-shell-backend.c b/modules/mail/e-mail-shell-backend.c
index 9a745a6..bdf1655 100644
--- a/modules/mail/e-mail-shell-backend.c
+++ b/modules/mail/e-mail-shell-backend.c
@@ -388,9 +388,10 @@ mail_shell_backend_window_added_cb (GtkApplication *application,
 		shell_settings = e_shell_get_shell_settings (shell);
 
 		/* Express mode does not honor this setting. */
-		if (!e_shell_get_express_mode (shell))
+		if (!e_shell_get_express_mode (shell)) {
 			active = e_shell_settings_get_boolean (
 				shell_settings, "composer-format-html");
+		}
 
 		e_editor_widget_set_mode (
 			editor_widget,


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