feat(ui): install the Flatpak files dropped or opened with PacManager
The window accepts a drop and the desktop entry's %U hands over the file the user picked, so both gestures end up as the same request. The frame asks the core which files it can install and never names a format itself; dropped files queue up because the core runs one operation at a time, and the search and log fields stop swallowing drops so a file dropped on them reaches the window. 🤖 Generated with Codebuff Co-Authored-By: Codebuff <noreply@codebuff.com>
This commit is contained in:
5 files changed
+187
No files matched your search
@@ -32,6 +32,9 @@ BrowsePage::BrowsePage(AppCore* core, QWidget* parent) : Page(core, parent) {
|
||||
searchRow->setSpacing(10);
|
||||
|
||||
m_searchBar = new QLineEdit();
|
||||
// Drops belong to the window: a .flatpakref let go over the search field
|
||||
// must install, not paste its path (see MainWindow::dragEnterEvent).
|
||||
m_searchBar->setAcceptDrops(false);
|
||||
m_searchBar->setPlaceholderText("Rechercher un paquet (ex : firefox)...");
|
||||
m_searchBar->setMinimumHeight(40);
|
||||
m_searchBar->addAction(ui::icon("search"), QLineEdit::LeadingPosition);
|
||||
@@ -54,6 +57,7 @@ BrowsePage::BrowsePage(AppCore* core, QWidget* parent) : Page(core, parent) {
|
||||
filterRow->setSpacing(10);
|
||||
|
||||
m_filterBar = new QLineEdit();
|
||||
m_filterBar->setAcceptDrops(false); // drops go to the window (see above)
|
||||
m_filterBar->setPlaceholderText("Filtrer par nom...");
|
||||
m_filterBar->setMinimumHeight(36);
|
||||
m_filterBar->addAction(ui::icon("filter"), QLineEdit::LeadingPosition);
|
||||
|
||||
Reference in new issue
Block a user