|
@@ -473,6 +473,7 @@ NonnullRefPtr<GUI::Menu> HackStudioWidget::create_project_tree_view_context_menu
|
|
m_open_selected_in_new_tab_action = create_open_selected_in_new_tab_action();
|
|
m_open_selected_in_new_tab_action = create_open_selected_in_new_tab_action();
|
|
m_show_in_file_manager_action = create_show_in_file_manager_action();
|
|
m_show_in_file_manager_action = create_show_in_file_manager_action();
|
|
m_copy_relative_path_action = create_copy_relative_path_action();
|
|
m_copy_relative_path_action = create_copy_relative_path_action();
|
|
|
|
+ m_copy_full_path_action = create_copy_full_path_action();
|
|
|
|
|
|
m_new_directory_action = create_new_directory_action();
|
|
m_new_directory_action = create_new_directory_action();
|
|
m_delete_action = create_delete_action();
|
|
m_delete_action = create_delete_action();
|
|
@@ -494,6 +495,7 @@ NonnullRefPtr<GUI::Menu> HackStudioWidget::create_project_tree_view_context_menu
|
|
project_tree_view_context_menu->add_action(*m_open_selected_in_new_tab_action);
|
|
project_tree_view_context_menu->add_action(*m_open_selected_in_new_tab_action);
|
|
project_tree_view_context_menu->add_action(*m_show_in_file_manager_action);
|
|
project_tree_view_context_menu->add_action(*m_show_in_file_manager_action);
|
|
project_tree_view_context_menu->add_action(*m_copy_relative_path_action);
|
|
project_tree_view_context_menu->add_action(*m_copy_relative_path_action);
|
|
|
|
+ project_tree_view_context_menu->add_action(*m_copy_full_path_action);
|
|
// TODO: Cut, copy, duplicate with new name...
|
|
// TODO: Cut, copy, duplicate with new name...
|
|
project_tree_view_context_menu->add_separator();
|
|
project_tree_view_context_menu->add_separator();
|
|
project_tree_view_context_menu->add_action(*m_tree_view_rename_action);
|
|
project_tree_view_context_menu->add_action(*m_tree_view_rename_action);
|
|
@@ -626,6 +628,23 @@ NonnullRefPtr<GUI::Action> HackStudioWidget::create_copy_relative_path_action()
|
|
return copy_relative_path_action;
|
|
return copy_relative_path_action;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+NonnullRefPtr<GUI::Action> HackStudioWidget::create_copy_full_path_action()
|
|
|
|
+{
|
|
|
|
+ auto copy_full_path_action = GUI::Action::create("Copy &Full Path", [this](const GUI::Action&) {
|
|
|
|
+ auto paths = selected_file_paths();
|
|
|
|
+ VERIFY(!paths.is_empty());
|
|
|
|
+ Vector<String> full_paths;
|
|
|
|
+ for (auto& path : paths)
|
|
|
|
+ full_paths.append(get_absolute_path(path));
|
|
|
|
+ auto paths_string = String::join("\n", full_paths);
|
|
|
|
+ GUI::Clipboard::the().set_plain_text(paths_string);
|
|
|
|
+ });
|
|
|
|
+ copy_full_path_action->set_enabled(true);
|
|
|
|
+ copy_full_path_action->set_icon(GUI::Icon::default_icon("hard-disk").bitmap_for_size(16));
|
|
|
|
+
|
|
|
|
+ return copy_full_path_action;
|
|
|
|
+}
|
|
|
|
+
|
|
NonnullRefPtr<GUI::Action> HackStudioWidget::create_delete_action()
|
|
NonnullRefPtr<GUI::Action> HackStudioWidget::create_delete_action()
|
|
{
|
|
{
|
|
auto delete_action = GUI::CommonActions::make_delete_action([this](const GUI::Action&) {
|
|
auto delete_action = GUI::CommonActions::make_delete_action([this](const GUI::Action&) {
|