Fix the Lubuntu Manual shortcut behavior

This commit is contained in:
Aaron Rainbolt 2023-03-02 18:44:02 -06:00
parent 637c32ce1b
commit e08672cb49
2 changed files with 13 additions and 1 deletions

2
debian/changelog vendored
View File

@ -5,6 +5,8 @@ pcmanfm-qt (1.2.1-0ubuntu2) lunar; urgency=medium
* Make the Lubuntu Manual checkbox behave correctly (if the shortcut is * Make the Lubuntu Manual checkbox behave correctly (if the shortcut is
present, it should be checked, if the shortcut is missing, it should be present, it should be checked, if the shortcut is missing, it should be
unchecked). unchecked).
* Make the context menu of the Lubuntu Manual shortcut on the desktop behave
like the other special shortcuts (Home, Trash, Computer, Network).
-- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 02 Mar 2023 17:41:45 -0600 -- Aaron Rainbolt <arraybolt3@ubuntu.com> Thu, 02 Mar 2023 17:41:45 -0600

View File

@ -222,7 +222,17 @@ Last-Update: 2022-06-16
void DesktopWindow::createTrash() { void DesktopWindow::createTrash() {
if(trashMonitor_) { if(trashMonitor_) {
return; return;
@@ -1297,7 +1321,8 @@ void DesktopWindow::trustOurDesktopShort @@ -987,7 +1011,8 @@ void DesktopWindow::onFileClicked(int ty
if((fileName == QLatin1String("trash-can.desktop") && ds.contains(QLatin1String("Trash")))
|| (fileName == QLatin1String("user-home.desktop") && ds.contains(QLatin1String("Home")))
|| (fileName == QLatin1String("computer.desktop") && ds.contains(QLatin1String("Computer")))
- || (fileName == QLatin1String("network.desktop") && ds.contains(QLatin1String("Network")))) {
+ || (fileName == QLatin1String("network.desktop") && ds.contains(QLatin1String("Network")))
+ || (fileName == QLatin1String("lubuntu-manual.desktop") && ds.contains(QLatin1String("Lubuntu Manual")))) {
QMenu* menu = new QMenu(this);
// "Open" action for all
QAction* action = menu->addAction(tr("Open"));
@@ -1297,7 +1322,8 @@ void DesktopWindow::trustOurDesktopShort
const char* execStr = isHome ? homeExec.get() : const char* execStr = isHome ? homeExec.get() :
fileName == QLatin1String("trash-can.desktop") && ds.contains(QLatin1String("Trash")) ? "pcmanfm-qt trash:///" : fileName == QLatin1String("trash-can.desktop") && ds.contains(QLatin1String("Trash")) ? "pcmanfm-qt trash:///" :
fileName == QLatin1String("computer.desktop") && ds.contains(QLatin1String("Computer")) ? "pcmanfm-qt computer:///" : fileName == QLatin1String("computer.desktop") && ds.contains(QLatin1String("Computer")) ? "pcmanfm-qt computer:///" :