diff options
author | portix <portix@gmx.net> | 2011-05-09 23:27:35 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2011-05-09 23:27:35 +0200 |
commit | f94a58cec67b4d31ac1a7bf79151523629fc94ae (patch) | |
tree | 086e33a9a0d49011ae0767aed0704d0f5df12fe1 /src/util.c | |
parent | ea99a455bfd24cbf11bdfb8e6cef1caac7b2ec48 (diff) | |
parent | de008793cbf4cdbcd43ed79d659d86c97dc0ce74 (diff) | |
download | dwb-f94a58cec67b4d31ac1a7bf79151523629fc94ae.zip |
merge with branch 'html'
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -207,7 +207,12 @@ dwb_util_arg_to_char(Arg *arg, DwbType type) { /* dwb_util_navigation_sort_first {{{*/ int dwb_util_navigation_compare_first(Navigation *a, Navigation *b) { - return (strcmp(b->first, b->first)); + return (strcmp(a->first, b->first)); +}/*}}}*/ +/* dwb_util_navigation_sort_first {{{*/ +int +dwb_util_navigation_compare_second(Navigation *a, Navigation *b) { + return (strcmp(a->second, b->second)); }/*}}}*/ /* dwb_util_keymap_sort_first(KeyMap *, KeyMap *) {{{*/ int @@ -332,6 +337,16 @@ dwb_util_get_data_dir(const char *dir) { } return NULL; }/*}}}*/ +char * +dwb_util_get_data_file(const char *filename) { + char *path = dwb_util_get_data_dir("lib"); + char *ret = g_build_filename(path, filename, NULL); + g_free(path); + if (g_file_test(ret, G_FILE_TEST_EXISTS)) { + return ret; + } + return NULL; +} /* NAVIGATION {{{*/ /* dwb_navigation_new(const char *uri, const char *title) {{{*/ |