Re: active pane color

David Jensen wrote:

It seems, here at least, e2_pane_flag_active() is being called too soon. I get the button color for the 'default' theme. This seems to work better. Maybe the Treeviews are not realized??

attached a patch.

Further hacking, this works better.
This diff just sets the the default by passing NULL. It even works through a theme change.


Sorry, forget the header_color-1 diff.


-- David Jensen

diff -Naur emelfm2-0.1.2.orig/src/e2_pane.c emelfm2-0.1.2/src/e2_pane.c
--- emelfm2-0.1.2.orig/src/e2_pane.c    2005-08-21 23:52:22.000000000 -0500
+++ emelfm2-0.1.2/src/e2_pane.c 2005-09-29 19:56:16.000000000 -0500
@@ -113,16 +113,12 @@
                default:
                {
                        //revert all columns' header color
-                       GList *cols = gtk_tree_view_get_columns (GTK_TREE_VIEW 
(curr_view->treeview));
-                       GtkTreeViewColumn *col = cols->data;
-                       GdkColor inactive_panecolor = 
col->button->style->bg[GTK_STATE_NORMAL];
-                       g_list_free (cols);
-                       cols = gtk_tree_view_get_columns (GTK_TREE_VIEW 
(other_view->treeview));
+                       GList *cols = gtk_tree_view_get_columns (GTK_TREE_VIEW 
(other_view->treeview));
                        GList *base = cols;
                        for (; cols !=NULL; cols=cols->next)
                        {
-                               col = cols->data;
-                               gtk_widget_modify_bg (col->button, 
GTK_STATE_NORMAL, &inactive_panecolor);
+                               GtkTreeViewColumn *col = cols->data;
+                               gtk_widget_modify_bg (col->button, 
GTK_STATE_NORMAL, NULL);
                        }
                        g_list_free (base);
                        break;

Other related posts: