mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-01 12:07:14 +02:00
LibGUI+Everywhere: Make sync requests to Clipboard server more obvious
This commit is contained in:
committed by
Linus Groh
parent
06f140a025
commit
f22c0ffe0c
Notes:
sideshowbarker
2024-07-18 00:55:17 +09:00
Author: https://github.com/BenWiederhake Commit: https://github.com/SerenityOS/serenity/commit/f22c0ffe0c5 Pull-request: https://github.com/SerenityOS/serenity/pull/10984 Reviewed-by: https://github.com/linusg
@@ -214,7 +214,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||
auto* editor = current_image_editor();
|
||||
if (!editor)
|
||||
return;
|
||||
auto bitmap = GUI::Clipboard::the().data_and_type().as_bitmap();
|
||||
auto bitmap = GUI::Clipboard::the().fetch_data_and_type().as_bitmap();
|
||||
if (!bitmap)
|
||||
return;
|
||||
|
||||
@@ -226,7 +226,7 @@ void MainWidget::initialize_menubar(GUI::Window& window)
|
||||
GUI::Clipboard::the().on_change = [&](auto& mime_type) {
|
||||
m_paste_action->set_enabled(mime_type == "image/x-serenityos");
|
||||
};
|
||||
m_paste_action->set_enabled(GUI::Clipboard::the().mime_type() == "image/x-serenityos");
|
||||
m_paste_action->set_enabled(GUI::Clipboard::the().fetch_mime_type() == "image/x-serenityos");
|
||||
|
||||
m_undo_action = GUI::CommonActions::make_undo_action([&](auto&) {
|
||||
if (auto* editor = current_image_editor())
|
||||
|
||||
Reference in New Issue
Block a user