Fix budgie detection

#382
This commit is contained in:
Linus Dierheimer
2023-01-14 16:58:09 +01:00
parent 53430b9827
commit 6e1d656a60
2 changed files with 20 additions and 3 deletions
+14
View File
@@ -239,6 +239,13 @@ static void getLXQt(const FFinstance* instance, FFDisplayServerResult* result)
ffStrbufDestroy(&wmProcessNameBuffer);
}
static void getBudgie(const FFinstance* instance, FFDisplayServerResult* result)
{
ffStrbufSetS(&result->dePrettyName, "Budgie");
ffStrbufSetS(&result->deProcessName, "budgie-desktop");
ffParsePropFileData(instance, "budgie/budgie-version.xml", "<str>", &result->deVersion);
}
static void applyPrettyNameIfDE(const FFinstance* instance, FFDisplayServerResult* result, const char* name)
{
if(!ffStrSet(name))
@@ -282,6 +289,13 @@ static void applyPrettyNameIfDE(const FFinstance* instance, FFDisplayServerResul
strcasecmp(name, "X-LXQT") == 0 ||
strcasecmp(name, "lxqt-session") == 0
) getLXQt(instance, result);
else if(
strcasecmp(name, "Budgie") == 0 ||
strcasecmp(name, "X-Budgie") == 0 ||
strcasecmp(name, "budgie-desktop") == 0 ||
strcasecmp(name, "Budgie:GNOME") == 0
) getBudgie(instance, result);
}
static void getWMProtocolNameFromEnv(FFDisplayServerResult* result)
+6 -3
View File
@@ -80,8 +80,11 @@ static void detectGTKFromSettings(const FFinstance* instance, FFGTKResult* resul
cursorTheme = ffSettingsGet(instance, "/org/mate/peripherals-mouse/cursor-theme", "org.mate.peripherals-mouse", NULL, "cursor-theme", FF_VARIANT_TYPE_STRING).strValue;
cursorSize = ffSettingsGet(instance, "/org/mate/peripherals-mouse/cursor-size", "org.mate.peripherals-mouse", NULL, "cursor-size", FF_VARIANT_TYPE_INT).intValue;
}
else if(ffStrbufIgnCaseCompS(&wmde->dePrettyName, "Gnome") == 0 || ffStrbufIgnCaseCompS(&wmde->dePrettyName, "Unity") == 0 || ffStrbufIgnCaseCompS(&wmde->dePrettyName, "Budgie") == 0)
{
else if(
ffStrbufIgnCaseCompS(&wmde->dePrettyName, "Gnome") == 0 ||
ffStrbufIgnCaseCompS(&wmde->dePrettyName, "Unity") == 0 ||
fStrbufIgnCaseCompS(&wmde->dePrettyName, "Budgie") == 0
) {
themeName = ffSettingsGet(instance, "/org/gnome/desktop/interface/gtk-theme", "org.gnome.desktop.interface", NULL, "gtk-theme", FF_VARIANT_TYPE_STRING).strValue;
iconsName = ffSettingsGet(instance, "/org/gnome/desktop/interface/icon-theme", "org.gnome.desktop.interface", NULL, "icon-theme", FF_VARIANT_TYPE_STRING).strValue;
fontName = ffSettingsGet(instance, "/org/gnome/desktop/interface/font-name", "org.gnome.desktop.interface", NULL, "font-name", FF_VARIANT_TYPE_STRING).strValue;
@@ -145,7 +148,7 @@ static void detectGTKFromConfigDir(FFstrbuf* configDir, const char* version, FFG
static void detectGTK(const FFinstance* instance, const char* version, FFGTKResult* result)
{
//Mate, Cinnamon and Gnome use dconf to save theme config
//Mate, Cinnamon, Gnome, Unity, Budgie use dconf to save theme config
//On other DEs, this will do nothing
detectGTKFromSettings(instance, result);
if(allPropertiesSet(result))