]> git.saurik.com Git - wxWidgets.git/blobdiff - src/xrc/xmlres.cpp
Added symbolic names for native control week days.
[wxWidgets.git] / src / xrc / xmlres.cpp
index d19bdec665be788d32ba1d9a95a338dea5dc001e..82c3f10a891a1c1ef57336f94d8aee505f9681fc 100644 (file)
@@ -292,13 +292,13 @@ bool wxXmlResource::Load(const wxString& filemask_)
 bool wxXmlResource::Unload(const wxString& filename)
 {
     wxASSERT_MSG( !wxIsWild(filename),
-                    _T("wildcards not supported by wxXmlResource::Unload()") );
+                    wxT("wildcards not supported by wxXmlResource::Unload()") );
 
     wxString fnd = ConvertFileNameToURL(filename);
 #if wxUSE_FILESYSTEM
     const bool isArchive = IsArchive(fnd);
     if ( isArchive )
-        fnd += _T("#zip:");
+        fnd += wxT("#zip:");
 #endif // wxUSE_FILESYSTEM
 
     bool unloaded = false;
@@ -564,7 +564,7 @@ bool wxXmlResource::UpdateResources()
 
         if (modif)
         {
-            wxLogTrace(_T("xrc"), _T("opening file '%s'"), rec->File);
+            wxLogTrace(wxT("xrc"), wxT("opening file '%s'"), rec->File);
 
             wxInputStream *stream = NULL;
 
@@ -1226,7 +1226,7 @@ static wxColour GetSystemColour(const wxString& name)
     if (!name.empty())
     {
         #define SYSCLR(clr) \
-            if (name == _T(#clr)) return wxSystemSettings::GetColour(clr);
+            if (name == wxT(#clr)) return wxSystemSettings::GetColour(clr);
         SYSCLR(wxSYS_COLOUR_SCROLLBAR)
         SYSCLR(wxSYS_COLOUR_BACKGROUND)
         SYSCLR(wxSYS_COLOUR_DESKTOP)
@@ -1688,7 +1688,7 @@ static wxFont GetSystemFont(const wxString& name)
     if (!name.empty())
     {
         #define SYSFNT(fnt) \
-            if (name == _T(#fnt)) return wxSystemSettings::GetFont(fnt);
+            if (name == wxT(#fnt)) return wxSystemSettings::GetFont(fnt);
         SYSFNT(wxSYS_OEM_FIXED_FONT)
         SYSFNT(wxSYS_ANSI_FIXED_FONT)
         SYSFNT(wxSYS_ANSI_VAR_FONT)
@@ -1850,8 +1850,12 @@ void wxXmlResourceHandler::SetupWindow(wxWindow *wnd)
         wnd->SetExtraStyle(wnd->GetExtraStyle() | GetStyle(wxT("exstyle")));
     if (HasParam(wxT("bg")))
         wnd->SetBackgroundColour(GetColour(wxT("bg")));
+    if (HasParam(wxT("ownbg")))
+        wnd->SetOwnBackgroundColour(GetColour(wxT("ownbg")));
     if (HasParam(wxT("fg")))
         wnd->SetForegroundColour(GetColour(wxT("fg")));
+    if (HasParam(wxT("ownfg")))
+        wnd->SetOwnForegroundColour(GetColour(wxT("ownfg")));
     if (GetBool(wxT("enabled"), 1) == 0)
         wnd->Enable(false);
     if (GetBool(wxT("focused"), 0) == 1)
@@ -1863,7 +1867,9 @@ void wxXmlResourceHandler::SetupWindow(wxWindow *wnd)
         wnd->SetToolTip(GetText(wxT("tooltip")));
 #endif
     if (HasParam(wxT("font")))
-        wnd->SetFont(GetFont());
+        wnd->SetFont(GetFont(wxT("font")));
+    if (HasParam(wxT("ownfont")))
+        wnd->SetOwnFont(GetFont(wxT("ownfont")));
     if (HasParam(wxT("help")))
         wnd->SetHelpText(GetText(wxT("help")));
 }