Use custom notification for compositing suspended via dbus.

svn path=/trunk/KDE/kdebase/workspace/; revision=949932
This commit is contained in:
Martin Gräßlin 2009-04-06 09:33:43 +00:00
parent 52be720325
commit 253793dfff
4 changed files with 10 additions and 1 deletions

View file

@ -291,7 +291,7 @@ void Workspace::toggleCompositing()
// display notification only if there is the shortcut // display notification only if there is the shortcut
message = i18n( "Compositing has been suspended by another application.<br/>" message = i18n( "Compositing has been suspended by another application.<br/>"
"You can resume using the '%1' shortcut.", shortcut ); "You can resume using the '%1' shortcut.", shortcut );
Notify::raise( Notify::CompositingSlow, message ); Notify::raise( Notify::CompositingSuspendedDbus, message );
} }
} }
} }

View file

@ -6113,3 +6113,8 @@ Comment[x-test]=xxThe compositing performance was too slow and compositing has b
Comment[zh_CN]=由于混成性能过低,此特性已经被暂时关闭 Comment[zh_CN]=由于混成性能过低,此特性已经被暂时关闭
Comment[zh_TW]=組合效能過慢,因此被暫停了 Comment[zh_TW]=組合效能過慢,因此被暫停了
Action=Popup Action=Popup
[Event/compositingsuspendeddbus]
Name=Compositing has been suspended
Comment=Another application has requested to suspend compositing
Action=Popup

View file

@ -103,6 +103,9 @@ bool Notify::raise( Event e, const QString& message, Client* c )
event = "compositingslow"; event = "compositingslow";
flags = KNotification::Persistent; flags = KNotification::Persistent;
break; break;
case CompositingSuspendedDbus:
event = "compositingsuspendeddbus";
break;
default: default:
if ((e > DesktopChange) && (e <= DesktopChange+20)) if ((e > DesktopChange) && (e <= DesktopChange+20))
{ {

View file

@ -59,6 +59,7 @@ class Notify
DemandAttentionCurrent, DemandAttentionCurrent,
DemandAttentionOther, DemandAttentionOther,
CompositingSlow, CompositingSlow,
CompositingSuspendedDbus,
DesktopChange = 100 DesktopChange = 100
}; };