diff dwt/widgets/Menu.d @ 115:640928daee8c

Revert the reverting changes Backed out changeset f353be82b6be
author Frank Benoit <benoit@tionex.de>
date Mon, 11 Feb 2008 04:05:55 +0100
parents f353be82b6be
children 25f88bf5a6df
line wrap: on
line diff
--- a/dwt/widgets/Menu.d	Sun Feb 10 18:42:25 2008 -0800
+++ b/dwt/widgets/Menu.d	Mon Feb 11 04:05:55 2008 +0100
@@ -540,7 +540,7 @@
 }
 
 void destroyItem (MenuItem item) {
-    static if (OS.IsWinCE) {
+    if (OS.IsWinCE) {
         if ((OS.IsPPC || OS.IsSP) && hwndCB !is null) {
             if (OS.IsSP) {
                 redraw();
@@ -586,8 +586,8 @@
     HMENU hMenu = handle;
     HWND hCB = hwndCB;
     releaseHandle ();
-    static if (OS.IsWinCE) {
-        if( hCB !is null ){
+    if (OS.IsWinCE && hCB !is null) {
+        static if( OS.IsWinCE ){
             OS.CommandBar_Destroy (hCB);
         }
     } else {
@@ -661,7 +661,7 @@
  */
 /*public*/ Rectangle getBounds () {
     checkWidget ();
-    static if (OS.IsWinCE) return new Rectangle (0, 0, 0, 0);
+    if (OS.IsWinCE) return new Rectangle (0, 0, 0, 0);
     if ((style & DWT.BAR) !is 0) {
         if (parent.menuBar !is this) {
             return new Rectangle (0, 0, 0, 0);
@@ -706,7 +706,7 @@
  */
 public MenuItem getDefaultItem () {
     checkWidget ();
-    static if (OS.IsWinCE) return null;
+    if (OS.IsWinCE) return null;
     int id = OS.GetMenuDefaultItem (handle, OS.MF_BYCOMMAND, OS.GMDI_USEDISABLED);
     if (id is -1) return null;
     MENUITEMINFO info;
@@ -866,7 +866,7 @@
 }
 
 int GetMenuItemCount (HANDLE handle) {
-    static if (OS.IsWinCE) {
+    if (OS.IsWinCE) {
         if ((OS.IsPPC || OS.IsSP) && hwndCB !is null) {
             return OS.IsSP ? 2 : OS.SendMessage (hwndCB, OS.TB_BUTTONCOUNT, 0, 0);
         }
@@ -1325,7 +1325,7 @@
         if (item.parent !is this) return;
         newID = item.id;
     }
-    static if (OS.IsWinCE) return;
+    if (OS.IsWinCE) return;
     int oldID = OS.GetMenuDefaultItem (handle, OS.MF_BYCOMMAND, OS.GMDI_USEDISABLED);
     if (newID is oldID) return;
     OS.SetMenuDefaultItem (handle, newID, OS.MF_BYCOMMAND);
@@ -1457,7 +1457,7 @@
         }
         return;
     }
-    static if (OS.IsWinCE) return;
+    if (OS.IsWinCE) return;
     if ((style & DWT.BAR) !is 0) {
         if (this is parent.menuBar) OS.DrawMenuBar (parent.handle);
         return;