summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-05-14 14:13:31 +0200
committerA Thousand Ships <96648715+AThousandShips@users.noreply.github.com>2024-05-30 22:54:04 +0200
commit755a0efbb66ce40ec7399103b34094e734bf09bf (patch)
tree909dabab0f5c7339299955c9e772525c585ce774
parent505da68b261be6ed37b42422c61358ff9d208748 (diff)
downloadredot-engine-755a0efbb66ce40ec7399103b34094e734bf09bf.tar.gz
[Scene] Add `SceneStringNames::id_pressed`
-rw-r--r--editor/animation_bezier_editor.cpp2
-rw-r--r--editor/animation_track_editor.cpp10
-rw-r--r--editor/code_editor.cpp2
-rw-r--r--editor/connections_dialog.cpp6
-rw-r--r--editor/debugger/editor_debugger_node.cpp2
-rw-r--r--editor/debugger/editor_debugger_tree.cpp2
-rw-r--r--editor/debugger/script_editor_debugger.cpp4
-rw-r--r--editor/dependency_editor.cpp2
-rw-r--r--editor/editor_dock_manager.cpp2
-rw-r--r--editor/editor_inspector.cpp6
-rw-r--r--editor/editor_node.cpp16
-rw-r--r--editor/editor_properties.cpp8
-rw-r--r--editor/editor_properties_array_dict.cpp4
-rw-r--r--editor/editor_resource_picker.cpp2
-rw-r--r--editor/editor_run_native.cpp2
-rw-r--r--editor/export/export_template_manager.cpp2
-rw-r--r--editor/export/project_export.cpp2
-rw-r--r--editor/filesystem_dock.cpp10
-rw-r--r--editor/groups_editor.cpp2
-rw-r--r--editor/gui/editor_file_dialog.cpp2
-rw-r--r--editor/gui/editor_object_selector.cpp2
-rw-r--r--editor/gui/editor_scene_tabs.cpp2
-rw-r--r--editor/import/3d/scene_import_settings.cpp2
-rw-r--r--editor/inspector_dock.cpp8
-rw-r--r--editor/plugins/animation_blend_space_1d_editor.cpp2
-rw-r--r--editor/plugins/animation_blend_space_2d_editor.cpp2
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp2
-rw-r--r--editor/plugins/animation_library_editor.cpp2
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp4
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp10
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp2
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp20
-rw-r--r--editor/plugins/cpu_particles_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/cpu_particles_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/curve_editor_plugin.cpp2
-rw-r--r--editor/plugins/debugger_editor_plugin.cpp2
-rw-r--r--editor/plugins/font_config_plugin.cpp8
-rw-r--r--editor/plugins/gpu_particles_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/gpu_particles_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/mesh_library_editor_plugin.cpp2
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp12
-rw-r--r--editor/plugins/parallax_background_editor_plugin.cpp2
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/path_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_editor_plugin.cpp10
-rw-r--r--editor/plugins/script_text_editor.cpp18
-rw-r--r--editor/plugins/shader_editor_plugin.cpp2
-rw-r--r--editor/plugins/skeleton_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/skeleton_3d_editor_plugin.cpp2
-rw-r--r--editor/plugins/sprite_2d_editor_plugin.cpp2
-rw-r--r--editor/plugins/text_editor.cpp12
-rw-r--r--editor/plugins/text_shader_editor.cpp10
-rw-r--r--editor/plugins/tiles/tile_data_editors.cpp2
-rw-r--r--editor/plugins/tiles/tile_map_layer_editor.cpp4
-rw-r--r--editor/plugins/tiles/tile_proxies_manager_dialog.cpp2
-rw-r--r--editor/plugins/tiles/tile_set_atlas_source_editor.cpp8
-rw-r--r--editor/plugins/tiles/tile_set_editor.cpp6
-rw-r--r--editor/plugins/version_control_editor_plugin.cpp6
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp8
-rw-r--r--editor/scene_tree_dock.cpp12
-rw-r--r--modules/gridmap/editor/grid_map_editor_plugin.cpp2
-rw-r--r--scene/gui/color_picker.cpp4
-rw-r--r--scene/gui/line_edit.cpp6
-rw-r--r--scene/gui/popup_menu.cpp2
-rw-r--r--scene/gui/rich_text_label.cpp2
-rw-r--r--scene/gui/text_edit.cpp6
-rw-r--r--scene/gui/tree.cpp2
-rw-r--r--scene/scene_string_names.cpp1
-rw-r--r--scene/scene_string_names.h1
72 files changed, 163 insertions, 161 deletions
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index baec996016..2136a843b6 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -1950,5 +1950,5 @@ AnimationBezierTrackEdit::AnimationBezierTrackEdit() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &AnimationBezierTrackEdit::_menu_selected));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationBezierTrackEdit::_menu_selected));
}
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index 045774080c..69dbb26749 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -2810,7 +2810,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if (!menu) {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEdit::_menu_selected));
}
menu->clear();
if (animation->track_get_type(track) == Animation::TYPE_AUDIO) {
@@ -2833,7 +2833,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if (!menu) {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEdit::_menu_selected));
}
menu->clear();
menu->add_icon_item(get_editor_theme_icon(SNAME("InterpRaw")), TTR("Nearest"), MENU_INTERPOLATION_NEAREST);
@@ -2879,7 +2879,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if (!menu) {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEdit::_menu_selected));
}
menu->clear();
menu->add_icon_item(get_editor_theme_icon(SNAME("InterpWrapClamp")), TTR("Clamp Loop Interp"), MENU_LOOP_CLAMP);
@@ -2913,7 +2913,7 @@ void AnimationTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
if (!menu) {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &AnimationTrackEdit::_menu_selected));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEdit::_menu_selected));
}
bool selected = _try_select_at_ui_pos(pos, mb->is_command_or_control_pressed() || mb->is_shift_pressed(), false);
@@ -7365,7 +7365,7 @@ AnimationTrackEditor::AnimationTrackEditor() {
edit->get_popup()->add_item(TTR("Optimize Animation (no undo)..."), EDIT_OPTIMIZE_ANIMATION);
edit->get_popup()->add_item(TTR("Clean-Up Animation (no undo)..."), EDIT_CLEAN_UP_ANIMATION);
- edit->get_popup()->connect("id_pressed", callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed));
+ edit->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationTrackEditor::_edit_menu_pressed));
edit->get_popup()->connect("about_to_popup", callable_mp(this, &AnimationTrackEditor::_edit_menu_about_to_popup));
pick_track = memnew(SceneTreeDialog);
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 253157a561..0e272429a3 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -1794,7 +1794,7 @@ CodeTextEditor::CodeTextEditor() {
zoom_menu->set_item_metadata(i, z);
}
- zoom_menu->connect("id_pressed", callable_mp(this, &CodeTextEditor::_zoom_popup_id_pressed));
+ zoom_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CodeTextEditor::_zoom_popup_id_pressed));
status_bar->add_child(memnew(VSeparator));
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index cb775a67e7..154492fff8 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -1596,13 +1596,13 @@ ConnectionsDock::ConnectionsDock() {
disconnect_all_dialog->set_text(TTR("Are you sure you want to remove all connections from this signal?"));
class_menu = memnew(PopupMenu);
- class_menu->connect("id_pressed", callable_mp(this, &ConnectionsDock::_handle_class_menu_option));
+ class_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ConnectionsDock::_handle_class_menu_option));
class_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_class_menu_about_to_popup));
class_menu->add_item(TTR("Open Documentation"), CLASS_MENU_OPEN_DOCS);
add_child(class_menu);
signal_menu = memnew(PopupMenu);
- signal_menu->connect("id_pressed", callable_mp(this, &ConnectionsDock::_handle_signal_menu_option));
+ signal_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ConnectionsDock::_handle_signal_menu_option));
signal_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_signal_menu_about_to_popup));
signal_menu->add_item(TTR("Connect..."), SIGNAL_MENU_CONNECT);
signal_menu->add_item(TTR("Disconnect All"), SIGNAL_MENU_DISCONNECT_ALL);
@@ -1612,7 +1612,7 @@ ConnectionsDock::ConnectionsDock() {
add_child(signal_menu);
slot_menu = memnew(PopupMenu);
- slot_menu->connect("id_pressed", callable_mp(this, &ConnectionsDock::_handle_slot_menu_option));
+ slot_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ConnectionsDock::_handle_slot_menu_option));
slot_menu->connect("about_to_popup", callable_mp(this, &ConnectionsDock::_slot_menu_about_to_popup));
slot_menu->add_item(TTR("Edit..."), SLOT_MENU_EDIT);
slot_menu->add_item(TTR("Go to Method"), SLOT_MENU_GO_TO_METHOD);
diff --git a/editor/debugger/editor_debugger_node.cpp b/editor/debugger/editor_debugger_node.cpp
index 2a98f50a3a..e52c9c914c 100644
--- a/editor/debugger/editor_debugger_node.cpp
+++ b/editor/debugger/editor_debugger_node.cpp
@@ -496,7 +496,7 @@ void EditorDebuggerNode::set_script_debug_button(MenuButton *p_button) {
p->add_shortcut(ED_GET_SHORTCUT("debugger/continue"), DEBUG_CONTINUE);
p->add_separator();
p->add_check_shortcut(ED_GET_SHORTCUT("debugger/debug_with_external_editor"), DEBUG_WITH_EXTERNAL_EDITOR);
- p->connect("id_pressed", callable_mp(this, &EditorDebuggerNode::_menu_option));
+ p->connect(SceneStringName(id_pressed), callable_mp(this, &EditorDebuggerNode::_menu_option));
_break_state_changed();
script_menu->show();
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp
index 12b590da3c..f8ffce0c83 100644
--- a/editor/debugger/editor_debugger_tree.cpp
+++ b/editor/debugger/editor_debugger_tree.cpp
@@ -45,7 +45,7 @@ EditorDebuggerTree::EditorDebuggerTree() {
// Popup
item_menu = memnew(PopupMenu);
- item_menu->connect("id_pressed", callable_mp(this, &EditorDebuggerTree::_item_menu_id_pressed));
+ item_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorDebuggerTree::_item_menu_id_pressed));
add_child(item_menu);
// File Dialog
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp
index 37bb048b19..2c1eced3e0 100644
--- a/editor/debugger/script_editor_debugger.cpp
+++ b/editor/debugger/script_editor_debugger.cpp
@@ -1937,7 +1937,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
tabs->add_child(dbg);
breakpoints_menu = memnew(PopupMenu);
- breakpoints_menu->connect("id_pressed", callable_mp(this, &ScriptEditorDebugger::_item_menu_id_pressed));
+ breakpoints_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditorDebugger::_item_menu_id_pressed));
breakpoints_tree->add_child(breakpoints_menu);
}
@@ -1990,7 +1990,7 @@ ScriptEditorDebugger::ScriptEditorDebugger() {
errors_tab->add_child(error_tree);
item_menu = memnew(PopupMenu);
- item_menu->connect("id_pressed", callable_mp(this, &ScriptEditorDebugger::_item_menu_id_pressed));
+ item_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditorDebugger::_item_menu_id_pressed));
error_tree->add_child(item_menu);
tabs->add_child(errors_tab);
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index 4c21f51e9c..0c870baec1 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -396,7 +396,7 @@ void DependencyEditorOwners::show(const String &p_path) {
DependencyEditorOwners::DependencyEditorOwners() {
file_options = memnew(PopupMenu);
add_child(file_options);
- file_options->connect("id_pressed", callable_mp(this, &DependencyEditorOwners::_file_option));
+ file_options->connect(SceneStringName(id_pressed), callable_mp(this, &DependencyEditorOwners::_file_option));
owners = memnew(ItemList);
owners->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
diff --git a/editor/editor_dock_manager.cpp b/editor/editor_dock_manager.cpp
index 5d98fefa76..ccb47220db 100644
--- a/editor/editor_dock_manager.cpp
+++ b/editor/editor_dock_manager.cpp
@@ -838,7 +838,7 @@ EditorDockManager::EditorDockManager() {
docks_menu = memnew(PopupMenu);
docks_menu->set_hide_on_item_selection(false);
- docks_menu->connect("id_pressed", callable_mp(this, &EditorDockManager::_docks_menu_option));
+ docks_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorDockManager::_docks_menu_option));
EditorNode::get_singleton()->get_gui_base()->connect(SceneStringName(theme_changed), callable_mp(this, &EditorDockManager::_update_docks_menu));
}
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index fafefa7771..0ea944a05f 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -1094,7 +1094,7 @@ void EditorProperty::_update_popup() {
} else {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &EditorProperty::menu_option));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorProperty::menu_option));
}
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("ActionCopy")), ED_GET_SHORTCUT("property_editor/copy_value"), MENU_COPY_VALUE);
menu->add_icon_shortcut(get_editor_theme_icon(SNAME("ActionPaste")), ED_GET_SHORTCUT("property_editor/paste_value"), MENU_PASTE_VALUE);
@@ -1290,7 +1290,7 @@ void EditorInspectorCategory::gui_input(const Ref<InputEvent> &p_event) {
EditorInspectorCategory::EditorInspectorCategory() {
menu = memnew(PopupMenu);
- menu->connect("id_pressed", callable_mp(this, &EditorInspectorCategory::_handle_menu_option));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorInspectorCategory::_handle_menu_option));
menu->add_item(TTR("Open Documentation"), MENU_OPEN_DOCS);
add_child(menu);
}
@@ -2427,7 +2427,7 @@ EditorInspectorArray::EditorInspectorArray(bool p_read_only) {
rmb_popup->add_separator();
rmb_popup->add_item(TTR("Clear Array"), OPTION_CLEAR_ARRAY);
rmb_popup->add_item(TTR("Resize Array..."), OPTION_RESIZE_ARRAY);
- rmb_popup->connect("id_pressed", callable_mp(this, &EditorInspectorArray::_rmb_popup_id_pressed));
+ rmb_popup->connect(SceneStringName(id_pressed), callable_mp(this, &EditorInspectorArray::_rmb_popup_id_pressed));
add_child(rmb_popup);
elements_vbox = memnew(VBoxContainer);
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index af06ccb885..a603121938 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -6902,7 +6902,7 @@ EditorNode::EditorNode() {
recent_scenes = memnew(PopupMenu);
file_menu->add_submenu_node_item(TTR("Open Recent"), recent_scenes, FILE_OPEN_RECENT);
- recent_scenes->connect("id_pressed", callable_mp(this, &EditorNode::_open_recent_scene));
+ recent_scenes->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_open_recent_scene));
file_menu->add_separator();
file_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/save_scene", TTR("Save Scene"), KeyModifierMask::CMD_OR_CTRL + Key::S), FILE_SAVE_SCENE);
@@ -6947,7 +6947,7 @@ EditorNode::EditorNode() {
apple_menu->add_shortcut(ED_GET_SHORTCUT("editor/editor_settings"), SETTINGS_PREFERENCES);
apple_menu->add_separator();
- apple_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
+ apple_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
}
#endif
@@ -6956,7 +6956,7 @@ EditorNode::EditorNode() {
main_menu->add_child(project_menu);
project_menu->add_shortcut(ED_SHORTCUT_AND_COMMAND("editor/project_settings", TTR("Project Settings..."), Key::NONE, TTR("Project Settings")), RUN_SETTINGS);
- project_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
+ project_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
project_menu->add_separator();
project_menu->add_item(TTR("Version Control"), VCS_MENU);
@@ -7028,7 +7028,7 @@ EditorNode::EditorNode() {
editor_layouts = memnew(PopupMenu);
editor_layouts->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
settings_menu->add_submenu_node_item(TTR("Editor Layout"), editor_layouts);
- editor_layouts->connect("id_pressed", callable_mp(this, &EditorNode::_layout_menu_option));
+ editor_layouts->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_layout_menu_option));
settings_menu->add_separator();
ED_SHORTCUT_AND_COMMAND("editor/take_screenshot", TTR("Take Screenshot"), KeyModifierMask::CTRL | Key::F12);
@@ -7071,7 +7071,7 @@ EditorNode::EditorNode() {
}
main_menu->add_child(help_menu);
- help_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
+ help_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
ED_SHORTCUT_AND_COMMAND("editor/editor_help", TTR("Search Help..."), Key::F1);
ED_SHORTCUT_OVERRIDE("editor/editor_help", "macos", KeyModifierMask::ALT | Key::SPACE);
@@ -7170,7 +7170,7 @@ EditorNode::EditorNode() {
update_spinner = memnew(MenuButton);
right_menu_hb->add_child(update_spinner);
update_spinner->set_icon(theme->get_icon(SNAME("Progress1"), EditorStringName(EditorIcons)));
- update_spinner->get_popup()->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
+ update_spinner->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
PopupMenu *p = update_spinner->get_popup();
p->add_radio_check_item(TTR("Update Continuously"), SETTINGS_UPDATE_CONTINUOUSLY);
p->add_radio_check_item(TTR("Update When Changed"), SETTINGS_UPDATE_WHEN_CHANGED);
@@ -7341,11 +7341,11 @@ EditorNode::EditorNode() {
gui_base->add_child(file_script);
file_script->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
- file_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
+ file_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
file_menu->connect("about_to_popup", callable_mp(this, &EditorNode::_update_file_menu_opened));
file_menu->connect("popup_hide", callable_mp(this, &EditorNode::_update_file_menu_closed));
- settings_menu->connect("id_pressed", callable_mp(this, &EditorNode::_menu_option));
+ settings_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorNode::_menu_option));
file->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
file_templates->connect("file_selected", callable_mp(this, &EditorNode::_dialog_action));
diff --git a/editor/editor_properties.cpp b/editor/editor_properties.cpp
index a455258a6d..ecc31bb0e2 100644
--- a/editor/editor_properties.cpp
+++ b/editor/editor_properties.cpp
@@ -854,7 +854,7 @@ EditorPropertyLayersGrid::EditorPropertyLayersGrid() {
layer_rename = memnew(PopupMenu);
layer_rename->add_item(TTR("Rename layer"), 0);
add_child(layer_rename);
- layer_rename->connect("id_pressed", callable_mp(this, &EditorPropertyLayersGrid::_rename_pressed));
+ layer_rename->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyLayersGrid::_rename_pressed));
}
Size2 EditorPropertyLayersGrid::get_grid_size() const {
@@ -1304,7 +1304,7 @@ EditorPropertyLayers::EditorPropertyLayers() {
layers = memnew(PopupMenu);
add_child(layers);
layers->set_hide_on_checkable_item_selection(false);
- layers->connect("id_pressed", callable_mp(this, &EditorPropertyLayers::_menu_pressed));
+ layers->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyLayers::_menu_pressed));
layers->connect("popup_hide", callable_mp((BaseButton *)button, &BaseButton::set_pressed).bind(false));
ProjectSettings::get_singleton()->connect("settings_changed", callable_mp(this, &EditorPropertyLayers::_refresh_names));
}
@@ -1687,7 +1687,7 @@ EditorPropertyEasing::EditorPropertyEasing() {
preset = memnew(PopupMenu);
add_child(preset);
- preset->connect("id_pressed", callable_mp(this, &EditorPropertyEasing::_set_preset));
+ preset->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyEasing::_set_preset));
spin = memnew(EditorSpinSlider);
spin->set_flat(true);
@@ -2990,7 +2990,7 @@ EditorPropertyNodePath::EditorPropertyNodePath() {
menu->get_popup()->add_item(TTR("Copy as Text"), ACTION_COPY);
menu->get_popup()->add_item(TTR("Edit"), ACTION_EDIT);
menu->get_popup()->add_item(TTR("Show Node in Tree"), ACTION_SELECT);
- menu->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &EditorPropertyNodePath::_menu_option));
+ menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyNodePath::_menu_option));
edit = memnew(LineEdit);
edit->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/editor/editor_properties_array_dict.cpp b/editor/editor_properties_array_dict.cpp
index b5f34ecb3d..8f2936705e 100644
--- a/editor/editor_properties_array_dict.cpp
+++ b/editor/editor_properties_array_dict.cpp
@@ -841,7 +841,7 @@ EditorPropertyArray::EditorPropertyArray() {
change_type = memnew(PopupMenu);
add_child(change_type);
- change_type->connect("id_pressed", callable_mp(this, &EditorPropertyArray::_change_type_menu));
+ change_type->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyArray::_change_type_menu));
changing_type_index = -1;
subtype = Variant::NIL;
@@ -1157,7 +1157,7 @@ EditorPropertyDictionary::EditorPropertyDictionary() {
paginator = nullptr;
change_type = memnew(PopupMenu);
add_child(change_type);
- change_type->connect("id_pressed", callable_mp(this, &EditorPropertyDictionary::_change_type_menu));
+ change_type->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyDictionary::_change_type_menu));
changing_type_index = -1;
has_borders = true;
}
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index 50820ac12f..7e367c753d 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -947,7 +947,7 @@ void EditorResourcePicker::_ensure_resource_menu() {
edit_menu = memnew(PopupMenu);
edit_menu->add_theme_constant_override("icon_max_width", get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)));
add_child(edit_menu);
- edit_menu->connect("id_pressed", callable_mp(this, &EditorResourcePicker::_edit_menu_cbk));
+ edit_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorResourcePicker::_edit_menu_cbk));
edit_menu->connect("popup_hide", callable_mp((BaseButton *)edit_button, &BaseButton::set_pressed).bind(false));
}
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index 5c50231623..715f310b5b 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -188,7 +188,7 @@ EditorRunNative::EditorRunNative() {
remote_debug = memnew(MenuButton);
remote_debug->set_flat(false);
remote_debug->set_theme_type_variation("RunBarButton");
- remote_debug->get_popup()->connect("id_pressed", callable_mp(this, &EditorRunNative::start_run_native));
+ remote_debug->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorRunNative::start_run_native));
remote_debug->set_tooltip_text(TTR("Remote Debug"));
remote_debug->set_disabled(true);
diff --git a/editor/export/export_template_manager.cpp b/editor/export/export_template_manager.cpp
index 339a6e4b7f..b6584a6092 100644
--- a/editor/export/export_template_manager.cpp
+++ b/editor/export/export_template_manager.cpp
@@ -973,7 +973,7 @@ ExportTemplateManager::ExportTemplateManager() {
mirror_options_button->get_popup()->add_item(TTR("Copy Mirror URL"), COPY_MIRROR_URL);
mirror_options_button->set_disabled(!downloads_available);
download_install_hb->add_child(mirror_options_button);
- mirror_options_button->get_popup()->connect("id_pressed", callable_mp(this, &ExportTemplateManager::_mirror_options_button_cbk));
+ mirror_options_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ExportTemplateManager::_mirror_options_button_cbk));
download_install_hb->add_spacer();
diff --git a/editor/export/project_export.cpp b/editor/export/project_export.cpp
index dd283ebfd6..7787512cc2 100644
--- a/editor/export/project_export.cpp
+++ b/editor/export/project_export.cpp
@@ -1373,7 +1373,7 @@ ProjectExportDialog::ProjectExportDialog() {
file_mode_popup->add_item(TTR("Strip Visuals"), EditorExportPreset::MODE_FILE_STRIP);
file_mode_popup->add_item(TTR("Keep"), EditorExportPreset::MODE_FILE_KEEP);
file_mode_popup->add_item(TTR("Remove"), EditorExportPreset::MODE_FILE_REMOVE);
- file_mode_popup->connect("id_pressed", callable_mp(this, &ProjectExportDialog::_set_file_export_mode));
+ file_mode_popup->connect(SceneStringName(id_pressed), callable_mp(this, &ProjectExportDialog::_set_file_export_mode));
include_filters = memnew(LineEdit);
resources_vb->add_margin_child(
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index c07667ac12..f8401b5ec1 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -556,8 +556,8 @@ void FileSystemDock::_notification(int p_what) {
files->connect("item_activated", callable_mp(this, &FileSystemDock::_file_list_activate_file));
button_hist_next->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_fw_history));
button_hist_prev->connect(SceneStringName(pressed), callable_mp(this, &FileSystemDock::_bw_history));
- file_list_popup->connect("id_pressed", callable_mp(this, &FileSystemDock::_file_list_rmb_option));
- tree_popup->connect("id_pressed", callable_mp(this, &FileSystemDock::_tree_rmb_option));
+ file_list_popup->connect(SceneStringName(id_pressed), callable_mp(this, &FileSystemDock::_file_list_rmb_option));
+ tree_popup->connect(SceneStringName(id_pressed), callable_mp(this, &FileSystemDock::_tree_rmb_option));
current_path_line_edit->connect("text_submitted", callable_mp(this, &FileSystemDock::_navigate_to_path).bind(false));
always_show_folders = bool(EDITOR_GET("docks/filesystem/always_show_folders"));
@@ -3174,7 +3174,7 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, const Vect
if (p_paths.size() == 1 && p_display_path_dependent_options) {
PopupMenu *new_menu = memnew(PopupMenu);
- new_menu->connect("id_pressed", callable_mp(this, &FileSystemDock::_tree_rmb_option));
+ new_menu->connect(SceneStringName(id_pressed), callable_mp(this, &FileSystemDock::_tree_rmb_option));
p_popup->add_submenu_node_item(TTR("Create New"), new_menu, FILE_NEW);
p_popup->set_item_icon(p_popup->get_item_index(FILE_NEW), get_editor_theme_icon(SNAME("Add")));
@@ -3199,7 +3199,7 @@ void FileSystemDock::_file_and_folders_fill_popup(PopupMenu *p_popup, const Vect
if (p_paths[0] != "res://") {
PopupMenu *folder_colors_menu = memnew(PopupMenu);
- folder_colors_menu->connect("id_pressed", callable_mp(this, &FileSystemDock::_folder_color_index_pressed).bind(folder_colors_menu));
+ folder_colors_menu->connect(SceneStringName(id_pressed), callable_mp(this, &FileSystemDock::_folder_color_index_pressed).bind(folder_colors_menu));
p_popup->add_submenu_node_item(TTR("Set Folder Color..."), folder_colors_menu);
p_popup->set_item_icon(-1, get_editor_theme_icon(SNAME("Paint")));
@@ -3771,7 +3771,7 @@ MenuButton *FileSystemDock::_create_file_menu_button() {
button->set_tooltip_text(TTR("Sort Files"));
PopupMenu *p = button->get_popup();
- p->connect("id_pressed", callable_mp(this, &FileSystemDock::_file_sort_popup));
+ p->connect(SceneStringName(id_pressed), callable_mp(this, &FileSystemDock::_file_sort_popup));
p->add_radio_check_item(TTR("Sort by Name (Ascending)"), FILE_SORT_NAME);
p->add_radio_check_item(TTR("Sort by Name (Descending)"), FILE_SORT_NAME_REVERSE);
p->add_radio_check_item(TTR("Sort by Type (Ascending)"), FILE_SORT_TYPE);
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index fc2ea80be9..ed83ae98f3 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -858,7 +858,7 @@ GroupsEditor::GroupsEditor() {
add_child(tree);
menu = memnew(PopupMenu);
- menu->connect("id_pressed", callable_mp(this, &GroupsEditor::_menu_id_pressed));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &GroupsEditor::_menu_id_pressed));
tree->add_child(menu);
ProjectSettingsEditor::get_singleton()->get_group_settings()->connect("group_changed", callable_mp(this, &GroupsEditor::_update_groups_and_tree));
diff --git a/editor/gui/editor_file_dialog.cpp b/editor/gui/editor_file_dialog.cpp
index 8883c0b9af..97c54e8f48 100644
--- a/editor/gui/editor_file_dialog.cpp
+++ b/editor/gui/editor_file_dialog.cpp
@@ -2265,7 +2265,7 @@ EditorFileDialog::EditorFileDialog() {
list_vb->add_child(item_list);
item_menu = memnew(PopupMenu);
- item_menu->connect("id_pressed", callable_mp(this, &EditorFileDialog::_item_menu_id_pressed));
+ item_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorFileDialog::_item_menu_id_pressed));
add_child(item_menu);
// Other stuff.
diff --git a/editor/gui/editor_object_selector.cpp b/editor/gui/editor_object_selector.cpp
index a713aa1ecd..0985753430 100644
--- a/editor/gui/editor_object_selector.cpp
+++ b/editor/gui/editor_object_selector.cpp
@@ -251,7 +251,7 @@ EditorObjectSelector::EditorObjectSelector(EditorSelectionHistory *p_history) {
sub_objects_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
add_child(sub_objects_menu);
sub_objects_menu->connect("about_to_popup", callable_mp(this, &EditorObjectSelector::_about_to_show));
- sub_objects_menu->connect("id_pressed", callable_mp(this, &EditorObjectSelector::_id_pressed));
+ sub_objects_menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorObjectSelector::_id_pressed));
set_tooltip_text(TTR("Open a list of sub-resources."));
}
diff --git a/editor/gui/editor_scene_tabs.cpp b/editor/gui/editor_scene_tabs.cpp
index f1ca59e0ac..791c51fba2 100644
--- a/editor/gui/editor_scene_tabs.cpp
+++ b/editor/gui/editor_scene_tabs.cpp
@@ -409,7 +409,7 @@ EditorSceneTabs::EditorSceneTabs() {
scene_tabs_context_menu = memnew(PopupMenu);
tabbar_container->add_child(scene_tabs_context_menu);
- scene_tabs_context_menu->connect("id_pressed", callable_mp(EditorNode::get_singleton(), &EditorNode::trigger_menu_option).bind(false));
+ scene_tabs_context_menu->connect(SceneStringName(id_pressed), callable_mp(EditorNode::get_singleton(), &EditorNode::trigger_menu_option).bind(false));
scene_tab_add = memnew(Button);
scene_tab_add->set_flat(true);
diff --git a/editor/import/3d/scene_import_settings.cpp b/editor/import/3d/scene_import_settings.cpp
index 4c78c620c1..4d7155abe1 100644
--- a/editor/import/3d/scene_import_settings.cpp
+++ b/editor/import/3d/scene_import_settings.cpp
@@ -1584,7 +1584,7 @@ SceneImportSettingsDialog::SceneImportSettingsDialog() {
action_menu->get_popup()->add_item(TTR("Set Animation Save Paths"), ACTION_CHOOSE_ANIMATION_SAVE_PATHS);
action_menu->get_popup()->add_item(TTR("Set Mesh Save Paths"), ACTION_CHOOSE_MESH_SAVE_PATHS);
- action_menu->get_popup()->connect("id_pressed", callable_mp(this, &SceneImportSettingsDialog::_menu_callback));
+ action_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &SceneImportSettingsDialog::_menu_callback));
tree_split = memnew(HSplitContainer);
main_vb->add_child(tree_split);
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index 5455933809..ad2e16636b 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -666,7 +666,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
general_options_hb->add_child(resource_save_button);
resource_save_button->get_popup()->add_item(TTR("Save"), RESOURCE_SAVE);
resource_save_button->get_popup()->add_item(TTR("Save As..."), RESOURCE_SAVE_AS);
- resource_save_button->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
+ resource_save_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &InspectorDock::_menu_option));
resource_save_button->set_focus_mode(Control::FOCUS_NONE);
resource_save_button->set_disabled(true);
@@ -683,7 +683,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
resource_extra_button->get_popup()->add_shortcut(ED_SHORTCUT("property_editor/show_in_filesystem", TTR("Show in FileSystem")), RESOURCE_SHOW_IN_FILESYSTEM);
resource_extra_button->get_popup()->add_shortcut(ED_SHORTCUT("property_editor/unref_resource", TTR("Make Resource Built-In")), RESOURCE_MAKE_BUILT_IN);
resource_extra_button->get_popup()->set_item_disabled(3, true);
- resource_extra_button->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
+ resource_extra_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &InspectorDock::_menu_option));
general_options_hb->add_spacer();
@@ -708,7 +708,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
history_menu->set_tooltip_text(TTR("History of recently edited objects."));
general_options_hb->add_child(history_menu);
history_menu->connect("about_to_popup", callable_mp(this, &InspectorDock::_prepare_history));
- history_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_select_history));
+ history_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &InspectorDock::_select_history));
HBoxContainer *subresource_hb = memnew(HBoxContainer);
add_child(subresource_hb);
@@ -745,7 +745,7 @@ InspectorDock::InspectorDock(EditorData &p_editor_data) {
property_tools_hb->add_child(object_menu);
object_menu->set_tooltip_text(TTR("Manage object properties."));
object_menu->get_popup()->connect("about_to_popup", callable_mp(this, &InspectorDock::_prepare_menu));
- object_menu->get_popup()->connect("id_pressed", callable_mp(this, &InspectorDock::_menu_option));
+ object_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &InspectorDock::_menu_option));
info = memnew(Button);
add_child(info);
diff --git a/editor/plugins/animation_blend_space_1d_editor.cpp b/editor/plugins/animation_blend_space_1d_editor.cpp
index 95b184b8ab..2eed2b4775 100644
--- a/editor/plugins/animation_blend_space_1d_editor.cpp
+++ b/editor/plugins/animation_blend_space_1d_editor.cpp
@@ -799,7 +799,7 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_add_menu_type));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeBlendSpace1DEditor::_add_menu_type));
animations_menu = memnew(PopupMenu);
animations_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
diff --git a/editor/plugins/animation_blend_space_2d_editor.cpp b/editor/plugins/animation_blend_space_2d_editor.cpp
index 7ee86c77d2..1caec00586 100644
--- a/editor/plugins/animation_blend_space_2d_editor.cpp
+++ b/editor/plugins/animation_blend_space_2d_editor.cpp
@@ -1078,7 +1078,7 @@ AnimationNodeBlendSpace2DEditor::AnimationNodeBlendSpace2DEditor() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &AnimationNodeBlendSpace2DEditor::_add_menu_type));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeBlendSpace2DEditor::_add_menu_type));
animations_menu = memnew(PopupMenu);
animations_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 26a90c3ce8..9f2959e9d9 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -1193,7 +1193,7 @@ AnimationNodeBlendTreeEditor::AnimationNodeBlendTreeEditor() {
graph->get_menu_hbox()->add_child(add_node);
add_node->set_text(TTR("Add Node..."));
graph->get_menu_hbox()->move_child(add_node, 0);
- add_node->get_popup()->connect("id_pressed", callable_mp(this, &AnimationNodeBlendTreeEditor::_add_node));
+ add_node->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeBlendTreeEditor::_add_node));
add_node->get_popup()->connect("popup_hide", callable_mp(this, &AnimationNodeBlendTreeEditor::_popup_hide), CONNECT_DEFERRED);
add_node->connect("about_to_popup", callable_mp(this, &AnimationNodeBlendTreeEditor::_update_options_menu).bind(false));
add_node->set_disabled(read_only);
diff --git a/editor/plugins/animation_library_editor.cpp b/editor/plugins/animation_library_editor.cpp
index 8620c3b883..a2f1fa5614 100644
--- a/editor/plugins/animation_library_editor.cpp
+++ b/editor/plugins/animation_library_editor.cpp
@@ -839,7 +839,7 @@ AnimationLibraryEditor::AnimationLibraryEditor() {
file_popup = memnew(PopupMenu);
add_child(file_popup);
- file_popup->connect("id_pressed", callable_mp(this, &AnimationLibraryEditor::_file_popup_selected));
+ file_popup->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationLibraryEditor::_file_popup_selected));
add_child(vb);
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index 1cf11f2a43..37db074142 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -121,9 +121,9 @@ void AnimationPlayerEditor::_notification(int p_what) {
} break;
case NOTIFICATION_ENTER_TREE: {
- tool_anim->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &AnimationPlayerEditor::_animation_tool_menu));
+ tool_anim->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationPlayerEditor::_animation_tool_menu));
- onion_skinning->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu));
+ onion_skinning->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationPlayerEditor::_onion_skinning_menu));
blend_editor.next->connect(SNAME("item_selected"), callable_mp(this, &AnimationPlayerEditor::_blend_editor_next_changed));
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 449e99d692..8aec827aad 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -606,7 +606,7 @@ bool AnimationNodeStateMachineEditor::_create_submenu(PopupMenu *p_menu, Ref<Ani
PopupMenu *nodes_menu = memnew(PopupMenu);
nodes_menu->set_name(p_name);
- nodes_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
+ nodes_menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
p_menu->add_child(nodes_menu);
bool node_added = false;
@@ -1766,7 +1766,7 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_add_menu_type));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_add_menu_type));
menu->connect("popup_hide", callable_mp(this, &AnimationNodeStateMachineEditor::_stop_connecting));
animations_menu = memnew(PopupMenu);
@@ -1776,17 +1776,17 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
connect_menu = memnew(PopupMenu);
add_child(connect_menu);
- connect_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
+ connect_menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
connect_menu->connect("popup_hide", callable_mp(this, &AnimationNodeStateMachineEditor::_stop_connecting));
state_machine_menu = memnew(PopupMenu);
state_machine_menu->set_name("state_machines");
- state_machine_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
+ state_machine_menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
connect_menu->add_child(state_machine_menu);
end_menu = memnew(PopupMenu);
end_menu->set_name("end_nodes");
- end_menu->connect("id_pressed", callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
+ end_menu->connect(SceneStringName(id_pressed), callable_mp(this, &AnimationNodeStateMachineEditor::_connect_to));
connect_menu->add_child(end_menu);
name_edit_popup = memnew(Popup);
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index 99c7ab63e9..2ce4fa7788 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -1679,7 +1679,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
support->get_popup()->add_check_item(TTRGET(support_text[SUPPORT_TESTING]), SUPPORT_TESTING);
support->get_popup()->set_item_checked(SUPPORT_FEATURED, true);
support->get_popup()->set_item_checked(SUPPORT_COMMUNITY, true);
- support->get_popup()->connect("id_pressed", callable_mp(this, &EditorAssetLibrary::_support_toggled));
+ support->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &EditorAssetLibrary::_support_toggled));
/////////
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index 59be0fa1de..645565bb7e 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -5388,7 +5388,7 @@ CanvasItemEditor::CanvasItemEditor() {
snap_config_menu->set_switch_on_hover(true);
PopupMenu *p = snap_config_menu->get_popup();
- p->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
+ p->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
p->set_hide_on_checkable_item_selection(false);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_rotation_snap", TTR("Use Rotation Snap")), SNAP_USE_ROTATION);
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_scale_snap", TTR("Use Scale Snap")), SNAP_USE_SCALE);
@@ -5396,7 +5396,7 @@ CanvasItemEditor::CanvasItemEditor() {
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/use_pixel_snap", TTR("Use Pixel Snap")), SNAP_USE_PIXEL);
smartsnap_config_popup = memnew(PopupMenu);
- smartsnap_config_popup->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
+ smartsnap_config_popup->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
smartsnap_config_popup->set_hide_on_checkable_item_selection(false);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_parent", TTR("Snap to Parent")), SNAP_USE_NODE_PARENT);
smartsnap_config_popup->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/snap_node_anchors", TTR("Snap to Node Anchor")), SNAP_USE_NODE_ANCHORS);
@@ -5459,7 +5459,7 @@ CanvasItemEditor::CanvasItemEditor() {
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_show_bones", TTR("Show Bones")), SKELETON_SHOW_BONES);
p->add_separator();
p->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_make_bones", TTR("Make Bone2D Node(s) from Node(s)"), KeyModifierMask::CMD_OR_CTRL | KeyModifierMask::SHIFT | Key::B), SKELETON_MAKE_BONES);
- p->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
+ p->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
main_menu_hbox->add_child(memnew(VSeparator));
@@ -5481,14 +5481,14 @@ CanvasItemEditor::CanvasItemEditor() {
view_menu->set_switch_on_hover(true);
view_menu->set_shortcut_context(this);
main_menu_hbox->add_child(view_menu);
- view_menu->get_popup()->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
+ view_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
p = view_menu->get_popup();
p->set_hide_on_checkable_item_selection(false);
grid_menu = memnew(PopupMenu);
grid_menu->connect("about_to_popup", callable_mp(this, &CanvasItemEditor::_prepare_grid_menu));
- grid_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_on_grid_menu_id_pressed));
+ grid_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_on_grid_menu_id_pressed));
grid_menu->add_radio_check_item(TTR("Show"), GRID_VISIBILITY_SHOW);
grid_menu->add_radio_check_item(TTR("Show When Snapping"), GRID_VISIBILITY_SHOW_WHEN_SNAPPING);
grid_menu->add_radio_check_item(TTR("Hide"), GRID_VISIBILITY_HIDE);
@@ -5505,7 +5505,7 @@ CanvasItemEditor::CanvasItemEditor() {
gizmos_menu = memnew(PopupMenu);
gizmos_menu->set_name("GizmosMenu");
- gizmos_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
+ gizmos_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
gizmos_menu->set_hide_on_checkable_item_selection(false);
gizmos_menu->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_position_gizmos", TTR("Position")), SHOW_POSITION_GIZMOS);
gizmos_menu->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/show_lock_gizmos", TTR("Lock")), SHOW_LOCK_GIZMOS);
@@ -5522,7 +5522,7 @@ CanvasItemEditor::CanvasItemEditor() {
p->add_check_shortcut(ED_SHORTCUT("canvas_item_editor/preview_canvas_scale", TTR("Preview Canvas Scale")), PREVIEW_CANVAS_SCALE);
theme_menu = memnew(PopupMenu);
- theme_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_switch_theme_preview));
+ theme_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_switch_theme_preview));
theme_menu->add_radio_check_item(TTR("Project theme"), THEME_PREVIEW_PROJECT);
theme_menu->add_radio_check_item(TTR("Editor theme"), THEME_PREVIEW_EDITOR);
theme_menu->add_radio_check_item(TTR("Default theme"), THEME_PREVIEW_DEFAULT);
@@ -5596,7 +5596,7 @@ CanvasItemEditor::CanvasItemEditor() {
animation_menu->set_shortcut_context(this);
animation_menu->set_tooltip_text(TTR("Animation Key and Pose Options"));
animation_hb->add_child(animation_menu);
- animation_menu->get_popup()->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_popup_callback));
+ animation_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_popup_callback));
animation_menu->set_switch_on_hover(true);
p = animation_menu->get_popup();
@@ -5618,12 +5618,12 @@ CanvasItemEditor::CanvasItemEditor() {
add_child(selection_menu);
selection_menu->set_min_size(Vector2(100, 0));
selection_menu->set_auto_translate_mode(AUTO_TRANSLATE_MODE_DISABLED);
- selection_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_selection_result_pressed));
+ selection_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_selection_result_pressed));
selection_menu->connect("popup_hide", callable_mp(this, &CanvasItemEditor::_selection_menu_hide), CONNECT_DEFERRED);
add_node_menu = memnew(PopupMenu);
add_child(add_node_menu);
- add_node_menu->connect("id_pressed", callable_mp(this, &CanvasItemEditor::_add_node_pressed));
+ add_node_menu->connect(SceneStringName(id_pressed), callable_mp(this, &CanvasItemEditor::_add_node_pressed));
multiply_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/multiply_grid_step", TTR("Multiply grid step by 2"), Key::KP_MULTIPLY);
divide_grid_step_shortcut = ED_SHORTCUT("canvas_item_editor/divide_grid_step", TTR("Divide grid step by 2"), Key::KP_DIVIDE);
diff --git a/editor/plugins/cpu_particles_2d_editor_plugin.cpp b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
index 1d53a1b4d4..1c0d93248d 100644
--- a/editor/plugins/cpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_2d_editor_plugin.cpp
@@ -251,7 +251,7 @@ void CPUParticles2DEditorPlugin::_generate_emission_mask() {
void CPUParticles2DEditorPlugin::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- menu->get_popup()->connect("id_pressed", callable_mp(this, &CPUParticles2DEditorPlugin::_menu_callback));
+ menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CPUParticles2DEditorPlugin::_menu_callback));
menu->set_icon(file->get_editor_theme_icon(SNAME("CPUParticles2D")));
file->connect("file_selected", callable_mp(this, &CPUParticles2DEditorPlugin::_file_selected));
} break;
diff --git a/editor/plugins/cpu_particles_3d_editor_plugin.cpp b/editor/plugins/cpu_particles_3d_editor_plugin.cpp
index baf70e45f0..a833c8c356 100644
--- a/editor/plugins/cpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/cpu_particles_3d_editor_plugin.cpp
@@ -173,7 +173,7 @@ CPUParticles3DEditor::CPUParticles3DEditor() {
options->get_popup()->add_item(TTR("Generate AABB"), MENU_OPTION_GENERATE_AABB);
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
options->get_popup()->add_item(TTR("Convert to GPUParticles3D"), MENU_OPTION_CONVERT_TO_GPU_PARTICLES);
- options->get_popup()->connect("id_pressed", callable_mp(this, &CPUParticles3DEditor::_menu_option));
+ options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CPUParticles3DEditor::_menu_option));
generate_aabb = memnew(ConfirmationDialog);
generate_aabb->set_title(TTR("Generate Visibility AABB"));
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index ee9a2e99d9..eb9442fdee 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -1026,7 +1026,7 @@ CurveEditor::CurveEditor() {
presets_button->set_switch_on_hover(true);
presets_button->set_h_size_flags(SIZE_EXPAND | SIZE_SHRINK_END);
toolbar->add_child(presets_button);
- presets_button->get_popup()->connect("id_pressed", callable_mp(this, &CurveEditor::_on_preset_item_selected));
+ presets_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &CurveEditor::_on_preset_item_selected));
curve_editor_rect = memnew(CurveEdit);
add_child(curve_editor_rect);
diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp
index 53cb76f133..55416ab4eb 100644
--- a/editor/plugins/debugger_editor_plugin.cpp
+++ b/editor/plugins/debugger_editor_plugin.cpp
@@ -99,7 +99,7 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(PopupMenu *p_debug_menu) {
// Multi-instance, start/stop.
debug_menu->add_separator();
debug_menu->add_item(TTR("Customize Run Instances..."), RUN_MULTIPLE_INSTANCES);
- debug_menu->connect("id_pressed", callable_mp(this, &DebuggerEditorPlugin::_menu_option));
+ debug_menu->connect(SceneStringName(id_pressed), callable_mp(this, &DebuggerEditorPlugin::_menu_option));
run_instances_dialog = memnew(RunInstancesDialog);
EditorNode::get_singleton()->get_gui_base()->add_child(run_instances_dialog);
diff --git a/editor/plugins/font_config_plugin.cpp b/editor/plugins/font_config_plugin.cpp
index 1b104f9075..6d1e102808 100644
--- a/editor/plugins/font_config_plugin.cpp
+++ b/editor/plugins/font_config_plugin.cpp
@@ -372,7 +372,7 @@ EditorPropertyFontMetaOverride::EditorPropertyFontMetaOverride(bool p_script) {
}
}
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &EditorPropertyFontMetaOverride::_add_script));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyFontMetaOverride::_add_script));
locale_select = memnew(EditorLocaleDialog);
locale_select->connect("locale_selected", callable_mp(this, &EditorPropertyFontMetaOverride::_add_lang));
@@ -840,12 +840,12 @@ EditorPropertyOTFeatures::EditorPropertyOTFeatures() {
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &EditorPropertyOTFeatures::_add_feature));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyOTFeatures::_add_feature));
for (int i = 0; i < FGRP_MAX; i++) {
menu_sub[i] = memnew(PopupMenu);
menu->add_child(menu_sub[i]);
- menu_sub[i]->connect("id_pressed", callable_mp(this, &EditorPropertyOTFeatures::_add_feature));
+ menu_sub[i]->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyOTFeatures::_add_feature));
}
group_names[FGRP_STYLISTIC_SET] = TTRC("Stylistic Sets");
@@ -1018,7 +1018,7 @@ EditorPropertyFontNamesArray::EditorPropertyFontNamesArray() {
}
}
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &EditorPropertyFontNamesArray::_add_font));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &EditorPropertyFontNamesArray::_add_font));
}
/*************************************************************************/
diff --git a/editor/plugins/gpu_particles_2d_editor_plugin.cpp b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
index 328b272562..ba28305cf0 100644
--- a/editor/plugins/gpu_particles_2d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_2d_editor_plugin.cpp
@@ -352,7 +352,7 @@ void GPUParticles2DEditorPlugin::_generate_emission_mask() {
void GPUParticles2DEditorPlugin::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- menu->get_popup()->connect("id_pressed", callable_mp(this, &GPUParticles2DEditorPlugin::_menu_callback));
+ menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &GPUParticles2DEditorPlugin::_menu_callback));
menu->set_icon(menu->get_editor_theme_icon(SNAME("GPUParticles2D")));
file->connect("file_selected", callable_mp(this, &GPUParticles2DEditorPlugin::_file_selected));
EditorNode::get_singleton()->get_editor_selection()->connect("selection_changed", callable_mp(this, &GPUParticles2DEditorPlugin::_selection_changed));
diff --git a/editor/plugins/gpu_particles_3d_editor_plugin.cpp b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
index 9063109ece..b682ec1de6 100644
--- a/editor/plugins/gpu_particles_3d_editor_plugin.cpp
+++ b/editor/plugins/gpu_particles_3d_editor_plugin.cpp
@@ -420,7 +420,7 @@ GPUParticles3DEditor::GPUParticles3DEditor() {
options->get_popup()->add_item(TTR("Create Emission Points From Node"), MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
options->get_popup()->add_item(TTR("Convert to CPUParticles3D"), MENU_OPTION_CONVERT_TO_CPU_PARTICLES);
- options->get_popup()->connect("id_pressed", callable_mp(this, &GPUParticles3DEditor::_menu_option));
+ options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &GPUParticles3DEditor::_menu_option));
generate_aabb = memnew(ConfirmationDialog);
generate_aabb->set_title(TTR("Generate Visibility AABB"));
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index 4d1b31a8dc..6eae3b975a 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -540,7 +540,7 @@ MeshInstance3DEditor::MeshInstance3DEditor() {
options->get_popup()->add_item(TTR("View UV2"), MENU_OPTION_DEBUG_UV2);
options->get_popup()->add_item(TTR("Unwrap UV2 for Lightmap/AO"), MENU_OPTION_CREATE_UV2);
- options->get_popup()->connect("id_pressed", callable_mp(this, &MeshInstance3DEditor::_menu_option));
+ options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &MeshInstance3DEditor::_menu_option));
outline_dialog = memnew(ConfirmationDialog);
outline_dialog->set_title(TTR("Create Outline Mesh"));
diff --git a/editor/plugins/mesh_library_editor_plugin.cpp b/editor/plugins/mesh_library_editor_plugin.cpp
index 950aced7a1..0b2549986c 100644
--- a/editor/plugins/mesh_library_editor_plugin.cpp
+++ b/editor/plugins/mesh_library_editor_plugin.cpp
@@ -271,7 +271,7 @@ MeshLibraryEditor::MeshLibraryEditor() {
menu->get_popup()->add_item(TTR("Import from Scene (Apply Transforms)"), MENU_OPTION_IMPORT_FROM_SCENE_APPLY_XFORMS);
menu->get_popup()->add_item(TTR("Update from Scene"), MENU_OPTION_UPDATE_FROM_SCENE);
menu->get_popup()->set_item_disabled(menu->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE), true);
- menu->get_popup()->connect("id_pressed", callable_mp(this, &MeshLibraryEditor::_menu_cbk));
+ menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &MeshLibraryEditor::_menu_cbk));
menu->hide();
cd_remove = memnew(ConfirmationDialog);
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index ffe46d5daa..3980f23c8a 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -278,7 +278,7 @@ MultiMeshEditor::MultiMeshEditor() {
options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("MultiMeshInstance3D"), EditorStringName(EditorIcons)));
options->get_popup()->add_item(TTR("Populate Surface"));
- options->get_popup()->connect("id_pressed", callable_mp(this, &MultiMeshEditor::_menu_option));
+ options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &MultiMeshEditor::_menu_option));
populate_dialog = memnew(ConfirmationDialog);
populate_dialog->set_title(TTR("Populate MultiMesh"));
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index 69b66cd7b2..9c7740a1e2 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -5294,8 +5294,8 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_selection"), VIEW_CENTER_TO_SELECTION);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_transform_with_view"), VIEW_ALIGN_TRANSFORM_WITH_VIEW);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_rotation_with_view"), VIEW_ALIGN_ROTATION_WITH_VIEW);
- view_menu->get_popup()->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
- display_submenu->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_menu_option));
+ view_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditorViewport::_menu_option));
+ display_submenu->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditorViewport::_menu_option));
view_menu->set_disable_shortcuts(true);
// TODO: Re-evaluate with new OpenGL3 renderer, and implement.
@@ -5474,7 +5474,7 @@ Node3DEditorViewport::Node3DEditorViewport(Node3DEditor *p_spatial_editor, int p
selection_menu = memnew(PopupMenu);
add_child(selection_menu);
selection_menu->set_min_size(Size2(100, 0) * EDSCALE);
- selection_menu->connect("id_pressed", callable_mp(this, &Node3DEditorViewport::_selection_result_pressed));
+ selection_menu->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditorViewport::_selection_result_pressed));
selection_menu->connect("popup_hide", callable_mp(this, &Node3DEditorViewport::_selection_menu_hide));
if (p_index == 0) {
@@ -8640,7 +8640,7 @@ Node3DEditor::Node3DEditor() {
p->add_separator();
p->add_shortcut(ED_SHORTCUT("spatial_editor/configure_snap", TTR("Configure Snap...")), MENU_TRANSFORM_CONFIGURE_SNAP);
- p->connect("id_pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed));
+ p->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed));
view_menu = memnew(MenuButton);
view_menu->set_flat(false);
@@ -8676,7 +8676,7 @@ Node3DEditor::Node3DEditor() {
gizmos_menu = memnew(PopupMenu);
gizmos_menu->set_hide_on_checkable_item_selection(false);
p->add_submenu_node_item(TTR("Gizmos"), gizmos_menu);
- gizmos_menu->connect("id_pressed", callable_mp(this, &Node3DEditor::_menu_gizmo_toggled));
+ gizmos_menu->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditor::_menu_gizmo_toggled));
p->add_separator();
p->add_check_shortcut(ED_SHORTCUT("spatial_editor/view_origin", TTR("View Origin")), MENU_VIEW_ORIGIN);
@@ -8688,7 +8688,7 @@ Node3DEditor::Node3DEditor() {
p->set_item_checked(p->get_item_index(MENU_VIEW_ORIGIN), true);
p->set_item_checked(p->get_item_index(MENU_VIEW_GRID), true);
- p->connect("id_pressed", callable_mp(this, &Node3DEditor::_menu_item_pressed));
+ p->connect(SceneStringName(id_pressed), callable_mp(this, &Node3DEditor::_menu_item_pressed));
/* REST OF MENU */
diff --git a/editor/plugins/parallax_background_editor_plugin.cpp b/editor/plugins/parallax_background_editor_plugin.cpp
index e14a81778e..6c55fd2753 100644
--- a/editor/plugins/parallax_background_editor_plugin.cpp
+++ b/editor/plugins/parallax_background_editor_plugin.cpp
@@ -118,7 +118,7 @@ void ParallaxBackgroundEditorPlugin::convert_to_parallax2d() {
void ParallaxBackgroundEditorPlugin::_notification(int p_what) {
switch (p_what) {
case NOTIFICATION_ENTER_TREE: {
- menu->get_popup()->connect("id_pressed", callable_mp(this, &ParallaxBackgroundEditorPlugin::_menu_callback));
+ menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ParallaxBackgroundEditorPlugin::_menu_callback));
menu->set_icon(menu->get_editor_theme_icon(SNAME("ParallaxBackground")));
} break;
}
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index f404dca88b..a5717c3bb3 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -672,7 +672,7 @@ Path2DEditor::Path2DEditor() {
menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle);
menu->add_check_item(TTR("Mirror Handle Lengths"));
menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length);
- menu->connect("id_pressed", callable_mp(this, &Path2DEditor::_handle_option_pressed));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &Path2DEditor::_handle_option_pressed));
}
void Path2DEditorPlugin::edit(Object *p_object) {
diff --git a/editor/plugins/path_3d_editor_plugin.cpp b/editor/plugins/path_3d_editor_plugin.cpp
index 3f5ade8a03..447e82f70d 100644
--- a/editor/plugins/path_3d_editor_plugin.cpp
+++ b/editor/plugins/path_3d_editor_plugin.cpp
@@ -896,7 +896,7 @@ Path3DEditorPlugin::Path3DEditorPlugin() {
menu->set_item_checked(HANDLE_OPTION_ANGLE, mirror_handle_angle);
menu->add_check_item(TTR("Mirror Handle Lengths"));
menu->set_item_checked(HANDLE_OPTION_LENGTH, mirror_handle_length);
- menu->connect("id_pressed", callable_mp(this, &Path3DEditorPlugin::_handle_option_pressed));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &Path3DEditorPlugin::_handle_option_pressed));
curve_edit->set_pressed(true);
}
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 8bffbeaf15..c0529ca3bc 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -1434,7 +1434,7 @@ Polygon2DEditor::Polygon2DEditor() {
uv_menu->get_popup()->add_item(TTR("Clear UV"), UVEDIT_UV_CLEAR);
uv_menu->get_popup()->add_separator();
uv_menu->get_popup()->add_item(TTR("Grid Settings"), UVEDIT_GRID_SETTINGS);
- uv_menu->get_popup()->connect("id_pressed", callable_mp(this, &Polygon2DEditor::_menu_option));
+ uv_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &Polygon2DEditor::_menu_option));
uv_mode_hb->add_child(memnew(VSeparator));
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 4812c623c9..de9b6ae15f 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -4038,7 +4038,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option));
+ context_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option));
overview_vbox = memnew(VBoxContainer);
overview_vbox->set_custom_minimum_size(Size2(0, 90));
@@ -4122,7 +4122,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
recent_scripts = memnew(PopupMenu);
file_menu->get_popup()->add_submenu_node_item(TTR("Open Recent"), recent_scripts, FILE_OPEN_RECENT);
- recent_scripts->connect("id_pressed", callable_mp(this, &ScriptEditor::_open_recent_script));
+ recent_scripts->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_open_recent_script));
_update_recent_scripts();
@@ -4148,7 +4148,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/import_theme", TTR("Import Theme...")), THEME_IMPORT);
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/reload_theme", TTR("Reload Theme")), THEME_RELOAD);
file_menu->get_popup()->add_submenu_node_item(TTR("Theme"), theme_submenu, FILE_THEME);
- theme_submenu->connect("id_pressed", callable_mp(this, &ScriptEditor::_theme_option));
+ theme_submenu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_theme_option));
theme_submenu->add_separator();
theme_submenu->add_shortcut(ED_SHORTCUT("script_editor/save_theme", TTR("Save Theme")), THEME_SAVE);
@@ -4165,7 +4165,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
file_menu->get_popup()->add_separator();
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/toggle_scripts_panel", TTR("Toggle Scripts Panel"), KeyModifierMask::CMD_OR_CTRL | Key::BACKSLASH), TOGGLE_SCRIPTS_PANEL);
- file_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option));
+ file_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option));
file_menu->get_popup()->connect("about_to_popup", callable_mp(this, &ScriptEditor::_prepare_file_menu));
file_menu->get_popup()->connect("popup_hide", callable_mp(this, &ScriptEditor::_file_menu_closed));
@@ -4173,7 +4173,7 @@ ScriptEditor::ScriptEditor(WindowWrapper *p_wrapper) {
script_search_menu->set_text(TTR("Search"));
script_search_menu->set_switch_on_hover(true);
script_search_menu->set_shortcut_context(this);
- script_search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptEditor::_menu_option));
+ script_search_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptEditor::_menu_option));
menu_hb->add_child(script_search_menu);
MenuButton *debug_menu_btn = memnew(MenuButton);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index b11ad8b7d5..059e177874 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -2254,7 +2254,7 @@ void ScriptTextEditor::_enable_code_editor() {
errors_panel->connect("meta_clicked", callable_mp(this, &ScriptTextEditor::_error_clicked));
add_child(context_menu);
- context_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ context_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
add_child(color_panel);
@@ -2297,7 +2297,7 @@ void ScriptTextEditor::_enable_code_editor() {
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unindent"), EDIT_UNINDENT);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/delete_line"), EDIT_DELETE_LINE);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
- sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ sub_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_submenu_node_item(TTR("Line"), sub_menu);
}
{
@@ -2306,7 +2306,7 @@ void ScriptTextEditor::_enable_code_editor() {
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/fold_all_lines"), EDIT_FOLD_ALL_LINES);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/unfold_all_lines"), EDIT_UNFOLD_ALL_LINES);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/create_code_region"), EDIT_CREATE_CODE_REGION);
- sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ sub_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_submenu_node_item(TTR("Folding"), sub_menu);
}
edit_menu->get_popup()->add_separator();
@@ -2318,21 +2318,21 @@ void ScriptTextEditor::_enable_code_editor() {
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_spaces"), EDIT_CONVERT_INDENT_TO_SPACES);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_indent_to_tabs"), EDIT_CONVERT_INDENT_TO_TABS);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT);
- sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ sub_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_submenu_node_item(TTR("Indentation"), sub_menu);
}
- edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ edit_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_separator();
{
PopupMenu *sub_menu = memnew(PopupMenu);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_uppercase"), EDIT_TO_UPPERCASE);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_lowercase"), EDIT_TO_LOWERCASE);
sub_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/capitalize"), EDIT_CAPITALIZE);
- sub_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ sub_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
edit_menu->get_popup()->add_submenu_node_item(TTR("Convert Case"), sub_menu);
}
edit_menu->get_popup()->add_submenu_node_item(TTR("Syntax Highlighter"), highlighter_menu);
- highlighter_menu->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_change_syntax_highlighter));
+ highlighter_menu->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_change_syntax_highlighter));
edit_hb->add_child(search_menu);
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
@@ -2344,7 +2344,7 @@ void ScriptTextEditor::_enable_code_editor() {
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace_in_files"), REPLACE_IN_FILES);
search_menu->get_popup()->add_separator();
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL);
- search_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ search_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
_load_theme_settings();
@@ -2363,7 +2363,7 @@ void ScriptTextEditor::_enable_code_editor() {
breakpoints_menu->connect("about_to_popup", callable_mp(this, &ScriptTextEditor::_update_breakpoint_list));
breakpoints_menu->connect("index_pressed", callable_mp(this, &ScriptTextEditor::_breakpoint_item_pressed));
- goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &ScriptTextEditor::_edit_option));
+ goto_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ScriptTextEditor::_edit_option));
}
ScriptTextEditor::ScriptTextEditor() {
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index a83f95f680..4c848a463c 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -699,7 +699,7 @@ ShaderEditorPlugin::ShaderEditorPlugin() {
file_menu->get_popup()->add_item(TTR("Open File in Inspector"), FILE_INSPECT);
file_menu->get_popup()->add_separator();
file_menu->get_popup()->add_item(TTR("Close File"), FILE_CLOSE);
- file_menu->get_popup()->connect("id_pressed", callable_mp(this, &ShaderEditorPlugin::_menu_item_pressed));
+ file_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &ShaderEditorPlugin::_menu_item_pressed));
menu_hb->add_child(file_menu);
for (int i = FILE_SAVE; i < FILE_MAX; i++) {
diff --git a/editor/plugins/skeleton_2d_editor_plugin.cpp b/editor/plugins/skeleton_2d_editor_plugin.cpp
index 44543ffa9f..8308fe6d6e 100644
--- a/editor/plugins/skeleton_2d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_2d_editor_plugin.cpp
@@ -107,7 +107,7 @@ Skeleton2DEditor::Skeleton2DEditor() {
options->get_popup()->add_item(TTR("Overwrite Rest Pose"), MENU_OPTION_MAKE_REST);
options->set_switch_on_hover(true);
- options->get_popup()->connect("id_pressed", callable_mp(this, &Skeleton2DEditor::_menu_option));
+ options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &Skeleton2DEditor::_menu_option));
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
diff --git a/editor/plugins/skeleton_3d_editor_plugin.cpp b/editor/plugins/skeleton_3d_editor_plugin.cpp
index e792f0998b..202817f6ee 100644
--- a/editor/plugins/skeleton_3d_editor_plugin.cpp
+++ b/editor/plugins/skeleton_3d_editor_plugin.cpp
@@ -735,7 +735,7 @@ void Skeleton3DEditor::create_editors() {
p->add_item(TTR("Create Physical Skeleton"), SKELETON_OPTION_CREATE_PHYSICAL_SKELETON);
p->add_item(TTR("Export Skeleton Profile"), SKELETON_OPTION_EXPORT_SKELETON_PROFILE);
- p->connect("id_pressed", callable_mp(this, &Skeleton3DEditor::_on_click_skeleton_option));
+ p->connect(SceneStringName(id_pressed), callable_mp(this, &Skeleton3DEditor::_on_click_skeleton_option));
set_bone_options_enabled(false);
Vector<Variant> button_binds;
diff --git a/editor/plugins/sprite_2d_editor_plugin.cpp b/editor/plugins/sprite_2d_editor_plugin.cpp
index 0b882e265d..c7a89484f0 100644
--- a/editor/plugins/sprite_2d_editor_plugin.cpp
+++ b/editor/plugins/sprite_2d_editor_plugin.cpp
@@ -587,7 +587,7 @@ Sprite2DEditor::Sprite2DEditor() {
options->get_popup()->add_item(TTR("Create LightOccluder2D Sibling"), MENU_OPTION_CREATE_LIGHT_OCCLUDER_2D);
options->set_switch_on_hover(true);
- options->get_popup()->connect("id_pressed", callable_mp(this, &Sprite2DEditor::_menu_option));
+ options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &Sprite2DEditor::_menu_option));
err_dialog = memnew(AcceptDialog);
add_child(err_dialog);
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index c4c3f3b4e3..ecdc4acf47 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -614,7 +614,7 @@ TextEditor::TextEditor() {
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
+ context_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_edit_option));
edit_hb = memnew(HBoxContainer);
@@ -624,7 +624,7 @@ TextEditor::TextEditor() {
edit_menu->set_text(TTR("Edit"));
edit_menu->set_switch_on_hover(true);
edit_menu->connect("about_to_popup", callable_mp(this, &TextEditor::_prepare_edit_menu));
- edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
+ edit_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_edit_option));
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_undo"), EDIT_UNDO);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_redo"), EDIT_REDO);
@@ -658,11 +658,11 @@ TextEditor::TextEditor() {
convert_case->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_uppercase"), EDIT_TO_UPPERCASE);
convert_case->add_shortcut(ED_GET_SHORTCUT("script_text_editor/convert_to_lowercase"), EDIT_TO_LOWERCASE);
convert_case->add_shortcut(ED_GET_SHORTCUT("script_text_editor/capitalize"), EDIT_CAPITALIZE);
- convert_case->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
+ convert_case->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_edit_option));
highlighter_menu = memnew(PopupMenu);
edit_menu->get_popup()->add_submenu_node_item(TTR("Syntax Highlighter"), highlighter_menu);
- highlighter_menu->connect("id_pressed", callable_mp(this, &TextEditor::_change_syntax_highlighter));
+ highlighter_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_change_syntax_highlighter));
Ref<EditorPlainTextSyntaxHighlighter> plain_highlighter;
plain_highlighter.instantiate();
@@ -678,7 +678,7 @@ TextEditor::TextEditor() {
edit_hb->add_child(search_menu);
search_menu->set_text(TTR("Search"));
search_menu->set_switch_on_hover(true);
- search_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
+ search_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_edit_option));
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find"), SEARCH_FIND);
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
@@ -693,7 +693,7 @@ TextEditor::TextEditor() {
edit_hb->add_child(goto_menu);
goto_menu->set_text(TTR("Go To"));
goto_menu->set_switch_on_hover(true);
- goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextEditor::_edit_option));
+ goto_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextEditor::_edit_option));
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
goto_menu->get_popup()->add_separator();
diff --git a/editor/plugins/text_shader_editor.cpp b/editor/plugins/text_shader_editor.cpp
index fb8bed381e..fb7515f98e 100644
--- a/editor/plugins/text_shader_editor.cpp
+++ b/editor/plugins/text_shader_editor.cpp
@@ -1138,7 +1138,7 @@ TextShaderEditor::TextShaderEditor() {
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
+ context_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
VBoxContainer *main_container = memnew(VBoxContainer);
HBoxContainer *hbc = memnew(HBoxContainer);
@@ -1169,7 +1169,7 @@ TextShaderEditor::TextShaderEditor() {
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_word_wrap"), EDIT_TOGGLE_WORD_WRAP);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("ui_text_completion_query"), EDIT_COMPLETE);
- edit_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
+ edit_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
search_menu = memnew(MenuButton);
search_menu->set_shortcut_context(this);
@@ -1180,13 +1180,13 @@ TextShaderEditor::TextShaderEditor() {
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_next"), SEARCH_FIND_NEXT);
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/find_previous"), SEARCH_FIND_PREV);
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/replace"), SEARCH_REPLACE);
- search_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
+ search_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
MenuButton *goto_menu = memnew(MenuButton);
goto_menu->set_shortcut_context(this);
goto_menu->set_text(TTR("Go To"));
goto_menu->set_switch_on_hover(true);
- goto_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
+ goto_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
goto_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/goto_line"), SEARCH_GOTO_LINE);
goto_menu->get_popup()->add_separator();
@@ -1201,7 +1201,7 @@ TextShaderEditor::TextShaderEditor() {
help_menu->set_text(TTR("Help"));
help_menu->set_switch_on_hover(true);
help_menu->get_popup()->add_item(TTR("Online Docs"), HELP_DOCS);
- help_menu->get_popup()->connect("id_pressed", callable_mp(this, &TextShaderEditor::_menu_option));
+ help_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TextShaderEditor::_menu_option));
add_child(main_container);
main_container->add_child(hbc);
diff --git a/editor/plugins/tiles/tile_data_editors.cpp b/editor/plugins/tiles/tile_data_editors.cpp
index a94080e253..df90383678 100644
--- a/editor/plugins/tiles/tile_data_editors.cpp
+++ b/editor/plugins/tiles/tile_data_editors.cpp
@@ -903,7 +903,7 @@ GenericTilePolygonEditor::GenericTilePolygonEditor() {
button_advanced_menu->get_popup()->add_item(TTR("Rotate Left"), ROTATE_LEFT, Key::E);
button_advanced_menu->get_popup()->add_item(TTR("Flip Horizontally"), FLIP_HORIZONTALLY, Key::H);
button_advanced_menu->get_popup()->add_item(TTR("Flip Vertically"), FLIP_VERTICALLY, Key::V);
- button_advanced_menu->get_popup()->connect("id_pressed", callable_mp(this, &GenericTilePolygonEditor::_advanced_menu_item_pressed));
+ button_advanced_menu->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &GenericTilePolygonEditor::_advanced_menu_item_pressed));
button_advanced_menu->set_focus_mode(FOCUS_ALL);
toolbar->add_child(button_advanced_menu);
diff --git a/editor/plugins/tiles/tile_map_layer_editor.cpp b/editor/plugins/tiles/tile_map_layer_editor.cpp
index 5fd4fb3602..6cf0bec535 100644
--- a/editor/plugins/tiles/tile_map_layer_editor.cpp
+++ b/editor/plugins/tiles/tile_map_layer_editor.cpp
@@ -2389,7 +2389,7 @@ TileMapLayerEditorTilesPlugin::TileMapLayerEditorTilesPlugin() {
source_sort_button->set_tooltip_text(TTR("Sort sources"));
PopupMenu *p = source_sort_button->get_popup();
- p->connect("id_pressed", callable_mp(this, &TileMapLayerEditorTilesPlugin::_set_source_sort));
+ p->connect(SceneStringName(id_pressed), callable_mp(this, &TileMapLayerEditorTilesPlugin::_set_source_sort));
p->add_radio_check_item(TTR("Sort by ID (Ascending)"), TilesEditorUtils::SOURCE_SORT_ID);
p->add_radio_check_item(TTR("Sort by ID (Descending)"), TilesEditorUtils::SOURCE_SORT_ID_REVERSE);
p->add_radio_check_item(TTR("Sort by Name (Ascending)"), TilesEditorUtils::SOURCE_SORT_NAME);
@@ -4491,7 +4491,7 @@ TileMapLayerEditor::TileMapLayerEditor() {
advanced_menu_button->set_theme_type_variation("FlatButton");
advanced_menu_button->get_popup()->add_item(TTR("Automatically Replace Tiles with Proxies"), ADVANCED_MENU_REPLACE_WITH_PROXIES);
advanced_menu_button->get_popup()->add_item(TTR("Extract TileMap layers as individual TileMapLayer nodes"), ADVANCED_MENU_EXTRACT_TILE_MAP_LAYERS);
- advanced_menu_button->get_popup()->connect("id_pressed", callable_mp(this, &TileMapLayerEditor::_advanced_menu_button_id_pressed));
+ advanced_menu_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TileMapLayerEditor::_advanced_menu_button_id_pressed));
tile_map_toolbar->add_child(advanced_menu_button);
// A label for editing errors.
diff --git a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
index 9add6ef586..35e64899fb 100644
--- a/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
+++ b/editor/plugins/tiles/tile_proxies_manager_dialog.cpp
@@ -378,7 +378,7 @@ TileProxiesManagerDialog::TileProxiesManagerDialog() {
popup_menu = memnew(PopupMenu);
popup_menu->add_shortcut(ED_GET_SHORTCUT("ui_text_delete"));
- popup_menu->connect("id_pressed", callable_mp(this, &TileProxiesManagerDialog::_menu_id_pressed));
+ popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TileProxiesManagerDialog::_menu_id_pressed));
add_child(popup_menu);
// Add proxy panel.
diff --git a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
index 03070bc6b5..9cab4c5103 100644
--- a/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
+++ b/editor/plugins/tiles/tile_set_atlas_source_editor.cpp
@@ -2637,7 +2637,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
tool_advanced_menu_button->get_popup()->add_item(TTR("Create Tiles in Non-Transparent Texture Regions"), ADVANCED_AUTO_CREATE_TILES);
tool_advanced_menu_button->get_popup()->add_item(TTR("Remove Tiles in Fully Transparent Texture Regions"), ADVANCED_AUTO_REMOVE_TILES);
tool_advanced_menu_button->get_popup()->add_item(TTR("Remove Tiles Outside the Texture"), ADVANCED_CLEANUP_TILES);
- tool_advanced_menu_button->get_popup()->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
+ tool_advanced_menu_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
tool_settings->add_child(tool_advanced_menu_button);
outside_tiles_warning = memnew(TextureRect);
@@ -2689,12 +2689,12 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
base_tile_popup_menu = memnew(PopupMenu);
base_tile_popup_menu->add_shortcut(ED_GET_SHORTCUT("tiles_editor/delete"), TILE_DELETE);
base_tile_popup_menu->add_item(TTR("Create an Alternative Tile"), TILE_CREATE_ALTERNATIVE);
- base_tile_popup_menu->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
+ base_tile_popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
tile_atlas_view->add_child(base_tile_popup_menu);
empty_base_tile_popup_menu = memnew(PopupMenu);
empty_base_tile_popup_menu->add_item(TTR("Create a Tile"), TILE_CREATE);
- empty_base_tile_popup_menu->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
+ empty_base_tile_popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
tile_atlas_view->add_child(empty_base_tile_popup_menu);
tile_atlas_control = memnew(TileAtlasControl(this));
@@ -2710,7 +2710,7 @@ TileSetAtlasSourceEditor::TileSetAtlasSourceEditor() {
alternative_tile_popup_menu = memnew(PopupMenu);
alternative_tile_popup_menu->add_shortcut(ED_SHORTCUT("tiles_editor/delete_tile", TTR("Delete"), Key::KEY_DELETE), TILE_DELETE);
- alternative_tile_popup_menu->connect("id_pressed", callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
+ alternative_tile_popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetAtlasSourceEditor::_menu_option));
tile_atlas_view->add_child(alternative_tile_popup_menu);
alternative_tiles_control = memnew(Control);
diff --git a/editor/plugins/tiles/tile_set_editor.cpp b/editor/plugins/tiles/tile_set_editor.cpp
index 0efed44ac7..aca6669f11 100644
--- a/editor/plugins/tiles/tile_set_editor.cpp
+++ b/editor/plugins/tiles/tile_set_editor.cpp
@@ -849,7 +849,7 @@ TileSetEditor::TileSetEditor() {
source_sort_button->set_tooltip_text(TTR("Sort Sources"));
PopupMenu *p = source_sort_button->get_popup();
- p->connect("id_pressed", callable_mp(this, &TileSetEditor::_set_source_sort));
+ p->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetEditor::_set_source_sort));
p->add_radio_check_item(TTR("Sort by ID (Ascending)"), TilesEditorUtils::SOURCE_SORT_ID);
p->add_radio_check_item(TTR("Sort by ID (Descending)"), TilesEditorUtils::SOURCE_SORT_ID_REVERSE);
p->add_radio_check_item(TTR("Sort by Name (Ascending)"), TilesEditorUtils::SOURCE_SORT_NAME);
@@ -887,7 +887,7 @@ TileSetEditor::TileSetEditor() {
sources_add_button->get_popup()->set_item_tooltip(-1, TTR("A palette of tiles made from a texture."));
sources_add_button->get_popup()->add_item(TTR("Scenes Collection"));
sources_add_button->get_popup()->set_item_tooltip(-1, TTR("A collection of scenes that can be instantiated and placed as tiles."));
- sources_add_button->get_popup()->connect("id_pressed", callable_mp(this, &TileSetEditor::_source_add_id_pressed));
+ sources_add_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetEditor::_source_add_id_pressed));
sources_bottom_actions->add_child(sources_add_button);
sources_advanced_menu_button = memnew(MenuButton);
@@ -895,7 +895,7 @@ TileSetEditor::TileSetEditor() {
sources_advanced_menu_button->set_theme_type_variation("FlatButton");
sources_advanced_menu_button->get_popup()->add_item(TTR("Open Atlas Merging Tool"));
sources_advanced_menu_button->get_popup()->add_item(TTR("Manage Tile Proxies"));
- sources_advanced_menu_button->get_popup()->connect("id_pressed", callable_mp(this, &TileSetEditor::_sources_advanced_menu_id_pressed));
+ sources_advanced_menu_button->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &TileSetEditor::_sources_advanced_menu_id_pressed));
sources_bottom_actions->add_child(sources_advanced_menu_button);
sources_bottom_actions->add_child(source_sort_button);
diff --git a/editor/plugins/version_control_editor_plugin.cpp b/editor/plugins/version_control_editor_plugin.cpp
index beed89ea10..1e88916672 100644
--- a/editor/plugins/version_control_editor_plugin.cpp
+++ b/editor/plugins/version_control_editor_plugin.cpp
@@ -1432,7 +1432,7 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
extra_options = memnew(MenuButton);
extra_options->set_icon(EditorNode::get_singleton()->get_editor_theme()->get_icon(SNAME("GuiTabMenuHl"), EditorStringName(EditorIcons)));
extra_options->get_popup()->connect(SNAME("about_to_popup"), callable_mp(this, &VersionControlEditorPlugin::_update_extra_options));
- extra_options->get_popup()->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_extra_option_selected));
+ extra_options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &VersionControlEditorPlugin::_extra_option_selected));
menu_bar->add_child(extra_options);
extra_options->get_popup()->add_item(TTR("Force Push"), EXTRA_OPTION_FORCE_PUSH);
@@ -1440,14 +1440,14 @@ VersionControlEditorPlugin::VersionControlEditorPlugin() {
extra_options->get_popup()->add_item(TTR("Create New Branch"), EXTRA_OPTION_CREATE_BRANCH);
extra_options_remove_branch_list = memnew(PopupMenu);
- extra_options_remove_branch_list->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_popup_branch_remove_confirm));
+ extra_options_remove_branch_list->connect(SceneStringName(id_pressed), callable_mp(this, &VersionControlEditorPlugin::_popup_branch_remove_confirm));
extra_options->get_popup()->add_submenu_node_item(TTR("Remove Branch"), extra_options_remove_branch_list);
extra_options->get_popup()->add_separator();
extra_options->get_popup()->add_item(TTR("Create New Remote"), EXTRA_OPTION_CREATE_REMOTE);
extra_options_remove_remote_list = memnew(PopupMenu);
- extra_options_remove_remote_list->connect(SNAME("id_pressed"), callable_mp(this, &VersionControlEditorPlugin::_popup_remote_remove_confirm));
+ extra_options_remove_remote_list->connect(SceneStringName(id_pressed), callable_mp(this, &VersionControlEditorPlugin::_popup_remote_remove_confirm));
extra_options->get_popup()->add_submenu_node_item(TTR("Remove Remote"), extra_options_remove_remote_list);
change_type_to_strings[EditorVCSInterface::CHANGE_TYPE_NEW] = TTR("New");
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 438d798120..b50b992ffd 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -6195,7 +6195,7 @@ VisualShaderEditor::VisualShaderEditor() {
PopupMenu *varying_menu = varying_button->get_popup();
varying_menu->add_item(TTR("Add Varying"), int(VaryingMenuOptions::ADD));
varying_menu->add_item(TTR("Remove Varying"), int(VaryingMenuOptions::REMOVE));
- varying_menu->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_varying_menu_id_pressed));
+ varying_menu->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_varying_menu_id_pressed));
preview_shader = memnew(Button);
preview_shader->set_theme_type_variation("FlatButton");
@@ -6251,14 +6251,14 @@ VisualShaderEditor::VisualShaderEditor() {
popup_menu->add_item(TTR("Delete"), NodeMenuOptions::DELETE);
popup_menu->add_item(TTR("Duplicate"), NodeMenuOptions::DUPLICATE);
popup_menu->add_item(TTR("Clear Copy Buffer"), NodeMenuOptions::CLEAR_COPY_BUFFER);
- popup_menu->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_node_menu_id_pressed));
+ popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_node_menu_id_pressed));
connection_popup_menu = memnew(PopupMenu);
add_child(connection_popup_menu);
connection_popup_menu->add_item(TTR("Disconnect"), ConnectionMenuOptions::DISCONNECT);
connection_popup_menu->add_item(TTR("Insert New Node"), ConnectionMenuOptions::INSERT_NEW_NODE);
connection_popup_menu->add_item(TTR("Insert New Reroute"), ConnectionMenuOptions::INSERT_NEW_REROUTE);
- connection_popup_menu->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_connection_menu_id_pressed));
+ connection_popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_connection_menu_id_pressed));
///////////////////////////////////////
// SHADER NODES TREE
@@ -6280,7 +6280,7 @@ VisualShaderEditor::VisualShaderEditor() {
tools = memnew(MenuButton);
filter_hb->add_child(tools);
tools->set_tooltip_text(TTR("Options"));
- tools->get_popup()->connect("id_pressed", callable_mp(this, &VisualShaderEditor::_tools_menu_option));
+ tools->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &VisualShaderEditor::_tools_menu_option));
tools->get_popup()->add_item(TTR("Expand All"), EXPAND_ALL);
tools->get_popup()->add_item(TTR("Collapse All"), COLLAPSE_ALL);
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index 9209c26876..23588e0e6c 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -4397,12 +4397,12 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
filter->add_theme_constant_override("minimum_character_width", 0);
filter->connect("text_changed", callable_mp(this, &SceneTreeDock::_filter_changed));
filter->connect(SceneStringName(gui_input), callable_mp(this, &SceneTreeDock::_filter_gui_input));
- filter->get_menu()->connect("id_pressed", callable_mp(this, &SceneTreeDock::_filter_option_selected));
+ filter->get_menu()->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_filter_option_selected));
_append_filter_options_to(filter->get_menu());
filter_quick_menu = memnew(PopupMenu);
filter_quick_menu->set_theme_type_variation("FlatMenuButton");
- filter_quick_menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_filter_option_selected));
+ filter_quick_menu->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_filter_option_selected));
filter->add_child(filter_quick_menu);
button_create_script = memnew(Button);
@@ -4429,7 +4429,7 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
filter_hbc->add_child(button_tree_menu);
PopupMenu *tree_menu = button_tree_menu->get_popup();
- tree_menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
+ tree_menu->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
button_hb = memnew(HBoxContainer);
vbc->add_child(button_hb);
@@ -4549,15 +4549,15 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
menu_subresources = memnew(PopupMenu);
- menu_subresources->connect("id_pressed", callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
+ menu_subresources->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_tool_selected).bind(false));
menu->add_child(menu_subresources);
menu_properties = memnew(PopupMenu);
add_child(menu_properties);
- menu_properties->connect("id_pressed", callable_mp(this, &SceneTreeDock::_property_selected));
+ menu_properties->connect(SceneStringName(id_pressed), callable_mp(this, &SceneTreeDock::_property_selected));
clear_inherit_confirm = memnew(ConfirmationDialog);
clear_inherit_confirm->set_text(TTR("Clear Inheritance? (No Undo!)"));
diff --git a/modules/gridmap/editor/grid_map_editor_plugin.cpp b/modules/gridmap/editor/grid_map_editor_plugin.cpp
index 27c74421db..226cb48eb8 100644
--- a/modules/gridmap/editor/grid_map_editor_plugin.cpp
+++ b/modules/gridmap/editor/grid_map_editor_plugin.cpp
@@ -1275,7 +1275,7 @@ GridMapEditor::GridMapEditor() {
settings_pick_distance->set_value(EDITOR_GET("editors/grid_map/pick_distance"));
settings_vbc->add_margin_child(TTR("Pick Distance:"), settings_pick_distance);
- options->get_popup()->connect("id_pressed", callable_mp(this, &GridMapEditor::_menu_option));
+ options->get_popup()->connect(SceneStringName(id_pressed), callable_mp(this, &GridMapEditor::_menu_option));
HBoxContainer *hb = memnew(HBoxContainer);
add_child(hb);
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 245a086dda..622ab79155 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -1863,7 +1863,7 @@ ColorPicker::ColorPicker() {
shape_popup->add_radio_check_item("VHS Circle", SHAPE_VHS_CIRCLE);
shape_popup->add_radio_check_item("OKHSL Circle", SHAPE_OKHSL_CIRCLE);
shape_popup->set_item_checked(current_shape, true);
- shape_popup->connect("id_pressed", callable_mp(this, &ColorPicker::set_picker_shape));
+ shape_popup->connect(SceneStringName(id_pressed), callable_mp(this, &ColorPicker::set_picker_shape));
add_mode(new ColorModeRGB(this));
add_mode(new ColorModeHSV(this));
@@ -1904,7 +1904,7 @@ ColorPicker::ColorPicker() {
mode_popup->add_check_item("Colorized Sliders", MODE_MAX);
mode_popup->set_item_checked(current_mode, true);
mode_popup->set_item_checked(MODE_MAX + 1, true);
- mode_popup->connect("id_pressed", callable_mp(this, &ColorPicker::_set_mode_popup_value));
+ mode_popup->connect(SceneStringName(id_pressed), callable_mp(this, &ColorPicker::_set_mode_popup_value));
VBoxContainer *vbl = memnew(VBoxContainer);
real_vbox->add_child(vbl);
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 729e219825..aa41e46f82 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -2469,9 +2469,9 @@ void LineEdit::_generate_context_menu() {
menu->add_check_item(ETR("Display Control Characters"), MENU_DISPLAY_UCC);
menu->add_submenu_node_item(ETR("Insert Control Character"), menu_ctl, MENU_SUBMENU_INSERT_UCC);
- menu->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
- menu_dir->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
- menu_ctl->connect("id_pressed", callable_mp(this, &LineEdit::menu_option));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &LineEdit::menu_option));
+ menu_dir->connect(SceneStringName(id_pressed), callable_mp(this, &LineEdit::menu_option));
+ menu_ctl->connect(SceneStringName(id_pressed), callable_mp(this, &LineEdit::menu_option));
menu->connect(SceneStringName(focus_entered), callable_mp(this, &LineEdit::_validate_caret_can_draw));
menu->connect(SceneStringName(focus_exited), callable_mp(this, &LineEdit::_validate_caret_can_draw));
diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp
index bdd0102b63..207cf3df89 100644
--- a/scene/gui/popup_menu.cpp
+++ b/scene/gui/popup_menu.cpp
@@ -2422,7 +2422,7 @@ void PopupMenu::activate_item(int p_idx) {
hide();
}
- emit_signal(SNAME("id_pressed"), id);
+ emit_signal(SceneStringName(id_pressed), id);
emit_signal(SNAME("index_pressed"), p_idx);
}
diff --git a/scene/gui/rich_text_label.cpp b/scene/gui/rich_text_label.cpp
index 49db379853..048892a4a5 100644
--- a/scene/gui/rich_text_label.cpp
+++ b/scene/gui/rich_text_label.cpp
@@ -6309,7 +6309,7 @@ Size2 RichTextLabel::get_minimum_size() const {
void RichTextLabel::_generate_context_menu() {
menu = memnew(PopupMenu);
add_child(menu, false, INTERNAL_MODE_FRONT);
- menu->connect("id_pressed", callable_mp(this, &RichTextLabel::menu_option));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &RichTextLabel::menu_option));
menu->add_item(ETR("Copy"), MENU_COPY);
menu->add_item(ETR("Select All"), MENU_SELECT_ALL);
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index fba3d46cd0..a9dc4c765c 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -7182,9 +7182,9 @@ void TextEdit::_generate_context_menu() {
menu->add_check_item(ETR("Display Control Characters"), MENU_DISPLAY_UCC);
menu->add_submenu_node_item(ETR("Insert Control Character"), menu_ctl, MENU_SUBMENU_INSERT_UCC);
- menu->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
- menu_dir->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
- menu_ctl->connect("id_pressed", callable_mp(this, &TextEdit::menu_option));
+ menu->connect(SceneStringName(id_pressed), callable_mp(this, &TextEdit::menu_option));
+ menu_dir->connect(SceneStringName(id_pressed), callable_mp(this, &TextEdit::menu_option));
+ menu_ctl->connect(SceneStringName(id_pressed), callable_mp(this, &TextEdit::menu_option));
}
void TextEdit::_update_context_menu() {
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index fc5b942918..56be6b90a2 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -5821,7 +5821,7 @@ Tree::Tree() {
line_editor->connect("text_submitted", callable_mp(this, &Tree::_line_editor_submit));
text_editor->connect(SceneStringName(gui_input), callable_mp(this, &Tree::_text_editor_gui_input));
popup_editor->connect("popup_hide", callable_mp(this, &Tree::_text_editor_popup_modal_close));
- popup_menu->connect("id_pressed", callable_mp(this, &Tree::popup_select));
+ popup_menu->connect(SceneStringName(id_pressed), callable_mp(this, &Tree::popup_select));
value_editor->connect("value_changed", callable_mp(this, &Tree::value_editor_changed));
set_notify_transform(true);
diff --git a/scene/scene_string_names.cpp b/scene/scene_string_names.cpp
index ac3ff7f38c..7ce6002893 100644
--- a/scene/scene_string_names.cpp
+++ b/scene/scene_string_names.cpp
@@ -128,4 +128,5 @@ SceneStringNames::SceneStringNames() {
shader_overrides_group_active = StaticCString::create("_shader_overrides_group_active_");
pressed = StaticCString::create("pressed");
+ id_pressed = StaticCString::create("id_pressed");
}
diff --git a/scene/scene_string_names.h b/scene/scene_string_names.h
index 5f68e5180c..d76d69e12f 100644
--- a/scene/scene_string_names.h
+++ b/scene/scene_string_names.h
@@ -141,6 +141,7 @@ public:
StringName shader_overrides_group_active;
StringName pressed;
+ StringName id_pressed;
};
#define SceneStringName(m_name) SceneStringNames::get_singleton()->m_name