|
|
|
@ -246,6 +246,7 @@ void MainWindow::info_status_app(string stule) {
|
|
|
|
boxInfo->add_class(stule);
|
|
|
|
boxInfo->add_class(stule);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::get_builder() {
|
|
|
|
void MainWindow::get_builder() {
|
|
|
|
builder->set_translation_domain(path_app);
|
|
|
|
builder->set_translation_domain(path_app);
|
|
|
|
builder->get_widget("boxColor", boxColor);
|
|
|
|
builder->get_widget("boxColor", boxColor);
|
|
|
|
@ -381,7 +382,6 @@ void MainWindow::event_zone() {
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::synopsis_show() {
|
|
|
|
void MainWindow::synopsis_show() {
|
|
|
|
int start_error = error_info;
|
|
|
|
int start_error = error_info;
|
|
|
|
//su -l superadmin -c " DISPLAY=$DISPLAY
|
|
|
|
|
|
|
|
string cmd = "xdg-open " + string(_("https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/")) + app_name;
|
|
|
|
string cmd = "xdg-open " + string(_("https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/")) + app_name;
|
|
|
|
if (geteuid() == 0) {
|
|
|
|
if (geteuid() == 0) {
|
|
|
|
string response_user = this->call("who");
|
|
|
|
string response_user = this->call("who");
|
|
|
|
@ -389,7 +389,6 @@ void MainWindow::synopsis_show() {
|
|
|
|
if (index != std::string::npos){
|
|
|
|
if (index != std::string::npos){
|
|
|
|
response_user = response_user.substr(0, index);
|
|
|
|
response_user = response_user.substr(0, index);
|
|
|
|
cmd = "su -l " + response_user + " -c \" DISPLAY=$DISPLAY " + cmd + " \"";
|
|
|
|
cmd = "su -l " + response_user + " -c \" DISPLAY=$DISPLAY " + cmd + " \"";
|
|
|
|
cout << "" << cmd << endl;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
wrapper_system(cmd, "&");
|
|
|
|
wrapper_system(cmd, "&");
|
|
|
|
@ -929,6 +928,8 @@ void MainWindow::event_entry_cbDhcp() {
|
|
|
|
else if (activ_index == 2) {
|
|
|
|
else if (activ_index == 2) {
|
|
|
|
txtNtpServer->set_text("");
|
|
|
|
txtNtpServer->set_text("");
|
|
|
|
if (flag_ntp_edit == false) {
|
|
|
|
if (flag_ntp_edit == false) {
|
|
|
|
|
|
|
|
txtNtpServer->set_sensitive(true);
|
|
|
|
|
|
|
|
txtNtpServer->grab_focus();
|
|
|
|
string cmd = "";
|
|
|
|
string cmd = "";
|
|
|
|
if (flag_load == false) {
|
|
|
|
if (flag_load == false) {
|
|
|
|
cmd = "ubconfig --default --source system get network NTPSERVERS";
|
|
|
|
cmd = "ubconfig --default --source system get network NTPSERVERS";
|
|
|
|
@ -939,12 +940,8 @@ void MainWindow::event_entry_cbDhcp() {
|
|
|
|
string response = this->get_ubconfig_value(cmd);
|
|
|
|
string response = this->get_ubconfig_value(cmd);
|
|
|
|
if (response != "dhcp" && response != "default") {
|
|
|
|
if (response != "dhcp" && response != "default") {
|
|
|
|
txtNtpServer->set_text(response);
|
|
|
|
txtNtpServer->set_text(response);
|
|
|
|
txtNtpServer->grab_focus();
|
|
|
|
|
|
|
|
txtNtpServer->unset_cursor();
|
|
|
|
|
|
|
|
cout << 222 << endl;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this->write_config(response, "dhcp");
|
|
|
|
this->write_config(response, "dhcp");
|
|
|
|
txtNtpServer->set_sensitive(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
this->write_config("", "dhcp");
|
|
|
|
this->write_config("", "dhcp");
|
|
|
|
|