|
|
|
@ -71,7 +71,6 @@ void MainWindow::settings(){
|
|
|
|
vec_param_names.push_back("GRUB_TERMINAL_INPUT");
|
|
|
|
vec_param_names.push_back("GRUB_TERMINAL_INPUT");
|
|
|
|
vec_param_names.push_back("GRUB_TERMINAL_OUTPUT");
|
|
|
|
vec_param_names.push_back("GRUB_TERMINAL_OUTPUT");
|
|
|
|
vec_param_names.push_back("GRUB_BOOT_SILENT");
|
|
|
|
vec_param_names.push_back("GRUB_BOOT_SILENT");
|
|
|
|
vec_param_names.push_back("GRUB_USER");
|
|
|
|
|
|
|
|
vec_param_names.push_back("GRUB_PASSWORD");
|
|
|
|
vec_param_names.push_back("GRUB_PASSWORD");
|
|
|
|
vec_param_names.push_back("GRUB_DEFAULT");
|
|
|
|
vec_param_names.push_back("GRUB_DEFAULT");
|
|
|
|
vec_param_names.push_back("GRUB_PLAY");
|
|
|
|
vec_param_names.push_back("GRUB_PLAY");
|
|
|
|
@ -228,22 +227,6 @@ void MainWindow::view_add_colums_music(Gtk::TreeView &treeView) {
|
|
|
|
treeView.append_column_editable(str_melody_code, m_columns_music.melody_code);
|
|
|
|
treeView.append_column_editable(str_melody_code, m_columns_music.melody_code);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::view_add_line_music(Gtk::TreeModel::Row &row, Glib::RefPtr<Gtk::ListStore> list_store_m) {
|
|
|
|
|
|
|
|
row = *(list_store_m->append());
|
|
|
|
|
|
|
|
row[m_columns_music.check_button] = false;
|
|
|
|
|
|
|
|
row[m_columns_music.title] = "";
|
|
|
|
|
|
|
|
row[m_columns_music.melody_code] = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::view_add_line_user(Gtk::TreeModel::Row &row, Glib::RefPtr<Gtk::ListStore> list_store_m) {
|
|
|
|
|
|
|
|
row = *(list_store_m->append());
|
|
|
|
|
|
|
|
row[m_columns_user.check_button] = false;
|
|
|
|
|
|
|
|
row[m_columns_user.name] = "";
|
|
|
|
|
|
|
|
row[m_columns_user.password] = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::item_selected_kernel(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) {
|
|
|
|
void MainWindow::item_selected_kernel(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) {
|
|
|
|
auto selection_IPT = treeViewIPT->get_selection();
|
|
|
|
auto selection_IPT = treeViewIPT->get_selection();
|
|
|
|
auto selection_OTT = treeViewOTT->get_selection();
|
|
|
|
auto selection_OTT = treeViewOTT->get_selection();
|
|
|
|
@ -341,79 +324,6 @@ void MainWindow::set_download_mode() {
|
|
|
|
map_cmd_selection["GRUB_BOOT_SILENT"] = key;
|
|
|
|
map_cmd_selection["GRUB_BOOT_SILENT"] = key;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::set_security_login() {
|
|
|
|
|
|
|
|
bool index = chbSecurityLogin->get_active();
|
|
|
|
|
|
|
|
string key = "";
|
|
|
|
|
|
|
|
if (index == false) {
|
|
|
|
|
|
|
|
key = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (index == true) {
|
|
|
|
|
|
|
|
key = entrySecurityLogin->get_text();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
map_cmd_selection["GRUB_USER"] = key;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::get_security_login(std::map <string, string> &map_temp) {
|
|
|
|
|
|
|
|
// Todo;
|
|
|
|
|
|
|
|
std::map <string, string>:: iterator iter_map_data;
|
|
|
|
|
|
|
|
iter_map_data = map_temp.find("GRUB_USER");
|
|
|
|
|
|
|
|
if (iter_map_data != map_temp.end()) {
|
|
|
|
|
|
|
|
string value = iter_map_data->second;
|
|
|
|
|
|
|
|
if (value.length() != 0) {
|
|
|
|
|
|
|
|
Utils::str_replace_all(value, " ","");
|
|
|
|
|
|
|
|
Utils::str_replace_all(value, "\"","");
|
|
|
|
|
|
|
|
chbSecurityLogin->set_active(1);
|
|
|
|
|
|
|
|
entrySecurityLogin->set_sensitive(true);
|
|
|
|
|
|
|
|
entrySecurityLogin->set_text(value);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
chbSecurityLogin->set_active(0);
|
|
|
|
|
|
|
|
entrySecurityLogin->set_text("");
|
|
|
|
|
|
|
|
entrySecurityLogin->set_sensitive(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
chbSecurityLogin->set_active(0);
|
|
|
|
|
|
|
|
entrySecurityLogin->set_text("");
|
|
|
|
|
|
|
|
entrySecurityLogin->set_sensitive(false);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::set_password_protec() {
|
|
|
|
|
|
|
|
bool index = chbPasswordProtecc->get_active();
|
|
|
|
|
|
|
|
string key = "";
|
|
|
|
|
|
|
|
if (index == false){
|
|
|
|
|
|
|
|
key = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (index == true) {
|
|
|
|
|
|
|
|
key = entryPasswordProtecc->get_text();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (key != "************") {
|
|
|
|
|
|
|
|
map_cmd_selection["GRUB_PASSWORD"] = key;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::get_password_protec(std::map <string, string> &map_temp) {
|
|
|
|
|
|
|
|
std::map <string, string>:: iterator iter_map_data;
|
|
|
|
|
|
|
|
iter_map_data = map_temp.find("GRUB_PASSWORD");
|
|
|
|
|
|
|
|
if (iter_map_data != map_temp.end()) {
|
|
|
|
|
|
|
|
string value = iter_map_data->second;
|
|
|
|
|
|
|
|
if (value.length() != 0) {
|
|
|
|
|
|
|
|
Utils::str_replace_all(value, "\"","");
|
|
|
|
|
|
|
|
chbPasswordProtecc->set_active(1);
|
|
|
|
|
|
|
|
entryPasswordProtecc->set_text("************");
|
|
|
|
|
|
|
|
entryPasswordProtecc->set_sensitive(true);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else{
|
|
|
|
|
|
|
|
chbPasswordProtecc->set_active(0);
|
|
|
|
|
|
|
|
entryPasswordProtecc->set_text("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
chbPasswordProtecc->set_active(-1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
string MainWindow::template_item_selected(int size, Glib::RefPtr<Gtk::ListStore> &list_store, string key) {
|
|
|
|
string MainWindow::template_item_selected(int size, Glib::RefPtr<Gtk::ListStore> &list_store, string key) {
|
|
|
|
string cmds = map_cmd_selection[key];
|
|
|
|
string cmds = map_cmd_selection[key];
|
|
|
|
Utils::str_replace_all(cmds, "\"", "");
|
|
|
|
Utils::str_replace_all(cmds, "\"", "");
|
|
|
|
@ -773,8 +683,10 @@ void MainWindow::cmd_entry_all(Gtk::Entry &entry, string cmd_settings, string cm
|
|
|
|
void MainWindow::event() {
|
|
|
|
void MainWindow::event() {
|
|
|
|
btnRemoveUser->signal_clicked().connect([&]() {remove_user();});
|
|
|
|
btnRemoveUser->signal_clicked().connect([&]() {remove_user();});
|
|
|
|
btnRemoveMusic->signal_clicked().connect([&]() {remove_music();});
|
|
|
|
btnRemoveMusic->signal_clicked().connect([&]() {remove_music();});
|
|
|
|
btnAddUser->signal_clicked().connect([&]() {view_add_line_user(row_user, list_store_user);});
|
|
|
|
btnAddUser->signal_clicked().connect([&]() {string name = "", passwd = "";
|
|
|
|
btnAddMusic->signal_clicked().connect([&]() {view_add_line_music(row_music, list_store_music);});
|
|
|
|
set_add_data_user(row_user, false, name, passwd);});
|
|
|
|
|
|
|
|
btnAddMusic->signal_clicked().connect([&]() {string code = "", name = "";
|
|
|
|
|
|
|
|
set_add_data_music(row_music, false,name, code);});
|
|
|
|
btnOpenMenuOS->signal_clicked().connect([&]() {obj_menu_os.show();});
|
|
|
|
btnOpenMenuOS->signal_clicked().connect([&]() {obj_menu_os.show();});
|
|
|
|
btnCancelHelp->signal_clicked().connect([&]() {wndShowWeb->hide();});
|
|
|
|
btnCancelHelp->signal_clicked().connect([&]() {wndShowWeb->hide();});
|
|
|
|
chkAlwaysOpenHelp->signal_toggled().connect([&]() {flag_open_browser = true;});
|
|
|
|
chkAlwaysOpenHelp->signal_toggled().connect([&]() {flag_open_browser = true;});
|
|
|
|
@ -814,32 +726,40 @@ void MainWindow::event() {
|
|
|
|
this->signal_delete_event().connect(sigc::mem_fun(*this, &MainWindow::gui_exit));
|
|
|
|
this->signal_delete_event().connect(sigc::mem_fun(*this, &MainWindow::gui_exit));
|
|
|
|
chbLoadVariantSelectionTimer->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_active_boot_second));
|
|
|
|
chbLoadVariantSelectionTimer->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::set_active_boot_second));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
/*
|
|
|
|
|
|
|
|
void get_tree_view_user() {
|
|
|
|
void MainWindow::set_tree_view_user() {
|
|
|
|
Gtk::TreeModel::Row row = list_store_user->children()[index];
|
|
|
|
|
|
|
|
string users_root = "";
|
|
|
|
|
|
|
|
string key = "";
|
|
|
|
string key = "";
|
|
|
|
if(row) {
|
|
|
|
string users_root = "";
|
|
|
|
if (row[m_columns_user.name].length() != 0) {
|
|
|
|
Glib::RefPtr<Gtk::TreeModel> treeViewUser_model = treeViewUser->get_model();
|
|
|
|
key = "GRUB_PASSWORD[" + row[m_columns_user.name] + "]=";
|
|
|
|
Gtk::TreeModel::Children children = treeViewUser_model->children();
|
|
|
|
map_cmd_selection[key] = row[m_columns_user.password];
|
|
|
|
for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter) {
|
|
|
|
if (row[m_columns_user.check_button]) {
|
|
|
|
Gtk::TreeModel::Row row = *iter;
|
|
|
|
if (users_root.length() != 0) {
|
|
|
|
if(row) {
|
|
|
|
users_root = users_root + "," + row[m_columns_user.name];
|
|
|
|
string superuser_name = row[m_columns_user.name] + "";
|
|
|
|
|
|
|
|
if (row[m_columns_user.check_button] && superuser_name.length() != 0) {
|
|
|
|
|
|
|
|
key = "GRUB_PASSWORD[" + superuser_name + "]=";
|
|
|
|
|
|
|
|
if ((row[m_columns_user.password] + "") != "************") {
|
|
|
|
|
|
|
|
map_cmd_selection[key] = row[m_columns_user.password] + "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
users_root = users_root + row[m_columns_user.name];
|
|
|
|
map_cmd_selection[key] = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (row[m_columns_user.check_button]) {
|
|
|
|
|
|
|
|
if (users_root.length() != 0) {
|
|
|
|
|
|
|
|
users_root = users_root + "," + superuser_name;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
users_root = users_root + row[m_columns_user.name];
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
map_cmd_selection["GRUB_SUPERUSERS"] = users_root
|
|
|
|
if (users_root.length() != 0) {
|
|
|
|
|
|
|
|
map_cmd_selection["GRUB_SUPERUSERS"] = users_root;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void get_tree_view_music() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
void MainWindow::set_init_data_user(std::map<string, string> &map_temp) {
|
|
|
|
void MainWindow::set_init_data_user(std::map<string, string> &map_temp) {
|
|
|
|
treeViewUser->reset_expander_column();
|
|
|
|
treeViewUser->reset_expander_column();
|
|
|
|
list_store_user = Gtk::ListStore::create(m_columns_user);
|
|
|
|
list_store_user = Gtk::ListStore::create(m_columns_user);
|
|
|
|
@ -855,28 +775,65 @@ void MainWindow::set_init_data_user(std::map<string, string> &map_temp) {
|
|
|
|
Utils::str_remove(buf_key,"]");
|
|
|
|
Utils::str_remove(buf_key,"]");
|
|
|
|
if (value.length() != 0) {
|
|
|
|
if (value.length() != 0) {
|
|
|
|
password = "************";
|
|
|
|
password = "************";
|
|
|
|
|
|
|
|
this->set_add_data_user(row_user, false, buf_key, password);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else {
|
|
|
|
|
|
|
|
password = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this->set_add_data_user(row_user, false, buf_key, password);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::set_init_data_superuser(std::map<string, string> &map_temp) {
|
|
|
|
void MainWindow::set_init_data_superuser(std::map<string, string> &map_temp) {
|
|
|
|
Glib::RefPtr<Gtk::TreeModel> treeViewKernelUser = treeViewUser->get_model();
|
|
|
|
Glib::RefPtr<Gtk::TreeModel> treeViewUser_model = treeViewUser->get_model();
|
|
|
|
string names_superusers = map_temp["GRUB_SUPERUSERS"];
|
|
|
|
string names_superusers = map_temp["GRUB_SUPERUSERS"];
|
|
|
|
vector<string> vec_superusers = Utils::split(names_superusers, ',');
|
|
|
|
vector<string> vec_superusers = Utils::split(names_superusers, ',');
|
|
|
|
Gtk::TreeModel::Children children = treeViewKernelUser->children();
|
|
|
|
Gtk::TreeModel::Children children = treeViewUser_model->children();
|
|
|
|
for (string& str_superuser: vec_superusers) {
|
|
|
|
for (string& str_superuser: vec_superusers) {
|
|
|
|
for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter){
|
|
|
|
for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter){
|
|
|
|
Gtk::TreeModel::Row row = *iter;
|
|
|
|
Gtk::TreeModel::Row row = *iter;
|
|
|
|
if (row[m_columns_user.name] == str_superuser) {
|
|
|
|
if (row[m_columns_user.name] == str_superuser) {
|
|
|
|
row[m_columns_user.check_button] = true;
|
|
|
|
row[m_columns_user.check_button] = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::set_data_csv_music() {
|
|
|
|
|
|
|
|
string path_name = "";
|
|
|
|
|
|
|
|
path_name = path_name + path_resources + "/" + "grub-beeplist.csv";
|
|
|
|
|
|
|
|
string line;
|
|
|
|
|
|
|
|
string all_music = "";
|
|
|
|
|
|
|
|
string all_music_old = "";
|
|
|
|
|
|
|
|
string code_melodies = "";
|
|
|
|
|
|
|
|
ifstream in(path_name);
|
|
|
|
|
|
|
|
if (in.is_open()) {
|
|
|
|
|
|
|
|
while (getline(in, line)){
|
|
|
|
|
|
|
|
all_music_old += line + "\n";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Glib::RefPtr<Gtk::TreeModel> treeViewMusic_model = treeViewMusic->get_model();
|
|
|
|
|
|
|
|
Gtk::TreeModel::Children children = treeViewMusic_model->children();
|
|
|
|
|
|
|
|
for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter){
|
|
|
|
|
|
|
|
Gtk::TreeModel::Row row = *iter;
|
|
|
|
|
|
|
|
code_melodies = row[m_columns_music.melody_code] + "";
|
|
|
|
|
|
|
|
if (code_melodies.length() != 0 && (row[m_columns_music.title] + "").length() != 0) {
|
|
|
|
|
|
|
|
all_music += row[m_columns_music.title] + "," + code_melodies + "\n";
|
|
|
|
|
|
|
|
if (row[m_columns_music.check_button]) {
|
|
|
|
|
|
|
|
map_cmd_selection["GRUB_PLAY"] = code_melodies + "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
map_cmd_selection["GRUB_PLAY"] = "";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU);
|
|
|
|
|
|
|
|
info_status_app(info_box_error_css);
|
|
|
|
|
|
|
|
lblWarning->set_text(str_null_music_name);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (all_music_old != all_music) {
|
|
|
|
|
|
|
|
ofstream fout(path_name, ios_base::out | ios_base::trunc);
|
|
|
|
|
|
|
|
if (fout.is_open()) {
|
|
|
|
|
|
|
|
fout << all_music;
|
|
|
|
|
|
|
|
fout.close();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -931,11 +888,58 @@ void MainWindow::remove_music() {
|
|
|
|
void MainWindow::remove_line_user(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator& iter) {
|
|
|
|
void MainWindow::remove_line_user(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator& iter) {
|
|
|
|
iter_user_del = iter;
|
|
|
|
iter_user_del = iter;
|
|
|
|
flag_validate_del_user = true;
|
|
|
|
flag_validate_del_user = true;
|
|
|
|
|
|
|
|
bool flag_error = false;
|
|
|
|
|
|
|
|
string name = "";
|
|
|
|
|
|
|
|
string password = "";
|
|
|
|
|
|
|
|
Glib::RefPtr<Gtk::TreeModel> treeViewUser_model = treeViewUser->get_model();
|
|
|
|
|
|
|
|
Gtk::TreeModel::Children children = treeViewUser_model->children();
|
|
|
|
|
|
|
|
for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter){
|
|
|
|
|
|
|
|
Gtk::TreeModel::Row row = *iter;
|
|
|
|
|
|
|
|
name = row[m_columns_user.name] + "";
|
|
|
|
|
|
|
|
password = row[m_columns_user.password] + "";
|
|
|
|
|
|
|
|
if (name.length() == 0 && password.length() == 0) {
|
|
|
|
|
|
|
|
flag_error = true;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (flag_error == true) {
|
|
|
|
|
|
|
|
imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU);
|
|
|
|
|
|
|
|
info_status_app(info_box_error_css);
|
|
|
|
|
|
|
|
lblWarning->set_text(str_null_username);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
info_status_app(info_box_ok_css);
|
|
|
|
|
|
|
|
imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU);
|
|
|
|
|
|
|
|
lblWarning->set_text("");
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::remove_line_music(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator& iter) {
|
|
|
|
void MainWindow::remove_line_music(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator& iter) {
|
|
|
|
iter_music_del = iter;
|
|
|
|
iter_music_del = iter;
|
|
|
|
flag_validate_del_music = true;
|
|
|
|
flag_validate_del_music = true;
|
|
|
|
|
|
|
|
string code_melodies = "";
|
|
|
|
|
|
|
|
bool flag_error = false;
|
|
|
|
|
|
|
|
Glib::RefPtr<Gtk::TreeModel> treeViewMusic_model = treeViewMusic->get_model();
|
|
|
|
|
|
|
|
Gtk::TreeModel::Children children = treeViewMusic_model->children();
|
|
|
|
|
|
|
|
for(Gtk::TreeModel::iterator iter = children.begin(); iter != children.end(); ++iter){
|
|
|
|
|
|
|
|
Gtk::TreeModel::Row row = *iter;
|
|
|
|
|
|
|
|
code_melodies = row[m_columns_music.melody_code] + "";
|
|
|
|
|
|
|
|
if (code_melodies.length() == 0 && (row[m_columns_music.title] + "").length() == 0) {
|
|
|
|
|
|
|
|
flag_error = true;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (flag_error == true) {
|
|
|
|
|
|
|
|
imgInfo->set_from_icon_name(icon_warning, Gtk::ICON_SIZE_MENU);
|
|
|
|
|
|
|
|
info_status_app(info_box_error_css);
|
|
|
|
|
|
|
|
lblWarning->set_text(str_null_music_name);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
info_status_app(info_box_ok_css);
|
|
|
|
|
|
|
|
imgInfo->set_from_icon_name(icon_checked, Gtk::ICON_SIZE_MENU);
|
|
|
|
|
|
|
|
lblWarning->set_text("");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
bool MainWindow::focus_tree_view(GdkEventFocus*) {
|
|
|
|
bool MainWindow::focus_tree_view(GdkEventFocus*) {
|
|
|
|
@ -1107,8 +1111,8 @@ void MainWindow::set_data_cfg() {
|
|
|
|
map_cmd_selection["GRUB_DEFAULT"] = "";
|
|
|
|
map_cmd_selection["GRUB_DEFAULT"] = "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
this->set_download_mode();
|
|
|
|
this->set_download_mode();
|
|
|
|
this->set_security_login();
|
|
|
|
this->set_tree_view_user();
|
|
|
|
this->set_password_protec();
|
|
|
|
this->set_data_csv_music();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::download_globl_cfg() {
|
|
|
|
void MainWindow::download_globl_cfg() {
|
|
|
|
@ -1144,8 +1148,6 @@ void MainWindow::load_template(std::map<string, string>* map_temp, string cmd) {
|
|
|
|
this->set_row_all(*map_temp, list_store_IPT, vec_Option_IPT, size_IPT, "GRUB_TERMINAL_INPUT");
|
|
|
|
this->set_row_all(*map_temp, list_store_IPT, vec_Option_IPT, size_IPT, "GRUB_TERMINAL_INPUT");
|
|
|
|
this->set_row_all(*map_temp, list_store_OTT, vec_Option_OTT, size_OTT, "GRUB_TERMINAL_OUTPUT");
|
|
|
|
this->set_row_all(*map_temp, list_store_OTT, vec_Option_OTT, size_OTT, "GRUB_TERMINAL_OUTPUT");
|
|
|
|
this->get_download_mode(*map_temp);
|
|
|
|
this->get_download_mode(*map_temp);
|
|
|
|
this->get_security_login(*map_temp);
|
|
|
|
|
|
|
|
this->get_password_protec(*map_temp);
|
|
|
|
|
|
|
|
this->get_default_load(*map_temp);
|
|
|
|
this->get_default_load(*map_temp);
|
|
|
|
this->set_entry(entryKernel, *map_temp, "GRUB_CMDLINE_LINUX");
|
|
|
|
this->set_entry(entryKernel, *map_temp, "GRUB_CMDLINE_LINUX");
|
|
|
|
this->set_entry(entryIPT, *map_temp, "GRUB_TERMINAL_INPUT");
|
|
|
|
this->set_entry(entryIPT, *map_temp, "GRUB_TERMINAL_INPUT");
|
|
|
|
@ -1173,7 +1175,6 @@ void MainWindow::set_entry(Gtk::Entry* entry, std::map<string, string> &map_temp
|
|
|
|
else {
|
|
|
|
else {
|
|
|
|
entry->set_text("");
|
|
|
|
entry->set_text("");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::init_dict(string flag_load) {
|
|
|
|
void MainWindow::init_dict(string flag_load) {
|
|
|
|
@ -1183,7 +1184,6 @@ void MainWindow::init_dict(string flag_load) {
|
|
|
|
map_cmd_selection_n["GRUB_TERMINAL_INPUT"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_TERMINAL_INPUT"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_TERMINAL_OUTPUT"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_TERMINAL_OUTPUT"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_BOOT_SILENT"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_BOOT_SILENT"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_USER"] = "";
|
|
|
|
|
|
|
|
map_cmd_selection_n["GRUB_PASSWORD"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_PASSWORD"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_DEFAULT"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_DEFAULT"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_PLAY"] = "";
|
|
|
|
map_cmd_selection_n["GRUB_PLAY"] = "";
|
|
|
|
|