[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/phonon/platform_kde
From:       Adriaan de Groot <groot () kde ! org>
Date:       2008-01-17 8:37:48
Message-ID: 1200559068.141798.25591.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 762478 by adridg:

Somewhat hackish partial solution to the 'Unable to find a Multimedia Backend' hydra: \
only show the message *once* from each notofy process; this at least allows you to \
click 'ok' and get rid of them.

 M  +11 -1     kdepluginfactory.cpp  


--- trunk/KDE/kdelibs/phonon/platform_kde/kdepluginfactory.cpp #762477:762478
@@ -154,13 +154,23 @@
 
 QObject *KdePlatformPlugin::createBackend()
 {
+    // Within this process, display the warning about missing backends
+    // only once.
+    static bool has_shown = false;
     ensureMainComponentData();
     const KService::List offers = KServiceTypeTrader::self()->query("PhononBackend",
             "Type == 'Service' and [X-KDE-PhononBackendInfo-InterfaceVersion] == \
1");  if (offers.isEmpty()) {
-        KMessageBox::error(0, i18n("Unable to find a Multimedia Backend"));
+        if (!has_shown) {
+            KMessageBox::error(0, i18n("Unable to find a Multimedia Backend"));
+            has_shown = true;
+        }
         return 0;
     }
+    // Flag the warning as not shown, since if the next time the
+    // list of backends is suddenly empty again the user should be
+    // told.
+    has_shown = false;
 
     KService::List::const_iterator it = offers.begin();
     const KService::List::const_iterator end = offers.end();


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic