[Xfce4-commits] <midori:master> Use accessor for widget style

Christian Dywan noreply at xfce.org
Tue Oct 19 00:54:07 CEST 2010


Updating branch refs/heads/master
         to 42299f7fe3becb2a7409b80b5e6b3b6d4d07e0c8 (commit)
       from fc166214b08a7b017a227140d8d00969eff28453 (commit)

commit 42299f7fe3becb2a7409b80b5e6b3b6d4d07e0c8
Author: Christian Dywan <christian at twotoasts.de>
Date:   Mon Oct 18 22:47:51 2010 +0200

    Use accessor for widget style

 midori/sokoke.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/midori/sokoke.c b/midori/sokoke.c
index 2389b18..02910d6 100644
--- a/midori/sokoke.c
+++ b/midori/sokoke.c
@@ -982,6 +982,7 @@ sokoke_xfce_header_new (const gchar* icon,
     if (sokoke_get_desktop () == SOKOKE_DESKTOP_XFCE)
     {
         GtkWidget* entry;
+        GtkStyle* style;
         gchar* markup;
         GtkWidget* xfce_heading;
         GtkWidget* hbox;
@@ -992,8 +993,9 @@ sokoke_xfce_header_new (const gchar* icon,
 
         xfce_heading = gtk_event_box_new ();
         entry = gtk_entry_new ();
+        style = gtk_widget_get_style (entry);
         gtk_widget_modify_bg (xfce_heading, GTK_STATE_NORMAL,
-            &entry->style->base[GTK_STATE_NORMAL]);
+            &style->base[GTK_STATE_NORMAL]);
         hbox = gtk_hbox_new (FALSE, 12);
         gtk_container_set_border_width (GTK_CONTAINER (hbox), 6);
         if (icon)
@@ -1004,7 +1006,7 @@ sokoke_xfce_header_new (const gchar* icon,
         gtk_box_pack_start (GTK_BOX (hbox), image, FALSE, FALSE, 0);
         label = gtk_label_new (NULL);
         gtk_widget_modify_fg (label, GTK_STATE_NORMAL
-         , &entry->style->text[GTK_STATE_NORMAL]);
+         , &style->text[GTK_STATE_NORMAL]);
         markup = g_strdup_printf ("<span size='large' weight='bold'>%s</span>",
                                   title);
         gtk_label_set_markup (GTK_LABEL (label), markup);



More information about the Xfce4-commits mailing list