|
|
|
@ -954,8 +954,8 @@ unsigned short MainWindow::read_uid_min_max(string filename, string search){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::pars_users() {
|
|
|
|
void MainWindow::pars_users() {
|
|
|
|
unsigned short uid_min = this->read_uid_min_max("/etc/login.defs", "UID_MIN");
|
|
|
|
unsigned short uid_min = this->read_uid_min_max(file_source_login_min_max, "UID_MIN");
|
|
|
|
unsigned short uid_max = this->read_uid_min_max("/etc/login.defs", "UID_MAX");
|
|
|
|
unsigned short uid_max = this->read_uid_min_max(file_source_login_min_max, "UID_MAX");
|
|
|
|
while (true) {
|
|
|
|
while (true) {
|
|
|
|
errno = 0;
|
|
|
|
errno = 0;
|
|
|
|
passwd* entry = getpwent();
|
|
|
|
passwd* entry = getpwent();
|
|
|
|
@ -996,10 +996,10 @@ void MainWindow::pars_apps() {
|
|
|
|
struct struct_App App;
|
|
|
|
struct struct_App App;
|
|
|
|
string file_name = "";
|
|
|
|
string file_name = "";
|
|
|
|
string str_Categories;
|
|
|
|
string str_Categories;
|
|
|
|
string path = "/usr/share/applications/";
|
|
|
|
string path = path_all_applications;
|
|
|
|
for (const auto & entry : fs::directory_iterator(path)) {
|
|
|
|
for (const auto & entry : fs::directory_iterator(path)) {
|
|
|
|
file_name = entry.path().filename().string();
|
|
|
|
file_name = entry.path().filename().string();
|
|
|
|
path = "/usr/share/applications/"+file_name;
|
|
|
|
path = string(path_all_applications) +file_name;
|
|
|
|
if (file_name.find(".desktop") != std::string::npos) {
|
|
|
|
if (file_name.find(".desktop") != std::string::npos) {
|
|
|
|
GKeyFile *gfile=g_key_file_new();
|
|
|
|
GKeyFile *gfile=g_key_file_new();
|
|
|
|
g_key_file_load_from_file(gfile, path.c_str(), G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
|
|
|
|
g_key_file_load_from_file(gfile, path.c_str(), G_KEY_FILE_KEEP_TRANSLATIONS, NULL);
|
|
|
|
|