Fix saving non-project filetype error regex.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@5170 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2010-08-16 16:54:59 +00:00
parent e9b810aeb0
commit 3e282dea44
2 changed files with 5 additions and 5 deletions

View File

@ -6,6 +6,8 @@
* scintilla/LexMarkdown.cxx:
Fix infinite loop in Markdown lexer (patch by Colomban Wendling,
thanks).
* src/build.c:
Fix saving non-project filetype error regex.
2010-08-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -2569,12 +2569,12 @@ static void foreach_project_filetype(gpointer data, gpointer user_data)
}
/* TODO: untyped ptr is too ugly (also for build_load_menu) */
void build_save_menu(GKeyFile *config, gpointer ptr, GeanyBuildSource src)
{
GeanyFiletype *ft;
GeanyProject *pj;
ForEachData data;
gchar *regkey;
switch (src)
{
@ -2584,12 +2584,10 @@ void build_save_menu(GKeyFile *config, gpointer ptr, GeanyBuildSource src)
return;
build_save_menu_grp(config, ft->homefilecmds, GEANY_GBG_FT, NULL);
build_save_menu_grp(config, ft->homeexeccmds, GEANY_GBG_EXEC, NULL);
regkey = g_strdup_printf("%serror_regex", ft->name);
if (NZV(ft->homeerror_regex_string))
g_key_file_set_string(config, build_grp_name, regkey, ft->projerror_regex_string);
g_key_file_set_string(config, build_grp_name, "error_regex", ft->homeerror_regex_string);
else
g_key_file_remove_key(config, build_grp_name, regkey, NULL);
g_free(regkey);
g_key_file_remove_key(config, build_grp_name, "error_regex", NULL);
break;
case GEANY_BCS_PREF:
build_save_menu_grp(config, non_ft_pref, GEANY_GBG_NON_FT, NULL);