* main.c (do_nc): Make midnight_colors[] local to do_nc().
Initialize normal color - it's used by the tree. * boxes.c (tree_box): Use standard dialog_colors. * tree.c: Use NORMALC for normal entries.
Этот коммит содержится в:
родитель
d02a8d6473
Коммит
66f37c0af4
@ -1,5 +1,10 @@
|
||||
2002-08-31 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* main.c (do_nc): Make midnight_colors[] local to do_nc().
|
||||
Initialize normal color - it's used by the tree.
|
||||
* boxes.c (tree_box): Use standard dialog_colors.
|
||||
* tree.c: Use NORMALC for normal entries.
|
||||
|
||||
* view.c (view): Avoid passing an uninitialized color array to
|
||||
create_dlg() - pass NULL instead.
|
||||
|
||||
|
@ -659,8 +659,6 @@ void display_bits_box()
|
||||
#define TREE_Y 20
|
||||
#define TREE_X 60
|
||||
|
||||
static int tree_colors [4];
|
||||
|
||||
static int
|
||||
tree_callback (struct Dlg_head *h, int id, int msg)
|
||||
{
|
||||
@ -690,11 +688,8 @@ tree_box (char *current_dir)
|
||||
char *val;
|
||||
WButtonBar *bar;
|
||||
|
||||
tree_colors [3] = dialog_colors [0];
|
||||
tree_colors [1] = dialog_colors [1];
|
||||
|
||||
/* Create the components */
|
||||
dlg = create_dlg (0, 0, TREE_Y, TREE_X, tree_colors,
|
||||
dlg = create_dlg (0, 0, TREE_Y, TREE_X, dialog_colors,
|
||||
tree_callback, "[Directory Tree]", "tree", DLG_CENTER);
|
||||
mytree = tree_new (0, 2, 2, TREE_Y - 6, TREE_X - 5);
|
||||
add_widget (dlg, mytree);
|
||||
|
16
src/main.c
16
src/main.c
@ -266,9 +266,6 @@ static int print_last_revert = 0;
|
||||
static char *batch_file_name = 0;
|
||||
#endif
|
||||
|
||||
/* widget colors for the midnight commander */
|
||||
int midnight_colors [4];
|
||||
|
||||
/* Force colors, only used by Slang */
|
||||
int force_colors = 0;
|
||||
|
||||
@ -1603,11 +1600,6 @@ static void setup_mc (void)
|
||||
verbose = 0;
|
||||
}
|
||||
init_mouse ();
|
||||
|
||||
midnight_colors [0] = 0;
|
||||
midnight_colors [1] = REVERSE_COLOR; /* FOCUSC */
|
||||
midnight_colors [2] = INPUT_COLOR; /* HOT_NORMALC */
|
||||
midnight_colors [3] = NORMAL_COLOR; /* HOT_FOCUSC */
|
||||
}
|
||||
|
||||
static void setup_dummy_mc (const char *file)
|
||||
@ -1916,9 +1908,17 @@ mc_maybe_editor_or_viewer (void)
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Run the main dialog that occupies the whole screen */
|
||||
static void
|
||||
do_nc (void)
|
||||
{
|
||||
int midnight_colors [4];
|
||||
|
||||
midnight_colors [0] = NORMAL_COLOR; /* NORMALC */
|
||||
midnight_colors [1] = REVERSE_COLOR; /* FOCUSC */
|
||||
midnight_colors [2] = INPUT_COLOR; /* HOT_NORMALC */
|
||||
midnight_colors [3] = NORMAL_COLOR; /* HOT_FOCUSC */
|
||||
|
||||
midnight_dlg = create_dlg (0, 0, LINES, COLS, midnight_colors,
|
||||
midnight_callback, "[main]", "midnight",
|
||||
DLG_HAS_MENUBAR);
|
||||
|
@ -51,7 +51,8 @@
|
||||
|
||||
extern int command_prompt;
|
||||
|
||||
#define TREE_NORMALC HOT_FOCUSC
|
||||
/* Use the color of the parent widget for the unselected entries */
|
||||
#define TREE_NORMALC NORMALC
|
||||
|
||||
/* Specifies the display mode: 1d or 2d */
|
||||
int tree_navigation_flag;
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user