[ros-diffs] [mkupfer] 38763: Mario Kacmar <kario AT szm DOT sk> - Fix Switch-To Button, enable only if one selected application. - See issue #4028 for more details.

mkupfer at svn.reactos.org mkupfer at svn.reactos.org
Wed Jan 14 19:12:44 CET 2009


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/applpage.c?rev=38763&r1=38762&r2=38763&view=diff
==============================================================================
--- 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;



More information about the Ros-diffs mailing list