|
|
|
|
@ -77,11 +77,11 @@ void MainWindow::settings(){
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
boxWidgetAll->set_sensitive(false);
|
|
|
|
|
btnDownload->set_sensitive(false);
|
|
|
|
|
btnLoad->set_sensitive(false);
|
|
|
|
|
boxSave->set_sensitive(false);
|
|
|
|
|
imgInfo->set("/usr/share/icons/hicolor/scalable/status/warning.svg");
|
|
|
|
|
info_status_app("boxInfoMessError");
|
|
|
|
|
lblWarning->set_text(_("The program must be run with superuser privileges!"));
|
|
|
|
|
lblWarning->set_text(_("The program must be run as root"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -99,36 +99,14 @@ void MainWindow::get_monitor_size(){
|
|
|
|
|
void MainWindow::get_builder(){
|
|
|
|
|
builder->get_widget("chbLoadVariantSelectionTimer", chbLoadVariantSelectionTimer);
|
|
|
|
|
builder->get_widget("chbLastSelectionWillBecome", chbLastSelectionWillBecome);
|
|
|
|
|
builder->get_widget("chbQuiet", chbQuiet);
|
|
|
|
|
builder->get_widget("chbSplash", chbSplash);
|
|
|
|
|
builder->get_widget("chbPlymouth", chbPlymouth);
|
|
|
|
|
builder->get_widget("chbAcpi", chbAcpi);
|
|
|
|
|
builder->get_widget("chbNоapic", chbNоapic);
|
|
|
|
|
builder->get_widget("chbNolapic", chbNolapic);
|
|
|
|
|
builder->get_widget("chbSingle", chbSingle);
|
|
|
|
|
builder->get_widget("chbHomodeset", chbHomodeset);
|
|
|
|
|
builder->get_widget("chbI915Enable", chbI915Enable);
|
|
|
|
|
builder->get_widget("chbAhci", chbAhci);
|
|
|
|
|
builder->get_widget("chbSndIntel", chbSndIntel);
|
|
|
|
|
builder->get_widget("chbintelMax1", chbintelMax1);
|
|
|
|
|
builder->get_widget("chbintelMax4", chbintelMax4);
|
|
|
|
|
builder->get_widget("chbconsoleIT", chbconsoleIT);
|
|
|
|
|
builder->get_widget("chbSerialIT", chbSerialIT);
|
|
|
|
|
builder->get_widget("chbofConsoleIT", chbofConsoleIT);
|
|
|
|
|
builder->get_widget("chbAtKeyboard", chbAtKeyboard);
|
|
|
|
|
builder->get_widget("chbUsbKeyboard", chbUsbKeyboard);
|
|
|
|
|
builder->get_widget("chbofConsoleOT", chbofConsoleOT);
|
|
|
|
|
builder->get_widget("chbSerialOT", chbSerialOT);
|
|
|
|
|
builder->get_widget("chbconsoleOT", chbconsoleOT);
|
|
|
|
|
builder->get_widget("chbGfxterm", chbGfxterm);
|
|
|
|
|
builder->get_widget("chbVgaText", chbVgaText);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
builder->get_widget("lblInfoCommand", lblInfoCommand);
|
|
|
|
|
builder->get_widget("lblInfoCommand1", lblInfoCommand1);
|
|
|
|
|
builder->get_widget("lblInfoCommand2", lblInfoCommand2);
|
|
|
|
|
builder->get_widget("lblInfoDefaultDonw", lblInfoDefaultDonw);
|
|
|
|
|
builder->get_widget("lblInfoSeconds", lblInfoSeconds);
|
|
|
|
|
builder->get_widget("lblDownloadMenu", lblDownloadMenu);
|
|
|
|
|
builder->get_widget("lblLoadMenu", lblLoadMenu);
|
|
|
|
|
builder->get_widget("lblInfoInputTerminal", lblInfoInputTerminal);
|
|
|
|
|
builder->get_widget("lblInfoOutputTerminal", lblInfoOutputTerminal);
|
|
|
|
|
builder->get_widget("lblInfoSeconds", lblInfoSeconds);
|
|
|
|
|
@ -140,26 +118,19 @@ void MainWindow::get_builder(){
|
|
|
|
|
builder->get_widget("entryIT", entryIT);
|
|
|
|
|
builder->get_widget("entryOT", entryOT);
|
|
|
|
|
|
|
|
|
|
builder->get_widget("boxInput1", boxInput1);
|
|
|
|
|
builder->get_widget("boxInput2", boxInput2);
|
|
|
|
|
builder->get_widget("boxOtput1", boxOtput1);
|
|
|
|
|
builder->get_widget("boxOtput2", boxOtput2);
|
|
|
|
|
builder->get_widget("boxKernel", boxKernel);
|
|
|
|
|
builder->get_widget("boxKernel1", boxKernel1);
|
|
|
|
|
builder->get_widget("boxKernel2", boxKernel2);
|
|
|
|
|
builder->get_widget("boxColor", boxColor);
|
|
|
|
|
builder->get_widget("boxWidgetAll", boxWidgetAll);
|
|
|
|
|
|
|
|
|
|
builder->get_widget("aboutWindows", aboutWindows);
|
|
|
|
|
builder->get_widget("btnSynopsis", btnSynopsis);
|
|
|
|
|
builder->get_widget("btnAbout", btnAbout);
|
|
|
|
|
builder->get_widget("btnDonwlodLocal", btnDonwlodLocal);
|
|
|
|
|
builder->get_widget("btnDonwlolGlob", btnDonwlolGlob);
|
|
|
|
|
builder->get_widget("btnLoadLocal", btnLoadLocal);
|
|
|
|
|
builder->get_widget("btnLoadGlob", btnLoadGlob);
|
|
|
|
|
builder->get_widget("btnSaveLocalGlob", btnSaveLocalGlob);
|
|
|
|
|
builder->get_widget("btnSaveLocal", btnSaveLocal);
|
|
|
|
|
builder->get_widget("btnSaveGlob", btnSaveGlob);
|
|
|
|
|
builder->get_widget("btnSettings", btnSettings);
|
|
|
|
|
builder->get_widget("btnDownload", btnDownload);
|
|
|
|
|
builder->get_widget("btnLoad", btnLoad);
|
|
|
|
|
builder->get_widget("btnSave", btnSave);
|
|
|
|
|
builder->get_widget("boxButton", boxButton);
|
|
|
|
|
builder->get_widget("boxSave", boxSave);
|
|
|
|
|
@ -167,6 +138,9 @@ void MainWindow::get_builder(){
|
|
|
|
|
builder->get_widget("lblWarning", lblWarning);
|
|
|
|
|
builder->get_widget("imgInfo", imgInfo);
|
|
|
|
|
builder->get_widget("btnBoxAboutDialog", btnBoxAboutDialog);
|
|
|
|
|
builder->get_widget("treeViewKernel", treeViewKernel);
|
|
|
|
|
builder->get_widget("treeViewOTT", treeViewOTT);
|
|
|
|
|
builder->get_widget("treeViewIPT", treeViewIPT);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::localization(){
|
|
|
|
|
@ -188,56 +162,30 @@ void MainWindow::localization(){
|
|
|
|
|
lblInfoCommand2->set_text(_("Command line parameters:"));
|
|
|
|
|
lblInfoDefaultDonw->set_text(_("Default download"));
|
|
|
|
|
lblInfoSeconds->set_text(_("Seconds"));
|
|
|
|
|
lblDownloadMenu->set_text(_("Download menu"));
|
|
|
|
|
lblLoadMenu->set_text(_("Download menu"));
|
|
|
|
|
lblInfoInputTerminal->set_text(_("Input terminal"));
|
|
|
|
|
lblInfoOutputTerminal->set_text(_("Output terminal"));
|
|
|
|
|
|
|
|
|
|
chbLoadVariantSelectionTimer->set_label(_("Load variant selection timer"));
|
|
|
|
|
chbLastSelectionWillBecome->set_label(_("The last selection will become the default boot choice"));
|
|
|
|
|
chbQuiet->set_label(_("quiet (Downloading without text messages)"));
|
|
|
|
|
chbSplash->set_label(_("splash (Show welcome window)"));
|
|
|
|
|
chbPlymouth->set_label(_("no plymouth (Disable Plymouth)"));
|
|
|
|
|
chbAcpi->set_label(_("acpi=off (Disable ACPI)"));
|
|
|
|
|
chbNоapic->set_label(_("nоapic (Disable APIC)"));
|
|
|
|
|
chbNolapic->set_label(_("nolapic (Disable local APIC)"));
|
|
|
|
|
chbSingle->set_label(_("single (Single User Mode)"));
|
|
|
|
|
chbHomodeset->set_label(_("nomodeset (Disable kernel selection and loading of video drivers)"));
|
|
|
|
|
chbI915Enable->set_label(_("i915.enable_dc=0 (Disable GPU power management)"));
|
|
|
|
|
chbAhci->set_label(_("ahci.mobile_jpm_policy=1 (Maximum performance, power management)"));
|
|
|
|
|
chbSndIntel->set_label(_("snd-intel-dspcfg.dsp_driver=1 (Forced selection of a sound device driver from Intel)"));
|
|
|
|
|
chbintelMax1->set_label(_("intel_idle max_cstate=1 (Prevents the processor from going into a deep sleep state)"));
|
|
|
|
|
chbintelMax4->set_label(_("intel_idle.max_cstate=4 (Eliminates flickering laptop display on processors Ultra Voltage)"));
|
|
|
|
|
chbconsoleIT->set_label(_("console (PC BIOS & console EFI)"));
|
|
|
|
|
chbSerialIT->set_label(_("serial (Serial terminal)"));
|
|
|
|
|
chbofConsoleIT->set_label(_("ofconsole (Console Open Firmware)"));
|
|
|
|
|
chbAtKeyboard ->set_label(_("at_keyboard (Keyboard PC AT (Coreboot))"));
|
|
|
|
|
chbUsbKeyboard->set_label(_("usb_keyboard (Keyboard USB Keyboard (protocol HID Boot))"));
|
|
|
|
|
chbofConsoleOT->set_label(_("ofconsole (Console Open Firmware)"));
|
|
|
|
|
chbSerialOT->set_label(_("serial (Serial terminal)"));
|
|
|
|
|
chbconsoleOT->set_label(_("console (PC BIOS & console EFI)"));
|
|
|
|
|
chbGfxterm->set_label(_("gfxterm (Output in graphical mode)"));
|
|
|
|
|
chbVgaText->set_label(_("chbVgaText"));
|
|
|
|
|
btnSynopsis->set_label(_("Help"));
|
|
|
|
|
btnAbout->set_label(_("About"));
|
|
|
|
|
btnSaveLocalGlob->set_label(_("Save to global and local configuration"));
|
|
|
|
|
btnSaveLocal->set_label(_("Save local configuration"));
|
|
|
|
|
btnSaveGlob->set_label(_("Save global configuration"));
|
|
|
|
|
btnDonwlolGlob->set_label(_("Load global configuration"));
|
|
|
|
|
btnDonwlodLocal->set_label(_("Load local configuration"));
|
|
|
|
|
btnLoadGlob->set_label(_("Load global configuration"));
|
|
|
|
|
btnLoadLocal->set_label(_("Load local configuration"));
|
|
|
|
|
btnSave->set_label(_("Save"));
|
|
|
|
|
btnDownload->set_label(_("Donwload"));
|
|
|
|
|
btnLoad->set_label(_("Load"));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void MainWindow::event(){
|
|
|
|
|
chbintelMax1->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::fn_event_intelMax1));
|
|
|
|
|
chbintelMax4->signal_toggled().connect(sigc::mem_fun(*this, &MainWindow::fn_event_intelMax4));
|
|
|
|
|
signal_configure_event().connect(sigc::mem_fun(*this, &MainWindow::gui_set_orientation), false);
|
|
|
|
|
btnSynopsis->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::synopsis_show));
|
|
|
|
|
btnAbout->signal_activate().connect([&]() {aboutWindows->show();});
|
|
|
|
|
btnDonwlodLocal->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::download_local_cfg));
|
|
|
|
|
btnDonwlolGlob->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::download_globl_cfg));
|
|
|
|
|
btnLoadLocal->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::download_local_cfg));
|
|
|
|
|
btnLoadGlob->signal_activate().connect(sigc::mem_fun(*this, &MainWindow::download_globl_cfg));
|
|
|
|
|
btnSaveLocalGlob->signal_activate().connect([&]() {save_global_local_cfg();});
|
|
|
|
|
btnSaveLocal->signal_activate().connect([&]() {save_local_cfg();});
|
|
|
|
|
btnSaveGlob->signal_activate().connect([&]() {save_global_cfg();});
|
|
|
|
|
@ -411,47 +359,6 @@ void MainWindow::fn_event_intelMax4(){
|
|
|
|
|
chbintelMax1->set_active(false);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
bool MainWindow::gui_set_orientation(GdkEventConfigure* event){
|
|
|
|
|
if (event){}
|
|
|
|
|
int w,h;
|
|
|
|
|
this->get_monitor_size();
|
|
|
|
|
w = this->get_width();
|
|
|
|
|
h = this->get_height();
|
|
|
|
|
int padding = w*0.11;
|
|
|
|
|
float padding_interest = 0.6;
|
|
|
|
|
if ((width!=w) || heigh!=h){
|
|
|
|
|
if (((screen_width/2)<=w) && ((screen_hight-padding)<=h)){
|
|
|
|
|
boxOtput1->set_orientation(Gtk::ORIENTATION_VERTICAL);
|
|
|
|
|
boxOtput2->set_orientation(Gtk::ORIENTATION_VERTICAL);
|
|
|
|
|
boxInput1->set_orientation(Gtk::ORIENTATION_VERTICAL);
|
|
|
|
|
boxInput2->set_orientation(Gtk::ORIENTATION_VERTICAL);
|
|
|
|
|
boxKernel->set_orientation(Gtk::ORIENTATION_VERTICAL);
|
|
|
|
|
boxKernel1->set_orientation(Gtk::ORIENTATION_VERTICAL);
|
|
|
|
|
boxKernel2->set_orientation(Gtk::ORIENTATION_VERTICAL);
|
|
|
|
|
cout << 1 << endl;
|
|
|
|
|
}
|
|
|
|
|
else if (((screen_width*padding_interest)<=w) && ((screen_hight*padding_interest)<=h)){
|
|
|
|
|
boxOtput1->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
|
|
|
|
|
boxOtput2->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
|
|
|
|
|
boxInput1->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
|
|
|
|
|
boxInput2->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
|
|
|
|
|
boxKernel->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
|
|
|
|
|
boxKernel1->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
|
|
|
|
|
boxKernel2->set_orientation(Gtk::ORIENTATION_HORIZONTAL);
|
|
|
|
|
cout << 2 << endl;
|
|
|
|
|
}
|
|
|
|
|
else{
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
width=w;
|
|
|
|
|
heigh=h;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void MainWindow::add_CSS(){
|
|
|
|
|
Glib::RefPtr<Gtk::CssProvider> cssProvider = Gtk::CssProvider::create();
|
|
|
|
|
cssProvider->load_from_path(path_css);
|
|
|
|
|
|