]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/docview.cpp
Daniel Gehriger <dgehrige@dmtsun.epfl.ch> patch for default extension filter
[wxWidgets.git] / src / common / docview.cpp
index 4f7427ebfec657c541cc160f48099bc22dcec95e..26281bef2704e43633e926d9eb2bc5f929e0dc47 100644 (file)
@@ -1044,6 +1044,7 @@ void wxDocManager::FileHistoryRemoveMenu(wxMenu *menu)
     m_fileHistory->RemoveMenu(menu);
 }
 
     m_fileHistory->RemoveMenu(menu);
 }
 
+#if wxUSE_CONFIG
 void wxDocManager::FileHistoryLoad(wxConfigBase& config)
 {
   if (m_fileHistory)
 void wxDocManager::FileHistoryLoad(wxConfigBase& config)
 {
   if (m_fileHistory)
@@ -1055,6 +1056,7 @@ void wxDocManager::FileHistorySave(wxConfigBase& config)
   if (m_fileHistory)
     m_fileHistory->Save(config);
 }
   if (m_fileHistory)
     m_fileHistory->Save(config);
 }
+#endif
 
 void wxDocManager::FileHistoryAddFilesToMenu(wxMenu* menu)
 {
 
 void wxDocManager::FileHistoryAddFilesToMenu(wxMenu* menu)
 {
@@ -1256,7 +1258,7 @@ wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates,
   int n = 0;
   for (i = 0; i < noTemplates; i++)
   {
   int n = 0;
   for (i = 0; i < noTemplates; i++)
   {
-    if (templates[i]->IsVisible() && templates[i]->GetViewName())
+    if (templates[i]->IsVisible() && (templates[i]->GetViewName() != ""))
     {
       strings[n] = WXSTRINGCAST templates[i]->m_viewTypeName;
       data[n] = (char *)templates[i];
     {
       strings[n] = WXSTRINGCAST templates[i]->m_viewTypeName;
       data[n] = (char *)templates[i];
@@ -1704,7 +1706,7 @@ void wxCommandProcessor::SetMenuStrings(void)
         // we've undone to the start of the list, but can redo the first.
         wxCommand *redoCommand = (wxCommand *)m_commands.First()->Data();
         wxString redoCommandName(redoCommand->GetName());
         // we've undone to the start of the list, but can redo the first.
         wxCommand *redoCommand = (wxCommand *)m_commands.First()->Data();
         wxString redoCommandName(redoCommand->GetName());
-        if (!redoCommandName) redoCommandName = _("Unnamed command");
+        if (redoCommandName == "") redoCommandName = _("Unnamed command");
         buf = wxString(_("&Redo ")) + redoCommandName;
         m_commandEditMenu->SetLabel(wxID_REDO, buf);
         m_commandEditMenu->Enable(wxID_REDO, TRUE);
         buf = wxString(_("&Redo ")) + redoCommandName;
         m_commandEditMenu->SetLabel(wxID_REDO, buf);
         m_commandEditMenu->Enable(wxID_REDO, TRUE);
@@ -1820,6 +1822,7 @@ void wxFileHistory::RemoveMenu(wxMenu *menu)
   m_fileMenus.DeleteObject(menu);
 }
 
   m_fileMenus.DeleteObject(menu);
 }
 
+#if wxUSE_CONFIG
 void wxFileHistory::Load(wxConfigBase& config)
 {
   m_fileHistoryN = 0;
 void wxFileHistory::Load(wxConfigBase& config)
 {
   m_fileHistoryN = 0;
@@ -1846,6 +1849,7 @@ void wxFileHistory::Save(wxConfigBase& config)
     config.Write(buf, wxString(m_fileHistory[i]));
   }
 }
     config.Write(buf, wxString(m_fileHistory[i]));
   }
 }
+#endif
 
 void wxFileHistory::AddFilesToMenu()
 {
 
 void wxFileHistory::AddFilesToMenu()
 {