48 {
_T(
"cg"),
_T(
"cg source file"), 7 },
86 wxChar name[MAX_PATH] = {0};
87 GetModuleFileName(0L, name, MAX_PATH);
97 SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, 0L, 0L);
102 wxChar name[MAX_PATH] = {0};
103 GetModuleFileName(0L, name, MAX_PATH);
105 for (
int i = 0; i <= 12; ++i)
113 wxChar name[MAX_PATH] = {0};
114 GetModuleFileName(0L, name, MAX_PATH);
124 wxChar name[MAX_PATH] = {0};
125 GetModuleFileName(0L, name, MAX_PATH);
135 wxChar name[MAX_PATH] = {0};
136 GetModuleFileName(0L, name, MAX_PATH);
140 for (
int i = 0; i <= 12; ++i)
148 wxString BaseKeyName(
_T(
"HKEY_CURRENT_USER\\Software\\Classes\\"));
150 BaseKeyName =
_T(
"HKEY_CLASSES_ROOT\\");
155 key.
SetName(BaseKeyName +
_T(
".") + ext);
157 key =
_T(
"CodeBlocks.") + ext;
159 key.
SetName(BaseKeyName + node);
163 key.
SetName(BaseKeyName + node +
_T(
"\\DefaultIcon"));
167 key.
SetName(BaseKeyName + node +
_T(
"\\shell\\open\\command"));
169 key =
_T(
"\"") + exe +
_T(
"\" \"%1\"");
171 key.
SetName(BaseKeyName + node + _T(
"\\shell\\open\\ddeexec"));
173 key = _T(
"[Open(\"%1\")]");
175 key.
SetName(BaseKeyName + node + _T(
"\\shell\\open\\ddeexec\\application"));
179 key.
SetName(BaseKeyName + node + _T(
"\\shell\\open\\ddeexec\\ifexec"));
181 key = _T(
"[IfExec_Open(\"%1\")]");;
183 key.
SetName(BaseKeyName + node + _T(
"\\shell\\open\\ddeexec\\topic"));
190 key.
SetName(BaseKeyName + node + _T(
"\\shell\\Build\\command"));
192 key = _T(
"\"") + exe + _T(
"\" ") + batchbuildargs + _T(
" --build \"%1\"");
194 key.
SetName(BaseKeyName + node + _T(
"\\shell\\Rebuild (clean)\\command"));
196 key = _T(
"\"") + exe + _T(
"\" ") + batchbuildargs + _T(
" --rebuild \"%1\"");
202 wxString BaseKeyName(
_T(
"HKEY_CURRENT_USER\\Software\\Classes\\"));
204 BaseKeyName =
_T(
"HKEY_CLASSES_ROOT\\");
207 key.
SetName(BaseKeyName +
_T(
".") + ext);
211 #if wxCHECK_VERSION(3, 0, 0) 219 key.
SetName(BaseKeyName +
_T(
"CodeBlocks.") + ext);
226 wxString BaseKeyName(
_T(
"HKEY_CURRENT_USER\\Software\\Classes\\"));
229 BaseKeyName =
_T(
"HKEY_CLASSES_ROOT\\");
232 key.
SetName(BaseKeyName +
_T(
".") + ext);
236 key.
SetName(BaseKeyName +
_T(
"CodeBlocks.") + ext);
240 key.
SetName(BaseKeyName +
_T(
"CodeBlocks.") + ext +
_T(
"\\DefaultIcon"));
249 key.
SetName(BaseKeyName +
_T(
"CodeBlocks.") + ext +
_T(
"\\shell\\open\\command"));
257 key.
SetName(BaseKeyName +
_T(
"CodeBlocks.") + ext +
_T(
"\\shell\\open\\ddeexec"));
262 if (strVal !=
_T(
"[Open(\"%1\")]"))
265 key.
SetName(BaseKeyName +
_T(
"CodeBlocks.") + ext +
_T(
"\\shell\\open\\ddeexec\\application"));
273 key.
SetName(BaseKeyName +
_T(
"CodeBlocks.") + ext +
_T(
"\\shell\\open\\ddeexec\\ifexec"));
278 if (strVal !=
_T(
"[IfExec_Open(\"%1\")]"))
281 key.
SetName(BaseKeyName +
_T(
"CodeBlocks.") + ext +
_T(
"\\shell\\open\\ddeexec\\topic"));
292 key.
SetName(BaseKeyName +
_T(
"CodeBlocks.") + ext +
_T(
"\\shell\\Build\\command"));
297 if (strVal !=
_T(
"\"") + exe +
_T(
"\" ") + batchbuildargs +
_T(
" --build \"%1\""))
300 key.
SetName(BaseKeyName +
_T(
"CodeBlocks.") + ext +
_T(
"\\shell\\Rebuild (clean)\\command"));
305 if (strVal !=
_T(
"\"") + exe +
_T(
"\" ") + batchbuildargs +
_T(
" --rebuild \"%1\""))
331 wxChar exe[MAX_PATH] = {0};
332 GetModuleFileName(0L, exe, MAX_PATH);
336 list->Append(d + knownTypes[i].ext +
_T(
" (") + knownTypes[i].descr +
_T(
")"));
345 wxChar name[MAX_PATH] = {0};
346 GetModuleFileName(0L, name, MAX_PATH);
void EndModal(int retCode)
const DLLIMPORT wxString TCC_EXT
const DLLIMPORT wxString CODEBLOCKS_EXT
const DLLIMPORT wxString F95_EXT
#define ASC_ASSOC_DLG_NO_ONLY_NOW
ConfigManager * GetConfigManager(const wxString &name_space) const
void OnCancel(wxCommandEvent &event)
void OnApply(wxCommandEvent &event)
static Manager * Get()
Use Manager::Get() to get a pointer to its instance Manager::Get() is guaranteed to never return an i...
const Associations::Assoc knownTypes[]
const DLLIMPORT wxString H_EXT
const DLLIMPORT wxString INL_EXT
void OnClearAll(wxCommandEvent &event)
const DLLIMPORT wxString DEVCPP_EXT
const DLLIMPORT wxString HPP_EXT
const DLLIMPORT wxString JAVA_EXT
void DoSetAssociation(const wxString &executable, int index)
bool QueryValue(const wxString &szValue, wxString &strValue, bool raw) const
const DLLIMPORT wxString S62_EXT
const DLLIMPORT wxString HXX_EXT
const DLLIMPORT wxString C_EXT
const DLLIMPORT wxString MSVC6_EXT
const DLLIMPORT wxString F77_EXT
const DLLIMPORT wxString TPP_EXT
bool IsChecked(unsigned int item) const
bool DoCheckAssociation(const wxString &executable, int index)
const DLLIMPORT wxString F_EXT
wxUSE_UNICODE_dependent wxChar
const DLLIMPORT wxString D_EXT
const DLLIMPORT wxString MSVC6_WORKSPACE_EXT
const DLLIMPORT wxString SS_EXT
const DLLIMPORT wxString F90_EXT
const DLLIMPORT wxString WORKSPACE_EXT
bool IsSameAs(const wxString &s, bool caseSensitive=true) const
const DLLIMPORT wxString CC_EXT
wxString Read(const wxString &key, const wxString &defaultVal=wxEmptyString)
const DLLIMPORT wxString S_EXT
void DoClearAssociation(const wxString &ext)
const DLLIMPORT wxString CXX_EXT
void OnOK(wxCommandEvent &event)
void DoSetAssociation(const wxString &ext, const wxString &descr, const wxString &exe, int icoNum)
void OnESC(wxCommandEvent &event)
const DLLIMPORT wxString XRCRESOURCE_EXT
bool Create(bool bOkIfExists=true)
const DLLIMPORT wxString HH_EXT
bool StartsWith(const wxString &prefix, wxString *rest=NULL) const
const wxString DefaultBatchBuildArgs
bool Open(AccessMode mode=Write)
const DLLIMPORT wxString CPP_EXT
static wxXmlResource * Get()
bool DoCheckAssociation(const wxString &ext, const wxString &descr, const wxString &exe, int icoNum)
const DLLIMPORT wxString ASM_EXT
void SetName(const wxString &strKey)
const DLLIMPORT wxString RESOURCE_EXT
static wxString Format(const wxString &format,...)
wxObject * LoadObject(wxWindow *parent, const wxString &name, const wxString &classname)
virtual unsigned int GetCount() const
unsigned int CountAssocs()
void OnCharHook(wxKeyEvent &event)