I do not feel like doing it on my own without others giving at least their opinion.
<opinion>Sounds good. Patch?</opinion>
Issue: The filter in the save dialog is populated from the lexers, causing C and C++ to be merged into a single filter where .c comes first (a single lexer handles both).
A quick solution would be to split the lexer into lexer_c.xml and lexer_cpp.xml, but that would imply a color set for C and another one for C++. Chances are high users will want a shared color set for both C and C++ files, so it will cause complaints.
Another solution would be to extend the internal definition of the lexer files, so they can have multiple name/filemaks sets intended for the save dialog. For the open dialog it may still be handy to use them as they are right now, or also have a specific tag.
Example:
<?xml version="1.0"?>
<!DOCTYPE CodeBlocks_lexer_properties>
<CodeBlocks_lexer_properties>
<Lexer name="C/C++"
index="3"
filemasks="*.c,*.cpp,*.cc,*.cxx,*.h,*.hpp,*.hh,*.hxx,*.inl">
<SaveFilter name="C" filemasks="*.c"/>
<SaveFilter name="C header" filemasks="*.h"/>
<SaveFilter name="C++" filemasks="*.cpp,*.cc,*.cxx"/>
<SaveFilter name="C++ header" filemasks="*.hpp,*.hh,*.hxx,*.inl"/>
<OpenFilter name="C/C++" filemasks="*.c,*.cpp,*.cc,*.cxx,*.h,*.hpp,*.hh,*.hxx,*.inl"/>
<Style name="Default"
index="0"
fg="0,0,0"
bg="255,255,255"
bold="0"
italics="0"
underlined="0"/>
...
An extra change required would be in sdk/cbeditor.cpp at line 1722 (as today's revision):
Filter = mgr->Read(_T("/file_dialogs/save_file_as/filter"), _T("C/C++ files"));
The default value would most likely turn into "C++ files".
The implementation would require more time than I have at hand. At least the why and a how are known now.