From 6471c1be23a4274fcb32dfd953ab1f52fa96cf8b Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Wed, 4 Jul 2012 19:11:23 +0000 Subject: [PATCH] enlightenment_filemanager now opens files as well. unfortunately the e_fm code requires a window and icon, we have none so there is some duplication of code. SVN revision: 73301 --- src/bin/e_fm_cmdline.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/bin/e_fm_cmdline.c b/src/bin/e_fm_cmdline.c index 4c67efe26..68f36bd21 100644 --- a/src/bin/e_fm_cmdline.c +++ b/src/bin/e_fm_cmdline.c @@ -37,6 +37,7 @@ fm_open(const char *path) { DBusMessage *msg; Eina_Bool sent; + const char *method; char *p; if (path[0] == '/') @@ -71,10 +72,15 @@ fm_open(const char *path) return; } + if (ecore_file_is_dir(p)) + method = "OpenDirectory"; + else + method = "OpenFile"; + msg = dbus_message_new_method_call ("org.enlightenment.FileManager", "/org/enlightenment/FileManager", - "org.enlightenment.FileManager", "OpenDirectory"); + "org.enlightenment.FileManager", method); if (!msg) { fputs("ERROR: Could not create DBus Message\n", stderr); @@ -101,7 +107,7 @@ fm_open(const char *path) static const Ecore_Getopt options = { "enlightenment_filemanager", - "%prog [options] [folder1] ... [folderN]", + "%prog [options] [file-or-folder1] ... [file-or-folderN]", PACKAGE_VERSION, "(C) 2012 Gustavo Sverzut Barbieri and others", "BSD 2-Clause",