Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: killerbot on November 11, 2024, 03:18:42 pm

Title: Make DirectWrite the default value for editor technology (MSW). => broke build
Post by: killerbot on November 11, 2024, 03:18:42 pm
-    cmbTechnology->SetSelection(cfg->ReadInt(wxT("/technology"), 0));
+    cmbTechnology->SetSelection(cfg->ReadInt(wxT("/technology"), 1);

a ")" is missing -==> @ wh11204

Could you add it, I am at a non edit location at the moment ;-)
Title: Re: Make DirectWrite the default value for editor technology (MSW). => broke build
Post by: stahta01 on November 11, 2024, 04:09:57 pm
This is what I think the correct fix is. But, I have not tested it.

Code
Index: src/sdk/cbeditor.cpp
===================================================================
--- src/sdk/cbeditor.cpp (revision 13584)
+++ src/sdk/cbeditor.cpp (working copy)
@@ -1441,7 +1441,7 @@
     if (!control)
         return;
 #if defined(__WXMSW__) && wxCHECK_VERSION(3, 1, 0)
-    const int technology = config->ReadInt(wxT("/technology"), 0);
+    const int technology = config->ReadInt(wxT("/technology"), 1);
     if (technology == 1)
         control->SetTechnology(wxSCI_TECHNOLOGY_DIRECTWRITE);
     else
Title: Re: Make DirectWrite the default value for editor technology (MSW). => broke build
Post by: stahta01 on November 11, 2024, 04:19:15 pm
Your place appears to be here
Code
Index: src/src/editorconfigurationdlg.cpp
===================================================================
--- src/src/editorconfigurationdlg.cpp (revision 13584)
+++ src/src/editorconfigurationdlg.cpp (working copy)
@@ -163,7 +163,7 @@
     wxChoice *cmbFontQuality = XRCCTRL(*this, "cmbFontQuality", wxChoice);
 
 #if defined(__WXMSW__) && wxCHECK_VERSION(3, 1, 0)
-    cmbTechnology->SetSelection(cfg->ReadInt(wxT("/technology"), 0));
+    cmbTechnology->SetSelection(cfg->ReadInt(wxT("/technology"), 1));
     cmbFontQuality->SetSelection(cfg->ReadInt(wxT("/font_quality"), 0));
 #else
     cmbTechnology->SetSelection(0);

I was wondering if both places needed changed or just one of the places. If one, I thought I picked the correct one.
Edit: I think it would be best to change both places, now.

Tim S.
Title: Re: Make DirectWrite the default value for editor technology (MSW). => broke build
Post by: Miguel Gimenez on November 11, 2024, 06:48:55 pm
Sorry, I was on Linux so compilation obviously was OK.

EDIT: fixed in trunk. It is wonderful how a bracket can disappear just changing a '0' to a '1'  :o