When an effect isn't found in screenedges ui add an empty string to monitor selection instead of crashing.
When trunk is reopened we should change to something like "Missing effect". BUG: 192953 svn path=/trunk/KDE/kdebase/workspace/; revision=969007
This commit is contained in:
parent
68175c738b
commit
23db34e558
1 changed files with 33 additions and 9 deletions
|
@ -176,19 +176,43 @@ void KWinScreenEdgesConfig::monitorInit()
|
|||
KService::List services;
|
||||
services = trader->query( "KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_presentwindows'" );
|
||||
if( services.isEmpty() )
|
||||
abort(); // Crash is better than wrong IDs
|
||||
monitorAddItem( services.first()->name() + " - " + i18n( "All Desktops" ));
|
||||
monitorAddItem( services.first()->name() + " - " + i18n( "Current Desktop" ));
|
||||
{
|
||||
// adding empty strings in case the effect is not found
|
||||
// TODO: after string freeze add a info that the effect is missing
|
||||
monitorAddItem( QString() );
|
||||
monitorAddItem( QString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
monitorAddItem( services.first()->name() + " - " + i18n( "All Desktops" ));
|
||||
monitorAddItem( services.first()->name() + " - " + i18n( "Current Desktop" ));
|
||||
}
|
||||
services = trader->query( "KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_desktopgrid'" );
|
||||
if( services.isEmpty() )
|
||||
abort(); // Crash is better than wrong IDs
|
||||
monitorAddItem( services.first()->name());
|
||||
{
|
||||
// adding empty strings in case the effect is not found
|
||||
// TODO: after string freeze add a info that the effect is missing
|
||||
monitorAddItem( QString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
monitorAddItem( services.first()->name());
|
||||
}
|
||||
services = trader->query( "KWin/Effect", "[X-KDE-PluginInfo-Name] == 'kwin4_effect_cube'" );
|
||||
if( services.isEmpty() )
|
||||
abort(); // Crash is better than wrong IDs
|
||||
monitorAddItem( services.first()->name() + " - " + i18n( "Cube" ));
|
||||
monitorAddItem( services.first()->name() + " - " + i18n( "Cylinder" ));
|
||||
monitorAddItem( services.first()->name() + " - " + i18n( "Sphere" ));
|
||||
{
|
||||
// adding empty strings in case the effect is not found
|
||||
// TODO: after string freeze add a info that the effect is missing
|
||||
monitorAddItem( QString() );
|
||||
monitorAddItem( QString() );
|
||||
monitorAddItem( QString() );
|
||||
}
|
||||
else
|
||||
{
|
||||
monitorAddItem( services.first()->name() + " - " + i18n( "Cube" ));
|
||||
monitorAddItem( services.first()->name() + " - " + i18n( "Cylinder" ));
|
||||
monitorAddItem( services.first()->name() + " - " + i18n( "Sphere" ));
|
||||
}
|
||||
|
||||
monitorShowEvent();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue