From kde-commits Thu Jan 17 08:37:48 2008 From: Adriaan de Groot Date: Thu, 17 Jan 2008 08:37:48 +0000 To: kde-commits Subject: KDE/kdelibs/phonon/platform_kde Message-Id: <1200559068.141798.25591.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=120055908215945 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();