From e78e0bd5564d53a3af11439736b19f6c956430fd Mon Sep 17 00:00:00 2001 From: Miguel de Icaza Date: Tue, 10 Mar 1998 04:45:35 +0000 Subject: [PATCH] 1998-03-09 Federico Mena Quintero * gscreen.c (x_panel_select_item): Set the colors of the row. --- gnome/ChangeLog | 2 ++ gnome/gmain.c | 4 ++-- gnome/gscreen.c | 30 +++++++----------------------- 3 files changed, 11 insertions(+), 25 deletions(-) diff --git a/gnome/ChangeLog b/gnome/ChangeLog index 808e752ab..d38ea7472 100644 --- a/gnome/ChangeLog +++ b/gnome/ChangeLog @@ -1,5 +1,7 @@ 1998-03-09 Federico Mena Quintero + * gscreen.c (x_panel_select_item): Set the colors of the row. + * gmain.c (xtoolkit_init): Changed gnome_init() to new version. (xtoolkit_init): Call gnome_init() properly. Also, return 0. diff --git a/gnome/gmain.c b/gnome/gmain.c index 9391b7902..4fe13ce71 100644 --- a/gnome/gmain.c +++ b/gnome/gmain.c @@ -28,9 +28,9 @@ GdkColorContext *mc_cc; struct gmc_color_pairs_s gmc_color_pairs [MAX_COLOR_PAIRS]; char *default_edition_colors = -"normal=black,white:" +"normal=black:" "directory=blue:" -"marked=white,blue:" +"marked=white,seagreen:" "execute=green:" "link=yellow:" "device=magenta:" diff --git a/gnome/gscreen.c b/gnome/gscreen.c index 1add06e5c..bc57f3e80 100644 --- a/gnome/gscreen.c +++ b/gnome/gscreen.c @@ -76,27 +76,8 @@ panel_file_list_set_type_bitmap (GtkCList *cl, int row, int column, int color, f static void panel_file_list_set_row_colors (GtkCList *cl, int row, int color_pair) { - GtkCListRow *row; - - row = 0; - - if (gmc_color_pairs [color_pair].fore) - gtk_clist_set_foreground (cl, row, gmc_color_pairs [color_pair].fore); - else { - /* ARREGLAME GUEY */ - row = g_list_nth (cl->rows, row); - row->fg_set = 0; - } - - if (gmc_color_pairs [color_pair].back) - gtk_clist_set_background (cl, row, gmc_color_pairs [color_pair].back); - else { - if (!row) - row = g_list_nth (cl->rows, row); - - row->bg_set = 0; - } - + gtk_clist_set_foreground (cl, row, gmc_color_pairs [color_pair].fore); + gtk_clist_set_background (cl, row, gmc_color_pairs [color_pair].back); } void @@ -174,8 +155,11 @@ x_panel_set_size (int index) void x_panel_select_item (WPanel *panel, int index, int value) { - printf ("x_panel_select_item: value = %d\n", value); - panel_file_list_set_row_colors (GTK_CLIST (panel->list), index, MARKED_COLOR); + int color; + + color = file_compute_color (value ? MARKED : NORMAL, &panel->dir.list[index]); + + panel_file_list_set_row_colors (GTK_CLIST (panel->list), index, color); } void