DesktopEntry::DesktopEntry(const std::string &baseDirectory, const std::string &relative, const std::string &language): identifier_(relative), path_(baseDirectory + relative), noDisplay_(false), hidden_(false), allowMultiple_(false), allowRemote_(false) { ConfigReader config(path_); std::replace(identifier_.begin(), identifier_.end(), '/', '-'); name_ = getLocaleValue(config, std::string("Desktop Entry"), std::string("Name"), language); icon_ = getLocaleValue(config, std::string("Desktop Entry"), std::string("Icon"), language); executable_ = config.value(std::string("Desktop Entry"), std::string("Exec")); types_ = split(config.value(std::string("Desktop Entry"), std::string("MimeType")), ';'); noDisplay_ = (config.value(std::string("Desktop Entry"), std::string("NoDisplay")) == std::string("true")); hidden_ = (config.value(std::string("Desktop Entry"), std::string("Hidden")) == std::string("true")); }
String SystemStats::getUserRegion() { return getLocaleValue (_NL_IDENTIFICATION_TERRITORY); }
String SystemStats::getUserLanguage() { return getLocaleValue (_NL_IDENTIFICATION_LANGUAGE); }