mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-12-04 05:20:30 +00:00
LibVT: Paste full path when dropping file on widget
Prioritize URLs over plain text content in order to insert absolute path instead of basename
This commit is contained in:
parent
ab3aa0759a
commit
04fc7d708c
Notes:
sideshowbarker
2024-07-18 11:23:05 +09:00
Author: https://github.com/xavier Commit: https://github.com/SerenityOS/serenity/commit/04fc7d708c9 Pull-request: https://github.com/SerenityOS/serenity/pull/8235
1 changed files with 5 additions and 5 deletions
|
@ -1097,11 +1097,7 @@ void TerminalWidget::context_menu_event(GUI::ContextMenuEvent& event)
|
|||
|
||||
void TerminalWidget::drop_event(GUI::DropEvent& event)
|
||||
{
|
||||
if (event.mime_data().has_text()) {
|
||||
event.accept();
|
||||
auto text = event.mime_data().text();
|
||||
send_non_user_input(text.bytes());
|
||||
} else if (event.mime_data().has_urls()) {
|
||||
if (event.mime_data().has_urls()) {
|
||||
event.accept();
|
||||
auto urls = event.mime_data().urls();
|
||||
bool first = true;
|
||||
|
@ -1116,6 +1112,10 @@ void TerminalWidget::drop_event(GUI::DropEvent& event)
|
|||
|
||||
first = false;
|
||||
}
|
||||
} else if (event.mime_data().has_text()) {
|
||||
event.accept();
|
||||
auto text = event.mime_data().text();
|
||||
send_non_user_input(text.bytes());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue