diff --git a/data/Makefile.am b/data/Makefile.am index 9cd5ec95..f9e2a632 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -3,81 +3,81 @@ colorschemes = \ colorschemes/alt.conf filetypes = \ - filetypes.abaqus \ - filetypes.abc \ - filetypes.actionscript \ - filetypes.ada \ - filetypes.asciidoc \ - filetypes.asm \ - filetypes.batch \ - filetypes.c \ - filetypes.caml \ - filetypes.Clojure.conf \ - filetypes.cmake \ - filetypes.cobol \ - filetypes.coffeescript \ - filetypes.common \ - filetypes.conf \ - filetypes.cpp \ - filetypes.cs \ - filetypes.css \ - filetypes.CUDA.conf \ - filetypes.Cython.conf \ - filetypes.d \ - filetypes.diff \ - filetypes.docbook \ - filetypes.erlang \ - filetypes.f77 \ - filetypes.ferite \ - filetypes.forth \ - filetypes.fortran \ - filetypes.freebasic \ - filetypes.Genie.conf \ - filetypes.glsl \ - filetypes.go \ - filetypes.Graphviz.conf \ - filetypes.haskell \ - filetypes.haxe \ - filetypes.html \ - filetypes.java \ - filetypes.javascript \ - filetypes.JSON.conf \ - filetypes.latex \ - filetypes.lisp \ - filetypes.lua \ - filetypes.makefile \ - filetypes.markdown \ - filetypes.matlab \ - filetypes.nsis \ - filetypes.objectivec \ - filetypes.pascal \ - filetypes.perl \ - filetypes.php \ - filetypes.po \ - filetypes.powershell \ - filetypes.python \ - filetypes.r \ - filetypes.restructuredtext \ - filetypes.ruby \ - filetypes.rust \ - filetypes.Scala.conf \ - filetypes.sh \ - filetypes.sql \ - filetypes.tcl \ - filetypes.txt2tags \ - filetypes.vala \ - filetypes.verilog \ - filetypes.vhdl \ - filetypes.xml \ - filetypes.yaml \ - filetypes.zephir + filedefs/filetypes.abaqus \ + filedefs/filetypes.abc \ + filedefs/filetypes.actionscript \ + filedefs/filetypes.ada \ + filedefs/filetypes.asciidoc \ + filedefs/filetypes.asm \ + filedefs/filetypes.batch \ + filedefs/filetypes.c \ + filedefs/filetypes.caml \ + filedefs/filetypes.Clojure.conf \ + filedefs/filetypes.cmake \ + filedefs/filetypes.cobol \ + filedefs/filetypes.coffeescript \ + filedefs/filetypes.common \ + filedefs/filetypes.conf \ + filedefs/filetypes.cpp \ + filedefs/filetypes.cs \ + filedefs/filetypes.css \ + filedefs/filetypes.CUDA.conf \ + filedefs/filetypes.Cython.conf \ + filedefs/filetypes.d \ + filedefs/filetypes.diff \ + filedefs/filetypes.docbook \ + filedefs/filetypes.erlang \ + filedefs/filetypes.f77 \ + filedefs/filetypes.ferite \ + filedefs/filetypes.forth \ + filedefs/filetypes.fortran \ + filedefs/filetypes.freebasic \ + filedefs/filetypes.Genie.conf \ + filedefs/filetypes.glsl \ + filedefs/filetypes.go \ + filedefs/filetypes.Graphviz.conf \ + filedefs/filetypes.haskell \ + filedefs/filetypes.haxe \ + filedefs/filetypes.html \ + filedefs/filetypes.java \ + filedefs/filetypes.javascript \ + filedefs/filetypes.JSON.conf \ + filedefs/filetypes.latex \ + filedefs/filetypes.lisp \ + filedefs/filetypes.lua \ + filedefs/filetypes.makefile \ + filedefs/filetypes.markdown \ + filedefs/filetypes.matlab \ + filedefs/filetypes.nsis \ + filedefs/filetypes.objectivec \ + filedefs/filetypes.pascal \ + filedefs/filetypes.perl \ + filedefs/filetypes.php \ + filedefs/filetypes.po \ + filedefs/filetypes.powershell \ + filedefs/filetypes.python \ + filedefs/filetypes.r \ + filedefs/filetypes.restructuredtext \ + filedefs/filetypes.ruby \ + filedefs/filetypes.rust \ + filedefs/filetypes.Scala.conf \ + filedefs/filetypes.sh \ + filedefs/filetypes.sql \ + filedefs/filetypes.tcl \ + filedefs/filetypes.txt2tags \ + filedefs/filetypes.vala \ + filedefs/filetypes.verilog \ + filedefs/filetypes.vhdl \ + filedefs/filetypes.xml \ + filedefs/filetypes.yaml \ + filedefs/filetypes.zephir tagfiles = \ - c99.tags \ - php.tags \ - python.tags \ - pascal.tags \ - html_entities.tags + tags/c99.tags \ + tags/php.tags \ + tags/python.tags \ + tags/pascal.tags \ + tags/html_entities.tags template_files = \ templates/files/file.html \ diff --git a/data/filetypes.CUDA.conf b/data/filedefs/filetypes.CUDA.conf similarity index 100% rename from data/filetypes.CUDA.conf rename to data/filedefs/filetypes.CUDA.conf diff --git a/data/filetypes.Clojure.conf b/data/filedefs/filetypes.Clojure.conf similarity index 100% rename from data/filetypes.Clojure.conf rename to data/filedefs/filetypes.Clojure.conf diff --git a/data/filetypes.Cython.conf b/data/filedefs/filetypes.Cython.conf similarity index 100% rename from data/filetypes.Cython.conf rename to data/filedefs/filetypes.Cython.conf diff --git a/data/filetypes.Genie.conf b/data/filedefs/filetypes.Genie.conf similarity index 100% rename from data/filetypes.Genie.conf rename to data/filedefs/filetypes.Genie.conf diff --git a/data/filetypes.Graphviz.conf b/data/filedefs/filetypes.Graphviz.conf similarity index 100% rename from data/filetypes.Graphviz.conf rename to data/filedefs/filetypes.Graphviz.conf diff --git a/data/filetypes.JSON.conf b/data/filedefs/filetypes.JSON.conf similarity index 100% rename from data/filetypes.JSON.conf rename to data/filedefs/filetypes.JSON.conf diff --git a/data/filetypes.Scala.conf b/data/filedefs/filetypes.Scala.conf similarity index 100% rename from data/filetypes.Scala.conf rename to data/filedefs/filetypes.Scala.conf diff --git a/data/filetypes.abaqus b/data/filedefs/filetypes.abaqus similarity index 100% rename from data/filetypes.abaqus rename to data/filedefs/filetypes.abaqus diff --git a/data/filetypes.abc b/data/filedefs/filetypes.abc similarity index 100% rename from data/filetypes.abc rename to data/filedefs/filetypes.abc diff --git a/data/filetypes.actionscript b/data/filedefs/filetypes.actionscript similarity index 100% rename from data/filetypes.actionscript rename to data/filedefs/filetypes.actionscript diff --git a/data/filetypes.ada b/data/filedefs/filetypes.ada similarity index 100% rename from data/filetypes.ada rename to data/filedefs/filetypes.ada diff --git a/data/filetypes.asciidoc b/data/filedefs/filetypes.asciidoc similarity index 100% rename from data/filetypes.asciidoc rename to data/filedefs/filetypes.asciidoc diff --git a/data/filetypes.asm b/data/filedefs/filetypes.asm similarity index 100% rename from data/filetypes.asm rename to data/filedefs/filetypes.asm diff --git a/data/filetypes.batch b/data/filedefs/filetypes.batch similarity index 100% rename from data/filetypes.batch rename to data/filedefs/filetypes.batch diff --git a/data/filetypes.c b/data/filedefs/filetypes.c similarity index 100% rename from data/filetypes.c rename to data/filedefs/filetypes.c diff --git a/data/filetypes.caml b/data/filedefs/filetypes.caml similarity index 100% rename from data/filetypes.caml rename to data/filedefs/filetypes.caml diff --git a/data/filetypes.cmake b/data/filedefs/filetypes.cmake similarity index 100% rename from data/filetypes.cmake rename to data/filedefs/filetypes.cmake diff --git a/data/filetypes.cobol b/data/filedefs/filetypes.cobol similarity index 100% rename from data/filetypes.cobol rename to data/filedefs/filetypes.cobol diff --git a/data/filetypes.coffeescript b/data/filedefs/filetypes.coffeescript similarity index 100% rename from data/filetypes.coffeescript rename to data/filedefs/filetypes.coffeescript diff --git a/data/filetypes.common b/data/filedefs/filetypes.common similarity index 100% rename from data/filetypes.common rename to data/filedefs/filetypes.common diff --git a/data/filetypes.conf b/data/filedefs/filetypes.conf similarity index 100% rename from data/filetypes.conf rename to data/filedefs/filetypes.conf diff --git a/data/filetypes.cpp b/data/filedefs/filetypes.cpp similarity index 100% rename from data/filetypes.cpp rename to data/filedefs/filetypes.cpp diff --git a/data/filetypes.cs b/data/filedefs/filetypes.cs similarity index 100% rename from data/filetypes.cs rename to data/filedefs/filetypes.cs diff --git a/data/filetypes.css b/data/filedefs/filetypes.css similarity index 100% rename from data/filetypes.css rename to data/filedefs/filetypes.css diff --git a/data/filetypes.d b/data/filedefs/filetypes.d similarity index 100% rename from data/filetypes.d rename to data/filedefs/filetypes.d diff --git a/data/filetypes.diff b/data/filedefs/filetypes.diff similarity index 100% rename from data/filetypes.diff rename to data/filedefs/filetypes.diff diff --git a/data/filetypes.docbook b/data/filedefs/filetypes.docbook similarity index 100% rename from data/filetypes.docbook rename to data/filedefs/filetypes.docbook diff --git a/data/filetypes.erlang b/data/filedefs/filetypes.erlang similarity index 100% rename from data/filetypes.erlang rename to data/filedefs/filetypes.erlang diff --git a/data/filetypes.f77 b/data/filedefs/filetypes.f77 similarity index 100% rename from data/filetypes.f77 rename to data/filedefs/filetypes.f77 diff --git a/data/filetypes.ferite b/data/filedefs/filetypes.ferite similarity index 100% rename from data/filetypes.ferite rename to data/filedefs/filetypes.ferite diff --git a/data/filetypes.forth b/data/filedefs/filetypes.forth similarity index 100% rename from data/filetypes.forth rename to data/filedefs/filetypes.forth diff --git a/data/filetypes.fortran b/data/filedefs/filetypes.fortran similarity index 100% rename from data/filetypes.fortran rename to data/filedefs/filetypes.fortran diff --git a/data/filetypes.freebasic b/data/filedefs/filetypes.freebasic similarity index 100% rename from data/filetypes.freebasic rename to data/filedefs/filetypes.freebasic diff --git a/data/filetypes.glsl b/data/filedefs/filetypes.glsl similarity index 100% rename from data/filetypes.glsl rename to data/filedefs/filetypes.glsl diff --git a/data/filetypes.go b/data/filedefs/filetypes.go similarity index 100% rename from data/filetypes.go rename to data/filedefs/filetypes.go diff --git a/data/filetypes.haskell b/data/filedefs/filetypes.haskell similarity index 100% rename from data/filetypes.haskell rename to data/filedefs/filetypes.haskell diff --git a/data/filetypes.haxe b/data/filedefs/filetypes.haxe similarity index 100% rename from data/filetypes.haxe rename to data/filedefs/filetypes.haxe diff --git a/data/filetypes.html b/data/filedefs/filetypes.html similarity index 100% rename from data/filetypes.html rename to data/filedefs/filetypes.html diff --git a/data/filetypes.java b/data/filedefs/filetypes.java similarity index 100% rename from data/filetypes.java rename to data/filedefs/filetypes.java diff --git a/data/filetypes.javascript b/data/filedefs/filetypes.javascript similarity index 100% rename from data/filetypes.javascript rename to data/filedefs/filetypes.javascript diff --git a/data/filetypes.latex b/data/filedefs/filetypes.latex similarity index 100% rename from data/filetypes.latex rename to data/filedefs/filetypes.latex diff --git a/data/filetypes.lisp b/data/filedefs/filetypes.lisp similarity index 100% rename from data/filetypes.lisp rename to data/filedefs/filetypes.lisp diff --git a/data/filetypes.lua b/data/filedefs/filetypes.lua similarity index 100% rename from data/filetypes.lua rename to data/filedefs/filetypes.lua diff --git a/data/filetypes.makefile b/data/filedefs/filetypes.makefile similarity index 100% rename from data/filetypes.makefile rename to data/filedefs/filetypes.makefile diff --git a/data/filetypes.markdown b/data/filedefs/filetypes.markdown similarity index 100% rename from data/filetypes.markdown rename to data/filedefs/filetypes.markdown diff --git a/data/filetypes.matlab b/data/filedefs/filetypes.matlab similarity index 100% rename from data/filetypes.matlab rename to data/filedefs/filetypes.matlab diff --git a/data/filetypes.nsis b/data/filedefs/filetypes.nsis similarity index 100% rename from data/filetypes.nsis rename to data/filedefs/filetypes.nsis diff --git a/data/filetypes.objectivec b/data/filedefs/filetypes.objectivec similarity index 100% rename from data/filetypes.objectivec rename to data/filedefs/filetypes.objectivec diff --git a/data/filetypes.pascal b/data/filedefs/filetypes.pascal similarity index 100% rename from data/filetypes.pascal rename to data/filedefs/filetypes.pascal diff --git a/data/filetypes.perl b/data/filedefs/filetypes.perl similarity index 100% rename from data/filetypes.perl rename to data/filedefs/filetypes.perl diff --git a/data/filetypes.php b/data/filedefs/filetypes.php similarity index 100% rename from data/filetypes.php rename to data/filedefs/filetypes.php diff --git a/data/filetypes.po b/data/filedefs/filetypes.po similarity index 100% rename from data/filetypes.po rename to data/filedefs/filetypes.po diff --git a/data/filetypes.powershell b/data/filedefs/filetypes.powershell similarity index 100% rename from data/filetypes.powershell rename to data/filedefs/filetypes.powershell diff --git a/data/filetypes.python b/data/filedefs/filetypes.python similarity index 100% rename from data/filetypes.python rename to data/filedefs/filetypes.python diff --git a/data/filetypes.r b/data/filedefs/filetypes.r similarity index 100% rename from data/filetypes.r rename to data/filedefs/filetypes.r diff --git a/data/filetypes.restructuredtext b/data/filedefs/filetypes.restructuredtext similarity index 100% rename from data/filetypes.restructuredtext rename to data/filedefs/filetypes.restructuredtext diff --git a/data/filetypes.ruby b/data/filedefs/filetypes.ruby similarity index 100% rename from data/filetypes.ruby rename to data/filedefs/filetypes.ruby diff --git a/data/filetypes.rust b/data/filedefs/filetypes.rust similarity index 100% rename from data/filetypes.rust rename to data/filedefs/filetypes.rust diff --git a/data/filetypes.sh b/data/filedefs/filetypes.sh similarity index 100% rename from data/filetypes.sh rename to data/filedefs/filetypes.sh diff --git a/data/filetypes.sql b/data/filedefs/filetypes.sql similarity index 100% rename from data/filetypes.sql rename to data/filedefs/filetypes.sql diff --git a/data/filetypes.tcl b/data/filedefs/filetypes.tcl similarity index 100% rename from data/filetypes.tcl rename to data/filedefs/filetypes.tcl diff --git a/data/filetypes.txt2tags b/data/filedefs/filetypes.txt2tags similarity index 100% rename from data/filetypes.txt2tags rename to data/filedefs/filetypes.txt2tags diff --git a/data/filetypes.vala b/data/filedefs/filetypes.vala similarity index 100% rename from data/filetypes.vala rename to data/filedefs/filetypes.vala diff --git a/data/filetypes.verilog b/data/filedefs/filetypes.verilog similarity index 100% rename from data/filetypes.verilog rename to data/filedefs/filetypes.verilog diff --git a/data/filetypes.vhdl b/data/filedefs/filetypes.vhdl similarity index 100% rename from data/filetypes.vhdl rename to data/filedefs/filetypes.vhdl diff --git a/data/filetypes.xml b/data/filedefs/filetypes.xml similarity index 100% rename from data/filetypes.xml rename to data/filedefs/filetypes.xml diff --git a/data/filetypes.yaml b/data/filedefs/filetypes.yaml similarity index 100% rename from data/filetypes.yaml rename to data/filedefs/filetypes.yaml diff --git a/data/filetypes.zephir b/data/filedefs/filetypes.zephir similarity index 100% rename from data/filetypes.zephir rename to data/filedefs/filetypes.zephir diff --git a/data/c99.tags b/data/tags/c99.tags similarity index 100% rename from data/c99.tags rename to data/tags/c99.tags diff --git a/data/html_entities.tags b/data/tags/html_entities.tags similarity index 100% rename from data/html_entities.tags rename to data/tags/html_entities.tags diff --git a/data/pascal.tags b/data/tags/pascal.tags similarity index 100% rename from data/pascal.tags rename to data/tags/pascal.tags diff --git a/data/php.tags b/data/tags/php.tags similarity index 100% rename from data/php.tags rename to data/tags/php.tags diff --git a/data/python.tags b/data/tags/python.tags similarity index 100% rename from data/python.tags rename to data/tags/python.tags diff --git a/src/filetypes.c b/src/filetypes.c index 4606c99f..609da02b 100644 --- a/src/filetypes.c +++ b/src/filetypes.c @@ -346,7 +346,9 @@ void filetypes_init_types(void) { filetype_add(filetypes[ft_id]); } - init_custom_filetypes(app->datadir); + f = g_build_filename(app->datadir, GEANY_FILEDEFS_SUBDIR, NULL); + init_custom_filetypes(f); + g_free(f); f = g_build_filename(app->configdir, GEANY_FILEDEFS_SUBDIR, NULL); init_custom_filetypes(f); g_free(f); @@ -536,7 +538,7 @@ static GeanyFiletype *check_builtin_filenames(const gchar *utf8_filename) if (g_str_has_prefix(lfn, path)) found = TRUE; - SETPTR(path, g_build_filename(app->datadir, "filetypes.", NULL)); + SETPTR(path, g_build_filename(app->datadir, GEANY_FILEDEFS_SUBDIR, "filetypes.", NULL)); if (g_str_has_prefix(lfn, path)) found = TRUE; @@ -1012,7 +1014,7 @@ static gchar *filetypes_get_filename(GeanyFiletype *ft, gboolean user) if (user) file_name = g_build_filename(app->configdir, GEANY_FILEDEFS_SUBDIR, base_name, NULL); else - file_name = g_build_filename(app->datadir, base_name, NULL); + file_name = g_build_filename(app->datadir, GEANY_FILEDEFS_SUBDIR, base_name, NULL); g_free(ext); g_free(base_name); diff --git a/src/geany.h b/src/geany.h index df37a234..3e628a21 100644 --- a/src/geany.h +++ b/src/geany.h @@ -41,6 +41,7 @@ G_BEGIN_DECLS * listed in the documentation should not be changed */ #define GEANY_FILEDEFS_SUBDIR "filedefs" #define GEANY_TEMPLATES_SUBDIR "templates" +#define GEANY_TAGS_SUBDIR "tags" #define GEANY_CODENAME "Malvek" #define GEANY_HOMEPAGE "http://www.geany.org/" #define GEANY_WIKI "http://wiki.geany.org/" diff --git a/src/libmain.c b/src/libmain.c index bac784b6..42a18c9b 100644 --- a/src/libmain.c +++ b/src/libmain.c @@ -704,7 +704,7 @@ static gint create_config_dir(void) if (saved_errno == 0 && ! g_file_test(filedefs_readme, G_FILE_TEST_EXISTS)) { gchar *text = g_strconcat( -"Copy files from ", app->datadir, " to this directory to overwrite " +"Copy files from ", app->datadir, "/filedefs to this directory to overwrite " "them. To use the defaults, just delete the file in this directory.\nFor more information read " "the documentation (in ", app->docdir, G_DIR_SEPARATOR_S "index.html or visit " GEANY_HOMEPAGE ").", NULL); utils_write_file(filedefs_readme, text); diff --git a/src/symbols.c b/src/symbols.c index 77e2dcc0..e445744a 100644 --- a/src/symbols.c +++ b/src/symbols.c @@ -243,7 +243,7 @@ void symbols_global_tags_loaded(guint file_type_idx) if (! tfi->tags_loaded) { - gchar *fname = g_build_filename(app->datadir, tfi->tag_file, NULL); + gchar *fname = g_build_filename(app->datadir, GEANY_TAGS_SUBDIR, tfi->tag_file, NULL); symbols_load_global_tags(fname, filetypes[file_type_idx]); tfi->tags_loaded = TRUE; @@ -263,7 +263,7 @@ static void html_tags_loaded(void) tfi = &tag_file_info[GTF_HTML_ENTITIES]; if (! tfi->tags_loaded) { - gchar *file = g_build_filename(app->datadir, tfi->tag_file, NULL); + gchar *file = g_build_filename(app->datadir, GEANY_TAGS_SUBDIR, tfi->tag_file, NULL); html_entities = utils_read_file_in_array(file); tfi->tags_loaded = TRUE; @@ -1762,13 +1762,13 @@ static void init_user_tags(void) const GSList *node; gchar *dir; - dir = g_build_filename(app->configdir, "tags", NULL); + dir = g_build_filename(app->configdir, GEANY_TAGS_SUBDIR, NULL); /* create the user tags dir for next time if it doesn't exist */ if (! g_file_test(dir, G_FILE_TEST_IS_DIR)) utils_mkdir(dir, FALSE); file_list = utils_get_file_list_full(dir, TRUE, FALSE, NULL); - SETPTR(dir, g_build_filename(app->datadir, "tags", NULL)); + SETPTR(dir, g_build_filename(app->datadir, GEANY_TAGS_SUBDIR, NULL)); list = utils_get_file_list_full(dir, TRUE, FALSE, NULL); g_free(dir); diff --git a/tests/ctags/runner.sh b/tests/ctags/runner.sh index b5dc8e91..695d517c 100755 --- a/tests/ctags/runner.sh +++ b/tests/ctags/runner.sh @@ -15,7 +15,7 @@ trap 'rm -rf "$TMPDIR"' EXIT mkdir -p "$CONFDIR" || exit 99 mkdir -p "$CONFDIR/filedefs/" || exit 99 cp "${srcdir:-.}"/../../data/filetype_extensions.conf "$CONFDIR" || exit 99 -cp "${srcdir:-.}"/../../data/filetypes.* "$CONFDIR/filedefs/" || exit 99 +cp "${srcdir:-.}"/../../data/filedefs/filetypes.* "$CONFDIR/filedefs/" || exit 99 result="$1" source="${result%.*}"