mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-27 03:37:53 +00:00
LibGUI: Allow blocking CommandPalette/EmojiInput on a per Window basis
Instead of having to negate every focusable widget or textbox, let windows override all their widgets. These two Dialogs now block themselves and each other.
This commit is contained in:
committed by
Tim Flynn
parent
bfcb4d88cf
commit
f8e65d24cf
@@ -775,6 +775,9 @@ void TextEditor::select_all()
|
||||
|
||||
void TextEditor::insert_emoji()
|
||||
{
|
||||
if (!accepts_emoji_input() || window()->blocks_emoji_input())
|
||||
return;
|
||||
|
||||
auto emoji_input_dialog = EmojiInputDialog::construct(window());
|
||||
emoji_input_dialog->set_window_mode(GUI::WindowMode::Passive);
|
||||
if (emoji_input_dialog->exec() != EmojiInputDialog::ExecResult::OK)
|
||||
@@ -1722,6 +1725,8 @@ void TextEditor::context_menu_event(ContextMenuEvent& event)
|
||||
if (is_displayonly())
|
||||
return;
|
||||
|
||||
m_insert_emoji_action->set_enabled(accepts_emoji_input() && !window()->blocks_emoji_input());
|
||||
|
||||
if (!m_context_menu) {
|
||||
m_context_menu = Menu::construct();
|
||||
m_context_menu->add_action(undo_action());
|
||||
|
||||
Reference in New Issue
Block a user