diff options
Diffstat (limited to 'src/fr-command-7z.c')
-rw-r--r-- | src/fr-command-7z.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/fr-command-7z.c b/src/fr-command-7z.c index a41f97d..33e3b3b 100644 --- a/src/fr-command-7z.c +++ b/src/fr-command-7z.c @@ -588,13 +588,24 @@ const char *sevenz_mime_types[] = { "application/x-7z-compressed", "application/x-ms-dos-executable", "application/x-ms-wim", "application/x-rar", - "application/zip", - NULL }; + "application/zip", /* zip always at the end and the number of */ + NULL }; /* place in fr_command_7z_get_mime_types */ static const char ** fr_command_7z_get_mime_types (FrCommand *comm) { + GSettings *settings; + settings = g_settings_new ("org.mate.engrampa.general"); + + if (g_settings_get_boolean (settings, "unar-open-zip") && + is_program_in_path ("unar") && is_program_in_path ("lsar")) + sevenz_mime_types [8] = NULL; + else + g_settings_set_boolean (settings, "unar-open-zip", FALSE); + + g_object_unref (settings); + return sevenz_mime_types; } |