Add/improve debug messages for custom filetypes.
git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4464 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
parent
37605ff27a
commit
3e6b304c77
@ -3,6 +3,8 @@
|
|||||||
* doc/geany.txt, doc/geany.html:
|
* doc/geany.txt, doc/geany.html:
|
||||||
Warn about not using BOM for configuration files (confuses GKeyFile
|
Warn about not using BOM for configuration files (confuses GKeyFile
|
||||||
parser, at least on my system).
|
parser, at least on my system).
|
||||||
|
* src/filetypes.c:
|
||||||
|
Add/improve debug messages for custom filetypes.
|
||||||
|
|
||||||
|
|
||||||
2009-11-30 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
2009-11-30 Frank Lanitz <frank(at)frank(dot)uvena(dot)de>
|
||||||
|
@ -695,13 +695,13 @@ static void add_custom_filetype(const gchar *filename)
|
|||||||
if (g_hash_table_lookup(filetypes_hash, fn))
|
if (g_hash_table_lookup(filetypes_hash, fn))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
geany_debug("Adding filetype %s.", fn);
|
|
||||||
ft = filetype_new();
|
ft = filetype_new();
|
||||||
ft->name = g_strdup(fn);
|
ft->name = g_strdup(fn);
|
||||||
filetype_make_title(ft, TITLE_FILE);
|
filetype_make_title(ft, TITLE_FILE);
|
||||||
ft->pattern = g_new0(gchar*, 1);
|
ft->pattern = g_new0(gchar*, 1);
|
||||||
ft->priv->custom = TRUE;
|
ft->priv->custom = TRUE;
|
||||||
filetype_add(ft);
|
filetype_add(ft);
|
||||||
|
geany_debug("Added filetype %s (%d).", ft->name, ft->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1241,6 +1241,8 @@ static void load_settings(gint ft_id, GKeyFile *config, GKeyFile *configh)
|
|||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
ft->lang = tm_source_file_get_named_lang(result);
|
ft->lang = tm_source_file_get_named_lang(result);
|
||||||
|
if (ft->lang < 0)
|
||||||
|
geany_debug("Cannot find tag parser '%s' for custom filetype '%s'.", result, ft->name);
|
||||||
g_free(result);
|
g_free(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1250,6 +1252,8 @@ static void load_settings(gint ft_id, GKeyFile *config, GKeyFile *configh)
|
|||||||
if (result)
|
if (result)
|
||||||
{
|
{
|
||||||
ft->lexer_filetype = filetypes_lookup_by_name(result);
|
ft->lexer_filetype = filetypes_lookup_by_name(result);
|
||||||
|
if (!ft->lexer_filetype)
|
||||||
|
geany_debug("Cannot find lexer filetype '%s' for custom filetype '%s'.", result, ft->name);
|
||||||
g_free(result);
|
g_free(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user