[evolution/webkit-composer: 152/231] EEditor: Tweak the main-toolbar style.



commit 82c114ec381f4ecdaf8388801f4cc78d464659cf
Author: Matthew Barnes <mbarnes redhat com>
Date:   Thu Feb 7 12:09:25 2013 -0500

    EEditor: Tweak the main-toolbar style.
    
    Should apply to all EEditor instances, not just in EEditorWindow.

 e-util/e-editor-window.c |    4 ----
 e-util/e-editor.c        |    7 +++++++
 2 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/e-util/e-editor-window.c b/e-util/e-editor-window.c
index c8c007b..dfa517a 100644
--- a/e-util/e-editor-window.c
+++ b/e-util/e-editor-window.c
@@ -126,10 +126,6 @@ e_editor_window_init (EEditorWindow *window)
        priv->main_toolbar = g_object_ref (widget);
        gtk_widget_show (widget);
 
-       gtk_style_context_add_class (
-               gtk_widget_get_style_context (widget),
-               GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
-
        gtk_widget_set_hexpand (GTK_WIDGET (priv->editor), TRUE);
        gtk_grid_attach (
                priv->main_layout, GTK_WIDGET (priv->editor),
diff --git a/e-util/e-editor.c b/e-util/e-editor.c
index 716dcfe..2a84ff5 100644
--- a/e-util/e-editor.c
+++ b/e-util/e-editor.c
@@ -777,6 +777,7 @@ static void
 e_editor_init (EEditor *editor)
 {
        EEditorPrivate *priv;
+       GtkWidget *widget;
        gchar *filename;
        GError *error = NULL;
 
@@ -804,6 +805,12 @@ e_editor_init (EEditor *editor)
 
        editor_actions_init (editor);
        priv->editor_layout_row = 2;
+
+       /* Tweak the main-toolbar style. */
+       widget = e_editor_get_managed_widget (editor, "/main-toolbar");
+       gtk_style_context_add_class (
+               gtk_widget_get_style_context (widget),
+               GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
 }
 
 /**


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