Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Sebastian Mayr
wine
Commits
c5789f8c
Commit
c5789f8c
authored
19 years ago
by
Vincent Béron
Committed by
Alexandre Julliard
19 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Move functions a bit to get rid of a static declaration.
parent
4082e9a6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dlls/shell32/systray.c
+34
-35
34 additions, 35 deletions
dlls/shell32/systray.c
with
34 additions
and
35 deletions
dlls/shell32/systray.c
+
34
−
35
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 */
}
/*************************************************************************
*
*/
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment