Permalink
Browse files

Blacklist any application with "mixer" or "control" in its name from …

…being show in the mounttray AV Disk launcher, and also display the application comment if there is one.
  • Loading branch information...
1 parent 1250f66 commit 64e9ae2cc3a8fb60eaa6b42bd10e79ca19444d3a Ken Moore committed Mar 26, 2014
Showing with 10 additions and 1 deletion.
  1. +10 −1 src-qt4/pc-mounttray/mountTray.cpp
@@ -469,7 +469,16 @@ void MountTray::slotOpenAVDisk(QString dev){
//Now generate the QStringList of application names
QStringList names;
for(int i=0; i<apps.length(); i++){
- names << apps[i].Name();
+ //Filter out "invalid" applications (mixers, etc..)
+ QString rname = apps[i].RawName();
+ if(rname.contains("mixer", Qt::CaseInsensitive) || rname.contains("control", Qt::CaseInsensitive) ){
+ //skip it
+ apps.removeAt(i);
+ i--;
+ }else{
+ if( apps[i].Comment().isEmpty() ){ names << apps[i].Name(); }
+ else{ names << apps[i].Name() +" ("+apps[i].Comment()+")"; }
+ }
}
//Prompt for the user to select an application
bool ok = false;

0 comments on commit 64e9ae2

Please sign in to comment.