shell32: Ensure status bar in control panel is reset when menu closed. Also reset to blank when item deselected.

This commit is contained in:
Owen Rudge 2008-07-28 16:15:46 +01:00 committed by Alexandre Julliard
parent ac78bfe18a
commit 6d59815059
1 changed files with 14 additions and 0 deletions

View File

@ -511,6 +511,8 @@ static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
if (item) if (item)
SetWindowTextW(panel->hWndStatusBar, SetWindowTextW(panel->hWndStatusBar,
item->applet->info[item->id].szInfo); item->applet->info[item->id].szInfo);
else
SetWindowTextW(panel->hWndStatusBar, NULL);
return 0; return 0;
} }
@ -533,6 +535,18 @@ static LRESULT WINAPI Control_WndProc(HWND hWnd, UINT wMsg,
if (item) if (item)
SetWindowTextW(panel->hWndStatusBar, item->applet->info[item->id].szInfo); SetWindowTextW(panel->hWndStatusBar, item->applet->info[item->id].szInfo);
} }
else if ((HIWORD(lParam1) == 0xFFFF) && (lParam2 == 0))
{
/* reset status bar description to that of the selected icon */
CPlItem *item = Control_GetCPlItem_From_ListView(panel);
if (item)
SetWindowTextW(panel->hWndStatusBar, item->applet->info[item->id].szInfo);
else
SetWindowTextW(panel->hWndStatusBar, NULL);
return 0;
}
else else
SetWindowTextW(panel->hWndStatusBar, NULL); SetWindowTextW(panel->hWndStatusBar, NULL);