From 30ad295fa190992520d51c1370b662126e191606 Mon Sep 17 00:00:00 2001 From: thankyouverycool <66646555+thankyouverycool@users.noreply.github.com> Date: Wed, 26 Aug 2020 10:02:03 -0400 Subject: [PATCH] Base+HackStudio: Rename project file extensions to .hsp More concise in Views and consistent with other extensions. --- Base/home/anon/Source/js/javascript.hackstudio | 2 -- Base/home/anon/Source/js/javascript.hsp | 2 ++ .../anon/Source/little/{little.hackstudio => little.hsp} | 2 +- Base/res/apps/HackStudio.af | 3 +++ DevTools/HackStudio/main.cpp | 8 ++++---- 5 files changed, 10 insertions(+), 7 deletions(-) delete mode 100644 Base/home/anon/Source/js/javascript.hackstudio create mode 100644 Base/home/anon/Source/js/javascript.hsp rename Base/home/anon/Source/little/{little.hackstudio => little.hsp} (71%) diff --git a/Base/home/anon/Source/js/javascript.hackstudio b/Base/home/anon/Source/js/javascript.hackstudio deleted file mode 100644 index d4786280a9..0000000000 --- a/Base/home/anon/Source/js/javascript.hackstudio +++ /dev/null @@ -1,2 +0,0 @@ -javascript.hackstudio -*.js diff --git a/Base/home/anon/Source/js/javascript.hsp b/Base/home/anon/Source/js/javascript.hsp new file mode 100644 index 0000000000..28bed34814 --- /dev/null +++ b/Base/home/anon/Source/js/javascript.hsp @@ -0,0 +1,2 @@ +javascript.hsp +*.js diff --git a/Base/home/anon/Source/little/little.hackstudio b/Base/home/anon/Source/little/little.hsp similarity index 71% rename from Base/home/anon/Source/little/little.hackstudio rename to Base/home/anon/Source/little/little.hsp index ee2283a2fd..6f1e3299c7 100644 --- a/Base/home/anon/Source/little/little.hackstudio +++ b/Base/home/anon/Source/little/little.hsp @@ -1,6 +1,6 @@ main.cpp Makefile -little.hackstudio +little.hsp test.frm other.cpp other.h diff --git a/Base/res/apps/HackStudio.af b/Base/res/apps/HackStudio.af index a70b0c29fd..64363e1d7c 100644 --- a/Base/res/apps/HackStudio.af +++ b/Base/res/apps/HackStudio.af @@ -6,3 +6,6 @@ Category=Development [Icons] 16x16=/res/icons/16x16/app-hack-studio.png 32x32=/res/icons/32x32/app-hack-studio.png + +[Launcher] +FileTypes=hsp diff --git a/DevTools/HackStudio/main.cpp b/DevTools/HackStudio/main.cpp index 7d33bd8b20..6faa0172f4 100644 --- a/DevTools/HackStudio/main.cpp +++ b/DevTools/HackStudio/main.cpp @@ -172,7 +172,7 @@ NonnullRefPtr get_editor_of_file(const String& file) static String get_project_executable_path() { - // e.g /my/project.hackstudio => /my/project + // e.g /my/project.hsp => /my/project // TODO: Perhaps a Makefile rule for getting the value of $(PROGRAM) would be better? return g_project->path().substring(0, g_project->path().index_of(".").value()); } @@ -219,10 +219,10 @@ int main_impl(int argc, char** argv) args_parser.parse(argc, argv); auto argument_absolute_path = Core::File::real_path_for(path_argument); - if (argument_absolute_path.ends_with(".hackstudio")) + if (argument_absolute_path.ends_with(".hsp")) open_project(argument_absolute_path); else - open_project("/home/anon/Source/little/little.hackstudio"); + open_project("/home/anon/Source/little/little.hsp"); auto& toolbar_container = widget.add(); auto& toolbar = toolbar_container.add(); @@ -704,7 +704,7 @@ int main_impl(int argc, char** argv) g_open_file = open_file; - if (!argument_absolute_path.is_empty() && !argument_absolute_path.ends_with(".hackstudio")) + if (!argument_absolute_path.is_empty() && !argument_absolute_path.ends_with(".hsp")) open_file(argument_absolute_path); else open_file(g_project->default_file());