]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/utilscmn.cpp
temp linking quick fix
[wxWidgets.git] / src / common / utilscmn.cpp
index 9962127b6ba2cbdcec62033906cf61f30e2c7f7a..a3b74371c12eac378d306569b288fbefd1fb035c 100644 (file)
@@ -68,6 +68,7 @@
 
 #if wxUSE_GUI
     #include "wx/colordlg.h"
+    #include "wx/fontdlg.h"
     #include "wx/notebook.h"
     #include "wx/frame.h"
     #include "wx/statusbr.h"
     #include "wx/msw/private.h"
 #endif
 
+// ----------------------------------------------------------------------------
+// common data
+// ----------------------------------------------------------------------------
+
+#if WXWIN_COMPATIBILITY_2_2
+    const wxChar *wxInternalErrorStr = wxT("wxWindows Internal Error");
+    const wxChar *wxFatalErrorStr = wxT("wxWindows Fatal Error");
+#endif // WXWIN_COMPATIBILITY_2_2
+
 // ----------------------------------------------------------------------------
 // function protoypes
 // ----------------------------------------------------------------------------
@@ -962,26 +972,48 @@ wxString wxGetPasswordFromUser(const wxString& message,
 
 wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit)
 {
-      wxColourData data;
-      data.SetChooseFull(TRUE);
-      if ( colInit.Ok() )
-      {
-          data.SetColour((wxColour &)colInit); // const_cast
-      }
+    wxColourData data;
+    data.SetChooseFull(TRUE);
+    if ( colInit.Ok() )
+    {
+        data.SetColour((wxColour &)colInit); // const_cast
+    }
 
-      wxColour colRet;
-      wxColourDialog dialog(parent, &data);
-      if ( dialog.ShowModal() == wxID_OK )
-      {
-          colRet = dialog.GetColourData().GetColour();
-      }
-      //else: leave it invalid
+    wxColour colRet;
+    wxColourDialog dialog(parent, &data);
+    if ( dialog.ShowModal() == wxID_OK )
+    {
+        colRet = dialog.GetColourData().GetColour();
+    }
+    //else: leave it invalid
 
-      return colRet;
+    return colRet;
 }
 
 #endif // wxUSE_COLOURDLG
 
+#if wxUSE_FONTDLG
+
+wxFont wxGetFontFromUser(wxWindow *parent, const wxFont& fontInit)
+{
+    wxFontData data;
+    if ( fontInit.Ok() )
+    {
+        data.SetInitialFont(fontInit);
+    }
+
+    wxFont fontRet;
+    wxFontDialog dialog(parent, &data);
+    if ( dialog.ShowModal() == wxID_OK )
+    {
+        fontRet = dialog.GetFontData().GetChosenFont();
+    }
+    //else: leave it invalid
+
+    return fontRet;
+}
+
+#endif // wxUSE_FONTDLG
 // ----------------------------------------------------------------------------
 // missing C RTL functions (FIXME shouldn't be here at all)
 // ----------------------------------------------------------------------------
@@ -1086,7 +1118,7 @@ const wxChar *wxGetInstallPrefix()
 {
     wxString prefix;
     
-    if ( wxGetEnv(wxT("WX_PREFIX"), &prefix) )
+    if ( wxGetEnv(wxT("WXPREFIX"), &prefix) )
         return prefix.c_str();
     
 #ifdef wxINSTALL_PREFIX