wine/dlls/shell32 systray.c
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Nov 8 10:08:17 CST 2005
ChangeSet ID: 21167
CVSROOT: /opt/cvs-commit
Module name: wine
Changes by: julliard at winehq.org 2005/11/08 10:08:17
Modified files:
dlls/shell32 : systray.c
Log message:
Vincent Béron <vberon at mecano.gme.usherb.ca>
Move functions a bit to get rid of a static declaration.
Patch: http://cvs.winehq.org/patch.py?id=21167
Old revision New revision Changes Path
1.30 1.31 +34 -35 wine/dlls/shell32/systray.c
Index: wine/dlls/shell32/systray.c
diff -u -p wine/dlls/shell32/systray.c:1.30 wine/dlls/shell32/systray.c:1.31
--- wine/dlls/shell32/systray.c:1.30 8 Nov 2005 16: 8:17 -0000
+++ wine/dlls/shell32/systray.c 8 Nov 2005 16: 8:17 -0000
@@ -53,8 +53,6 @@ typedef struct SystrayItem {
static SystrayItem *systray=NULL;
static int firstSystray=TRUE; /* defer creation of window class until first systray item is created */
-static BOOL SYSTRAY_Delete(PNOTIFYICONDATAA pnid);
-
#define ICON_SIZE GetSystemMetrics(SM_CXSMICON)
/* space around icon (forces icon to center of KDE systray area) */
@@ -69,6 +67,40 @@ static BOOL SYSTRAY_ItemIsEqual(PNOTIFYI
return TRUE;
}
+
+static void SYSTRAY_ItemTerm(SystrayItem *ptrayItem)
+{
+ if(ptrayItem->notifyIcon.hIcon)
+ DestroyIcon(ptrayItem->notifyIcon.hIcon);
+ if(ptrayItem->hWndToolTip)
+ DestroyWindow(ptrayItem->hWndToolTip);
+ if(ptrayItem->hWnd)
+ DestroyWindow(ptrayItem->hWnd);
+ return;
+}
+
+
+static BOOL SYSTRAY_Delete(PNOTIFYICONDATAA pnid)
+{
+ SystrayItem **ptrayItem = &systray;
+
+ while (*ptrayItem) {
+ if (SYSTRAY_ItemIsEqual(pnid, &(*ptrayItem)->notifyIcon)) {
+ SystrayItem *next = (*ptrayItem)->nextTrayItem;
+ TRACE("%p: %p %s\n", *ptrayItem, (*ptrayItem)->notifyIcon.hWnd, (*ptrayItem)->notifyIcon.szTip);
+ SYSTRAY_ItemTerm(*ptrayItem);
+
+ HeapFree(GetProcessHeap(),0,*ptrayItem);
+ *ptrayItem = next;
+
+ return TRUE;
+ }
+ ptrayItem = &((*ptrayItem)->nextTrayItem);
+ }
+
+ return FALSE; /* not found */
+}
+
static LRESULT CALLBACK SYSTRAY_WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
HDC hdc;
@@ -225,18 +257,6 @@ static BOOL SYSTRAY_ItemInit(SystrayItem
}
-static void SYSTRAY_ItemTerm(SystrayItem *ptrayItem)
-{
- if(ptrayItem->notifyIcon.hIcon)
- DestroyIcon(ptrayItem->notifyIcon.hIcon);
- if(ptrayItem->hWndToolTip)
- DestroyWindow(ptrayItem->hWndToolTip);
- if(ptrayItem->hWnd)
- DestroyWindow(ptrayItem->hWnd);
- return;
-}
-
-
static void SYSTRAY_ItemSetMessage(SystrayItem *ptrayItem, UINT uCallbackMessage)
{
ptrayItem->notifyIcon.uCallbackMessage = uCallbackMessage;
@@ -325,27 +345,6 @@ static BOOL SYSTRAY_Modify(PNOTIFYICONDA
}
-static BOOL SYSTRAY_Delete(PNOTIFYICONDATAA pnid)
-{
- SystrayItem **ptrayItem = &systray;
-
- while (*ptrayItem) {
- if (SYSTRAY_ItemIsEqual(pnid, &(*ptrayItem)->notifyIcon)) {
- SystrayItem *next = (*ptrayItem)->nextTrayItem;
- TRACE("%p: %p %s\n", *ptrayItem, (*ptrayItem)->notifyIcon.hWnd, (*ptrayItem)->notifyIcon.szTip);
- SYSTRAY_ItemTerm(*ptrayItem);
-
- HeapFree(GetProcessHeap(),0,*ptrayItem);
- *ptrayItem = next;
-
- return TRUE;
- }
- ptrayItem = &((*ptrayItem)->nextTrayItem);
- }
-
- return FALSE; /* not found */
-}
-
/*************************************************************************
*
*/
More information about the wine-cvs
mailing list