diff --git a/source/ubl-settings-diskquota.cc b/source/ubl-settings-diskquota.cc index e8d8179..2ca853b 100755 --- a/source/ubl-settings-diskquota.cc +++ b/source/ubl-settings-diskquota.cc @@ -42,6 +42,15 @@ void MainWindow::settings() { ,quotegroupFilesHarLimitLabel); obj_quotas_sys.set_map_gui(map_gui_cfg); obj_quotas_ubconfig.set_map_gui(map_gui_cfg); + #ifdef WEBKIT_FOUND + void *handle=NULL; + handle = dlopen("libwebkit2gtk-4.0.so", RTLD_LAZY); + if (handle) { + one = WEBKIT_WEB_VIEW( webkit_web_view_new() ); + three = Glib::wrap(GTK_WIDGET(one)); + wndWeb->add(*three); + } + #endif if (geteuid() == 0) { this->load_system_cfg(); this->load_global_cfg(); @@ -59,15 +68,7 @@ void MainWindow::settings() { builder->get_widget("boxColor", boxWidget); HeadOverlay->add_overlay(*boxWidget); ubl_make_plugs(boxSave, boxButton, socket_ext_id_I, socket_trd_id_I); - #ifdef WEBKIT_FOUND - void *handle=NULL; - handle = dlopen("libwebkit2gtk-4.0.so", RTLD_LAZY); - if (handle) { - one = WEBKIT_WEB_VIEW( webkit_web_view_new() ); - three = Glib::wrap(GTK_WIDGET(one)); - wndWeb->add(*three); - } - #endif + } void MainWindow::init_spin_all() { @@ -243,6 +244,12 @@ void MainWindow::lacalization() { lblHeadFiltersWindow->set_label(str_filters); ProjectTabLabel->set_label(str_projects); usersProjectLabel->set_text(str_device); + lblhelpHeader->set_text(read_documentation_web); + lblhelpText->set_text(redirected_documentation); + btnReadHelp->set_label(read_online); + btnCancelHelp->set_label(cancel); + chkAlwaysOpenHelp->set_label(always_redirect); + lblwebHeaderName->set_label(name_app); } @@ -461,10 +468,21 @@ void MainWindow::get_builder() { builder->get_widget("wndWeb", wndWeb); } #endif + builder->get_widget("lblHeadeWndWeb", lblHeadeWndWeb); + builder->get_widget("lblwebHeaderName", lblwebHeaderName); + builder->get_widget("lblhelpText", lblhelpText); + builder->get_widget("lblhelpHeader", lblhelpHeader); + builder->get_widget("chkAlwaysOpenHelp", chkAlwaysOpenHelp); + builder->get_widget("btnReadHelp", btnReadHelp); + builder->get_widget("btnCancelHelp", btnCancelHelp); + builder->get_widget("wndShowWeb", wndShowWeb); } void MainWindow::event() { + btnCancelHelp->signal_clicked().connect([&]() {wndShowWeb->hide();}); + chkAlwaysOpenHelp->signal_toggled().connect([&]() {flag_open_browser = true;}); + btnReadHelp->signal_clicked().connect(sigc::mem_fun(*this, &MainWindow::open_browser)); btnFilterGroups->signal_clicked().connect([&]() {this->groupsFilters_show();}); btnFilterUsers->signal_clicked().connect([&]() {this->groupsFilters_show();}); btnFilterProject->signal_clicked().connect([&]() {this->groupsFilters_show();}); diff --git a/source/ubl-settings-diskquota.h b/source/ubl-settings-diskquota.h index c253f1a..27943c3 100644 --- a/source/ubl-settings-diskquota.h +++ b/source/ubl-settings-diskquota.h @@ -39,6 +39,14 @@ #define load_local _("Load local configuration") #define read_online _("Read online") #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 boot_menu_user_name _("Boot menu user name:") +#define boot_menu_user_password _("Boot menu user password:") +#define last_successful_upload _("Last successful upload") +#define read_documentation_web _("Would you like to read documentation in the Web?") +#define redirected_documentation _("You will be redirected to documentation site, where user help pages are ""translated and supported by community.") #define local_read_error _("Local configuration reading error") #define global_read_error _("Global configuration read error") #define local_write_error _("Local configuration write error") @@ -308,6 +316,14 @@ class MainWindow : public Gtk::ApplicationWindow { Gtk::Button *btnFilterUsers; Gtk::Button *btnFilterProject; Gtk::ComboBoxText *quotegroupDeviceCombo; + Gtk::Label *lblHeadeWndWeb; + + Gtk::Label *lblwebHeaderName; + Gtk::Label *lblhelpText; + Gtk::Label *lblhelpHeader; + Gtk::CheckButton *chkAlwaysOpenHelp; + Gtk::Button *btnReadHelp; + Gtk::Button *btnCancelHelp; Gtk::Window *wndShowWeb; #ifdef WEBKIT_FOUND Gtk::Window *wndWeb; diff --git a/ubl-settings-diskquota.glade b/ubl-settings-diskquota.glade index 5c188a9..ebd182e 100644 --- a/ubl-settings-diskquota.glade +++ b/ubl-settings-diskquota.glade @@ -1,5 +1,5 @@ - + @@ -4247,4 +4247,238 @@ + + False + start + start + False + 450 + 250 + dialog-question-symbolic + + + True + False + vertical + + + True + False + + + True + False + start + 20 + 20 + dialog-question-symbolic + 6 + + + False + True + 0 + + + + + True + False + vertical + + + True + False + start + 10 + 5 + Would you like to read documentation in the Web? + True + 0 + + + + + + + False + True + 0 + + + + + True + False + start + start + 10 + 10 + You will be redirected to documentation website where documentation is translated and supported by community. + True + 0 + + + + True + True + 1 + + + + + Always redirect to online documentation + True + True + False + end + 10 + True + + + + False + True + 2 + + + + + + True + True + 1 + + + + + + True + True + 0 + + + + + True + False + 5 + 5 + 5 + 5 + 5 + 5 + 30 + True + + + Cancel + True + True + True + + + + True + True + 0 + + + + + Read Online + True + True + True + + + + True + True + 1 + + + + + False + True + 1 + + + + + + + True + False + True + + + True + False + ubl-settings-datetime + + + + + + + + True + False + 32 + dialog-question-symbolic + + + + + + + 800 + 600 + False + True + True + com.ublinux.ubl-settings-datetime + + + + + + True + False + True + + + True + False + ubl-settings-datetime + + + + + True + False + 32 + com.ublinux.ubl-settings-datetime + 5 + + + + + diff --git a/ubl-settings-diskquota_ru.po b/ubl-settings-diskquota_ru.po index 6538b83..ca810bb 100644 --- a/ubl-settings-diskquota_ru.po +++ b/ubl-settings-diskquota_ru.po @@ -17,6 +17,25 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" +msgid "Would you like to read documentation in the Web?" +msgstr "Вы хотите прочитать справку в Сети?" + +msgid "" +"You will be redirected to documentation site, where user help pages are " +"translated and supported by community." +msgstr "" +"Вы будете перенаправлены на сайт с документацией где страницы помощи " +"переводятся и поддерживаются сообществом." + +msgid "Cancel" +msgstr "Отменить" + +msgid "Always redirect" +msgstr "Всегда перенаправлять" + +msgid "Read online" +msgstr "Прочитать онлайн" + #: source/ubl-settings-quotas.cc:224 source/ubl-settings-quotas.cc:154 #: source/ubl-settings-quotas.cc:144 msgid "About"