[vlc-commits] commit: Qt4: disable all by default if user sets message-filter ( Ilkka Ollakka )

git at videolan.org git at videolan.org
Fri Jul 9 12:18:44 CEST 2010


vlc | branch: master | Ilkka Ollakka <ileoo at videolan.org> | Fri Jul  9 13:15:28 2010 +0300| [2af37db2cec14a68030fa2d55ae4885b2b333a90] | committer: Ilkka Ollakka 

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=2af37db2cec14a68030fa2d55ae4885b2b333a90
---

 modules/gui/qt4/dialogs/messages.cpp |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/modules/gui/qt4/dialogs/messages.cpp b/modules/gui/qt4/dialogs/messages.cpp
index a8d1e95..d105a1e 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 );



More information about the vlc-commits mailing list