Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d2e04761
Commit
d2e04761
authored
Dec 15, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
explorer: Store information needed for the info balloon in the tray icon structure.
parent
477c085e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
8 deletions
+19
-8
systray.c
programs/explorer/systray.c
+19
-8
No files found.
programs/explorer/systray.c
View file @
d2e04761
...
...
@@ -65,10 +65,16 @@ struct icon
HICON
image
;
/* the image to render */
HWND
owner
;
/* the HWND passed in to the Shell_NotifyIcon call */
HWND
tooltip
;
/* Icon tooltip */
UINT
state
;
/* state flags */
UINT
id
;
/* the unique id given by the app */
UINT
callback_message
;
int
display
;
/* index in display list, or -1 if hidden */
WCHAR
tiptext
[
128
];
/* Tooltip text. If empty => tooltip disabled */
WCHAR
info_text
[
256
];
/* info balloon text */
WCHAR
info_title
[
64
];
/* info balloon title */
UINT
info_flags
;
/* flags for info balloon */
UINT
info_timeout
;
/* timeout for info balloon */
HICON
info_icon
;
/* info balloon icon */
};
static
struct
list
icon_list
=
LIST_INIT
(
icon_list
);
...
...
@@ -84,6 +90,9 @@ static int icon_cx, icon_cy, tray_width;
#define MIN_DISPLAYED 8
#define ICON_BORDER 2
#define BALLOON_SHOW_MIN_TIMEOUT 10000
#define BALLOON_SHOW_MAX_TIMEOUT 30000
/* Retrieves icon record by owner window and ID */
static
struct
icon
*
get_icon
(
HWND
owner
,
UINT
id
)
{
...
...
@@ -252,10 +261,9 @@ static BOOL modify_icon( struct icon *icon, NOTIFYICONDATAW *nid )
return
FALSE
;
}
if
(
(
nid
->
uFlags
&
NIF_STATE
)
&&
(
nid
->
dwStateMask
&
NIS_HIDDEN
)
)
if
(
nid
->
uFlags
&
NIF_STATE
)
{
if
(
nid
->
dwState
&
NIS_HIDDEN
)
hide_icon
(
icon
);
else
show_icon
(
icon
);
icon
->
state
=
(
icon
->
state
&
~
nid
->
dwStateMask
)
|
(
nid
->
dwState
&
nid
->
dwStateMask
);
}
if
(
nid
->
uFlags
&
NIF_ICON
)
...
...
@@ -276,8 +284,14 @@ static BOOL modify_icon( struct icon *icon, NOTIFYICONDATAW *nid )
}
if
(
nid
->
uFlags
&
NIF_INFO
&&
nid
->
cbSize
>=
NOTIFYICONDATAA_V2_SIZE
)
{
WINE_FIXME
(
"balloon tip title %s, message %s
\n
"
,
wine_dbgstr_w
(
nid
->
szInfoTitle
),
wine_dbgstr_w
(
nid
->
szInfo
));
lstrcpynW
(
icon
->
info_text
,
nid
->
szInfo
,
sizeof
(
icon
->
info_text
)
/
sizeof
(
WCHAR
)
);
lstrcpynW
(
icon
->
info_title
,
nid
->
szInfoTitle
,
sizeof
(
icon
->
info_title
)
/
sizeof
(
WCHAR
)
);
icon
->
info_flags
=
nid
->
dwInfoFlags
;
icon
->
info_timeout
=
max
(
min
(
nid
->
u
.
uTimeout
,
BALLOON_SHOW_MAX_TIMEOUT
),
BALLOON_SHOW_MIN_TIMEOUT
);
icon
->
info_icon
=
nid
->
hBalloonIcon
;
}
if
(
icon
->
state
&
NIS_HIDDEN
)
hide_icon
(
icon
);
else
show_icon
(
icon
);
return
TRUE
;
}
...
...
@@ -308,10 +322,7 @@ static BOOL add_icon(NOTIFYICONDATAW *nid)
if
(
list_empty
(
&
icon_list
))
SetTimer
(
tray_window
,
1
,
2000
,
NULL
);
list_add_tail
(
&
icon_list
,
&
icon
->
entry
);
modify_icon
(
icon
,
nid
);
/* show icon, unless hidden state was explicitly specified */
if
(
!
((
nid
->
uFlags
&
NIF_STATE
)
&&
(
nid
->
dwStateMask
&
NIS_HIDDEN
)))
show_icon
(
icon
);
return
TRUE
;
return
modify_icon
(
icon
,
nid
);
}
/* Deletes tray icon window and icon record */
...
...
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