mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 07:57:49 +00:00
Ladybird: Accept file drops
This commit is contained in:
parent
731fec525e
commit
f3c6510b83
3 changed files with 26 additions and 0 deletions
|
@ -349,6 +349,14 @@ void BrowserWindow::new_tab(QString const& url, Activate activate)
|
|||
QObject::connect(tab_ptr, &Tab::title_changed, this, &BrowserWindow::tab_title_changed);
|
||||
QObject::connect(tab_ptr, &Tab::favicon_changed, this, &BrowserWindow::tab_favicon_changed);
|
||||
|
||||
QObject::connect(&tab_ptr->view(), &WebContentView::urls_dropped, this, [this](auto& urls) {
|
||||
VERIFY(urls.size());
|
||||
m_current_tab->navigate(urls[0].toString());
|
||||
|
||||
for (qsizetype i = 1; i < urls.size(); ++i)
|
||||
new_tab(urls[i].toString(), Activate::No);
|
||||
});
|
||||
|
||||
tab_ptr->view().on_get_all_cookies = [this](auto const& url) {
|
||||
return m_cookie_jar.get_all_cookies(url);
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue