]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/resource.cpp
Small optical changes for MSW
[wxWidgets.git] / src / common / resource.cpp
index f194ea4167a29e649be6b3c84f5b8c8ea1d089d6..5e4842f6b394cffac2e9e177e88785282a5f1ab5 100644 (file)
@@ -39,7 +39,6 @@
 #include "wx/button.h"
 #include "wx/bmpbuttn.h"
 #include "wx/radiobox.h"
-#include "wx/radiobut.h"
 #include "wx/listbox.h"
 #include "wx/choice.h"
 #include "wx/checkbox.h"
 #include "wx/icon.h"
 #include "wx/statbox.h"
 #include "wx/statbmp.h"
-#if wxUSE_GAUGE
 #include "wx/gauge.h"
-#endif
 #include "wx/textctrl.h"
 #include "wx/msgdlg.h"
 #include "wx/intl.h"
 #endif
 
-#if wxUSE_RADIOBUTTON
+#if wxUSE_RADIOBTN
 #include "wx/radiobut.h"
 #endif
 
@@ -194,7 +191,8 @@ bool wxResourceTable::DeleteResource(const wxString& name)
     // parent's child list.
     BeginFind();
     wxNode *node = (wxNode *) NULL;
-    while ((node = Next()))
+    node = Next();
+    while (node != NULL)
     {
       wxItemResource *parent = (wxItemResource *)node->Data();
       if (parent->GetChildren().Member(item))
@@ -202,6 +200,7 @@ bool wxResourceTable::DeleteResource(const wxString& name)
         parent->GetChildren().DeleteObject(item);
         break;
       }
+      node = Next();
     }
 
     delete item;
@@ -373,7 +372,7 @@ wxControl *wxResourceTable::CreateItem(wxWindow *parent, const wxItemResource* c
         ((wxGauge *)control)->SetValue((int)childResource->GetValue1());
       }
 #endif
-#if wxUSE_RADIOBUTTON
+#if wxUSE_RADIOBTN
    else if (itemType == wxString(_T("wxRadioButton")))
       {
         control = new wxRadioButton(parent, id, childResource->GetTitle(), // (int)childResource->GetValue1(),
@@ -862,7 +861,7 @@ wxItemResource *wxResourceInterpretControl(wxResourceTable& table, wxExpr *expr)
         controlItem->SetFont(wxResourceInterpretFontSpec(expr->Nth(count)));
     }
   }
-#if wxUSE_RADIOBUTTON
+#if wxUSE_RADIOBTN
   else if (controlType == _T("wxRadioButton"))
   {
     // Check for default value
@@ -1531,7 +1530,7 @@ static bool wxEatWhiteSpace(FILE *fd)
          default:
             ungetc(ch, fd);
             return TRUE;
-            
+
          }
       }
    return FALSE;
@@ -2044,7 +2043,8 @@ long wxParseWindowStyle(const wxString& bitListString)
   int i = 0;
   wxChar *word;
   long bitList = 0;
-  while ((word = wxResourceParseWord(WXSTRINGCAST bitListString, &i)))
+  word = wxResourceParseWord(WXSTRINGCAST bitListString, &i);
+  while (word != NULL)
   {
     bool found = FALSE;
     int j;
@@ -2060,6 +2060,7 @@ long wxParseWindowStyle(const wxString& bitListString)
       wxLogWarning(_("Unrecognized style %s whilst parsing resource."), word);
       return 0;
     }
+    word = wxResourceParseWord(WXSTRINGCAST bitListString, &i);
   }
   return bitList;
 }
@@ -2608,7 +2609,7 @@ bool wxEatWhiteSpaceString(char *s)
          default:
             ungetc_string();
             return TRUE;
-            
+
          }
       }
    return FALSE;