]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xh_toolb.cpp
Minor source cleaning.
[wxWidgets.git] / src / xrc / xh_toolb.cpp
index b21a906e63635d26124f669e7cd4e502ef34c384..7c1f0fa055483f260242088e3b80819ce24aa09c 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        xh_toolb.cpp
+// Name:        src/xrc/xh_toolb.cpp
 // Purpose:     XRC resource for wxBoxSizer
 // Author:      Vaclav Slavik
 // Created:     2000/08/11
@@ -8,10 +8,6 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "xh_toolb.h"
-#endif
-
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 #if wxUSE_XRC && wxUSE_TOOLBAR
 
 #include "wx/xrc/xh_toolb.h"
+
+#ifndef WX_PRECOMP
+    #include "wx/frame.h"
+#endif
+
 #include "wx/toolbar.h"
-#include "wx/frame.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxToolBarXmlHandler, wxXmlResourceHandler)
 
@@ -80,6 +80,9 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
                                kind,
                                GetText(wxT("tooltip")),
                                GetText(wxT("longhelp")));
+
+            if ( GetBool(wxT("disabled")) )
+                m_toolbar->EnableTool(GetID(), false);
         }
         return m_toolbar; // must return non-NULL
     }
@@ -119,6 +122,8 @@ wxObject *wxToolBarXmlHandler::DoCreateResource()
         long separation = GetLong(wxT("separation"), -1);
         if (separation != -1)
             toolbar->SetToolSeparation(separation);
+        if (HasParam(wxT("bg")))
+            toolbar->SetBackgroundColour(GetColour(wxT("bg")));
 
         wxXmlNode *children_node = GetParamNode(wxT("object"));
         if (!children_node)