News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

C::B is not saving the settings

Started by mauser, January 02, 2006, 09:03:29 PM

Previous topic - Next topic

mauser

I built the rev1650, and each time i start it opens compiler setting dialog and tips even if i set the default compiler and disable tips. it seems not to save settings. or maybe some conflict with previous version.

BlackRose

#1
I have similar problem - each time I start C::B it shows dialog "Compilers auto-detection" with no selected compiler.

I'm using unofficial SVN HEAD revision 1648 (2/1/2006) build from http://paginas.terra.com.br/informatica/mauricio/codeblocks/

As I have been searching for solution I found out some problem when C::B opens its configuration file - maybe some encoding problem, see picture...



(I'm using W2k SP4, Czech version - you can see some special czech characters.)

Note that opening of <AppData> folder is successful, problem occurs at time of opening config file...

BlackRose

thomas

Try if that fixes it. I doubt it will, but it is worth a try.  :?

If it doesn't (which I am afraid of) then it is a bug inside wxPathList.

Unluckily, I have no way of debugging that kind of error.

Index: configmanager.cpp
===================================================================
--- configmanager.cpp (revision 1647)
+++ configmanager.cpp (working copy)
@@ -72,7 +72,7 @@
     wxString loc = absFileName;
     if (loc.IsEmpty())
         loc = ConfigManager::LocateDataFile(_T("default.conf"));
-    doc = new TiXmlDocument(_C(loc));
+    doc = new TiXmlDocument(loc.fn_str());
     if(!doc->LoadFile())
     {
         doc->InsertEndChild(TiXmlDeclaration("1.0", "UTF-8", "yes"));
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

BlackRose

Thanks for your solution. Unfortunately I'm not using SVN source to compile C::B. I'm using only precompiled binaries - I have to wait until changes will be published :(

grv575


thomas

Quote from: grv575 on January 03, 2006, 12:16:03 PM
view->layouts->save current?
No, look at his screenshot. There is an A-some-unknown-diacritic instead of an i-acute in the pathname, so it fails to open.

I have no idea where that character comes from, though. The patch above replaces the mb_str macro with fn_str() because the documentation says "converts to the format the native filesystem expects". Very likely, it will change nothing at all because it is the same anyway, but it is worth a try.

The location of the home folder is queried from Windows and (along with a few fallback paths) fed to a wxPathList from which the final, fully-qualified filename is returned.
It is unlikely that Windows returns a bad path (even Windows should really know its own paths), so I am afraid it might come from wxPathList. But having no Czech System here, there's no way I could verify that theory.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

BlackRose

Please can you make a "temp" build of C::B with your suggested change and send it to me ? I will test it and we should be immediately sure if it has solved the problem.

thomas

Hmm... I just noticed that wxString::fn_str() returns wxChar* (which was the reason why I did not use it in the first place, now I remember  :?) so that does not compile at all... TinyXML does not accept wchar_t arguments.  :(

So... I assume it is a general problem with Unicode filenames... Give me a little time, I'll have to work out a loader which reads in the file and passes the contents to TinyXML in a buffer, this should work. Unluckily that means that I'll have to do the same for saving, again.

When I have it running for me, I'll mail it to you for testing (not tonight any more, though).
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

BlackRose


thomas

Quote from: BlackRose on January 04, 2006, 07:05:43 AM
OK, I will wait for it :)
I believe it works now...
Tried to mail it to the "centrum" address, but was rejected with the message "illegal attachement". :(
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

BlackRose


CmKaHo

Thomas, could you, please, send this patch to me. I have the same problem - I am also using czech XP. I am able to test it and send you a results.

Thanx,
Karel

thomas

"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

BlackRose

Thank You, now C::B works OK - at starting found my previous configurations, changes in settings seem to be saved! Good job done!

Tahank You very much.

BlackRose

BlackRose

While working in C::B rev 1719 I have found similar problem with default.workspace file. It seems to occur only at closing of C::B IDE when changes in default.workspace have to be saved.
See selected line in picture and 3rd line from bottom:


As a result no change in default.workspace is saved.