port to KNotification

svn path=/trunk/KDE/kdebase/workspace/; revision=617455
This commit is contained in:
Olivier Goffart 2006-12-29 09:58:51 +00:00
parent 2f328e778c
commit c584b831e7
6 changed files with 391 additions and 408 deletions

View file

@ -59,7 +59,7 @@ install(TARGETS kwin DESTINATION ${BIN_INSTALL_DIR})
########### install files ###############
install( FILES kwin.kcfg DESTINATION ${KCFG_INSTALL_DIR} )
install( FILES eventsrc DESTINATION ${DATA_INSTALL_DIR}/kwin )
install( FILES kwin.notifyrc DESTINATION ${DATA_INSTALL_DIR}/kwin )
install( FILES org.kde.KWin.xml DESTINATION ${DBUS_INTERFACES_DIR} )
kde4_install_icons( ${ICON_INSTALL_DIR} )

View file

@ -29,7 +29,6 @@ License. See the file "COPYING" for the exact licensing terms.
#include "atoms.h"
#include "group.h"
#include "rules.h"
#include "effects.h"
#include <QX11Info>
namespace KWinInternal
@ -246,8 +245,6 @@ void Workspace::setActiveClient( Client* c, allowed_t )
rootInfo->setActiveWindow( active_client? active_client->window() : 0 );
updateColormap();
if( effects )
effects->windowActivated( active_client );
--set_active_client_recursion;
}
@ -671,11 +668,11 @@ void Client::demandAttention( bool set )
// to be set.
// Delayed call to KNotify also solves the problem of having X server grab in manage(),
// which may deadlock when KNotify (or KLauncher when launching KNotify) need to access X.
Notify::Event e = isOnCurrentDesktop() ? Notify::DemandAttentionCurrent : Notify::DemandAttentionOther;
// Setting the demands attention state needs to be done directly in KWin, because
// KNotify would try to set it, resulting in a call to KNotify again, etc.
if( Notify::makeDemandAttention( e ))
info->setState( set ? NET::DemandsAttention : 0, NET::DemandsAttention );
info->setState( set ? NET::DemandsAttention : 0, NET::DemandsAttention );
if( demandAttentionKNotifyTimer == NULL )
{
@ -700,7 +697,7 @@ void Client::demandAttentionKNotify()
}
// TODO I probably shouldn't be lazy here and do it without the macro, so that people can read it
KWIN_COMPARE_PREDICATE( SameApplicationActiveHackPredicate, Client, const Client*,
KWIN_COMPARE_PREDICATE( SameApplicationActiveHackPredicate, const Client*,
// ignore already existing splashes, toolbars, utilities, menus and topmenus,
// as the app may show those before the main window
!cl->isSplash() && !cl->isToolbar() && !cl->isTopMenu() && !cl->isUtility() && !cl->isMenu()

384
eventsrc
View file

@ -1,384 +0,0 @@
[!Global!]
IconName=kwin
Comment=The KDE Window Manager
Comment[fr]=Le gestionnaire de fenêtres de KDE
Comment[x-test]=xxThe KDE Window Managerxx
[desktop1]
Name=Change to Desktop 1
Name[fr]=Aller au bureau 1
Name[x-test]=xxChange to Desktop 1xx
Comment=Virtual desktop one is selected
Comment[fr]=Le bureau virtuel 1 est sélectionné
Comment[x-test]=xxVirtual desktop one is selectedxx
default_sound=KDE_Desktop_1.ogg
default_presentation=0
[desktop2]
Name=Change to Desktop 2
Name[fr]=Aller au bureau 2
Name[x-test]=xxChange to Desktop 2xx
Comment=Virtual desktop two is selected
Comment[fr]=Le bureau virtuel 2 est sélectionné
Comment[x-test]=xxVirtual desktop two is selectedxx
default_sound=KDE_Desktop_2.ogg
default_presentation=0
[desktop3]
Name=Change to Desktop 3
Name[fr]=Aller au bureau 3
Name[x-test]=xxChange to Desktop 3xx
Comment=Virtual desktop three is selected
Comment[fr]=Le bureau virtuel 3 est sélectionné
Comment[x-test]=xxVirtual desktop three is selectedxx
default_sound=KDE_Desktop_3.ogg
default_presentation=0
[desktop4]
Name=Change to Desktop 4
Name[fr]=Aller au bureau 4
Name[x-test]=xxChange to Desktop 4xx
Comment=Virtual desktop four is selected
Comment[fr]=Le bureau virtuel 4 est sélectionné
Comment[x-test]=xxVirtual desktop four is selectedxx
default_sound=KDE_Desktop_4.ogg
default_presentation=0
[desktop5]
Name=Change to Desktop 5
Name[fr]=Aller au bureau 5
Name[x-test]=xxChange to Desktop 5xx
Comment=Virtual desktop five is selected
Comment[fr]=Le bureau virtuel 5 est sélectionné
Comment[x-test]=xxVirtual desktop five is selectedxx
default_sound=KDE_Desktop_5.ogg
default_presentation=0
[desktop6]
Name=Change to Desktop 6
Name[fr]=Aller au bureau 6
Name[x-test]=xxChange to Desktop 6xx
Comment=Virtual desktop six is selected
Comment[fr]=Le bureau virtuel 6 est sélectionné
Comment[x-test]=xxVirtual desktop six is selectedxx
default_sound=KDE_Desktop_6.ogg
default_presentation=0
[desktop7]
Name=Change to Desktop 7
Name[fr]=Aller au bureau 7
Name[x-test]=xxChange to Desktop 7xx
Comment=Virtual desktop seven is selected
Comment[fr]=Le bureau virtuel 7 est sélectionné
Comment[x-test]=xxVirtual desktop seven is selectedxx
default_sound=KDE_Desktop_7.ogg
default_presentation=0
[desktop8]
Name=Change to Desktop 8
Name[fr]=Aller au bureau 8
Name[x-test]=xxChange to Desktop 8xx
Comment=Virtual desktop eight is selected
Comment[fr]=Le bureau virtuel 8 est sélectionné
Comment[x-test]=xxVirtual desktop eight is selectedxx
default_sound=KDE_Desktop_8.ogg
default_presentation=0
[desktop9]
Name=Change to Desktop 9
Name[fr]=Aller au bureau 9
Name[x-test]=xxChange to Desktop 9xx
Comment=Virtual desktop nine is selected
Comment[fr]=Le bureau virtuel 9 est sélectionné
Comment[x-test]=xxVirtual desktop nine is selectedxx
default_presentation=0
[desktop10]
Name=Change to Desktop 10
Name[fr]=Aller au bureau 10
Name[x-test]=xxChange to Desktop 10xx
Comment=Virtual desktop ten is selected
Comment[fr]=Le bureau virtuel 10 est sélectionné
Comment[x-test]=xxVirtual desktop ten is selectedxx
default_presentation=0
[desktop11]
Name=Change to Desktop 11
Name[fr]=Aller au bureau 11
Name[x-test]=xxChange to Desktop 11xx
Comment=Virtual desktop eleven is selected
Comment[fr]=Le bureau virtuel 11 est sélectionné
Comment[x-test]=xxVirtual desktop eleven is selectedxx
default_presentation=0
[desktop12]
Name=Change to Desktop 12
Name[fr]=Aller au bureau 12
Name[x-test]=xxChange to Desktop 12xx
Comment=Virtual desktop twelve is selected
Comment[fr]=Le bureau virtuel 12 est sélectionné
Comment[x-test]=xxVirtual desktop twelve is selectedxx
default_presentation=0
[desktop13]
Name=Change to Desktop 13
Name[fr]=Aller au bureau 13
Name[x-test]=xxChange to Desktop 13xx
Comment=Virtual desktop thirteen is selected
Comment[fr]=Le bureau virtuel 13 est sélectionné
Comment[x-test]=xxVirtual desktop thirteen is selectedxx
default_presentation=0
[desktop14]
Name=Change to Desktop 14
Name[fr]=Aller au bureau 14
Name[x-test]=xxChange to Desktop 14xx
Comment=Virtual desktop fourteen is selected
Comment[fr]=Le bureau virtuel 14 est sélectionné
Comment[x-test]=xxVirtual desktop fourteen is selectedxx
default_presentation=0
[desktop15]
Name=Change to Desktop 15
Name[fr]=Aller au bureau 15
Name[x-test]=xxChange to Desktop 15xx
Comment=Virtual desktop fifteen is selected
Comment[fr]=Le bureau virtuel 15 est sélectionné
Comment[x-test]=xxVirtual desktop fifteen is selectedxx
default_presentation=0
[desktop16]
Name=Change to Desktop 16
Name[fr]=Aller au bureau 16
Name[x-test]=xxChange to Desktop 16xx
Comment=Virtual desktop sixteen is selected
Comment[fr]=Le bureau virtuel 16 est sélectionné
Comment[x-test]=xxVirtual desktop sixteen is selectedxx
default_presentation=0
[desktop17]
Name=Change to Desktop 17
Name[fr]=Aller au bureau 17
Name[x-test]=xxChange to Desktop 17xx
Comment=Virtual desktop seventeen is selected
Comment[fr]=Le bureau virtuel 17 est sélectionné
Comment[x-test]=xxVirtual desktop seventeen is selectedxx
default_presentation=0
[desktop18]
Name=Change to Desktop 18
Name[fr]=Aller au bureau 18
Name[x-test]=xxChange to Desktop 18xx
Comment=Virtual desktop eighteen is selected
Comment[fr]=Le bureau virtuel 18 est sélectionné
Comment[x-test]=xxVirtual desktop eighteen is selectedxx
default_presentation=0
[desktop19]
Name=Change to Desktop 19
Name[fr]=Aller au bureau 19
Name[x-test]=xxChange to Desktop 19xx
Comment=Virtual desktop nineteen is selected
Comment[fr]=Le bureau virtuel 19 est sélectionné
Comment[x-test]=xxVirtual desktop nineteen is selectedxx
default_presentation=0
[desktop20]
Name=Change to Desktop 20
Name[fr]=Aller au bureau 20
Name[x-test]=xxChange to Desktop 20xx
Comment=Virtual desktop twenty is selected
Comment[fr]=Le bureau virtuel 20 est sélectionné
Comment[x-test]=xxVirtual desktop twenty is selectedxx
default_presentation=0
[activate]
Name=Activate Window
Name[fr]=Activer une fenêtre
Name[x-test]=xxActivate Windowxx
Comment=Another window is activated
Comment[fr]=Une autre fenêtre est activée
Comment[x-test]=xxAnother window is activatedxx
default_presentation=0
[new]
Name=New Window
Name[fr]=Nouvelle fenêtre
Name[x-test]=xxNew Windowxx
Comment=New window
Comment[fr]=Nouvelle fenêtre
Comment[x-test]=xxNew windowxx
default_sound=KDE_Window_Open.ogg
default_presentation=0
[delete]
Name=Delete Window
Name[fr]=Supprimer la fenêtre
Name[x-test]=xxDelete Windowxx
Comment=Delete window
Comment[fr]=Supprimer une fenêtre
Comment[x-test]=xxDelete windowxx
default_presentation=0
[close]
Name=Window Close
Name[fr]=Fermer une fenêtre
Name[x-test]=xxWindow Closexx
Comment=A window closes
Comment[fr]=Une fenêtre se ferme
Comment[x-test]=xxA window closesxx
default_sound=KDE_Window_Close.ogg
default_presentation=0
[shadeup]
Name=Window Shade Up
Name[fr]=Enrouler une fenêtre
Name[x-test]=xxWindow Shade Upxx
Comment=A window is shaded up
Comment[fr]=Une fenêtre est enroulée
Comment[x-test]=xxA window is shaded upxx
default_sound=KDE_Window_Shade_Up.ogg
default_presentation=0
[shadedown]
Name=Window Shade Down
Name[fr]=Dérouler une fenêtre
Name[x-test]=xxWindow Shade Downxx
Comment=A window is shaded down
Comment[fr]=Une fenêtre est déroulée
Comment[x-test]=xxA window is shaded downxx
default_sound=KDE_Window_Shade_Down.ogg
default_presentation=0
[minimize]
Name=Window Minimize
Name[fr]=Réduire une fenêtre
Name[x-test]=xxWindow Minimizexx
Comment=A window is minimized
Comment[fr]=Une fenêtre est réduite
Comment[x-test]=xxA window is minimizedxx
default_sound=KDE_Window_Iconify.ogg
default_presentation=0
[unminimize]
Name=Window Unminimize
Name[fr]=Restaurer une fenêtre
Name[x-test]=xxWindow Unminimizexx
Comment=A Window is restored
Comment[fr]=Une fenêtre en icône est restaurée
Comment[x-test]=xxA Window is restoredxx
default_sound=KDE_Window_DeIconify.ogg
default_presentation=0
[maximize]
Name=Window Maximize
Name[fr]=Maximiser une fenêtre
Name[x-test]=xxWindow Maximizexx
Comment=A window is maximized
Comment[fr]=Une fenêtre est maximisée
Comment[x-test]=xxA window is maximizedxx
default_sound=KDE_Window_UnHide.ogg
default_presentation=0
[unmaximize]
Name=Window Unmaximize
Name[fr]=Restaurer une fenêtre maximisée
Name[x-test]=xxWindow Unmaximizexx
Comment=A window loses maximization
Comment[fr]=Une fenêtre maximisée est restaurée
Comment[x-test]=xxA window loses maximizationxx
default_sound=KDE_Window_Hide.ogg
default_presentation=0
[on_all_desktops]
Name=Window On All Desktops
Name[fr]=Fenêtre visible sur tous les bureaux
Name[x-test]=xxWindow On All Desktopsxx
Comment=A window is made visible on all desktops
Comment[fr]=Une fenêtre est maintenant visible sur tous les bureaux
Comment[x-test]=xxA window is made visible on all desktopsxx
default_sound=KDE_Window_Sticky.ogg
default_presentation=0
[not_on_all_desktops]
Name=Window Not On All Desktops
Name[fr]=Fenêtre visible sur un seul bureau
Name[x-test]=xxWindow Not On All Desktopsxx
Comment=A Window is no longer visible on all desktops
Comment[fr]=Une fenêtre n'est maintenant plus visible sur tous les bureaux
Comment[x-test]=xxA Window is no longer visible on all desktopsxx
default_presentation=1
default_sound=KDE_Window_UnSticky.ogg
[transnew]
Name=New Dialog
Name[fr]=Nouvelle boîte de dialogue
Name[x-test]=xxNew Dialogxx
Comment=Transient window (a dialog) appears
Comment[fr]=Une boîte de dialogue apparaît
Comment[x-test]=xxTransient window (a dialog) appearsxx
default_sound=KDE_Dialog_Appear.ogg
default_presentation=0
[transdelete]
Name=Delete Dialog
Name[fr]=Fermeture de la boîte de dialogue
Name[x-test]=xxDelete Dialogxx
Comment=Transient window (a dialog) is removed
Comment[fr]=Une boîte de dialogue disparaît
Comment[x-test]=xxTransient window (a dialog) is removedxx
default_sound=KDE_Dialog_Disappear.ogg
default_presentation=0
[movestart]
Name=Window Move Start
Name[fr]=Début de déplacement de fenêtre
Name[x-test]=xxWindow Move Startxx
Comment=A window has begun moving
Comment[fr]=Début de déplacement de fenêtre
Comment[x-test]=xxA window has begun movingxx
default_presentation=0
[moveend]
Name=Window Move End
Name[fr]=Fin de déplacement de fenêtre
Name[x-test]=xxWindow Move Endxx
Comment=A window has completed its moving
Comment[fr]=Fin de déplacement de fenêtre
Comment[x-test]=xxA window has completed its movingxx
default_presentation=0
[resizestart]
Name=Window Resize Start
Name[fr]=Début de redimensionnement de fenêtre
Name[x-test]=xxWindow Resize Startxx
Comment=A window has begun resizing
Comment[fr]=Début de redimensionnement de fenêtre
Comment[x-test]=xxA window has begun resizingxx
default_presentation=0
[resizeend]
Name=Window Resize End
Name[fr]=Fin de redimensionnement de fenêtre
Name[x-test]=xxWindow Resize Endxx
Comment=A window has finished resizing
Comment[fr]=Fin de redimensionnement de fenêtre
Comment[x-test]=xxA window has finished resizingxx
default_presentation=0
[demandsattentioncurrent]
Name=Window On Current Desktop Demands Attention
Name[fr]=La fenêtre sur le bureau courant demande votre attention
Name[x-test]=xxWindow On Current Desktop Demands Attentionxx
Comment=A window on the current virtual desktop demands attention
Comment[fr]=Une fenêtre du bureau virtuel actuel demande votre attention
Comment[x-test]=xxA window on the current virtual desktop demands attentionxx
default_presentation=64
[demandsattentionother]
Name=Window On Other Desktop Demands Attention
Name[fr]=Une fenêtre sur un autre bureau demande votre attention
Name[x-test]=xxWindow On Other Desktop Demands Attentionxx
Comment=A window on an inactive virtual desktop demands attention
Comment[fr]=Une fenêtre sur un bureau virtuel inactif demande l'attention
Comment[x-test]=xxA window on an inactive virtual desktop demands attentionxx
default_presentation=64

382
kwin.notifyrc Normal file
View file

@ -0,0 +1,382 @@
[Global]
IconName=kwin
Comment=The KDE Window Manager
[Event/desktop1]
Name=Change to Desktop 1
Name[Event/fr]=Aller au bureau 1
Name[Event/x-test]=xxChange to Desktop 1xx
Comment=Virtual desktop one is selected
Comment[Event/fr]=Le bureau virtuel 1 est sélectionné
Comment[Event/x-test]=xxVirtual desktop one is selectedxx
Sound=KDE_Desktop_1.ogg
[Event/desktop2]
Name=Change to Desktop 2
Name[Event/fr]=Aller au bureau 2
Name[Event/x-test]=xxChange to Desktop 2xx
Comment=Virtual desktop two is selected
Comment[Event/fr]=Le bureau virtuel 2 est sélectionné
Comment[Event/x-test]=xxVirtual desktop two is selectedxx
Sound=KDE_Desktop_2.ogg
[Event/desktop3]
Name=Change to Desktop 3
Name[Event/fr]=Aller au bureau 3
Name[Event/x-test]=xxChange to Desktop 3xx
Comment=Virtual desktop three is selected
Comment[Event/fr]=Le bureau virtuel 3 est sélectionné
Comment[Event/x-test]=xxVirtual desktop three is selectedxx
Sound=KDE_Desktop_3.ogg
[Event/desktop4]
Name=Change to Desktop 4
Name[Event/fr]=Aller au bureau 4
Name[Event/x-test]=xxChange to Desktop 4xx
Comment=Virtual desktop four is selected
Comment[Event/fr]=Le bureau virtuel 4 est sélectionné
Comment[Event/x-test]=xxVirtual desktop four is selectedxx
Sound=KDE_Desktop_4.ogg
[Event/desktop5]
Name=Change to Desktop 5
Name[Event/fr]=Aller au bureau 5
Name[Event/x-test]=xxChange to Desktop 5xx
Comment=Virtual desktop five is selected
Comment[Event/fr]=Le bureau virtuel 5 est sélectionné
Comment[Event/x-test]=xxVirtual desktop five is selectedxx
Sound=KDE_Desktop_5.ogg
[Event/desktop6]
Name=Change to Desktop 6
Name[Event/fr]=Aller au bureau 6
Name[Event/x-test]=xxChange to Desktop 6xx
Comment=Virtual desktop six is selected
Comment[Event/fr]=Le bureau virtuel 6 est sélectionné
Comment[Event/x-test]=xxVirtual desktop six is selectedxx
Sound=KDE_Desktop_6.ogg
[Event/desktop7]
Name=Change to Desktop 7
Name[Event/fr]=Aller au bureau 7
Name[Event/x-test]=xxChange to Desktop 7xx
Comment=Virtual desktop seven is selected
Comment[Event/fr]=Le bureau virtuel 7 est sélectionné
Comment[Event/x-test]=xxVirtual desktop seven is selectedxx
Sound=KDE_Desktop_7.ogg
[Event/desktop8]
Name=Change to Desktop 8
Name[Event/fr]=Aller au bureau 8
Name[Event/x-test]=xxChange to Desktop 8xx
Comment=Virtual desktop eight is selected
Comment[Event/fr]=Le bureau virtuel 8 est sélectionné
Comment[Event/x-test]=xxVirtual desktop eight is selectedxx
Sound=KDE_Desktop_8.ogg
[Event/desktop9]
Name=Change to Desktop 9
Name[Event/fr]=Aller au bureau 9
Name[Event/x-test]=xxChange to Desktop 9xx
Comment=Virtual desktop nine is selected
Comment[Event/fr]=Le bureau virtuel 9 est sélectionné
Comment[Event/x-test]=xxVirtual desktop nine is selectedxx
[Event/desktop10]
Name=Change to Desktop 10
Name[Event/fr]=Aller au bureau 10
Name[Event/x-test]=xxChange to Desktop 10xx
Comment=Virtual desktop ten is selected
Comment[Event/fr]=Le bureau virtuel 10 est sélectionné
Comment[Event/x-test]=xxVirtual desktop ten is selectedxx
[Event/desktop11]
Name=Change to Desktop 11
Name[Event/fr]=Aller au bureau 11
Name[Event/x-test]=xxChange to Desktop 11xx
Comment=Virtual desktop eleven is selected
Comment[Event/fr]=Le bureau virtuel 11 est sélectionné
Comment[Event/x-test]=xxVirtual desktop eleven is selectedxx
[Event/desktop12]
Name=Change to Desktop 12
Name[Event/fr]=Aller au bureau 12
Name[Event/x-test]=xxChange to Desktop 12xx
Comment=Virtual desktop twelve is selected
Comment[Event/fr]=Le bureau virtuel 12 est sélectionné
Comment[Event/x-test]=xxVirtual desktop twelve is selectedxx
[Event/desktop13]
Name=Change to Desktop 13
Name[Event/fr]=Aller au bureau 13
Name[Event/x-test]=xxChange to Desktop 13xx
Comment=Virtual desktop thirteen is selected
Comment[Event/fr]=Le bureau virtuel 13 est sélectionné
Comment[Event/x-test]=xxVirtual desktop thirteen is selectedxx
[Event/desktop14]
Name=Change to Desktop 14
Name[Event/fr]=Aller au bureau 14
Name[Event/x-test]=xxChange to Desktop 14xx
Comment=Virtual desktop fourteen is selected
Comment[Event/fr]=Le bureau virtuel 14 est sélectionné
Comment[Event/x-test]=xxVirtual desktop fourteen is selectedxx
[Event/desktop15]
Name=Change to Desktop 15
Name[Event/fr]=Aller au bureau 15
Name[Event/x-test]=xxChange to Desktop 15xx
Comment=Virtual desktop fifteen is selected
Comment[Event/fr]=Le bureau virtuel 15 est sélectionné
Comment[Event/x-test]=xxVirtual desktop fifteen is selectedxx
[Event/desktop16]
Name=Change to Desktop 16
Name[Event/fr]=Aller au bureau 16
Name[Event/x-test]=xxChange to Desktop 16xx
Comment=Virtual desktop sixteen is selected
Comment[Event/fr]=Le bureau virtuel 16 est sélectionné
Comment[Event/x-test]=xxVirtual desktop sixteen is selectedxx
[Event/desktop17]
Name=Change to Desktop 17
Name[Event/fr]=Aller au bureau 17
Name[Event/x-test]=xxChange to Desktop 17xx
Comment=Virtual desktop seventeen is selected
Comment[Event/fr]=Le bureau virtuel 17 est sélectionné
Comment[Event/x-test]=xxVirtual desktop seventeen is selectedxx
[Event/desktop18]
Name=Change to Desktop 18
Name[Event/fr]=Aller au bureau 18
Name[Event/x-test]=xxChange to Desktop 18xx
Comment=Virtual desktop eighteen is selected
Comment[Event/fr]=Le bureau virtuel 18 est sélectionné
Comment[Event/x-test]=xxVirtual desktop eighteen is selectedxx
[Event/desktop19]
Name=Change to Desktop 19
Name[Event/fr]=Aller au bureau 19
Name[Event/x-test]=xxChange to Desktop 19xx
Comment=Virtual desktop nineteen is selected
Comment[Event/fr]=Le bureau virtuel 19 est sélectionné
Comment[Event/x-test]=xxVirtual desktop nineteen is selectedxx
[Event/desktop20]
Name=Change to Desktop 20
Name[Event/fr]=Aller au bureau 20
Name[Event/x-test]=xxChange to Desktop 20xx
Comment=Virtual desktop twenty is selected
Comment[Event/fr]=Le bureau virtuel 20 est sélectionné
Comment[Event/x-test]=xxVirtual desktop twenty is selectedxx
[Event/activate]
Name=Activate Window
Name[Event/fr]=Activer une fenêtre
Name[Event/x-test]=xxActivate Windowxx
Comment=Another window is activated
Comment[Event/fr]=Une autre fenêtre est activée
Comment[Event/x-test]=xxAnother window is activatedxx
[Event/new]
Name=New Window
Name[Event/fr]=Nouvelle fenêtre
Name[Event/x-test]=xxNew Windowxx
Comment=New window
Comment[Event/fr]=Nouvelle fenêtre
Comment[Event/x-test]=xxNew windowxx
Sound=KDE_Window_Open.ogg
[Event/delete]
Name=Delete Window
Name[Event/fr]=Supprimer la fenêtre
Name[Event/x-test]=xxDelete Windowxx
Comment=Delete window
Comment[Event/fr]=Supprimer une fenêtre
Comment[Event/x-test]=xxDelete windowxx
[Event/close]
Name=Window Close
Name[Event/fr]=Fermer une fenêtre
Name[Event/x-test]=xxWindow Closexx
Comment=A window closes
Comment[Event/fr]=Une fenêtre se ferme
Comment[Event/x-test]=xxA window closesxx
Sound=KDE_Window_Close.ogg
[Event/shadeup]
Name=Window Shade Up
Name[Event/fr]=Enrouler une fenêtre
Name[Event/x-test]=xxWindow Shade Upxx
Comment=A window is shaded up
Comment[Event/fr]=Une fenêtre est enroulée
Comment[Event/x-test]=xxA window is shaded upxx
Sound=KDE_Window_Shade_Up.ogg
[Event/shadedown]
Name=Window Shade Down
Name[Event/fr]=Dérouler une fenêtre
Name[Event/x-test]=xxWindow Shade Downxx
Comment=A window is shaded down
Comment[Event/fr]=Une fenêtre est déroulée
Comment[Event/x-test]=xxA window is shaded downxx
Sound=KDE_Window_Shade_Down.ogg
[Event/minimize]
Name=Window Minimize
Name[Event/fr]=Réduire une fenêtre
Name[Event/x-test]=xxWindow Minimizexx
Comment=A window is minimized
Comment[Event/fr]=Une fenêtre est réduite
Comment[Event/x-test]=xxA window is minimizedxx
Sound=KDE_Window_Iconify.ogg
[Event/unminimize]
Name=Window Unminimize
Name[Event/fr]=Restaurer une fenêtre
Name[Event/x-test]=xxWindow Unminimizexx
Comment=A Window is restored
Comment[Event/fr]=Une fenêtre en icône est restaurée
Comment[Event/x-test]=xxA Window is restoredxx
Sound=KDE_Window_DeIconify.ogg
[Event/maximize]
Name=Window Maximize
Name[Event/fr]=Maximiser une fenêtre
Name[Event/x-test]=xxWindow Maximizexx
Comment=A window is maximized
Comment[Event/fr]=Une fenêtre est maximisée
Comment[Event/x-test]=xxA window is maximizedxx
Sound=KDE_Window_UnHide.ogg
[Event/unmaximize]
Name=Window Unmaximize
Name[Event/fr]=Restaurer une fenêtre maximisée
Name[Event/x-test]=xxWindow Unmaximizexx
Comment=A window loses maximization
Comment[Event/fr]=Une fenêtre maximisée est restaurée
Comment[Event/x-test]=xxA window loses maximizationxx
Sound=KDE_Window_Hide.ogg
[Event/on_all_desktops]
Name=Window On All Desktops
Name[Event/fr]=Fenêtre visible sur tous les bureaux
Name[Event/x-test]=xxWindow On All Desktopsxx
Comment=A window is made visible on all desktops
Comment[Event/fr]=Une fenêtre est maintenant visible sur tous les bureaux
Comment[Event/x-test]=xxA window is made visible on all desktopsxx
Sound=KDE_Window_Sticky.ogg
[Event/not_on_all_desktops]
Name=Window Not On All Desktops
Name[Event/fr]=Fenêtre visible sur un seul bureau
Name[Event/x-test]=xxWindow Not On All Desktopsxx
Comment=A Window is no longer visible on all desktops
Comment[Event/fr]=Une fenêtre n'est maintenant plus visible sur tous les bureaux
Comment[Event/x-test]=xxA Window is no longer visible on all desktopsxx
Action=Sound
Sound=KDE_Window_UnSticky.ogg
[Event/transnew]
Name=New Dialog
Name[Event/fr]=Nouvelle boîte de dialogue
Name[Event/x-test]=xxNew Dialogxx
Comment=Transient window (a dialog) appears
Comment[Event/fr]=Une boîte de dialogue apparaît
Comment[Event/x-test]=xxTransient window (a dialog) appearsxx
Sound=KDE_Dialog_Appear.ogg
[Event/transdelete]
Name=Delete Dialog
Name[Event/fr]=Fermeture de la boîte de dialogue
Name[Event/x-test]=xxDelete Dialogxx
Comment=Transient window (a dialog) is removed
Comment[Event/fr]=Une boîte de dialogue disparaît
Comment[Event/x-test]=xxTransient window (a dialog) is removedxx
Sound=KDE_Dialog_Disappear.ogg
[Event/movestart]
Name=Window Move Start
Name[Event/fr]=Début de déplacement de fenêtre
Name[Event/x-test]=xxWindow Move Startxx
Comment=A window has begun moving
Comment[Event/fr]=Début de déplacement de fenêtre
Comment[Event/x-test]=xxA window has begun movingxx
[Event/moveend]
Name=Window Move End
Name[Event/fr]=Fin de déplacement de fenêtre
Name[Event/x-test]=xxWindow Move Endxx
Comment=A window has completed its moving
Comment[Event/fr]=Fin de déplacement de fenêtre
Comment[Event/x-test]=xxA window has completed its movingxx
[Event/resizestart]
Name=Window Resize Start
Name[Event/fr]=Début de redimensionnement de fenêtre
Name[Event/x-test]=xxWindow Resize Startxx
Comment=A window has begun resizing
Comment[Event/fr]=Début de redimensionnement de fenêtre
Comment[Event/x-test]=xxA window has begun resizingxx
[Event/resizeend]
Name=Window Resize End
Name[Event/fr]=Fin de redimensionnement de fenêtre
Name[Event/x-test]=xxWindow Resize Endxx
Comment=A window has finished resizing
Comment[Event/fr]=Fin de redimensionnement de fenêtre
Comment[Event/x-test]=xxA window has finished resizingxx
[Event/demandsattentioncurrent]
Name=Window On Current Desktop Demands Attention
Name[Event/fr]=La fenêtre sur le bureau courant demande votre attention
Name[Event/x-test]=xxWindow On Current Desktop Demands Attentionxx
Comment=A window on the current virtual desktop demands attention
Comment[Event/fr]=Une fenêtre du bureau virtuel actuel demande votre attention
Comment[Event/x-test]=xxA window on the current virtual desktop demands attentionxx
[Event/demandsattentionother]
Name=Window On Other Desktop Demands Attention
Name[Event/fr]=Une fenêtre sur un autre bureau demande votre attention
Name[Event/x-test]=xxWindow On Other Desktop Demands Attentionxx
Comment=A window on an inactive virtual desktop demands attention
Comment[Event/fr]=Une fenêtre sur un bureau virtuel inactif demande l'attention
Comment[Event/x-test]=xxA window on an inactive virtual desktop demands attentionxx

View file

@ -10,7 +10,7 @@ License. See the file "COPYING" for the exact licensing terms.
******************************************************************/
#include "notifications.h"
#include <knotifyclient.h>
#include <knotification.h>
#include "client.h"
@ -118,8 +118,8 @@ bool Notify::raise( Event e, const QString& message, Client* c )
return true;
}
forgetIt= !KNotifyClient::event( c ? c->window() : 0, event, message );
return !forgetIt;
return KNotification::event( event, message /*, QPixmap() , c ? c->window() : 0*/ ); //FIXME get the widget ?
}
void Notify::sendPendingEvents()
@ -129,19 +129,8 @@ void Notify::sendPendingEvents()
EventData data = pending_events.first();
pending_events.pop_front();
if( !forgetIt )
forgetIt= !KNotifyClient::event( data.window, data.event, data.message );
KNotification::event( data.event, data.message /* , QPixmap() , data.window */ );
}
}
bool Notify::makeDemandAttention( Event e )
{
QString event = eventToName( e );
if( event.isNull() )
return false;
int rep = KNotifyClient::getPresentation( event );
if( rep == -1 )
rep = KNotifyClient::getDefaultPresentation( event );
return rep != -1 && ( rep & KNotifyClient::Taskbar );
}
} // namespace

View file

@ -51,7 +51,6 @@ class Notify
};
static bool raise( Event, const QString& message = QString(), Client* c = NULL );
static bool makeDemandAttention( Event );
static void sendPendingEvents();
private:
static QString eventToName( Event );