[utilities/krusader] app: ADDED: Give an option to hide unknown filesystem entries in the Media Menu.

Toni Asensi Esteve <[email protected]>
Newsgroups gmane.comp.kde.doc,gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 0085ceab4f61d2ae739b4d4d0c1366098a7ce833 by Toni Asensi Esteve, on behalf of Zorn VV.
Committed on 21/04/2025 at 21:40.
Pushed by asensi into branch 'master'.

ADDED: Give an option to hide unknown filesystem entries in the Media Menu.
GUI: A "Hide unknown File System entries" option can be chosen (to hide unknown FS entries in the Media Menu).
Revision: https://invent.kde.org/utilities/krusader/-/merge_requests/159
Closes #31

M  +4    -0    app/GUI/mediabutton.cpp
M  +1    -0    app/Konfigurator/kgpanel.cpp

https://invent.kde.org/utilities/krusader/-/commit/0085ceab4f61d2ae739b4d4d0c1366098a7ce833

diff --git a/app/GUI/mediabutton.cpp b/app/GUI/mediabutton.cpp
index 8fc046408..fedefc97f 100644
--- a/app/GUI/mediabutton.cpp
+++ b/app/GUI/mediabutton.cpp
@@ -204,6 +204,10 @@ bool MediaButton::getNameAndIcon(Solid::Device &device, QString &name, QIcon &ic
         return false;
     }
 
+    if (fstype.isEmpty() && cfg.readEntry("HideUnknownFS", false)) {
+        return false;
+    }
+
     if (cfg.readEntry("Hidden Mountpoints", QStringList()).contains(path)) {
         return false;
     }
diff --git a/app/Konfigurator/kgpanel.cpp b/app/Konfigurator/kgpanel.cpp
index c328eefb0..9739e6a47 100644
--- a/app/Konfigurator/kgpanel.cpp
+++ b/app/Konfigurator/kgpanel.cpp
@@ -836,6 +836,7 @@ void KgPanel::setupMediaMenuTab()
         {"MediaMenu", "ShowPath", true, i18n("Show Mount Path"), false, nullptr},
         {"MediaMenu", "ShowFSType", true, i18n("Show File System Type"), false, nullptr},
         {"MediaMenu", "HideSquashFS", false, i18n("Hide SquashFS entries"), false, nullptr},
+        {"MediaMenu", "HideUnknownFS", false, i18n("Hide unknown File System entries"), false, nullptr},
     };
     KonfiguratorCheckBoxGroup *mediaMenuCheckBoxes =
         createCheckBoxGroup(1, 0, mediaMenuParams, sizeof(mediaMenuParams) / sizeof(*mediaMenuParams), tab, PAGE_MEDIA_MENU);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.