|
|
|
|
@ -214,6 +214,15 @@ void MainWindow::event(){
|
|
|
|
|
rbSudo->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::denamic_cmd));
|
|
|
|
|
txtCmd->signal_focus_out_event().connect(sigc::mem_fun(*this, &MainWindow::focus_out_txt_cmd));
|
|
|
|
|
txtCmd->signal_focus_in_event().connect(sigc::mem_fun(*this, &MainWindow::focus_in_txt_cmd));
|
|
|
|
|
txtCmd->signal_delete_text().connect(sigc::mem_fun(*this, &MainWindow::delete_cmd));
|
|
|
|
|
}
|
|
|
|
|
void MainWindow::delete_cmd(const int &x,const int &y){
|
|
|
|
|
if (y>1){
|
|
|
|
|
chbTerminal->set_active(false);
|
|
|
|
|
chbAnotherUser->set_active(false);
|
|
|
|
|
cbxExecuteEpriority->set_active(false);
|
|
|
|
|
txtCmd->set_text("");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MainWindow::focus_in_txt_cmd(GdkEventFocus* event){
|
|
|
|
|
@ -229,9 +238,6 @@ bool MainWindow::focus_in_txt_cmd(GdkEventFocus* event){
|
|
|
|
|
else{
|
|
|
|
|
user_cmd = txtCmd->get_text();
|
|
|
|
|
}
|
|
|
|
|
chbTerminal->set_active(false);
|
|
|
|
|
chbAnotherUser->set_active(false);
|
|
|
|
|
cbxExecuteEpriority->set_active(false);
|
|
|
|
|
cmd_old = txtCmd->get_text();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
@ -592,11 +598,9 @@ void MainWindow::denamic_cmd(){
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MainWindow::focus_out_txt_cmd(GdkEventFocus* event){
|
|
|
|
|
//this->focus_in_txt_cmd(event);
|
|
|
|
|
if (cmd_old!=txtCmd->get_text()){
|
|
|
|
|
user_cmd = txtCmd->get_text();
|
|
|
|
|
}
|
|
|
|
|
this->denamic_cmd();
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|