]> git.sesse.net Git - vlc/commitdiff
Qt4: disable all by default if user sets message-filter
authorIlkka Ollakka <ileoo@videolan.org>
Fri, 9 Jul 2010 10:15:28 +0000 (13:15 +0300)
committerIlkka Ollakka <ileoo@videolan.org>
Fri, 9 Jul 2010 10:18:06 +0000 (13:18 +0300)
Also accept filter-name without +/- as enabled one, so user can see
messages by just typing module-name without any other syntax.

modules/gui/qt4/dialogs/messages.cpp

index a8d1e957cce46a72d27ad3b2f4b892b336e48cb3..d105a1ee1a097d06b153dfb241f8af1855b7e21c 100644 (file)
@@ -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 );