diff options
Diffstat (limited to 'base/linux_util.h')
-rw-r--r-- | base/linux_util.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/base/linux_util.h b/base/linux_util.h index 693377c..4cfa9da 100644 --- a/base/linux_util.h +++ b/base/linux_util.h @@ -35,7 +35,10 @@ class EnvironmentVariableGetter { enum DesktopEnvironment { DESKTOP_ENVIRONMENT_OTHER, DESKTOP_ENVIRONMENT_GNOME, - DESKTOP_ENVIRONMENT_KDE, + // KDE3 and KDE4 are sufficiently different that we count + // them as two different desktop environments here. + DESKTOP_ENVIRONMENT_KDE3, + DESKTOP_ENVIRONMENT_KDE4, }; // Return an entry from the DesktopEnvironment enum with a best guess @@ -44,6 +47,12 @@ enum DesktopEnvironment { // proxy settings, password manager, etc. DesktopEnvironment GetDesktopEnvironment(EnvironmentVariableGetter* env); +// Return a string representation of the given desktop environment. +// May return NULL in the case of DESKTOP_ENVIRONMENT_OTHER. +const char* GetDesktopEnvironmentName(DesktopEnvironment env); +// Convenience wrapper that calls GetDesktopEnvironment() first. +const char* GetDesktopEnvironmentName(EnvironmentVariableGetter* env); + } // namespace base #endif // BASE_LINUX_UTIL_H__ |