[gtkhtml/gnome-2-26] Editor wasn't emitting "notify::html-mode" when it should.



commit 0b2cba992ba5c9c80c82d58be00b9936eaf2847e
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri May 29 17:45:55 2009 -0400

    Editor wasn't emitting "notify::html-mode" when it should.
    
    Also, add a shadow around the editor's main editing area.
---
 components/editor/gtkhtml-editor-actions.c |    2 ++
 components/editor/gtkhtml-editor-private.c |    2 ++
 components/editor/gtkhtml-editor.c         |    2 +-
 3 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/components/editor/gtkhtml-editor-actions.c b/components/editor/gtkhtml-editor-actions.c
index b2ea85a..436120e 100644
--- a/components/editor/gtkhtml-editor-actions.c
+++ b/components/editor/gtkhtml-editor-actions.c
@@ -855,6 +855,8 @@ action_mode_cb (GtkRadioAction *action,
 
 	html_engine_set_painter (html->engine, new_painter);
 	html_engine_schedule_redraw (html->engine);
+
+	g_object_notify (G_OBJECT (editor), "html-mode");
 }
 
 static void
diff --git a/components/editor/gtkhtml-editor-private.c b/components/editor/gtkhtml-editor-private.c
index 0423353..9a1959c 100644
--- a/components/editor/gtkhtml-editor-private.c
+++ b/components/editor/gtkhtml-editor-private.c
@@ -250,6 +250,8 @@ gtkhtml_editor_private_init (GtkhtmlEditor *editor)
 	gtk_scrolled_window_set_policy (
 		GTK_SCROLLED_WINDOW (widget),
 		GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC);
+	gtk_scrolled_window_set_shadow_type (
+		GTK_SCROLLED_WINDOW (widget), GTK_SHADOW_IN);
 	gtk_box_pack_start (GTK_BOX (editor->vbox), widget, TRUE, TRUE, 0);
 	priv->scrolled_window = g_object_ref (widget);
 	gtk_widget_show (widget);
diff --git a/components/editor/gtkhtml-editor.c b/components/editor/gtkhtml-editor.c
index 765ad7e..494c5f4 100644
--- a/components/editor/gtkhtml-editor.c
+++ b/components/editor/gtkhtml-editor.c
@@ -1166,7 +1166,7 @@ gtkhtml_editor_set_html_mode (GtkhtmlEditor *editor,
 	mode = html_mode ? EDITOR_MODE_HTML : EDITOR_MODE_TEXT;
 	gtk_radio_action_set_current_value (action, mode);
 
-	g_object_notify (G_OBJECT (editor), "html-mode");
+	/* We emit "notify::html-mode" in the action handler. */
 }
 
 gboolean



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