From 8c11b48532a133ec60bc7c41e6436c84ab57668c Mon Sep 17 00:00:00 2001 From: Dave Davenport Date: Tue, 18 Apr 2017 08:24:09 +0200 Subject: [PATCH] Print message about disabled mode to stderr using fprintf. g_warning breaks the colour output. --- source/rofi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/rofi.c b/source/rofi.c index c994c36a..a9db81ce 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -367,9 +367,9 @@ static void help_print_disabled_mode ( const char *mode ) int is_term = isatty ( fileno ( stdout ) ); // Only output to terminal if ( is_term ) { - g_warning ( "Mode %s%s%s is not enabled. I have enabled it for now.", + fprintf ( stderr, "Mode %s%s%s is not enabled. I have enabled it for now.\n", color_red, mode, color_reset ); - g_warning ( "Please consider adding %s%s%s to the list of enabled modi: %smodi: %s%s%s,%s%s.", + fprintf ( stderr, "Please consider adding %s%s%s to the list of enabled modi: %smodi: %s%s%s,%s%s.\n", color_red, mode, color_reset, color_green, config.modi, color_reset, color_red, mode, color_reset