summaryrefslogtreecommitdiff
path: root/Applications/HexEditor
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-12-09 21:05:28 +0100
committerAndreas Kling <awesomekling@gmail.com>2019-12-09 21:05:44 +0100
commitfd5eb79d1959cbd4b43f624e3e0779e5dd5e0f17 (patch)
tree5898af512fb7afcdf185cf3dcec6ad449836022f /Applications/HexEditor
parente9dda8d59261d021d046074f39bc2c0a140a723a (diff)
downloadserenity-fd5eb79d1959cbd4b43f624e3e0779e5dd5e0f17.zip
LibGUI: Make GMenu inherit from CObject
This is primarily to make it possible to pass a GMenu* where a CObject* is expected.
Diffstat (limited to 'Applications/HexEditor')
-rw-r--r--Applications/HexEditor/HexEditorWidget.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/Applications/HexEditor/HexEditorWidget.cpp b/Applications/HexEditor/HexEditorWidget.cpp
index ec4ff7d23e..f38213a2c0 100644
--- a/Applications/HexEditor/HexEditorWidget.cpp
+++ b/Applications/HexEditor/HexEditorWidget.cpp
@@ -106,7 +106,7 @@ HexEditorWidget::HexEditorWidget()
});
auto menubar = make<GMenuBar>();
- auto app_menu = make<GMenu>("Hex Editor");
+ auto app_menu = GMenu::construct("Hex Editor");
app_menu->add_action(*m_new_action);
app_menu->add_action(*m_open_action);
app_menu->add_action(*m_save_action);
@@ -119,7 +119,7 @@ HexEditorWidget::HexEditorWidget()
}));
menubar->add_menu(move(app_menu));
- auto bytes_per_row_menu = make<GMenu>("Bytes Per Row");
+ auto bytes_per_row_menu = GMenu::construct("Bytes Per Row");
for (int i = 8; i <= 32; i += 8) {
bytes_per_row_menu->add_action(GAction::create(String::number(i), [this, i](auto&) {
m_editor->set_bytes_per_row(i);
@@ -146,7 +146,7 @@ HexEditorWidget::HexEditorWidget()
}
});
- auto edit_menu = make<GMenu>("Edit");
+ auto edit_menu = GMenu::construct("Edit");
edit_menu->add_action(GAction::create("Fill selection...", [&](const GAction&) {
auto input_box = GInputBox::construct("Fill byte (hex):", "Fill Selection", this);
if (input_box->exec() == GInputBox::ExecOK && !input_box->text_value().is_empty()) {
@@ -170,11 +170,11 @@ HexEditorWidget::HexEditorWidget()
}));
menubar->add_menu(move(edit_menu));
- auto view_menu = make<GMenu>("View");
+ auto view_menu = GMenu::construct("View");
view_menu->add_submenu(move(bytes_per_row_menu));
menubar->add_menu(move(view_menu));
- auto help_menu = make<GMenu>("Help");
+ auto help_menu = GMenu::construct("Help");
help_menu->add_action(GAction::create("About", [&](const GAction&) {
GAboutDialog::show("Hex Editor", load_png("/res/icons/32x32/app-hexeditor.png"), window());
}));