Author: mkupfer Date: Wed Jan 14 12:12:43 2009 New Revision: 38763
URL: http://svn.reactos.org/svn/reactos?rev=38763&view=rev Log: Mario Kacmar <kario AT szm DOT sk> - Fix Switch-To Button, enable only if one selected application. - See issue #4028 for more details.
Modified: trunk/reactos/base/applications/taskmgr/applpage.c
Modified: trunk/reactos/base/applications/taskmgr/applpage.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/taskmgr/a... ============================================================================== --- trunk/reactos/base/applications/taskmgr/applpage.c [iso-8859-1] (original) +++ trunk/reactos/base/applications/taskmgr/applpage.c [iso-8859-1] Wed Jan 14 12:12:43 2009 @@ -429,16 +429,23 @@ if (ListView_GetSelectedCount(hApplicationPageListCtrl)) { EnableWindow(hApplicationPageEndTaskButton, TRUE); + } + else + { + EnableWindow(hApplicationPageEndTaskButton, FALSE); + } + /* Enable "Switch To" button only if one app is selected */ + if (ListView_GetSelectedCount(hApplicationPageListCtrl) == 1 ) + { EnableWindow(hApplicationPageSwitchToButton, TRUE); } else { - EnableWindow(hApplicationPageEndTaskButton, FALSE); - EnableWindow(hApplicationPageSwitchToButton, FALSE); - } - - /* If we are on the applications tab the the windows menu will */ - /* be present on the menu bar so enable & disable the menu items */ + EnableWindow(hApplicationPageSwitchToButton, FALSE); + } + + /* If we are on the applications tab the windows menu will be */ + /* present on the menu bar so enable & disable the menu items */ if (TabCtrl_GetCurSel(hTabWnd) == 0) { HMENU hMenu;