|
|
|
@ -128,6 +128,7 @@ void MainWindow::get_builder(){
|
|
|
|
builder->get_widget("liststoreOther", liststoreOther);
|
|
|
|
builder->get_widget("liststoreOther", liststoreOther);
|
|
|
|
builder->get_widget("liststoreDevelopment", liststoreDevelopment);
|
|
|
|
builder->get_widget("liststoreDevelopment", liststoreDevelopment);
|
|
|
|
builder->get_widget("liststoreSystem", liststoreSystem);
|
|
|
|
builder->get_widget("liststoreSystem", liststoreSystem);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::add_CSS(){
|
|
|
|
void MainWindow::add_CSS(){
|
|
|
|
@ -192,8 +193,12 @@ void MainWindow::settings(){
|
|
|
|
this->event();
|
|
|
|
this->event();
|
|
|
|
this->localization();
|
|
|
|
this->localization();
|
|
|
|
this->add_CSS();
|
|
|
|
this->add_CSS();
|
|
|
|
spinPriority->set_range(-20,19);
|
|
|
|
spinPriority->set_range(0,19);
|
|
|
|
spinPriority->set_increments(1.0,-1.0);
|
|
|
|
spinPriority->set_increments(1.0,-1.0);
|
|
|
|
|
|
|
|
scalePriority->set_range(0,19);
|
|
|
|
|
|
|
|
scalePriority->set_value(0);
|
|
|
|
|
|
|
|
lblTimeEpriorityLow->set_text("19 (Низкий)");
|
|
|
|
|
|
|
|
lblTime4EpriorityHigh->set_text("0 (Высокий)");
|
|
|
|
scalePriority->set_inverted(true);
|
|
|
|
scalePriority->set_inverted(true);
|
|
|
|
this->pars_dir_bin();
|
|
|
|
this->pars_dir_bin();
|
|
|
|
this->pars_users();
|
|
|
|
this->pars_users();
|
|
|
|
@ -235,8 +240,10 @@ void MainWindow::get_path_filemaneg(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void MainWindow::open_list_app(){
|
|
|
|
void MainWindow::open_list_app(){
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//liststoreDevelopment = iconDevelopment->get_model();
|
|
|
|
//liststoreDevelopment = iconDevelopment->get_model();
|
|
|
|
/*
|
|
|
|
|
|
|
|
for ( const auto &str_app : list_app){
|
|
|
|
for ( const auto &str_app : list_app){
|
|
|
|
for ( const auto &str_categor : str_app.Categories){
|
|
|
|
for ( const auto &str_categor : str_app.Categories){
|
|
|
|
if (str_categor=="Graphics"){
|
|
|
|
if (str_categor=="Graphics"){
|
|
|
|
@ -272,15 +279,16 @@ void MainWindow::open_list_app(){
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
for (const auto & str_categor : set_categories){
|
|
|
|
for (const auto & str_categor : set_categories){
|
|
|
|
Gtk::Label* Label1 = new Gtk::Label(str_categor);
|
|
|
|
Gtk::Label* Label1 = new Gtk::Label(str_categor);
|
|
|
|
Gtk::IconView* icon = new Gtk::IconView();
|
|
|
|
Gtk::IconView* icon = new Gtk::IconView();
|
|
|
|
boxlistProgramm->pack_start(*icon);
|
|
|
|
boxlistProgramm->pack_start(*icon);
|
|
|
|
boxlistProgramm->pack_start(*Label1);
|
|
|
|
boxlistProgramm->pack_start(*Label1);
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
dialogStartMenu->show_all();
|
|
|
|
dialogStartMenu->show_all();
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -363,7 +371,7 @@ void MainWindow::start_cmd(){
|
|
|
|
str_cmd_terminal="";
|
|
|
|
str_cmd_terminal="";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
string cmd = "";
|
|
|
|
string cmd = "";
|
|
|
|
cmd = "" + str_cmd_terminal + str_variants_root + str_nice_cmd + user_cmd + " &";
|
|
|
|
cmd = "nohup " + str_cmd_terminal + str_variants_root + str_nice_cmd + user_cmd + " &";
|
|
|
|
txtCmd->set_text(cmd);
|
|
|
|
txtCmd->set_text(cmd);
|
|
|
|
system(cmd.c_str());
|
|
|
|
system(cmd.c_str());
|
|
|
|
|
|
|
|
|
|
|
|
@ -371,7 +379,7 @@ void MainWindow::start_cmd(){
|
|
|
|
}
|
|
|
|
}
|
|
|
|
void MainWindow::changed_user(){
|
|
|
|
void MainWindow::changed_user(){
|
|
|
|
Glib::ustring entry_user = cmbUser->get_active_text();
|
|
|
|
Glib::ustring entry_user = cmbUser->get_active_text();
|
|
|
|
if (entry_user == "superadmin" || entry_user == "root"){
|
|
|
|
if (geteuid()==0 || entry_user == "root"){
|
|
|
|
spinPriority->set_range(-20,19);
|
|
|
|
spinPriority->set_range(-20,19);
|
|
|
|
spinPriority->set_increments(1.0,-1.0);
|
|
|
|
spinPriority->set_increments(1.0,-1.0);
|
|
|
|
scalePriority->set_range(-20,19);
|
|
|
|
scalePriority->set_range(-20,19);
|
|
|
|
@ -393,7 +401,9 @@ void MainWindow::changed_user(){
|
|
|
|
void MainWindow::activ_or_block_other_user(){
|
|
|
|
void MainWindow::activ_or_block_other_user(){
|
|
|
|
bool flag = chbAnotherUser->get_active();
|
|
|
|
bool flag = chbAnotherUser->get_active();
|
|
|
|
cmbUser->set_sensitive(flag);
|
|
|
|
cmbUser->set_sensitive(flag);
|
|
|
|
|
|
|
|
lblInfoUserName->set_sensitive(flag);
|
|
|
|
//lblInfoUserOther->set_sensitive(flag);
|
|
|
|
//lblInfoUserOther->set_sensitive(flag);
|
|
|
|
|
|
|
|
|
|
|
|
if (flag_pkexec==true){
|
|
|
|
if (flag_pkexec==true){
|
|
|
|
rbPkexec->set_sensitive(flag);
|
|
|
|
rbPkexec->set_sensitive(flag);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|