Исправил минимальный размер окна

pull/34/head
Igor Belitskiy 3 years ago
parent a8e5cd1fdc
commit fe6523216e

File diff suppressed because it is too large Load Diff

@ -231,14 +231,12 @@ void MainWindow::item_selected_kernel(const Gtk::TreeModel::Path&, const Gtk::Tr
treeViewUser->get_selection()->unselect_all();
treeViewMelody->get_selection()->unselect_all();
if (flag_blocked_tree_view == false) {
if (this->intel_idle_cstate_check(size_kernel, list_store_kernel, "GRUB_CMDLINE_LINUX") == false) {
string str_flags = template_item_selected(size_kernel, list_store_kernel, "GRUB_CMDLINE_LINUX");
map_cmd_selection["GRUB_CMDLINE_LINUX"] = str_flags;
// Utils::str_replace_all(str_flags, " ", ", ");
entryKernel->set_text(str_flags);
}
}
}
void MainWindow::item_selected_OTT(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) {
treeViewIPT->get_selection()->unselect_all();
@ -246,14 +244,12 @@ void MainWindow::item_selected_OTT(const Gtk::TreeModel::Path&, const Gtk::TreeM
treeViewUser->get_selection()->unselect_all();
treeViewMelody->get_selection()->unselect_all();
if (flag_blocked_tree_view == false) {
if (this->intel_idle_cstate_check(size_OTT, list_store_OTT, "GRUB_TERMINAL_OUTPUT") == false) {
string str_flags = template_item_selected(size_OTT, list_store_OTT, "GRUB_TERMINAL_OUTPUT");
map_cmd_selection["GRUB_TERMINAL_OUTPUT"] = str_flags;
// Utils::str_replace_all(str_flags, " ", ", ");
entryOTT->set_text(str_flags);
}
}
}
void MainWindow::item_selected_IPT(const Gtk::TreeModel::Path&, const Gtk::TreeModel::iterator&) {
treeViewKernel->get_selection()->unselect_all();
@ -261,14 +257,12 @@ void MainWindow::item_selected_IPT(const Gtk::TreeModel::Path&, const Gtk::TreeM
treeViewUser->get_selection()->unselect_all();
treeViewMelody->get_selection()->unselect_all();
if (flag_blocked_tree_view == false) {
if (this->intel_idle_cstate_check(size_IPT, list_store_IPT, "GRUB_TERMINAL_INPUT") == false) {
string str_flags = template_item_selected(size_IPT, list_store_IPT, "GRUB_TERMINAL_INPUT");
map_cmd_selection["GRUB_TERMINAL_INPUT"] = str_flags;
// Utils::str_replace_all(str_flags, " ", ", ");
entryIPT->set_text(str_flags);
}
}
}
void MainWindow::get_download_mode(std::map <string, string> &map_temp) {
std::map <string, string>:: iterator iter_map_data;
@ -323,44 +317,6 @@ void MainWindow::set_download_mode() {
map_cmd_selection["GRUB_BOOT_SILENT"] = key;
}
bool MainWindow::intel_idle_cstate_check(int size, Glib::RefPtr<Gtk::ListStore> &list_store, string key) {
string cmds_old = map_cmd_selection[key];
string cmds = "";
string param = "";
int index_1 = -1;
int index_4 = -1;
bool active = false;
for (int index = 0; index < size; index++) {
Gtk::TreeModel::Row row = list_store->children()[index];
if(row) {
param = row[m_columns.name] + "";
active = row[m_columns.check_button];
if (param == "intel_idle.max_cstate=1" && active == true) {
index_1 = index;
}
else if (param == "intel_idle.max_cstate=4" && active == true) {
index_4 = index;
}
}
}
if (index_1 != -1 && index_4 != -1) {
if (cmds_old.find("intel_idle.max_cstate=1") == string::npos) {
Gtk::TreeModel::Row row = list_store->children()[index_4];
row[m_columns.check_button] = false;
return true;
}
else if (cmds_old.find("intel_idle.max_cstate=4") == string::npos) {
Gtk::TreeModel::Row row = list_store->children()[index_1];
row[m_columns.check_button] = false;
return true;
}
else {
return false;
}
}
return false;
}
string MainWindow::template_item_selected(int size, Glib::RefPtr<Gtk::ListStore> &list_store, string key) {
string cmds_old = map_cmd_selection[key];
string cmds = "";

@ -63,7 +63,7 @@ void me_thread(string cmd);
#define cancel _("Cancel")
#define always_redirect _("Always redirect")
#define boot_screen_display_mode _("Boot screen display mode:")
#define no_loading_animation _("No loading animation, full log")
#define no_loading_animation _("No loading animation,\nfull log")
#define boot_menu_user_name _("Boot menu user name:")
#define boot_menu_user_password _("Boot menu user password:")
#define last_successful_upload _("Last successful upload")
@ -73,7 +73,7 @@ void me_thread(string cmd);
#define user_password_configuration_edit_mode _("User password to enter boot configuration edit mode")
#define loading_animation_with _("Loading animation with the magazine")
#define loading_animation_without _("Loading animation without a magazine")
#define lack_loading_animation _("Lack of loading animation with the output of the abbreviated log")
#define lack_loading_animation _("Lack of loading animation with the\noutput of the abbreviated log")
#define web_url _("https://wiki.ublinux.com")
#define enter_password _("Enter your password")
#define enter_login _("Enter login")

@ -283,8 +283,8 @@ specified priority</property>
</child>
</object>
<object class="GtkWindow" id="window">
<property name="width-request">760</property>
<property name="height-request">560</property>
<property name="width-request">650</property>
<property name="height-request">500</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-bootloader</property>
<child>

@ -205,8 +205,8 @@ msgstr "Терминал для вывода"
#: source/ubl-settings-bootloader.h:75 source/ubl-settings-bootloader.h:74
#: source/ubl-settings-bootloader.cc:451
msgid "Lack of loading animation with the output of the abbreviated log"
msgstr "Отсутствие анимации загрузки с выводом сокращенного журнала"
msgid "Lack of loading animation with the\noutput of the abbreviated log"
msgstr "Отсутствие анимации загрузки с\nвыводом сокращенного журнала"
#, fuzzy
msgid "Last Successful Download"
@ -294,8 +294,8 @@ msgid "Maximum performance, power management"
msgstr "Максимальная производительность, управление питанием"
#: source/ubl-settings-bootloader.h:65 source/ubl-settings-bootloader.h:64
msgid "No loading animation, full log"
msgstr "Отсутствие анимации загрузки с выводом журнала"
msgid "No loading animation,\nfull log"
msgstr "Отсутствие анимации загрузки\nс выводом журнала"
#: source/ubl-settings-bootloader.cc:444 source/ubl-settings-bootloader.cc:446
msgid "Not available"

Loading…
Cancel
Save