diff --git a/ChangeLog b/ChangeLog index e6c79bfe1d..ecad919859 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-04 Tor Lillqvist + + * gtk/gtkstatusicon.c (gtk_status_icon_set_tooltip): Plug memory + leak on Win32. + 2005-11-03 Tor Lillqvist * gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index e6c79bfe1d..ecad919859 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,8 @@ +2005-11-04 Tor Lillqvist + + * gtk/gtkstatusicon.c (gtk_status_icon_set_tooltip): Plug memory + leak on Win32. + 2005-11-03 Tor Lillqvist * gdk/win32/gdkcursor-win32.c: As there is only one GdkDisplay in diff --git a/gtk/gtkstatusicon.c b/gtk/gtkstatusicon.c index a745a255cd..18a504e138 100755 --- a/gtk/gtkstatusicon.c +++ b/gtk/gtkstatusicon.c @@ -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))