1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 04:57:44 +00:00

HexEditor: Fix nullptr pass to AboutDialog and clean up menus

Refactors menubar creation to avoid a null parent window during
construction; moves search options to the more traditional edit
menu; creates and exclusive action group for bytes per row

Fixes #5177 in part
This commit is contained in:
thankyouverycool 2021-02-26 07:07:13 -05:00 committed by Andreas Kling
parent fb5cdc670f
commit a2e935e7a2
3 changed files with 39 additions and 27 deletions

View file

@ -29,6 +29,7 @@
#include "HexEditor.h"
#include <AK/Function.h>
#include <AK/LexicalPath.h>
#include <LibGUI/ActionGroup.h>
#include <LibGUI/Application.h>
#include <LibGUI/TextEditor.h>
#include <LibGUI/Widget.h>
@ -41,6 +42,7 @@ class HexEditorWidget final : public GUI::Widget {
public:
virtual ~HexEditorWidget() override;
void open_file(const String& path);
void initialize_menubar(GUI::MenuBar&);
bool request_close();
private:
@ -65,6 +67,8 @@ private:
RefPtr<GUI::Action> m_goto_decimal_offset_action;
RefPtr<GUI::Action> m_goto_hex_offset_action;
GUI::ActionGroup m_bytes_per_row_actions;
RefPtr<GUI::StatusBar> m_statusbar;
bool m_document_dirty { false };