From 05d8581bac74fc7d9aeb0ad4f078695bf0790f65 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Sun, 14 Jun 2020 16:57:30 +0100 Subject: [PATCH] Use $ --- .../tools/extractor_dialog.gd | 14 ++++++------- .../tools/language_selection_dialog.gd | 6 +++--- .../tools/string_edition_dialog.gd | 6 +++--- .../tools/translation_editor.gd | 20 +++++++++---------- 4 files changed, 23 insertions(+), 23 deletions(-) diff --git a/addons/zylann.translation_editor/tools/extractor_dialog.gd b/addons/zylann.translation_editor/tools/extractor_dialog.gd index a98dd3f..e6ded32 100644 --- a/addons/zylann.translation_editor/tools/extractor_dialog.gd +++ b/addons/zylann.translation_editor/tools/extractor_dialog.gd @@ -5,13 +5,13 @@ const Extractor = preload("extractor.gd") signal import_selected(strings) -onready var _root_path_edit = get_node("VBoxContainer/HBoxContainer/RootPathEdit") -onready var _excluded_dirs_edit = get_node("VBoxContainer/Options/ExcludedDirsEdit") -onready var _summary_label = get_node("VBoxContainer/StatusBar/SummaryLabel") -onready var _results_list = get_node("VBoxContainer/Results") -onready var _progress_bar = get_node("VBoxContainer/StatusBar/ProgressBar") -onready var _extract_button = get_node("VBoxContainer/Buttons/ExtractButton") -onready var _import_button = get_node("VBoxContainer/Buttons/ImportButton") +onready var _root_path_edit = $VBoxContainer/HBoxContainer/RootPathEdit +onready var _excluded_dirs_edit = $VBoxContainer/Options/ExcludedDirsEdit +onready var _summary_label = $VBoxContainer/StatusBar/SummaryLabel +onready var _results_list = $VBoxContainer/Results +onready var _progress_bar = $VBoxContainer/StatusBar/ProgressBar +onready var _extract_button = $VBoxContainer/Buttons/ExtractButton +onready var _import_button = $VBoxContainer/Buttons/ImportButton var _extractor = null # { string => { fpath => line number } } diff --git a/addons/zylann.translation_editor/tools/language_selection_dialog.gd b/addons/zylann.translation_editor/tools/language_selection_dialog.gd index 03e6b36..d90df4c 100644 --- a/addons/zylann.translation_editor/tools/language_selection_dialog.gd +++ b/addons/zylann.translation_editor/tools/language_selection_dialog.gd @@ -5,9 +5,9 @@ const Locales = preload("locales.gd") signal language_selected(language) -onready var _filter_edit = get_node("VBoxContainer/FilterEdit") -onready var _languages_list = get_node("VBoxContainer/LanguagesList") -onready var _ok_button = get_node("VBoxContainer/Buttons/OkButton") +onready var _filter_edit = $VBoxContainer/FilterEdit +onready var _languages_list = $VBoxContainer/LanguagesList +onready var _ok_button = $VBoxContainer/Buttons/OkButton var _hidden_locales = [] diff --git a/addons/zylann.translation_editor/tools/string_edition_dialog.gd b/addons/zylann.translation_editor/tools/string_edition_dialog.gd index d6dfdd8..709b876 100644 --- a/addons/zylann.translation_editor/tools/string_edition_dialog.gd +++ b/addons/zylann.translation_editor/tools/string_edition_dialog.gd @@ -3,9 +3,9 @@ extends WindowDialog signal submitted(str_id, prev_str_id) -onready var _line_edit = get_node("VBoxContainer/LineEdit") -onready var _ok_button = get_node("VBoxContainer/Buttons/OkButton") -onready var _hint_label = get_node("VBoxContainer/HintLabel") +onready var _line_edit = $VBoxContainer/LineEdit +onready var _ok_button = $VBoxContainer/Buttons/OkButton +onready var _hint_label = $VBoxContainer/HintLabel var _validator_func = null var _prev_str_id = null diff --git a/addons/zylann.translation_editor/tools/translation_editor.gd b/addons/zylann.translation_editor/tools/translation_editor.gd index 6f1fcc7..96e0064 100644 --- a/addons/zylann.translation_editor/tools/translation_editor.gd +++ b/addons/zylann.translation_editor/tools/translation_editor.gd @@ -19,16 +19,15 @@ const MENU_FILE_EXTRACT = 6 const FORMAT_CSV = 0 const FORMAT_GETTEXT = 1 -onready var _file_menu = get_node("VBoxContainer/MenuBar/FileMenu") -onready var _edit_menu = get_node("VBoxContainer/MenuBar/EditMenu") -onready var _search_edit = get_node("VBoxContainer/Main/LeftPane/Search/Search") -onready var _clear_search_button = get_node("VBoxContainer/Main/LeftPane/Search/ClearSearch") -onready var _string_list = get_node("VBoxContainer/Main/LeftPane/StringList") +onready var _file_menu = $VBoxContainer/MenuBar/FileMenu +onready var _edit_menu = $VBoxContainer/MenuBar/EditMenu +onready var _search_edit = $VBoxContainer/Main/LeftPane/Search/Search +onready var _clear_search_button = $VBoxContainer/Main/LeftPane/Search/ClearSearch +onready var _string_list = $VBoxContainer/Main/LeftPane/StringList onready var _translation_tab_container = \ - get_node("VBoxContainer/Main/RightPane/VSplitContainer/TranslationTabContainer") -onready var _notes_edit = \ - get_node("VBoxContainer/Main/RightPane/VSplitContainer/VBoxContainer/NotesEdit") -onready var _status_label = get_node("VBoxContainer/StatusBar/Label") + $VBoxContainer/Main/RightPane/VSplitContainer/TranslationTabContainer +onready var _notes_edit = $VBoxContainer/Main/RightPane/VSplitContainer/VBoxContainer/NotesEdit +onready var _status_label = $VBoxContainer/StatusBar/Label var _string_edit_dialog = null var _language_selection_dialog = null @@ -64,7 +63,8 @@ func _ready(): _file_menu.get_popup().add_item("Remove language", MENU_FILE_REMOVE_LANGUAGE) _file_menu.get_popup().add_separator() _file_menu.get_popup().add_item("Extractor", MENU_FILE_EXTRACT) - _file_menu.get_popup().set_item_disabled(_file_menu.get_popup().get_item_index(MENU_FILE_REMOVE_LANGUAGE), true) + _file_menu.get_popup().set_item_disabled( + _file_menu.get_popup().get_item_index(MENU_FILE_REMOVE_LANGUAGE), true) _file_menu.get_popup().connect("id_pressed", self, "_on_FileMenu_id_pressed") _edit_menu.get_popup().connect("id_pressed", self, "_on_EditMenu_id_pressed")