Plug memory leak on Win32.

2005-11-04  Tor Lillqvist  <tml@novell.com>

	* gtk/gtkstatusicon.c (gtk_status_icon_set_tooltip): Plug memory
	leak on Win32.
This commit is contained in:
Tor Lillqvist 2005-11-04 00:37:31 +00:00 committed by Tor Lillqvist
parent 3f49474ebc
commit 36e1f67ac2
3 changed files with 12 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-11-04 Tor Lillqvist <tml@novell.com>
* gtk/gtkstatusicon.c (gtk_status_icon_set_tooltip): Plug memory
leak on Win32.
2005-11-03 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in

View File

@ -1,3 +1,8 @@
2005-11-04 Tor Lillqvist <tml@novell.com>
* gtk/gtkstatusicon.c (gtk_status_icon_set_tooltip): Plug memory
leak on Win32.
2005-11-03 Tor Lillqvist <tml@novell.com>
* gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in

View File

@ -1273,10 +1273,12 @@ gtk_status_icon_set_tooltip (GtkStatusIcon *status_icon,
else
{
WCHAR *wcs = g_utf8_to_utf16 (tooltip_text, -1, NULL, NULL, NULL);
status_icon->priv->nid.uFlags |= NIF_TIP;
wcsncpy (status_icon->priv->nid.szTip, wcs,
G_N_ELEMENTS (status_icon->priv->nid.szTip) - 1);
status_icon->priv->nid.szTip[G_N_ELEMENTS (status_icon->priv->nid.szTip) - 1] = 0;
g_free (wcs);
}
if (status_icon->priv->nid.hWnd != NULL && status_icon->priv->visible)
if (!Shell_NotifyIconW (NIM_MODIFY, &status_icon->priv->nid))