Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
c5789f8c
Commit
c5789f8c
authored
Nov 08, 2005
by
Vincent Béron
Committed by
Alexandre Julliard
Nov 08, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move functions a bit to get rid of a static declaration.
parent
4082e9a6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
35 deletions
+34
-35
systray.c
dlls/shell32/systray.c
+34
-35
No files found.
dlls/shell32/systray.c
View file @
c5789f8c
...
...
@@ -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(PNOTIFYICONDATAA pnid1, PNOTIFYICONDATAA pnid2)
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 *ptrayItem)
}
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(PNOTIFYICONDATAA pnid)
}
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 */
}
/*************************************************************************
*
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment