Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

When exec CodeSnippets.exe, it's auto change Window type

<< < (3/3)

Pecan:
On its first run, CodeBlocks is returning an empty string as the config folder location in OnAttach() for plugins.

CodeSnippets will have to look for the APPDATA envar.

I'll work up a fix for CodeSnippets.


kennedyusa058:
I am not so knowledgeable about this matter. So i have to learn it. Thanks for the post. :P

pret auto

ollydbg:

--- Quote from: Pecan on June 22, 2009, 12:08:49 am ---On its first run, CodeBlocks is returning an empty string as the config folder location in OnAttach() for plugins.

CodeSnippets will have to look for the APPDATA envar.

I'll work up a fix for CodeSnippets.




--- End quote ---

Thanks, I have see the fix in trunk.

By the way, I read the code below

--- Code: ---wxString ConfigManager::LocateDataFile(const wxString& filename, int search_dirs)
{
    wxPathList searchPaths;

    // user dirs have precedence
    if (search_dirs & sdPluginsUser)
        searchPaths.Add(GetPluginsFolder(false));
    if (search_dirs & sdScriptsUser)
        searchPaths.Add(GetScriptsFolder(false));
    if (search_dirs & sdDataUser)
        searchPaths.Add(GetDataFolder(false));

    // then we have global dirs
    if (search_dirs & sdPluginsGlobal)
        searchPaths.Add(GetPluginsFolder(true));
    if (search_dirs & sdScriptsGlobal)
        searchPaths.Add(GetScriptsFolder(true));
    if (search_dirs & sdDataGlobal)
        searchPaths.Add(GetDataFolder(true));

    // rest of the dirs
    if (search_dirs & sdCurrent)
        searchPaths.Add(::wxGetCwd());
    if (search_dirs & sdConfig)
        searchPaths.Add(GetConfigFolder());
    if (search_dirs & sdHome)
        searchPaths.Add(GetHomeFolder());
    if (search_dirs & sdBase)
        searchPaths.Add(GetExecutableFolder());
    if (search_dirs & sdTemp)
        searchPaths.Add(GetTempFolder());

    // PATH env. var
    if (search_dirs & sdPath)
        searchPaths.AddEnvList(_T("PATH"));

    return searchPaths.FindValidPath(filename);
}

--- End code ---

when CB fails to find the *.conf file at first running, it will return an empty string  :D

Navigation

[0] Message Index

[*] Previous page

Go to full version