diff --git a/source/ubl-settings-bootloader.cc b/source/ubl-settings-bootloader.cc index 60aa7d8..cde08ff 100644 --- a/source/ubl-settings-bootloader.cc +++ b/source/ubl-settings-bootloader.cc @@ -112,12 +112,14 @@ void MainWindow::get_builder(){ builder->get_widget("btnSynopsis", btnSynopsis); builder->get_widget("btnAbout", btnAbout); - - - - - - + builder->get_widget("btnDonwlodLocal", btnDonwlodLocal); + builder->get_widget("btnDonwlolGlob", btnDonwlolGlob); + 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("btnSave", btnSave); } void MainWindow::localization(){ @@ -170,8 +172,13 @@ void MainWindow::localization(){ chbVgaText->set_label(gettext("chbVgaText")); btnSynopsis->set_label(gettext("Help")); btnAbout->set_label(gettext("About")); - - //set_label(gettext("Command line parameters:")); + btnSaveLocalGlob->set_label(gettext("Save to global and local configuration")); + btnSaveLocal->set_label(gettext("Save local configuration")); + btnSaveGlob->set_label(gettext("Save global configuration")); + btnDonwlolGlob->set_label(gettext("Load global configuration")); + btnDonwlodLocal->set_label(gettext("Load local configuration")); + btnSave->set_label(gettext("Save")); + btnDownload->set_label(gettext("Donwload")); } @@ -182,8 +189,34 @@ void MainWindow::event(){ 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)); + btnSaveLocalGlob->signal_activate().connect([&]() {save_global_local_cfg();}); + btnSaveLocal->signal_activate().connect([&]() {save_local_cfg();}); + btnSaveGlob->signal_activate().connect([&]() {save_global_cfg();}); +} + +void MainWindow::save_global_local_cfg(){ + } +void MainWindow::save_local_cfg(){ + +} + +void MainWindow::save_global_cfg(){ + +} + +void MainWindow::download_local_cfg(){ + +} + +void MainWindow::download_globl_cfg(){ + +} + + void MainWindow::synopsis_show() { wrapper_system("xdg-open https://wiki.ublinux.ru/ru/home", "&"); } diff --git a/source/ubl-settings-bootloader.h b/source/ubl-settings-bootloader.h index 6a23357..fa8e678 100644 --- a/source/ubl-settings-bootloader.h +++ b/source/ubl-settings-bootloader.h @@ -81,6 +81,14 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::AboutDialog *aboutWindows; Gtk::MenuItem *btnAbout; Gtk::MenuItem *btnSynopsis; + Gtk::MenuItem *btnSaveLocalGlob; + Gtk::MenuItem *btnSaveLocal; + Gtk::MenuItem *btnSaveGlob; + Gtk::MenuItem *btnDonwlolGlob; + Gtk::MenuItem *btnDonwlodLocal; + Gtk::Button *btnDownload; + Gtk::Button *btnSave; + Gtk::Button *btnSettings; private: int width; @@ -114,6 +122,11 @@ class MainWindow : public Gtk::ApplicationWindow { void wrapper_system(string cmd, string thread_str); struct Result wrapper_call(string cmd); void log_mess_error(string &cmd); + void save_global_local_cfg(); + void save_local_cfg(); + void save_global_cfg(); + void download_local_cfg(); + void download_globl_cfg(); diff --git a/style.css b/style.css index 41a96a0..3fdf619 100644 --- a/style.css +++ b/style.css @@ -1,7 +1,89 @@ +.boxInfoMessError{ + background-color: #ea9999; +} .cssboxColor1{ - background: url("/usr/share/ublexec/images/bg_top.png") no-repeat; + background: url("/usr/share/ubl-settings-datetime/images/bg_top.png") no-repeat; +} +.boxInfoMessOK{ + background-color: #f3f0ac; } .textHead{ text-shadow: 1px 1px #ffffff; } +.textHeaderBar{ + font-weight: bold; +} +.menuitemtop *{ + margin:2px 2px 0 2px; + padding: 5px 10px 3px 5px; +} +.menuitemmiddle *{ + margin:0 2px 0 2px; + padding: 3px 10px 3px 5px; +} +.menuitembottom *{ + margin:0 2px 2px 2px; + padding: 3px 10px 5px 5px; +} +.menuitemtop:hover { + border-radius:3px; + background:@theme_bg_color; +} +.menuitemmiddle:hover { + border-radius:3px; + background:@theme_bg_color; +} +.menuitembottom:hover { + border-radius:3px; + background:@theme_bg_color; + +} +.menuitemtop:hover* { + border-radius:3px; + margin:2px 2px 0 2px; + padding: 5px 10px 3px 5px; + background:@theme_selected_bg_color; + border-color:transparent; +} +.menuitemmiddle:hover* { + border-radius:3px; + margin:0 2px 0 2px; + padding: 3px 10px 3px 5px; + background:@theme_selected_bg_color; + border-color:transparent; +} +.menuitembottom:hover* { + border-radius:3px; + margin:0 2px 2px 2px; + padding: 3px 10px 5px 5px; + background:@theme_selected_bg_color; + border-color:transparent; +} +.menuitembottom{ + margin-top:0px; +} +.menuitemmiddle{ + margin-top:0px; + margin-bottom:0px; +} + +.menuitemtop{ + margin-bottom:0px; +} + +.bkimHeadBar{ + opacity:1.0; +} +.bkimButton{ + background-color: transparent; + opacity:1.0; +} +.bkimButtonPlug{ + background-color: transparent; + color: rgb(0, 0, 0); + opacity:1.0; +} +.noborder{ + border:none; +} \ No newline at end of file diff --git a/ubl-settings-bootloader.glade b/ubl-settings-bootloader.glade index d1d7a08..0881640 100644 --- a/ubl-settings-bootloader.glade +++ b/ubl-settings-bootloader.glade @@ -49,6 +49,33 @@ + + True + False + False + False + 4 + + + True + False + Load global configuration + + + + + + True + False + Load local configuration + + + + True False @@ -76,6 +103,43 @@ + + True + False + False + False + 4 + + + True + False + Save to global and local configuration + + + + + + True + False + Save global configuration + + + + + + True + False + Save local configuration + + + + 750 550 @@ -1264,7 +1328,7 @@ specified priority True False - UBConfig - Loading + ubl-settings-bootloader @@ -1280,19 +1344,146 @@ specified priority True False - + + True + False + + + True + True + False + True + True + menu2 + none + + + True + False + + + True + False + 5 + 5 + 5 + 5 + Save + + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + + + + + + False + True + 0 + + + + + True + True + False + True + True + menu1 + none + + + True + False + open-menu-symbolic + + + + + False + True + 1 + + + + + + False + True + 0 + + + + + end + 1 + + + + + True + False + + True True False True True - menu1 + menu none - + True False - open-menu-symbolic + + + True + False + 5 + 5 + 5 + 5 + Download + + + False + True + 0 + + + + + True + False + pan-down-symbolic + + + False + True + 1 + + @@ -1302,10 +1493,12 @@ specified priority 0 + - end - 1 + 2 diff --git a/ubl-settings-bootloader_ru.po b/ubl-settings-bootloader_ru.po index db88110..1fb87d6 100644 --- a/ubl-settings-bootloader_ru.po +++ b/ubl-settings-bootloader_ru.po @@ -120,3 +120,24 @@ msgstr "О программе" msgid "Help" msgstr "Справка" + +msgid "Save to global and local configuration" +msgstr "Сохранить глобальную и локальную конфигурацию" + +msgid "Save global configuration" +msgstr "Сохранить глобальную конфигурацию" + +msgid "Save local configuration" +msgstr "Сохранить локальную конфигурацию" + +msgid "Load global configuration" +msgstr "Загрузить глобальную конфигурацию" + +msgid "Load local configuration" +msgstr "Загрузить локальную конфигурацию" + +msgid "Save" +msgstr "Сохранить" + +msgid "Download" +msgstr "Загрузить"