summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2023-01-12 11:41:13 +0300
committerDanil Alexeev <danil@alexeev.xyz>2023-01-12 11:41:13 +0300
commit8f706be6fa122a0e3ebf6b48a011023f4a20516c (patch)
tree597fb592507e15a44495d475a2c14f069a4d1aeb /editor
parent0e4e782ada0bdd4ef19415f82a6373e2d79f7ecc (diff)
Rearrange `editor/naming/*` project settings
Diffstat (limited to 'editor')
-rw-r--r--editor/connections_dialog.cpp8
-rw-r--r--editor/editor_node.cpp4
-rw-r--r--editor/scene_tree_dock.cpp2
-rw-r--r--editor/scene_tree_editor.cpp2
4 files changed, 7 insertions, 9 deletions
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index 78987ee6ef..c187aafecf 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -30,6 +30,7 @@
#include "connections_dialog.h"
+#include "core/config/project_settings.h"
#include "editor/doc_tools.h"
#include "editor/editor_help.h"
#include "editor/editor_node.h"
@@ -242,9 +243,9 @@ StringName ConnectDialog::generate_method_callback_name(Node *p_source, String p
String dst_method;
if (p_source == p_target) {
- dst_method = String(EDITOR_GET("interface/editors/default_signal_callback_to_self_name")).format(subst);
+ dst_method = String(GLOBAL_GET("editor/naming/default_signal_callback_to_self_name")).format(subst);
} else {
- dst_method = String(EDITOR_GET("interface/editors/default_signal_callback_name")).format(subst);
+ dst_method = String(GLOBAL_GET("editor/naming/default_signal_callback_name")).format(subst);
}
return dst_method;
@@ -1237,9 +1238,6 @@ ConnectionsDock::ConnectionsDock() {
tree->connect("item_mouse_selected", callable_mp(this, &ConnectionsDock::_rmb_pressed));
add_theme_constant_override("separation", 3 * EDSCALE);
-
- EDITOR_DEF("interface/editors/default_signal_callback_name", "_on_{node_name}_{signal_name}");
- EDITOR_DEF("interface/editors/default_signal_callback_to_self_name", "_on_{signal_name}");
}
ConnectionsDock::~ConnectionsDock() {
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index ab79031ad2..ceab95ac75 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -3046,7 +3046,7 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {
}
String EditorNode::adjust_scene_name_casing(const String &root_name) {
- switch (GLOBAL_GET("editor/scene/scene_naming").operator int()) {
+ switch (GLOBAL_GET("editor/naming/scene_name_casing").operator int()) {
case SCENE_NAME_CASING_AUTO:
// Use casing of the root node.
break;
@@ -5900,7 +5900,7 @@ void EditorNode::_feature_profile_changed() {
}
void EditorNode::_bind_methods() {
- GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/scene/scene_naming", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"), SCENE_NAME_CASING_SNAKE_CASE);
+ GLOBAL_DEF(PropertyInfo(Variant::INT, "editor/naming/scene_name_casing", PROPERTY_HINT_ENUM, "Auto,PascalCase,snake_case"), SCENE_NAME_CASING_SNAKE_CASE);
ClassDB::bind_method("edit_current", &EditorNode::edit_current);
ClassDB::bind_method("edit_node", &EditorNode::edit_node);
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index ac6bceaa55..a6f7db46a6 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -2188,7 +2188,7 @@ void SceneTreeDock::_do_create(Node *p_parent) {
ERR_FAIL_COND(!child);
String new_name = p_parent->validate_child_name(child);
- if (GLOBAL_GET("editor/node_naming/name_casing").operator int() != NAME_CASING_PASCAL_CASE) {
+ if (GLOBAL_GET("editor/naming/node_name_casing").operator int() != NAME_CASING_PASCAL_CASE) {
new_name = adjust_name_casing(new_name);
}
child->set_name(new_name);
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 2f50172f54..7551e9ed51 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -971,7 +971,7 @@ void SceneTreeEditor::_renamed() {
String raw_new_name = which->get_text(0);
if (raw_new_name.strip_edges().is_empty()) {
// If name is empty, fallback to class name.
- if (GLOBAL_GET("editor/node_naming/name_casing").operator int() != NAME_CASING_PASCAL_CASE) {
+ if (GLOBAL_GET("editor/naming/node_name_casing").operator int() != NAME_CASING_PASCAL_CASE) {
raw_new_name = Node::adjust_name_casing(n->get_class());
} else {
raw_new_name = n->get_class();