From: Ilkka Ollakka Date: Fri, 9 Jul 2010 10:15:28 +0000 (+0300) Subject: Qt4: disable all by default if user sets message-filter X-Git-Tag: 1.2.0-pre1~5892 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=2af37db2cec14a68030fa2d55ae4885b2b333a90;p=vlc Qt4: disable all by default if user sets message-filter Also accept filter-name without +/- as enabled one, so user can see messages by just typing module-name without any other syntax. --- diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp index a8d1e957cc..d105a1ee1a 100644 --- a/modules/gui/qt4/dialogs/messages.cpp +++ b/modules/gui/qt4/dialogs/messages.cpp @@ -197,6 +197,9 @@ void MessagesDialog::updateConfig() if( !vbobjectsEdit->text().isEmpty() ) { + /* if user sets filter, go with the idea that user just wants that to be shown, + so disable all by default and enable those that user wants */ + msg_DisableObjectPrinting( p_intf, "all"); char * psz_verbose_objects = strdup(qtu(vbobjectsEdit->text())); char * psz_object, * iter = psz_verbose_objects; while( (psz_object = strsep( &iter, "," )) ) @@ -206,6 +209,8 @@ void MessagesDialog::updateConfig() printf("%s\n", psz_object+1); case '+': msg_EnableObjectPrinting(p_intf, psz_object+1); break; case '-': msg_DisableObjectPrinting(p_intf, psz_object+1); break; + /* user can but just 'lua,playlist' on filter */ + default: msg_EnableObjectPrinting(p_intf, psz_object); break; } } free( psz_verbose_objects );