Skip to content

Commit

Permalink
Fix displaying tab when rejecting flatpak installation
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianTM committed Nov 13, 2024
1 parent a05aa74 commit 9d7904e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
mx-packageinstaller (24.11.03) mx; urgency=medium

* Fix displaying tab when rejecting flatpak installation

-- Adrian <[email protected]> Wed, 13 Nov 2024 18:31:10 -0500

mx-packageinstaller (24.11.02) mx; urgency=medium

* Update flatpaks only if manually refreshed (list might show blank if flatpaks
Expand Down
4 changes: 3 additions & 1 deletion mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1733,13 +1733,14 @@ bool MainWindow::downloadPackageList(bool force_download)
return true;
}

void MainWindow::enableTabs(bool enable) const
void MainWindow::enableTabs(bool enable)
{
for (int tab = 0; tab < ui->tabWidget->count() - 1; ++tab) { // Enable all except last (Console)
ui->tabWidget->setTabEnabled(tab, enable);
}
ui->tabWidget->setTabVisible(Tab::Test, QFile::exists("/etc/apt/sources.list.d/mx.list"));
ui->tabWidget->setTabVisible(Tab::Flatpak, arch != "i386");
setCursor(QCursor(Qt::ArrowCursor));
}

void MainWindow::hideColumns() const
Expand Down Expand Up @@ -2735,6 +2736,7 @@ void MainWindow::handleFlatpakTab(const QString &search_str)
tr("Flatpak is not currently installed.\nOK to go ahead and install it?"));
if (ans == QMessageBox::No) {
ui->tabWidget->setCurrentIndex(Tab::Popular);
enableTabs(true);
return;
}
installFlatpak();
Expand Down
2 changes: 1 addition & 1 deletion mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ private slots:
void displayPackages();
void displayPopularApps() const;
void displayWarning(const QString &repo);
void enableTabs(bool enable) const;
void enableTabs(bool enable);
void finalizeFlatpakDisplay();
void formatFlatpakTree() const;
void handleEnabledReposTab(const QString &search_str);
Expand Down

0 comments on commit 9d7904e

Please sign in to comment.