]> spindle.queued.net Git - midori/commitdiff
Update tab panel colours in icon callback
authorChristian Dywan <christian@twotoasts.de>
Mon, 22 Mar 2010 21:01:59 +0000 (22:01 +0100)
committerChristian Dywan <christian@twotoasts.de>
Mon, 22 Mar 2010 21:34:03 +0000 (22:34 +0100)
Since Colorful Tabs now updates colors in the icon callback,
we also need to update in the icon callback.

extensions/tab-panel.c

index 6fb1fc8f1d3de07a74e7080b8dd42cd2f128ce2a..2d182d5ef34bcdde86578584c0c5640ecde37392 100644 (file)
@@ -329,8 +329,13 @@ tab_panel_view_notify_icon_cb (GtkWidget*       view,
     {
         GtkTreeModel* model = tab_panel_get_model_for_browser (browser);
         GtkTreeIter iter;
+        GtkWidget* label = midori_view_get_proxy_tab_label (MIDORI_VIEW (view));
+        GtkStyle* style = gtk_widget_get_style (label);
         if (tab_panel_get_iter_for_view (model, &iter, view))
-            gtk_tree_store_set (GTK_TREE_STORE (model), &iter, 3, icon, -1);
+            gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
+                3, icon,
+                6, &style->bg[GTK_STATE_NORMAL],
+                -1);
     }
 }
 
@@ -354,12 +359,10 @@ tab_panel_view_notify_title_cb (GtkWidget*       view,
         GtkTreeIter iter;
         if (tab_panel_get_iter_for_view (model, &iter, view))
         {
-            GtkWidget* label = midori_view_get_proxy_tab_label (MIDORI_VIEW (view));
-            GtkStyle* style = gtk_widget_get_style (label);
             gtk_tree_store_set (GTK_TREE_STORE (model), &iter,
                 4, title,
                 5, midori_view_get_label_ellipsize (MIDORI_VIEW (view)),
-                6, &style->bg[GTK_STATE_NORMAL], -1);
+                -1);
         }
     }
 }