Patch #1738 2006-12-19 00:29

stahta01

wxHIDE_READONLY patch for wxWidgets 2.8
Download
1738-wxHIDE_READONL.patch (14.3 KB)
Category
Application::Refinement
Status
Closed
Close date
2006-12-27 10:07
Assigned to
killerbot
Index: src/src/scriptingsettingsdlg.cpp
===================================================================
--- src/src/scriptingsettingsdlg.cpp    (revision 3395)
+++ src/src/scriptingsettingsdlg.cpp    (working copy)
@@ -242,7 +242,11 @@
                             XRCCTRL(*this, "txtScript", wxTextCtrl)->GetValue(),
                             XRCCTRL(*this, "txtScript", wxTextCtrl)->GetValue(),
                             FileFilters::GetFilterString(_T(".script")),
-                            wxOPEN | wxHIDE_READONLY);
+                            wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+    );
     PlaceWindow(dlg);
     if (dlg->ShowModal() == wxID_OK)
     {
Index: src/sdk/scripting/bindings/sc_io.cpp
===================================================================
--- src/sdk/scripting/bindings/sc_io.cpp    (revision 3353)
+++ src/sdk/scripting/bindings/sc_io.cpp    (working copy)
@@ -66,7 +66,11 @@
                             wxEmptyString,
                             Manager::Get()->GetMacrosManager()->ReplaceMacros(defaultFile),
                             filter,
-                            wxOPEN | wxHIDE_READONLY);
+                            wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+            );
             PlaceWindow(&dlg);
             if (dlg.ShowModal() == wxID_OK)
                 return dlg.GetPath();
Index: src/sdk/editpairdlg.cpp
===================================================================
--- src/sdk/editpairdlg.cpp    (revision 3353)
+++ src/sdk/editpairdlg.cpp    (working copy)
@@ -62,7 +62,11 @@
                             XRCCTRL(*this, "txtValue", wxTextCtrl)->GetValue(),
                             _T(""),
                             FileFilters::GetFilterAll(),
-                            wxOPEN | wxHIDE_READONLY);
+                            wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+            );
             PlaceWindow(&dlg);
             if (dlg.ShowModal() == wxID_OK)
                 XRCCTRL(*this, "txtValue", wxTextCtrl)->SetValue(dlg.GetPath());
Index: src/sdk/selecttargetdlg.cpp
===================================================================
--- src/sdk/selecttargetdlg.cpp    (revision 3353)
+++ src/sdk/selecttargetdlg.cpp    (working copy)
@@ -119,7 +119,11 @@
                             #else
                             _("All files (*)|*"),
                             #endif
-                            wxOPEN | wxFILE_MUST_EXIST | wxHIDE_READONLY);
+                            wxOPEN | wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+                            | wxHIDE_READONLY
+#endif
+        );
         dlg->SetFilterIndex(0);
         PlaceWindow(dlg);
         if (dlg->ShowModal() != wxID_OK)
Index: src/sdk/editarrayfiledlg.cpp
===================================================================
--- src/sdk/editarrayfiledlg.cpp    (revision 3353)
+++ src/sdk/editarrayfiledlg.cpp    (working copy)
@@ -84,7 +84,11 @@
                     m_BasePath,
                     _T(""),
                     FileFilters::GetFilterAll(),
-                    wxOPEN | wxHIDE_READONLY);
+                    wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                    | wxHIDE_READONLY
+#endif
+    );
 
     PlaceWindow(&dlg);
     if (dlg.ShowModal() != wxID_OK)
@@ -104,7 +108,11 @@
                     m_BasePath,
                     list->GetStringSelection(),
                     FileFilters::GetFilterAll(),
-                    wxOPEN | wxHIDE_READONLY);
+                    wxOPEN
+#if (WXWIN_COMPATIBILITY_2_4)
+                    | wxHIDE_READONLY
+#endif
+    );
 
     PlaceWindow(&dlg);
     if (dlg.ShowModal() != wxID_OK)
Index: src/sdk/projectmanager.cpp
===================================================================
--- src/sdk/projectmanager.cpp    (revision 3353)
+++ src/sdk/projectmanager.cpp    (working copy)
@@ -1875,7 +1875,12 @@
                     prj->GetBasePath(),
                     wxEmptyString,
                     FileFilters::GetFilterString(),
-                    wxOPEN | wxMULTIPLE | wxFILE_MUST_EXIST | wxHIDE_READONLY);
+                    wxOPEN | wxMULTIPLE | wxFILE_MUST_EXIST
+#if (WXWIN_COMPATIBILITY_2_4)
+                    | wxHIDE_READONLY
+#endif
+    );
+
     dlg.SetFilterIndex(FileFilters::GetIndexForFilterAll());
 
     PlaceWindow(&dlg);
Index: src/sdk/projectoptionsdlg.cpp
===================================================================
--- src/sdk/projectoptionsdlg.cpp    (revision 3353)
+++ src/sdk/projectoptionsdlg.cpp    (working copy)
@@ -852,7 +852,11 @@
                     fname.GetPath(),
                     fname.GetFullName(),
                     _("Script files (*.script)|*.script"),
-                    wxOPEN | wxMULTIPLE | wxHIDE_READONLY);
+                    wxOPEN | wxMULTIPLE
+#if (WXWIN_COMPATIBILITY_2_4
download for full patch...
stahta01 2006-12-19 00:34

Change: Under wxWidgets 2.8 WXWIN_COMPATIBILITY_2_4 defaults to 0 instead of 1 like it does under wxWidgets 2.6.

Problem: When WXWIN_COMPATIBILITY_2_4=0 then wx/filedlg.h does not define wxHIDE_READONLY. This results in errors.

Solution: Guard each use of wxHIDE_READONLY with if (WXWIN_COMPATIBILITY_2_4).

Tim S

stahta01 2006-12-26 20:53
An extra ); is in SVN 3425 Tim S

Index: src/tools/cb_share_config/mainframe.cpp
===================================================================
--- src/tools/cb_share_config/mainframe.cpp   (revision 3425)
+++ src/tools/cb_share_config/mainframe.cpp   (working copy)
@@ -254,7 +254,6 @@
 #if (WXWIN_COMPATIBILITY_2_4)
     | wxHIDE_READONLY
 #endif
-    );
   );

   return filename;

killerbot 2006-12-27 10:07

applied