mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:17:46 +00:00
GAction: Remove "custom_data" and the related convenience constructors.
This mechanism was never actually used, just something I imagined would be useful while I was first creating the class.
This commit is contained in:
parent
fe69b326e9
commit
2ae0333f5d
2 changed files with 1 additions and 14 deletions
|
@ -27,10 +27,6 @@ public:
|
|||
{
|
||||
return adopt(*new GAction(text, move(callback), widget));
|
||||
}
|
||||
static NonnullRefPtr<GAction> create(const StringView& text, const StringView& custom_data, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
{
|
||||
return adopt(*new GAction(text, custom_data, move(callback), widget));
|
||||
}
|
||||
static NonnullRefPtr<GAction> create(const StringView& text, RefPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> callback, GWidget* widget = nullptr)
|
||||
{
|
||||
return adopt(*new GAction(text, move(icon), move(callback), widget));
|
||||
|
@ -50,7 +46,6 @@ public:
|
|||
|
||||
String text() const { return m_text; }
|
||||
GShortcut shortcut() const { return m_shortcut; }
|
||||
String custom_data() const { return m_custom_data; }
|
||||
const GraphicsBitmap* icon() const { return m_icon.ptr(); }
|
||||
|
||||
Function<void(GAction&)> on_activation;
|
||||
|
@ -80,7 +75,6 @@ private:
|
|||
GAction(const StringView& text, const GShortcut&, Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
GAction(const StringView& text, const GShortcut&, RefPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
GAction(const StringView& text, RefPtr<GraphicsBitmap>&& icon, Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
GAction(const StringView& text, const StringView& custom_data = StringView(), Function<void(GAction&)> = nullptr, GWidget* = nullptr);
|
||||
|
||||
template<typename Callback>
|
||||
void for_each_toolbar_button(Callback);
|
||||
|
@ -88,7 +82,6 @@ private:
|
|||
void for_each_menu_item(Callback);
|
||||
|
||||
String m_text;
|
||||
String m_custom_data;
|
||||
RefPtr<GraphicsBitmap> m_icon;
|
||||
GShortcut m_shortcut;
|
||||
bool m_enabled { true };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue