1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-23 09:57:40 +03:00

regedit: Use color only when available.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Mon Apr 29 15:02:19 CEST 2013 on sn-devel-104
This commit is contained in:
Andreas Schneider 2012-10-26 19:52:08 +02:00 committed by Michael Adam
parent 92b6fc0ede
commit 08d7caedf0

View File

@ -438,13 +438,20 @@ static void display_window(TALLOC_CTX *mem_ctx, struct registry_context *ctx)
{
struct regedit *regedit;
struct tree_node *root;
bool colors;
int key;
initscr();
start_color();
cbreak();
noecho();
colors = has_colors();
if (colors) {
start_color();
use_default_colors();
}
regedit = talloc_zero(mem_ctx, struct regedit);
SMB_ASSERT(regedit != NULL);
regedit_main = regedit;