diff --git a/composite.cpp b/composite.cpp index 5f3073b942..34a56367df 100644 --- a/composite.cpp +++ b/composite.cpp @@ -484,12 +484,16 @@ void Workspace::checkCompositePaintTime( int msec ) if( tooslow ) { QTimer::singleShot( 0, this, SLOT( suspendCompositing())); - QString shortcut = i18n( "Empty" ); + QString shortcut, message; if( KAction* action = qobject_cast( keys->action("Suspend Compositing"))) shortcut = action->globalShortcut().primary().toString(QKeySequence::NativeText); - QString message = i18n( "Compositing was too slow and has been suspended.\n" - "If this was only a temporary problem, you can resume using the '%1' shortcut.\n" - "You can also disable functionality checks in advanced compositing settings.", shortcut ); + if (shortcut.isEmpty()) + message = i18n( "Compositing was too slow and has been suspended.\n" + "You can disable functionality checks in advanced compositing settings." ); + else + message = i18n( "Compositing was too slow and has been suspended.\n" + "If this was only a temporary problem, you can resume using the '%1' shortcut.\n" + "You can also disable functionality checks in advanced compositing settings.", shortcut ); Notify::raise( Notify::CompositingSlow, message ); compositeTimer.start( 1000 ); // so that it doesn't trigger sooner than suspendCompositing() }