From 4b4a8f1d20206483309417711a9125ac3e7b66e4 Mon Sep 17 00:00:00 2001 From: Sigmund Augdal Helberg <sigmunau@videolan.org> Date: Fri, 11 Oct 2002 12:50:43 +0000 Subject: [PATCH] added some coloring to the messages window in the kde interface --- modules/gui/kde/messages.cpp | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) diff --git a/modules/gui/kde/messages.cpp b/modules/gui/kde/messages.cpp index caa8329fa36a..e3654b084d6a 100644 --- a/modules/gui/kde/messages.cpp +++ b/modules/gui/kde/messages.cpp @@ -48,44 +48,28 @@ void KMessagesWindow::update() if( p_msg->i_start != i_stop ) { -// static GdkColor white = { 0, 0xffff, 0xffff, 0xffff }; -// static GdkColor gray = { 0, 0xaaaa, 0xaaaa, 0xaaaa }; -// static GdkColor yellow = { 0, 0xffff, 0xffff, 0x6666 }; -// static GdkColor red = { 0, 0xffff, 0x6666, 0x6666 }; - static const char * ppsz_type[4] = { ": ", " error: ", " warning: ", " debug: " }; -// static GdkColor * pp_color[4] = { &white, &red, &yellow, &gray }; - + static const char * ppsz_color[4] = { + "<font color=#FFFFFF>", + "<font color=#FF0000>", + "<font color=#CCCC00>", + "<font>" + }; for( i_start = p_msg->i_start; i_start != i_stop; i_start = (i_start+1) % VLC_MSG_QSIZE ) { text->append( QString(p_msg->p_msg[i_start].psz_module) + ppsz_type[p_msg->p_msg[i_start].i_type] + - p_msg->p_msg[i_start].psz_msg + "<br>"); + ppsz_color[p_msg->p_msg[i_start].i_type] + + p_msg->p_msg[i_start].psz_msg + "</font>" ); -// /* Append all messages to log window */ -// gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray, -// NULL, p_msg->p_msg[i_start].psz_module, -1 ); - -// gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray, -// NULL, ppsz_type[p_msg->p_msg[i_start].i_type], -// -1 ); - -// gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, -// pp_color[p_msg->p_msg[i_start].i_type], NULL, -// p_msg->p_msg[i_start].psz_msg, -1 ); - -// gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray, -// NULL, "\n", -1 ); } vlc_mutex_lock( p_msg->p_lock ); p_msg->i_start = i_start; vlc_mutex_unlock( p_msg->p_lock ); -// gtk_text_set_point( p_intf->p_sys->p_messages_text, -// gtk_text_get_length( p_intf->p_sys->p_messages_text ) ); } } -- GitLab