[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Login & Logout Notif (sounds)
From:       Charles <charles () altair ! dhs ! org>
Date:       2000-09-14 2:11:52
[Download RAW message or body]

This patch (to kwin) allows login and logout knotify events.  The default KDE 
sounds are enabled.  All other sounds are disabled.  It adds a couple of new 
strings to be i18ned ( in the eventsrc).  I still think we should use Ludovic 
Grossard's work for sounds.  But then, I also want to replace our old legacy 
K logo :).

There's one tiny bug.  It plays the exit sound just after you press 
control+alt+delete, not when you hit the "logout" button.  I didn't fix that 
because I'm sure someone who knows more about kwin could fix that in about 30 
seconds.

-Charles


["loginout_notif.diff" (text/plain)]

Index: events.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/events.cpp,v
retrieving revision 1.8
diff -u -r1.8 events.cpp
--- events.cpp	2000/08/31 17:20:45	1.8
+++ events.cpp	2000/09/14 02:04:50
@@ -68,13 +68,16 @@
     case ResizeEnd:
 	event = "resizeend";
 	break;
+    case StartKDE:
+	event = "startkde";
+	break;
+    case ExitKDE:
+	event = "exitkde";
+	break;
     }
 
     if ( !event )
 	return;
 
-
-
-    if ( !KNotifyClient::event( event ) )
-	forgetIt = TRUE;
+    forgetIt= !KNotifyClient::event( event );
 }
Index: events.h
===================================================================
RCS file: /home/kde/kdebase/kwin/events.h,v
retrieving revision 1.2
diff -u -r1.2 events.h
--- events.h	2000/08/31 17:15:10	1.2
+++ events.h	2000/09/14 02:04:50
@@ -29,7 +29,9 @@
 	MoveStart,
 	MoveEnd,
 	ResizeStart,
-	ResizeEnd
+	ResizeEnd,
+	StartKDE,
+	ExitKDE
     };
 	
     static void raise( Event );
Index: eventsrc
===================================================================
RCS file: /home/kde/kdebase/kwin/eventsrc,v
retrieving revision 1.32
diff -u -r1.32 eventsrc
--- eventsrc	2000/09/13 00:49:44	1.32
+++ eventsrc	2000/09/14 02:04:53
@@ -783,8 +783,7 @@
 Comment[ja]=ウィンドウを常に表示します
 Comment[mk]=Прозорот станува леплив
 Comment[nl]=Een venster is plakkerig gemaakt
-default_presentation=1
-soundfile=pop.wav
+default_presentation=0
 
 [unsticky]
 Name=Window Unsticky
@@ -1053,3 +1052,16 @@
 Comment[mk]=Прозорот завршува со предименционирањето
 Comment[nl]=Een venster is klaar met het wijzigen van grootte
 default_presentation=0
+
+[startkde]
+Name=Login
+Comment=KDE is Starting Up
+default_presentation=1
+default_sound=KDE_Startup.wav
+ 
+[exitkde]
+Name=Logout
+Comment=KDE is Exiting
+default_presentation=1
+default_sound=KDE_Logout.wav
+
Index: workspace.cpp
===================================================================
RCS file: /home/kde/kdebase/kwin/workspace.cpp,v
retrieving revision 1.164
diff -u -r1.164 workspace.cpp
--- workspace.cpp	2000/09/11 20:54:00	1.164
+++ workspace.cpp	2000/09/14 02:05:08
@@ -213,6 +213,7 @@
     keys              (0),
     root              (0)
 {
+    Events::raise(Events::StartKDE);
     root = qt_xrootwin();
     default_colormap = DefaultColormap(qt_xdisplay(), qt_xscreen() );
     installed_colormap = default_colormap;
@@ -2152,6 +2153,8 @@
 
 void Workspace::slotLogout()
 {
+  Events::raise(Events::ExitKDE);
+  
   kapp->requestShutDown();
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic