From be0b7de49eabfbe7841c34067d2353213bace600 Mon Sep 17 00:00:00 2001 From: David Capello Date: Sun, 24 Aug 2014 00:10:15 -0300 Subject: [PATCH] Remove unused LaunchCommand functionality to open files from docs/ --- src/app/commands/cmd_launch.cpp | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/src/app/commands/cmd_launch.cpp b/src/app/commands/cmd_launch.cpp index 7bb533ba2..03a704f72 100644 --- a/src/app/commands/cmd_launch.cpp +++ b/src/app/commands/cmd_launch.cpp @@ -23,7 +23,6 @@ #include "app/commands/command.h" #include "app/commands/params.h" #include "app/launcher.h" -#include "app/resource_finder.h" #include "base/fs.h" namespace app { @@ -38,7 +37,7 @@ protected: void onExecute(Context* context) override; private: - enum Type { Url, FileInDocs }; + enum Type { Url }; Type m_type; std::string m_path; @@ -55,12 +54,6 @@ LaunchCommand::LaunchCommand() void LaunchCommand::onLoadParams(Params* params) { - std::string type = params->get("type"); - if (type == "docs") - m_type = FileInDocs; - else if (type == "url") - m_type = Url; - m_path = params->get("path"); if (m_type == Url && !m_path.empty() && m_path[0] == '/') { @@ -76,15 +69,6 @@ void LaunchCommand::onExecute(Context* context) launcher::open_url(m_path); break; - case FileInDocs: - { - ResourceFinder rf; - rf.includeDocsDir(m_path.c_str()); - if (rf.findFirst()) - launcher::open_file(rf.filename()); - } - break; - } }