From 253793dfffd811029c9c56711470d5ed6cbe7c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Mon, 6 Apr 2009 09:33:43 +0000 Subject: [PATCH] Use custom notification for compositing suspended via dbus. svn path=/trunk/KDE/kdebase/workspace/; revision=949932 --- composite.cpp | 2 +- kwin.notifyrc | 5 +++++ notifications.cpp | 3 +++ notifications.h | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) diff --git a/composite.cpp b/composite.cpp index 8d7aeadb0c..f842d62935 100644 --- a/composite.cpp +++ b/composite.cpp @@ -291,7 +291,7 @@ void Workspace::toggleCompositing() // display notification only if there is the shortcut message = i18n( "Compositing has been suspended by another application.
" "You can resume using the '%1' shortcut.", shortcut ); - Notify::raise( Notify::CompositingSlow, message ); + Notify::raise( Notify::CompositingSuspendedDbus, message ); } } } diff --git a/kwin.notifyrc b/kwin.notifyrc index decfe81bbe..829ca91da6 100644 --- a/kwin.notifyrc +++ b/kwin.notifyrc @@ -6113,3 +6113,8 @@ Comment[x-test]=xxThe compositing performance was too slow and compositing has b Comment[zh_CN]=由于混成性能过低,此特性已经被暂时关闭 Comment[zh_TW]=組合效能過慢,因此被暫停了 Action=Popup + +[Event/compositingsuspendeddbus] +Name=Compositing has been suspended +Comment=Another application has requested to suspend compositing +Action=Popup diff --git a/notifications.cpp b/notifications.cpp index a45e85d9c7..508678c1ef 100644 --- a/notifications.cpp +++ b/notifications.cpp @@ -103,6 +103,9 @@ bool Notify::raise( Event e, const QString& message, Client* c ) event = "compositingslow"; flags = KNotification::Persistent; break; + case CompositingSuspendedDbus: + event = "compositingsuspendeddbus"; + break; default: if ((e > DesktopChange) && (e <= DesktopChange+20)) { diff --git a/notifications.h b/notifications.h index 5d7c3b0c62..f8d7b6db8b 100644 --- a/notifications.h +++ b/notifications.h @@ -59,6 +59,7 @@ class Notify DemandAttentionCurrent, DemandAttentionOther, CompositingSlow, + CompositingSuspendedDbus, DesktopChange = 100 };