mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
LibGUI+Everywhere: Make sync requests to Clipboard server more obvious
This commit is contained in:
parent
06f140a025
commit
f22c0ffe0c
13 changed files with 22 additions and 23 deletions
|
@ -83,7 +83,7 @@ void TextEditor::create_actions()
|
|||
m_cut_action->set_enabled(false);
|
||||
m_copy_action->set_enabled(false);
|
||||
m_paste_action = CommonActions::make_paste_action([&](auto&) { paste(); }, this);
|
||||
m_paste_action->set_enabled(is_editable() && Clipboard::the().mime_type().starts_with("text/"));
|
||||
m_paste_action->set_enabled(is_editable() && Clipboard::the().fetch_mime_type().starts_with("text/"));
|
||||
if (is_multi_line()) {
|
||||
m_go_to_line_action = Action::create(
|
||||
"Go to line...", { Mod_Ctrl, Key_L }, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/go-forward.png").release_value_but_fixme_should_propagate_errors(), [this](auto&) {
|
||||
|
@ -1453,7 +1453,7 @@ void TextEditor::paste()
|
|||
if (!is_editable())
|
||||
return;
|
||||
|
||||
auto [data, mime_type, _] = GUI::Clipboard::the().data_and_type();
|
||||
auto [data, mime_type, _] = GUI::Clipboard::the().fetch_data_and_type();
|
||||
if (!mime_type.starts_with("text/"))
|
||||
return;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue