|
|
|
@ -285,6 +285,7 @@ void MainWindow::changed_user() {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::delete_cmd(const int &x, const int &y) {
|
|
|
|
void MainWindow::delete_cmd(const int &x, const int &y) {
|
|
|
|
|
|
|
|
if (x == 0) {}
|
|
|
|
if (y > 1) {
|
|
|
|
if (y > 1) {
|
|
|
|
chbTerminal->set_active(false);
|
|
|
|
chbTerminal->set_active(false);
|
|
|
|
chbAnotherUser->set_active(false);
|
|
|
|
chbAnotherUser->set_active(false);
|
|
|
|
@ -294,6 +295,7 @@ void MainWindow::delete_cmd(const int &x, const int &y) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool MainWindow::focus_in_txt_cmd(GdkEventFocus* event) {
|
|
|
|
bool MainWindow::focus_in_txt_cmd(GdkEventFocus* event) {
|
|
|
|
|
|
|
|
if (event) {}
|
|
|
|
if (user_cmd.length() != 0) {
|
|
|
|
if (user_cmd.length() != 0) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (name_app.length() != 0) {
|
|
|
|
else if (name_app.length() != 0) {
|
|
|
|
@ -311,7 +313,7 @@ bool MainWindow::focus_in_txt_cmd(GdkEventFocus* event) {
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::synopsis_show() {
|
|
|
|
void MainWindow::synopsis_show() {
|
|
|
|
string cmd = "xdg-open " + string(gettext("https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/")) + app_name + " &";
|
|
|
|
string cmd = "xdg-open " + string(gettext("https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/")) + app_name + " &";
|
|
|
|
system(cmd.c_str());
|
|
|
|
index_error = system(cmd.c_str());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::icon_clear() {
|
|
|
|
void MainWindow::icon_clear() {
|
|
|
|
@ -377,7 +379,7 @@ void MainWindow::tempate_icon_select(Gtk::IconView *icon, Glib::RefPtr<Gtk::List
|
|
|
|
user_cmd = "";
|
|
|
|
user_cmd = "";
|
|
|
|
txtCmd->set_text(app_name_exec);
|
|
|
|
txtCmd->set_text(app_name_exec);
|
|
|
|
name_app = txtCmd->get_text();
|
|
|
|
name_app = txtCmd->get_text();
|
|
|
|
int len_name_app = name_app.length();
|
|
|
|
size_t len_name_app = name_app.length();
|
|
|
|
string array_del[] = {"%f", "%F", "%d", "%D", "%n", "%N", "%U"};
|
|
|
|
string array_del[] = {"%f", "%F", "%d", "%D", "%n", "%N", "%U"};
|
|
|
|
for (auto &del_sim: array_del) {
|
|
|
|
for (auto &del_sim: array_del) {
|
|
|
|
str_remove(name_app, del_sim);
|
|
|
|
str_remove(name_app, del_sim);
|
|
|
|
@ -605,7 +607,7 @@ string MainWindow::start_cmd(string user_cmd) {
|
|
|
|
string user_cmd_X = "xhost +SI:localuser:";
|
|
|
|
string user_cmd_X = "xhost +SI:localuser:";
|
|
|
|
user_cmd_X += cmbUser->get_active_text();
|
|
|
|
user_cmd_X += cmbUser->get_active_text();
|
|
|
|
user_cmd_X += " > /dev/null 2>&1";
|
|
|
|
user_cmd_X += " > /dev/null 2>&1";
|
|
|
|
system(user_cmd_X.c_str());
|
|
|
|
index_error = system(user_cmd_X.c_str());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((cbxExecuteEpriority->get_active()) && (chbAnotherUser->get_active() == false)) {
|
|
|
|
if ((cbxExecuteEpriority->get_active()) && (chbAnotherUser->get_active() == false)) {
|
|
|
|
str_nice_cmd = "nice -n " + to_string(spinPriority->get_value_as_int()) + " ";
|
|
|
|
str_nice_cmd = "nice -n " + to_string(spinPriority->get_value_as_int()) + " ";
|
|
|
|
@ -665,7 +667,7 @@ string MainWindow::start_cmd(string user_cmd) {
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::call_app(string &cmd) {
|
|
|
|
void MainWindow::call_app(string &cmd) {
|
|
|
|
if (cmd.length() != 0) {
|
|
|
|
if (cmd.length() != 0) {
|
|
|
|
std::thread t([&](string cmd) {system(cmd.c_str());}, cmd);
|
|
|
|
std::thread t([&](string cmd) {int index = system(cmd.c_str()); if (index){}}, cmd);
|
|
|
|
t.detach();
|
|
|
|
t.detach();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -718,6 +720,7 @@ string MainWindow::call(string cmd) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool MainWindow::focus_out_txt_cmd(GdkEventFocus* event) {
|
|
|
|
bool MainWindow::focus_out_txt_cmd(GdkEventFocus* event) {
|
|
|
|
|
|
|
|
if (event) {}
|
|
|
|
if (cmd_old != txtCmd->get_text()) {
|
|
|
|
if (cmd_old != txtCmd->get_text()) {
|
|
|
|
user_cmd = txtCmd->get_text();
|
|
|
|
user_cmd = txtCmd->get_text();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|