messages.cpp: use append(...) and not setText( text() + ...), seems to

decrease cpu-usage considerably.
 preferences.cpp: allow config strings to be 40 characters long instead of
10. Is that enough?
parent 546fb578
...@@ -61,7 +61,9 @@ void KMessagesWindow::update() ...@@ -61,7 +61,9 @@ void KMessagesWindow::update()
i_start != i_stop; i_start != i_stop;
i_start = (i_start+1) % VLC_MSG_QSIZE ) i_start = (i_start+1) % VLC_MSG_QSIZE )
{ {
text->setText( text->text() + 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>"); 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>");
// /* Append all messages to log window */ // /* Append all messages to log window */
// gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray, // gtk_text_insert( p_intf->p_sys->p_messages_text, NULL, &gray,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* preferences.cpp: preferences window for the kde gui * preferences.cpp: preferences window for the kde gui
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 VideoLAN * Copyright (C) 2001 VideoLAN
* $Id: preferences.cpp,v 1.5 2002/10/03 10:15:01 sigmunau Exp $ * $Id: preferences.cpp,v 1.6 2002/10/10 19:34:06 sigmunau Exp $
* *
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> Mon Aug 12 2002 * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no> Mon Aug 12 2002
* *
...@@ -166,7 +166,7 @@ KPreferences::KPreferences(intf_thread_t *p_intf, const char *psz_module_name, ...@@ -166,7 +166,7 @@ KPreferences::KPreferences(intf_thread_t *p_intf, const char *psz_module_name,
connect(kl, SIGNAL(textChanged ( const QString & )), connect(kl, SIGNAL(textChanged ( const QString & )),
ci, SLOT(setValue( const QString &))); ci, SLOT(setValue( const QString &)));
QToolTip::add(kl, p_item->psz_longtext); QToolTip::add(kl, p_item->psz_longtext);
kl->setMaxLength(10); kl->setMaxLength(40);
vlc_mutex_unlock( p_item->p_lock ); vlc_mutex_unlock( p_item->p_lock );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment