From d2d816228fb9ea068009ea4c6b3b9848b39ae9c1 Mon Sep 17 00:00:00 2001 From: Thomas Leonard Date: Thu, 15 Sep 2005 18:17:17 +0000 Subject: [PATCH] r4166: Only require shared-mime-database 0.14, not 0.16. Add the missing subclasses manually (Thomas Leonard). --- ROX-Filer/Help/Changes | 5 +++++ ROX-Filer/src/configure.in | 2 +- ROX-Filer/src/xdgmime.c | 12 ++++++++++++ ROX-Filer/subclasses | 5 +++++ rox.xml | 6 ------ 5 files changed, 23 insertions(+), 7 deletions(-) create mode 100644 ROX-Filer/subclasses diff --git a/ROX-Filer/Help/Changes b/ROX-Filer/Help/Changes index 4310d317..22b72170 100644 --- a/ROX-Filer/Help/Changes +++ b/ROX-Filer/Help/Changes @@ -2,6 +2,11 @@ A RISC OS-like filer for X by Thomas Leonard +15-Sep-2005 +~~~~~~~~~~~ +Only require shared-mime-database 0.14, not 0.16. Add the missing subclasses +manually (Thomas Leonard). + 13-Sep-2005 ~~~~~~~~~~~ Allow some labels used to display file names to wrap over more than one line, diff --git a/ROX-Filer/src/configure.in b/ROX-Filer/src/configure.in index 0eb3e1ef..4d654a5e 100644 --- a/ROX-Filer/src/configure.in +++ b/ROX-Filer/src/configure.in @@ -61,7 +61,7 @@ fi ROX_REQUIRE(gtk+-2.0, 2.4.0) ROX_REQUIRE(libxml-2.0, 2.0.0) -ROX_REQUIRE(shared-mime-info, 0.16) +ROX_REQUIRE(shared-mime-info, 0.14) GTK_VERSION=`"$PKG_CONFIG" --modversion gtk+-2.0` AC_DEFINE_UNQUOTED(GTK_VERSION, "$GTK_VERSION") diff --git a/ROX-Filer/src/xdgmime.c b/ROX-Filer/src/xdgmime.c index be7398e4..6fd1b045 100644 --- a/ROX-Filer/src/xdgmime.c +++ b/ROX-Filer/src/xdgmime.c @@ -44,6 +44,9 @@ #include #include +#include "global.h" +#include "main.h" + typedef struct XdgDirTimeList XdgDirTimeList; typedef struct XdgCallbackList XdgCallbackList; @@ -414,6 +417,8 @@ xdg_mime_init (void) if (need_reread) { + char *mime_parents; + global_hash = _xdg_glob_hash_new (); global_magic = _xdg_mime_magic_new (); alias_list = _xdg_mime_alias_list_new (); @@ -422,6 +427,13 @@ xdg_mime_init (void) xdg_run_command_on_dirs ((XdgDirectoryFunc) xdg_mime_init_from_directory, NULL); + /* We want to support shared-mime-database < 0.16, where we can't + * do this with the rox.xml file. + */ + mime_parents = g_build_filename(app_dir, "subclasses", NULL); + _xdg_mime_parent_read_from_file(parent_list, mime_parents); + g_free(mime_parents); + need_reread = FALSE; } } diff --git a/ROX-Filer/subclasses b/ROX-Filer/subclasses new file mode 100644 index 00000000..e4deb1cd --- /dev/null +++ b/ROX-Filer/subclasses @@ -0,0 +1,5 @@ +application/x-shellscript application/x-executable +application/x-awk application/x-executable +application/x-ruby application/x-executable +text/x-python application/x-executable +application/x-perl application/x-executable diff --git a/rox.xml b/rox.xml index 2f4dfdb9..e0777870 100644 --- a/rox.xml +++ b/rox.xml @@ -3,10 +3,4 @@ - - - - - - -- 2.11.4.GIT