1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 01:07:35 +00:00

Base+HackStudio: Rename project file extensions to .hsp

More concise in Views and consistent with other extensions.
This commit is contained in:
thankyouverycool 2020-08-26 10:02:03 -04:00 committed by Andreas Kling
parent 45901d4141
commit 30ad295fa1
5 changed files with 10 additions and 7 deletions

View file

@ -1,2 +0,0 @@
javascript.hackstudio
*.js

View file

@ -0,0 +1,2 @@
javascript.hsp
*.js

View file

@ -1,6 +1,6 @@
main.cpp main.cpp
Makefile Makefile
little.hackstudio little.hsp
test.frm test.frm
other.cpp other.cpp
other.h other.h

View file

@ -6,3 +6,6 @@ Category=Development
[Icons] [Icons]
16x16=/res/icons/16x16/app-hack-studio.png 16x16=/res/icons/16x16/app-hack-studio.png
32x32=/res/icons/32x32/app-hack-studio.png 32x32=/res/icons/32x32/app-hack-studio.png
[Launcher]
FileTypes=hsp

View file

@ -172,7 +172,7 @@ NonnullRefPtr<EditorWrapper> get_editor_of_file(const String& file)
static String get_project_executable_path() 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? // 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()); 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); args_parser.parse(argc, argv);
auto argument_absolute_path = Core::File::real_path_for(path_argument); 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); open_project(argument_absolute_path);
else else
open_project("/home/anon/Source/little/little.hackstudio"); open_project("/home/anon/Source/little/little.hsp");
auto& toolbar_container = widget.add<GUI::ToolBarContainer>(); auto& toolbar_container = widget.add<GUI::ToolBarContainer>();
auto& toolbar = toolbar_container.add<GUI::ToolBar>(); auto& toolbar = toolbar_container.add<GUI::ToolBar>();
@ -704,7 +704,7 @@ int main_impl(int argc, char** argv)
g_open_file = open_file; 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); open_file(argument_absolute_path);
else else
open_file(g_project->default_file()); open_file(g_project->default_file());