diff --git a/src/app.cpp b/src/app.cpp index 3e42c1ca1..cba77211a 100644 --- a/src/app.cpp +++ b/src/app.cpp @@ -174,12 +174,12 @@ int App::run() // Load main window top_window = static_cast(load_widget("main_window.xml", "main_window")); - box_menubar = jwidget_find_name(top_window, "menubar"); - box_editors = jwidget_find_name(top_window, "editor"); - box_colorbar = jwidget_find_name(top_window, "colorbar"); - box_toolbar = jwidget_find_name(top_window, "toolbar"); - box_statusbar = jwidget_find_name(top_window, "statusbar"); - box_tabsbar = jwidget_find_name(top_window, "tabsbar"); + box_menubar = top_window->findChild("menubar"); + box_editors = top_window->findChild("editor"); + box_colorbar = top_window->findChild("colorbar"); + box_toolbar = top_window->findChild("toolbar"); + box_statusbar = top_window->findChild("statusbar"); + box_tabsbar = top_window->findChild("tabsbar"); menubar = jmenubar_new(); statusbar = new StatusBar(); diff --git a/src/commands/cmd_configure_tools.cpp b/src/commands/cmd_configure_tools.cpp index 8bda57cef..f249b3de9 100644 --- a/src/commands/cmd_configure_tools.cpp +++ b/src/commands/cmd_configure_tools.cpp @@ -264,7 +264,7 @@ void ConfigureTools::onExecute(Context* context) brush_preview_msg_proc, NULL); } else { - brush_preview = jwidget_find_name(window, "brush_preview"); + brush_preview = window->findChild("brush_preview"); } // Current settings diff --git a/src/commands/cmd_duplicate_sprite.cpp b/src/commands/cmd_duplicate_sprite.cpp index ad2f39eb5..694d92532 100644 --- a/src/commands/cmd_duplicate_sprite.cpp +++ b/src/commands/cmd_duplicate_sprite.cpp @@ -66,9 +66,9 @@ void DuplicateSpriteCommand::onExecute(Context* context) /* load the window widget */ FramePtr window(load_widget("duplicate_sprite.xml", "duplicate_sprite")); - src_name = jwidget_find_name(window, "src_name"); - dst_name = jwidget_find_name(window, "dst_name"); - flatten = jwidget_find_name(window, "flatten"); + src_name = window->findChild("src_name"); + dst_name = window->findChild("dst_name"); + flatten = window->findChild("flatten"); src_name->setText(get_filename(document->getFilename())); @@ -81,7 +81,7 @@ void DuplicateSpriteCommand::onExecute(Context* context) /* open the window */ window->open_window_fg(); - if (window->get_killer() == jwidget_find_name(window, "ok")) { + if (window->get_killer() == window->findChild("ok")) { set_config_bool("DuplicateSprite", "Flatten", flatten->isSelected()); // make a copy of the document diff --git a/src/commands/cmd_new_layer.cpp b/src/commands/cmd_new_layer.cpp index 7be1f09a4..31bff06a0 100644 --- a/src/commands/cmd_new_layer.cpp +++ b/src/commands/cmd_new_layer.cpp @@ -96,10 +96,10 @@ void NewLayerCommand::onExecute(Context* context) window->open_window_fg(); - if (window->get_killer() != jwidget_find_name(window, "ok")) + if (window->get_killer() != window->findChild("ok")) return; - name = jwidget_find_name(window, "name")->getText(); + name = window->findChild("name")->getText(); } Layer* layer; diff --git a/src/commands/cmd_new_layer_set.cpp b/src/commands/cmd_new_layer_set.cpp index 410ba263d..371bbc292 100644 --- a/src/commands/cmd_new_layer_set.cpp +++ b/src/commands/cmd_new_layer_set.cpp @@ -64,8 +64,8 @@ void NewLayerSetCommand::onExecute(Context* context) window->open_window_fg(); - if (window->get_killer() == jwidget_find_name(window, "ok")) { - const char *name = jwidget_find_name(window, "name")->getText(); + if (window->get_killer() == window->findChild("ok")) { + const char *name = window->findChild("name")->getText(); Layer* layer = new LayerFolder(sprite); layer->setName(name); diff --git a/src/commands/filters/color_curve_editor.cpp b/src/commands/filters/color_curve_editor.cpp index 7268ea3b2..4c6769065 100644 --- a/src/commands/filters/color_curve_editor.cpp +++ b/src/commands/filters/color_curve_editor.cpp @@ -358,9 +358,9 @@ int ColorCurveEditor::editNodeManually(gfx::Point& point) FramePtr window(load_widget("color_curve.xml", "point_properties")); - entry_x = jwidget_find_name(window, "x"); - entry_y = jwidget_find_name(window, "y"); - button_ok = jwidget_find_name(window, "button_ok"); + entry_x = window->findChild("x"); + entry_y = window->findChild("y"); + button_ok = window->findChild("button_ok"); entry_x->setTextf("%d", point.x); entry_y->setTextf("%d", point.y); diff --git a/src/dialogs/filesel.cpp b/src/dialogs/filesel.cpp index 0cd9aa1c8..dbfb272ec 100644 --- a/src/dialogs/filesel.cpp +++ b/src/dialogs/filesel.cpp @@ -58,19 +58,19 @@ static bool navigation_locked = false; /* if true the navigation_history isn't changes (used when the back/forward buttons are pushed) */ -static void update_location(JWidget window); -static void update_navigation_buttons(JWidget window); +static void update_location(Widget* window); +static void update_navigation_buttons(Widget* window); static void add_in_navigation_history(IFileItem* folder); -static void select_filetype_from_filename(JWidget window); +static void select_filetype_from_filename(Widget* window); -static void goback_command(JWidget widget); -static void goforward_command(JWidget widget); -static void goup_command(JWidget widget); +static void goback_command(Widget* widget); +static void goforward_command(Widget* widget); +static void goup_command(Widget* widget); -static bool fileview_msg_proc(JWidget widget, JMessage msg); -static bool location_msg_proc(JWidget widget, JMessage msg); -static bool filetype_msg_proc(JWidget widget, JMessage msg); -static bool filename_msg_proc(JWidget widget, JMessage msg); +static bool fileview_msg_proc(Widget* widget, JMessage msg); +static bool location_msg_proc(Widget* widget, JMessage msg); +static bool filetype_msg_proc(Widget* widget, JMessage msg); +static bool filename_msg_proc(Widget* widget, JMessage msg); // Slot for App::Exit signal static void on_exit_delete_navigation_history() @@ -145,11 +145,11 @@ base::string ase_file_selector(const base::string& message, // load the window widget window = static_cast(load_widget("file_selector.xml", "file_selector")); - JWidget box = jwidget_find_name(window, "box"); + Widget* box = window->findChild("box"); Button* goback = window->findChildT