From kde-commits Fri Oct 31 23:54:53 2008 From: Albert Astals Cid Date: Fri, 31 Oct 2008 23:54:53 +0000 To: kde-commits Subject: KDE/kdebase/workspace/kwin Message-Id: <1225497293.288470.20440.nullmailer () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=122549730111061 SVN commit 878365 by aacid: Saying "If this was only a temporary problem, you can resume using the 'Empty' shortcut.\n" if no shortcut is found makes no sense, reworked to avoid it Tried my best to do correct indentation but make failed M +8 -4 composite.cpp --- trunk/KDE/kdebase/workspace/kwin/composite.cpp #878364:878365 @@ -484,12 +484,16 @@ 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() }