Repository: godotengine/godot
File: editor/file_system/dependency_editor.cpp (C++)

Code before:
	button->set_accessibility_name(TTRC("Sort Dependencies"));

	PopupMenu *p = button->get_popup();
	p->connect(SceneStringName(id_pressed), callable_mp(this, &DependencyEditor::_sort_popup));
	p->add_radio_check_item(TTRC("Sort by Type (Ascending)"), (int)DependencyEditorSortBy::TYPE);
	p->add_radio_check_item(TTRC("Sort by Type (Descending)"), (int)DependencyEditorSortBy::TYPE_REVERSE);
	p->add_radio_check_item(TTRC("Sort by Name (Ascending)"), (int)DependencyEditorSortBy::NAME);
	p->add_radio_check_item(TTRC("Sort by Name (Descending)"), (int)DependencyEditorSortBy::NAME_REVERSE);
	p->add_radio_check_item(TTRC("Sort by Path (Ascending)"), (int)DependencyEditorSortBy::PATH);
	p->add_radio_check_item(TTRC("Sort by Path (Descending)"), (int)DependencyEditorSortBy::PATH_REVERSE);
	p->set_item_checked((int)sort_by, true);
	return button;
}

DependencyEditor::DependencyEditor() {
	sort_by = DependencyEditorSortBy::PATH;
	VBoxContainer *vb = memnew(VBoxContainer);
	vb->set_name(TTR("Dependencies"));
	vb->add_theme_constant_override("separation", 8);
	add_child(vb);

	tree = memnew(Tree);
	tree->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
	tree->set_columns((int)DependencyEditorColumn::MAX);
	tree->set_column_titles_visible(true);
	tree->set_column_title((int)DependencyEditorColumn::TYPE, TTR("Type"));
	tree->set_column_clip_content((int)DependencyEditorColumn::TYPE, true);
	tree->set_column_expand_ratio((int)DependencyEditorColumn::TYPE, 2);
	tree->set_column_title((int)DependencyEditorColumn::NAME, TTR("Name"));
	tree->set_column_clip_content((int)DependencyEditorColumn::NAME, true);
	tree->set_column_expand_ratio((int)DependencyEditorColumn::NAME, 3);
	tree->set_column_title((int)DependencyEditorColumn::PATH, TTR("Path"));
	tree->set_column_clip_content((int)DependencyEditorColumn::PATH, true);
	tree->set_column_expand_ratio((int)DependencyEditorColumn::PATH, 5);
	tree->set_hide_root(true);
	tree->connect("button_clicked", callable_mp(this, &DependencyEditor::_load_pressed));

	HBoxContainer *hbc = memnew(HBoxContainer);
	Label *label = memnew(Label(TTR("Dependencies:")));
	label->set_theme_type_variation("HeaderSmall");

	hbc->add_child(label);
	hbc->add_spacer();
	fixdeps = memnew(Button(TTR("Fix Broken")));
	hbc->add_child(fixdeps);
	fixdeps->connect(SceneStringName(pressed), callable_mp(this, &DependencyEditor::_fix_all));

	vb->add_child(hbc);

	HBoxContainer *hbc_filter = memnew(HBoxContainer);
	vb->add_child(hbc_filter);

Review comment (suggestion):
```suggestion
	tree->set_column_title((int)DependencyEditorColumn::TYPE, TTRC("Type"));
```
Same in all added/changed lines.

Code after:
	popup_sort->add_radio_check_item(TTRC("Sort by Path (Ascending)"), (int)DependencyEditorSortBy::PATH);
	popup_sort->add_radio_check_item(TTRC("Sort by Path (Descending)"), (int)DependencyEditorSortBy::PATH_REVERSE);
	popup_sort->set_item_checked((int)sort_by, true);

	hbc_filter->add_child(menu_sort);

	MarginContainer *mc = memnew(MarginContainer);
	mc->set_v_size_flags(Control::SIZE_EXPAND_FILL);

	mc->add_child(tree);
	vb->add_child(mc);

	warning_label = memnew(Label);
	warning_label->set_autowrap_mode(TextServer::AUTOWRAP_WORD);
	vb->add_child(warning_label);

	set_title(TTR("Dependency Editor"));
	search = memnew(EditorFileDialog);
	search->connect("file_selected", callable_mp(this, &DependencyEditor::_searched));
	search->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
	add_child(search);
}

/////////////////////////////////////
void DependencyEditorOwners::_list_rmb_clicked(int p_item, const Vector2 &p_pos, MouseButton p_mouse_button_index) {
	if (p_mouse_button_index != MouseButton::RIGHT) {
		return;
	}

	file_options->clear();
	file_options->reset_size();
	if (p_item >= 0) {
		PackedInt32Array selected_items = owners->get_selected_items();
		bool only_scenes_selected = true;

		for (int i = 0; i < selected_items.size(); i++) {
			int item_idx = selected_items[i];
			if (ResourceLoader::get_resource_type(owners->get_item_text(item_idx)) != "PackedScene") {
				only_scenes_selected = false;
				break;
			}
		}

		if (only_scenes_selected) {
			file_options->add_icon_item(get_editor_theme_icon(SNAME("Load")), TTRN("Open Scene", "Open Scenes", selected_items.size()), FILE_MENU_OPEN);
		} else if (selected_items.size() == 1) {
			file_options->add_icon_item(get_editor_theme_icon(SNAME("Load")), TTR("Open"), FILE_MENU_OPEN);
		} else {
			return;
		}
	}