diff --git a/src/detection/de/de_linux.c b/src/detection/de/de_linux.c index b96a52399..3d75bcc41 100644 --- a/src/detection/de/de_linux.c +++ b/src/detection/de/de_linux.c @@ -5,7 +5,7 @@ #include "common/processing.h" #include "detection/displayserver/displayserver.h" -static void getKDE(FFstrbuf* result) +static void getKDE(FFstrbuf* result, FFDEOptions* options) { ffParsePropFileValues("/usr/share/xsessions/plasmax11.desktop", 1, (FFpropquery[]) { {"X-KDE-PluginInfo-Version =", result} @@ -25,7 +25,7 @@ static void getKDE(FFstrbuf* result) if(result->length == 0) ffParsePropFileData("wayland-sessions/plasmawayland5.desktop", "X-KDE-PluginInfo-Version =", result); - if(result->length == 0 && instance.config.general.allowSlowOperations) + if(result->length == 0 && options->slowVersionDetection) { if (ffProcessAppendStdOut(result, (char* const[]){ "plasmashell", @@ -36,7 +36,7 @@ static void getKDE(FFstrbuf* result) } } -static void getGnome(FFstrbuf* result) +static void getGnome(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) { ffParsePropFileData("gnome-shell/org.gnome.Extensions", "version :", result); @@ -51,12 +51,12 @@ static void getGnome(FFstrbuf* result) } } -static void getCinnamon(FFstrbuf* result) +static void getCinnamon(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options) { ffParsePropFileData("applications/cinnamon.desktop", "X-GNOME-Bugzilla-Version =", result); } -static void getMate(FFstrbuf* result) +static void getMate(FFstrbuf* result, FFDEOptions* options) { FF_STRBUF_AUTO_DESTROY major = ffStrbufCreate(); FF_STRBUF_AUTO_DESTROY minor = ffStrbufCreate(); @@ -70,7 +70,7 @@ static void getMate(FFstrbuf* result) ffParseSemver(result, &major, &minor, µ); - if(result->length == 0 && instance.config.general.allowSlowOperations) + if(result->length == 0 && options->slowVersionDetection) { ffProcessAppendStdOut(result, (char* const[]){ "mate-session", @@ -83,7 +83,7 @@ static void getMate(FFstrbuf* result) } } -static void getXFCE4(FFstrbuf* result) +static void getXFCE4(FFstrbuf* result, FFDEOptions* options) { ffParsePropFileData("gtk-doc/html/libxfce4ui/index.html", "
Version", result);
@@ -104,7 +104,7 @@ static void getXFCE4(FFstrbuf* result)
}
#endif
- if(result->length == 0 && instance.config.general.allowSlowOperations)
+ if(result->length == 0 && options->slowVersionDetection)
{
//This is somewhat slow
ffProcessAppendStdOut(result, (char* const[]){
@@ -119,7 +119,7 @@ static void getXFCE4(FFstrbuf* result)
}
}
-static void getLXQt(FFstrbuf* result)
+static void getLXQt(FFstrbuf* result, FFDEOptions* options)
{
ffParsePropFileData("gconfig/lxqt.pc", "Version:", result);
@@ -128,7 +128,7 @@ static void getLXQt(FFstrbuf* result)
if(result->length == 0)
ffParsePropFileData("cmake/lxqt/lxqt-config-version.cmake", "set ( PACKAGE_VERSION", result);
- if(result->length == 0 && instance.config.general.allowSlowOperations)
+ if(result->length == 0 && options->slowVersionDetection)
{
//This is really, really, really slow. Thank you, LXQt developers
ffProcessAppendStdOut(result, (char* const[]){
@@ -142,27 +142,27 @@ static void getLXQt(FFstrbuf* result)
}
}
-static void getBudgie(FFstrbuf* result)
+static void getBudgie(FFstrbuf* result, FF_MAYBE_UNUSED FFDEOptions* options)
{
ffParsePropFileData("budgie/budgie-version.xml", "