diff options
author | RĂ¼diger Timm <rt@openoffice.org> | 2005-03-29 13:57:43 +0000 |
---|---|---|
committer | RĂ¼diger Timm <rt@openoffice.org> | 2005-03-29 13:57:43 +0000 |
commit | 2e353b0248aae9a625963781c1dd8d9e8dc0f1d5 (patch) | |
tree | 5eb5fe459183f69b6bb7b126c922a6cc0e6cc8cb /sfx2/source/appl/shutdowniconw32.cxx | |
parent | 67fbced3c79f96ee1ab0b32b6f03d1eedc67c3b8 (diff) |
INTEGRATION: CWS lobeta3 (1.28.100); FILE MERGED
2005/03/16 11:42:13 lo 1.28.100.2: RESYNC: (1.28-1.29); FILE MERGED
2005/02/18 10:33:28 cd 1.28.100.1: #i41022# Enable restart/reload of Quickstarter
Diffstat (limited to 'sfx2/source/appl/shutdowniconw32.cxx')
-rw-r--r-- | sfx2/source/appl/shutdowniconw32.cxx | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index 539c254cce..1a65e51a6c 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -2,9 +2,9 @@ * * $RCSfile: shutdowniconw32.cxx,v $ * - * $Revision: 1.30 $ + * $Revision: 1.31 $ * - * last change: $Author: kz $ $Date: 2005-03-18 18:30:06 $ + * last change: $Author: rt $ $Date: 2005-03-29 14:57:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -161,9 +161,10 @@ using namespace ::osl; #define SFX_TASKBAR_NOTIFICATION WM_USER+1 -static HWND aListenerWindow = NULL; -static HWND aExecuterWindow = NULL; -static BOOL bModalMode = FALSE; +static HWND aListenerWindow = NULL; +static HWND aExecuterWindow = NULL; +static BOOL bModalMode = FALSE; +static HMENU popupMenu = NULL; static void OnMeasureItem(HWND hwnd, LPMEASUREITEMSTRUCT lpmis); static void OnDrawItem(HWND hwnd, LPDRAWITEMSTRUCT lpdis); @@ -316,7 +317,7 @@ static HMENU createSystrayMenu( ) static void deleteSystrayMenu( HMENU hMenu ) { - if( !hMenu ) + if( !hMenu || !IsMenu( hMenu )) return; MENUITEMINFOW mi; @@ -366,10 +367,30 @@ static void addTaskbarIcon( HWND hWnd ) // ------------------------------- -LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +static void removeTaskbarIcon() { - static HMENU popupMenu = NULL; + ShutdownIcon *pShutdownIcon = ShutdownIcon::getInstance(); + OSL_ENSURE( pShutdownIcon, "ShutdownIcon instance empty!"); + + if( !pShutdownIcon ) + return; + + if ( IsWindow( aListenerWindow )) + { + deleteSystrayMenu( popupMenu ); + + NOTIFYICONDATAA nid; + nid.cbSize=sizeof(NOTIFYICONDATA); + nid.hWnd = aListenerWindow; + nid.uID = ID_QUICKSTART; + Shell_NotifyIconA(NIM_DELETE, &nid); + } +} + +// ------------------------------- +LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) +{ static UINT s_uTaskbarRestart = 0; static UINT s_uMsgKillTray = 0; @@ -510,8 +531,6 @@ static sal_Bool checkOEM() { LRESULT CALLBACK executerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) { - static HMENU popupMenu = NULL; - switch (uMsg) { case WM_NCCREATE: |