Добавлен webkit

pull/3/head
Igor Belitskiy 2 years ago
parent 9dee33eaca
commit 696928b924

@ -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();});

@ -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;

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.40.0 -->
<!-- Generated with glade 3.38.2 -->
<interface>
<requires lib="gtk+" version="3.24"/>
<object class="GtkListStore" id="DeviceStore">
@ -4247,4 +4247,238 @@
</object>
</child>
</object>
<object class="GtkApplicationWindow" id="wndShowWeb">
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="resizable">False</property>
<property name="default-width">450</property>
<property name="default-height">250</property>
<property name="icon-name">dialog-question-symbolic</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="valign">start</property>
<property name="xpad">20</property>
<property name="ypad">20</property>
<property name="icon-name">dialog-question-symbolic</property>
<property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkLabel" id="lblhelpHeader">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="margin-top">10</property>
<property name="margin-bottom">5</property>
<property name="label" context="Would you like to read documentation in the Net?" comments="Would you like to read documentation in the Net?">Would you like to read documentation in the Web?</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
<style>
<class name="fgnb"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lblhelpText">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">start</property>
<property name="valign">start</property>
<property name="margin-right">10</property>
<property name="margin-end">10</property>
<property name="label" context="You will be redirected to documentation web site, where documentation are translated and supported by community." comments="You will be redirected to documentation web site, where documentation are translated and supported by community.">You will be redirected to documentation website where documentation is translated and supported by community.</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
<style>
<class name="fgnb"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="chkAlwaysOpenHelp">
<property name="label" translatable="yes">Always redirect to online documentation</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="halign">end</property>
<property name="margin-bottom">10</property>
<property name="draw-indicator">True</property>
<style>
<class name="label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
<style>
<class name="fgnb"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<style>
<class name="fgnb"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="spacing">30</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="btnCancelHelp">
<property name="label">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<style>
<class name="button"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="btnReadHelp">
<property name="label">Read Online</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<style>
<class name="button"/>
</style>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar" id="SettingsBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="show-close-button">True</property>
<child type="title">
<object class="GtkLabel" id="lblwebHeaderName">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">ubl-settings-datetime</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">32</property>
<property name="icon-name">dialog-question-symbolic</property>
</object>
</child>
</object>
</child>
</object>
<object class="GtkWindow" id="wndWeb">
<property name="width-request">800</property>
<property name="height-request">600</property>
<property name="can-focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="icon-name">com.ublinux.ubl-settings-datetime</property>
<child>
<placeholder/>
</child>
<child type="titlebar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="show-close-button">True</property>
<child type="title">
<object class="GtkLabel" id="lblHeadeWndWeb">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">ubl-settings-datetime</property>
</object>
</child>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="pixel-size">32</property>
<property name="icon-name">com.ublinux.ubl-settings-datetime</property>
<property name="icon_size">5</property>
</object>
</child>
</object>
</child>
</object>
</interface>

@ -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"

Loading…
Cancel
Save