]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/filedlgg.cpp
changed wxString::StartsWidth/EndsWidth to take wxString argument instead of wxChar*
[wxWidgets.git] / src / generic / filedlgg.cpp
index 90c086fd97e4a40c1b74242806aead8cbe5eeb69..6dcbdfacc4963047dc40321cdfe880adf4bfe614 100644 (file)
@@ -1016,6 +1016,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent,
 
     ignoreChanges = true;
 
+#if wxUSE_CONFIG
     if (wxConfig::Get(false))
     {
         wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ViewStyle"),
@@ -1023,6 +1024,7 @@ bool wxGenericFileDialog::Create( wxWindow *parent,
         wxConfig::Get()->Read(wxT("/wxWindows/wxFileDialog/ShowHidden"),
                               &ms_lastShowHidden);
     }
+#endif
 
     if ((m_dir.empty()) || (m_dir == wxT(".")))
     {
@@ -1190,6 +1192,7 @@ wxGenericFileDialog::~wxGenericFileDialog()
 
     if (!m_bypassGenericImpl)
     {
+#if wxUSE_CONFIG
         if (wxConfig::Get(false))
         {
             wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ViewStyle"),
@@ -1197,6 +1200,7 @@ wxGenericFileDialog::~wxGenericFileDialog()
             wxConfig::Get()->Write(wxT("/wxWindows/wxFileDialog/ShowHidden"),
                                    ms_lastShowHidden);
         }
+#endif
 
         const int count = m_choice->GetCount();
         for ( int i = 0; i < count; i++ )
@@ -1473,6 +1477,8 @@ void wxGenericFileDialog::HandleAction( const wxString &fn )
     {
         wxMessageBox(_("Please choose an existing file."), _("Error"),
                      wxOK | wxICON_ERROR );
+                     
+        return;
     }
 
     SetPath( filename );