Patch #1655 2006-11-24 09:55

stahta01

wxHIDE_READONLY patch for wxWidgets 2.7
Download
1655-wxHIDE_READONL.patch (14.3 KB)
Category
Application::FeatureAdd
Status
Closed
Close date
2006-12-19 21:23
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-11-24 09:58

This patch guards each use of wxHIDE_READONLY by #if (WXWIN_COMPATIBILITY_2_4)

This allows WXWIN_COMPATIBILITY_2_4 to be set to 0 in setup.h. wxWidgets 2.8 set WXWIN_COMPATIBILITY_2_4 to 0 by default.

Tim S

mortenmacfly 2006-11-25 13:14

Just as a reminder (we had the case that wxHIDE_READONLY was removed completely by accident): Under Windows this is important although the docs state this flag as deprecated. Otherwise the file open dialog will present a checkbox "open readonly" which is non-functional.

Anyway - I have no objections against this patch!

stahta01 2006-11-26 00:46

WARNING: Code::Blocks needs WXWIN_COMPATIBILITY_2_4 set to 1 to work without errors at this time. This patch only allows C::B to compile and link with WXWIN_COMPATIBILITY_2_4 set to 0, C::B still has issues with WXWIN_COMPATIBILITY_2_4 set to 0, I am working on finding the cause of the runtime errors.

Tim S

stahta01 2006-12-02 14:54

After patch [ Patch #1661 ] wxCheckListBox patch for wxWidgets 2.7 is applied then this patch is safe to apply.

The [ Patch #1661 ] wxCheckListBox patch was just applied.

stahta01 2006-12-03 22:04

Updated patch for changes to C::B SVN

mispunt 2006-12-08 18:54

Why not just remove the wxHIDE_READONLYs? We aren't supporting wx2.4 any more...

stahta01 2006-12-08 22:55

They can't just remove it because they tried and it breaks 2.6 when it is used with default option of having WXWIN_COMPATIBILITY_2_4 set to 1. Not sure what it breaks see this thread http://forums.codeblocks.org/index.php?topic=4141.0

Tim S

stahta01 2006-12-18 16:59

Updated patch to work against SVN; added fix of scriptingsettingsdlg.cpp Tim S

stahta01 2006-12-19 00:37

PLEASE CLOSE;

I have resubmiited as [ Patch #1738 ] wxHIDE_READONLY patch for wxWidgets 2.8 https://developer.berlios.de/patch/index.php?func=detailpatch&patch_id=1738&group_id=5358

Tim S