1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-08 12:40:44 +00:00

Update if == NOTIFICATION_* to switch statements to match coding style

This commit is contained in:
megalobyte
2022-02-15 21:44:22 -05:00
parent 98b97d34df
commit 8824b6c5e9
38 changed files with 1134 additions and 1016 deletions

View File

@@ -40,25 +40,27 @@
#include "scene/gui/control.h"
void LocalizationEditor::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
translation_list->connect("button_pressed", callable_mp(this, &LocalizationEditor::_translation_delete));
translation_pot_list->connect("button_pressed", callable_mp(this, &LocalizationEditor::_pot_delete));
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
translation_list->connect("button_pressed", callable_mp(this, &LocalizationEditor::_translation_delete));
translation_pot_list->connect("button_pressed", callable_mp(this, &LocalizationEditor::_pot_delete));
List<String> tfn;
ResourceLoader::get_recognized_extensions_for_type("Translation", &tfn);
for (const String &E : tfn) {
translation_file_open->add_filter("*." + E);
}
List<String> tfn;
ResourceLoader::get_recognized_extensions_for_type("Translation", &tfn);
for (const String &E : tfn) {
translation_file_open->add_filter("*." + E);
}
List<String> rfn;
ResourceLoader::get_recognized_extensions_for_type("Resource", &rfn);
for (const String &E : rfn) {
translation_res_file_open_dialog->add_filter("*." + E);
translation_res_option_file_open_dialog->add_filter("*." + E);
}
List<String> rfn;
ResourceLoader::get_recognized_extensions_for_type("Resource", &rfn);
for (const String &E : rfn) {
translation_res_file_open_dialog->add_filter("*." + E);
translation_res_option_file_open_dialog->add_filter("*." + E);
}
_update_pot_file_extensions();
pot_generate_dialog->add_filter("*.pot");
_update_pot_file_extensions();
pot_generate_dialog->add_filter("*.pot");
} break;
}
}