mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-03 18:14:25 +03:00
1998-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
* gscreen.c (x_panel_select_item): Set the colors of the row.
This commit is contained in:
parent
3f4a2d0830
commit
e78e0bd556
@ -1,5 +1,7 @@
|
|||||||
1998-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
1998-03-09 Federico Mena Quintero <federico@nuclecu.unam.mx>
|
||||||
|
|
||||||
|
* gscreen.c (x_panel_select_item): Set the colors of the row.
|
||||||
|
|
||||||
* gmain.c (xtoolkit_init): Changed gnome_init() to new version.
|
* gmain.c (xtoolkit_init): Changed gnome_init() to new version.
|
||||||
(xtoolkit_init): Call gnome_init() properly. Also, return 0.
|
(xtoolkit_init): Call gnome_init() properly. Also, return 0.
|
||||||
|
|
||||||
|
@ -28,9 +28,9 @@ GdkColorContext *mc_cc;
|
|||||||
struct gmc_color_pairs_s gmc_color_pairs [MAX_COLOR_PAIRS];
|
struct gmc_color_pairs_s gmc_color_pairs [MAX_COLOR_PAIRS];
|
||||||
|
|
||||||
char *default_edition_colors =
|
char *default_edition_colors =
|
||||||
"normal=black,white:"
|
"normal=black:"
|
||||||
"directory=blue:"
|
"directory=blue:"
|
||||||
"marked=white,blue:"
|
"marked=white,seagreen:"
|
||||||
"execute=green:"
|
"execute=green:"
|
||||||
"link=yellow:"
|
"link=yellow:"
|
||||||
"device=magenta:"
|
"device=magenta:"
|
||||||
|
@ -76,27 +76,8 @@ panel_file_list_set_type_bitmap (GtkCList *cl, int row, int column, int color, f
|
|||||||
static void
|
static void
|
||||||
panel_file_list_set_row_colors (GtkCList *cl, int row, int color_pair)
|
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);
|
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);
|
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;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
@ -174,8 +155,11 @@ x_panel_set_size (int index)
|
|||||||
void
|
void
|
||||||
x_panel_select_item (WPanel *panel, int index, int value)
|
x_panel_select_item (WPanel *panel, int index, int value)
|
||||||
{
|
{
|
||||||
printf ("x_panel_select_item: value = %d\n", value);
|
int color;
|
||||||
panel_file_list_set_row_colors (GTK_CLIST (panel->list), index, MARKED_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
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user