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

List:       kde-core-devel
Subject:    [PATCH] ksystemtray.cpp
From:       Martijn Klingens <klingens () kde ! org>
Date:       2002-04-11 11:38:39
[Download RAW message or body]

Attached patch allows Kopete to override the main window's close query by 
hiding to the systray and still make the standard Quit action from 
KSystemTray work.

Ok to apply and to backport?

Martijn

["ksystemtray.diff" (text/x-diff)]

? .ksystemtray.cpp.swp
? ksystemtray.diff
Index: ksystemtray.cpp
===================================================================
RCS file: /home/kde/kdelibs/kdeui/ksystemtray.cpp,v
retrieving revision 1.18
diff -u -3 -p -r1.18 ksystemtray.cpp
--- ksystemtray.cpp	2002/03/04 00:51:51	1.18
+++ ksystemtray.cpp	2002/04/11 11:06:16
@@ -63,14 +63,12 @@ void KSystemTray::showEvent( QShowEvent 
 {
     if ( !hasQuit ) {
 	menu->insertSeparator();
-	if ( parentWidget() ) {
+	if ( parentWidget() )
 	    minimizeRestoreId = menu->insertItem(i18n("Minimize"), this, SLOT( toggleMinimizeRestore() ) );
-	    menu->insertItem(SmallIcon("exit"), i18n("&Quit"), parentWidget(), SLOT(close() ) );
-	}
-	else {
+	else
 	    minimizeRestoreId = -1;
-	    menu->insertItem(SmallIcon("exit"), i18n("&Quit"), qApp, SLOT(closeAllWindows() ) );
-	}
+
+	menu->insertItem( SmallIcon( "exit" ), i18n( "&Quit" ), qApp, SLOT( quit() ) );
 	hasQuit = 1;
     }
 }


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

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