Исправлен скрин, исправлен дизайн

pull/11/head
Igor Belitskiy 3 years ago
parent bec1f559e7
commit 7431cc1a36

Binary file not shown.

Before

Width:  |  Height:  |  Size: 143 KiB

After

Width:  |  Height:  |  Size: 144 KiB

@ -66,7 +66,7 @@ string My_Process::get_cmd_error() {
return this->str_cmd_error;
}
string My_Process_call::call_all_sections(string cmd) {
char buffer[PATH_MAX];
char buffer[PATH_MAX] = {0};
std::string result = "";
FILE* pipe = popen(cmd.c_str(), "r");
if (!pipe) throw std::runtime_error("popen() failed!");

@ -94,18 +94,19 @@ void MainWindow::settings(){
this->change_security_login();
this->set_active_boot_second();
this->download_local_cfg();
//this->download_globl_cfg();
this->download_globl_cfg();
}
else{
boxWidgetAll->set_sensitive(false);
btnLoad->set_sensitive(false);
boxSave->set_sensitive(false);
btnSave->set_sensitive(false);
imgInfo->set_from_icon_name("com.ublinux.ubl-settings-bootloader.warning", Gtk::ICON_SIZE_MENU);
info_status_app("boxInfoMessError");
lblWarning->set_text(_("The program must be run as root"));
this->set_active_boot_second();
this->fill_in_view();
}
this->event();
}
@ -159,8 +160,6 @@ void MainWindow::item_selected_OTT(const Gtk::TreeModel::Path&, const Gtk::TreeM
}
}
void MainWindow::item_selected_IPT(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) {
// TODO
// Баг
auto selection_kernel = treeViewKernel->get_selection();
auto selection_OTT = treeViewOTT->get_selection();
selection_kernel->unselect_all();
@ -687,7 +686,7 @@ void MainWindow::wrapper_save_global_cfg() {
bool MainWindow::save_global_cfg() {
bool flag_no_save = true;
obj_save.set_data_local(map_cmd_selection);
obj_save.set_data_local(map_local_cmd_selection);
obj_save.set_data_global(map_global_cmd_selection);
obj_save.set_data_gui(map_cmd_selection);
obj_save.set_vec_params(vec_param_names);
@ -710,8 +709,8 @@ void MainWindow::wrapper_save_local_cfg() {
bool MainWindow::save_local_cfg() {
bool flag_no_save = true;
obj_save.set_data_local(map_cmd_selection);
obj_save.set_data_global(map_local_cmd_selection);
obj_save.set_data_local(map_local_cmd_selection);
obj_save.set_data_global(map_global_cmd_selection);
obj_save.set_data_gui(map_cmd_selection);
obj_save.set_vec_params(vec_param_names);
obj_save.save("boot", "system");
@ -755,10 +754,12 @@ void MainWindow::set_data_cfg() {
void MainWindow::download_globl_cfg() {
this->load_template(&map_global_cmd_selection, "global");
info_warning_error(1);
}
void MainWindow::download_local_cfg() {
this->load_template(&map_local_cmd_selection, "system");
info_warning_error(0);
}
void MainWindow::load_template(std::map<string, string>* map_temp, string str_load) {
@ -784,7 +785,6 @@ void MainWindow::load_template(std::map<string, string>* map_temp, string str_lo
this->set_entry(entryKernel, *map_temp, "GRUB_CMDLINE_LINUX");
this->set_entry(entryIPT, *map_temp, "GRUB_TERMINAL_INPUT");
this->set_entry(entryOTT, *map_temp, "GRUB_TERMINAL_OUTPUT");
info_warning_error(1);
map_cmd_selection = *map_temp;
}
@ -820,8 +820,6 @@ void MainWindow::set_row_all(std::map <string, string> &map_cmd, Glib::RefPtr<Gt
for (auto &name: list_params) {
this->set_row(list_store, size, name, false);
}
// TODO:
// Баг
string value = map_cmd[key];
Utils::str_replace_all(value, "\"", "");
vector<string> vec_params = Utils::split(value, ' ');
@ -842,7 +840,7 @@ void MainWindow::set_row(Glib::RefPtr<Gtk::ListStore> &list_store, int size, std
}
void MainWindow::synopsis_show() {
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) {
string response_user = getlogin();
cmd = "su -l " + response_user + " -c \" DISPLAY=$DISPLAY " + cmd + " \"";

@ -663,6 +663,9 @@ specified priority</property>
<property name="height-request">-1</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
@ -776,6 +779,9 @@ specified priority</property>
<object class="GtkTreeView" id="treeViewIPT">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
@ -889,6 +895,9 @@ specified priority</property>
<object class="GtkTreeView" id="treeViewOTT">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
</object>
</child>
</object>
@ -1206,6 +1215,15 @@ specified priority</property>
<widget name="lblPasswordProtec"/>
</widgets>
</object>
<object class="GtkSizeGroup">
<widgets>
<widget name="chbLoadVariantSelectionTimer"/>
<widget name="lblInfoDefaultDonw"/>
<widget name="lblDownloadMode"/>
<widget name="lblSecurityLogin"/>
<widget name="lblPasswordProtec"/>
</widgets>
</object>
<object class="GtkWindow" id="mess_sudo">
<property name="can-focus">False</property>
<property name="title" translatable="yes">Внимание!</property>

Loading…
Cancel
Save