1.0 Library version

pull/1/head
parent b8000f21f5
commit 9bb41c67d3

4
.gitignore vendored

@ -9,4 +9,6 @@ source/ubl-cmake.h
vgcore* vgcore*
.BUILD.md .BUILD.md
.updatebuild.sh .updatebuild.sh
.install.sh .install.sh
ublsettings-ui-debug
.install-debug.sh

@ -2,6 +2,9 @@
<gresources> <gresources>
<gresource prefix="/com/ublinux/ui"> <gresource prefix="/com/ublinux/ui">
<file>ublsettings-ui.glade</file> <file>ublsettings-ui.glade</file>
<file>ublsettings-ui-about.glade</file>
<file>ublsettings-ui-documentation.glade</file>
<file>ublsettings-ui-save-confirmation.glade</file>
</gresource> </gresource>
<gresource prefix="/com/ublinux/css"> <gresource prefix="/com/ublinux/css">
<file>ublsettings-ui.css</file> <file>ublsettings-ui.css</file>

@ -9,6 +9,11 @@ include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK_LIBRARY_DIRS}) link_directories(${GTK_LIBRARY_DIRS})
add_definitions(${GTK_CFLAGS_OTHER}) add_definitions(${GTK_CFLAGS_OTHER})
pkg_check_modules(VTE291 REQUIRED vte-2.91)
include_directories(${VTE291_INCLUDE_DIRS})
link_directories(${VTE291_LIBRARY_DIRS})
add_definitions(${VTE291_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
option(WEBKIT_FOUND "No" OFF) option(WEBKIT_FOUND "No" OFF)
@ -32,6 +37,9 @@ add_custom_target(GLADE ublsettings-ui.glade)
set(DEPENDFILES set(DEPENDFILES
../ublsettings-ui.glade ../ublsettings-ui.glade
../ublsettings-ui-about.glade
../ublsettings-ui-documentation.glade
../ublsettings-ui-save-confirmation.glade
../gresource.xml ../gresource.xml
../ublsettings-ui-banner.png ../ublsettings-ui-banner.png
../ublsettings-ui.css ../ublsettings-ui.css
@ -62,7 +70,7 @@ add_custom_target(
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \
-O2 -pipe -fno-plt -fexceptions \ -O2 -pipe -fno-plt -fexceptions \
-Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \
-fstack-clash-protection -fcf-protection -g") -fstack-clash-protection -fcf-protection")
add_library(${PROJECT_NAME} SHARED add_library(${PROJECT_NAME} SHARED
ublsettings-ui.c ublsettings-ui.c

@ -4,48 +4,28 @@
//signal emmit handlers - no header initialization //signal emmit handlers - no header initialization
/**on_close_subwindow(GtkWidget *self) void on_subwindow_close(GtkWidget *self){
* [EN]
* Closes window in which [self] is contained.
* [RU]
* Закрывает окно, в котором расположен виджет [self].
*/
void on_close_subwindow(GtkWidget *self){
gtk_widget_destroy(gtk_widget_get_toplevel(self)); gtk_widget_destroy(gtk_widget_get_toplevel(self));
} }
/**yon_open_browser(GtkWidget *self, char *link)
* [EN]
* Opens browser with [link] link.
* [RU]
* Открывает браузер с [link] ссылкой.
*/
void yon_open_browser(GtkWidget *self, char *link){ void yon_open_browser(GtkWidget *self, char *link){
yon_ubl_browser_window_open(link,app_information.app_name); yon_ubl_browser_window_open(link,template_app_information.app_title);
} }
/**on_open_documentation_confirmation(GtkWidget *self, char *link)
* [EN]
* Opens confirmation window for [link] link.
* [RU]
* Открывает окно подтверждение перехода по ссылке [link].
*/
void on_open_documentation_confirmation(GtkWidget *self, char *link){ void on_open_documentation_confirmation(GtkWidget *self, char *link){
if (app_information.always_open_documentation==0){ if (template_app_information.always_open_documentation==0){
GtkBuilder *builder = gtk_builder_new_from_resource(ui_glade_path); GtkBuilder *builder = gtk_builder_new_from_resource(ui_glade_path_documentation);
documentation_confirmation_window *widgets = malloc(sizeof(documentation_confirmation_window)); template_documentation_confirmation_window *window = malloc(sizeof(template_documentation_confirmation_window));
widgets->Window = yon_gtk_builder_get_widget(builder,"helpConfirmationWindow"); window->Window = yon_gtk_builder_get_widget(builder,"helpConfirmationWindow");
widgets->AcceptButton = yon_gtk_builder_get_widget(builder,"ReadHelpButton"); window->AcceptButton = yon_gtk_builder_get_widget(builder,"ReadHelpButton");
widgets->CloseButton = yon_gtk_builder_get_widget(builder,"CancelHelpButton"); window->CloseButton = yon_gtk_builder_get_widget(builder,"CancelHelpButton");
widgets->HatText = yon_gtk_builder_get_widget(builder,"webHeaderNameLabel"); window->HeaderLabel = yon_gtk_builder_get_widget(builder,"webHeaderNameLabel");
widgets->HeaderText = yon_gtk_builder_get_widget(builder,"helpHeader"); window->AlwaysOpenCheck = yon_gtk_builder_get_widget(builder,"AlwaysOpenDocumentationCheckbox");
widgets->InfoText = yon_gtk_builder_get_widget(builder,"helpText"); gtk_label_set_text(GTK_LABEL(window->HeaderLabel),template_app_information.app_title);
widgets->AlwaysOpenCheck = yon_gtk_builder_get_widget(builder,"AlwaysOpenDocumentationCheckbox"); gtk_widget_show_all(window->Window);
gtk_label_set_text(GTK_LABEL(widgets->HatText),app_information.app_name); g_signal_connect(G_OBJECT(window->CloseButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
gtk_widget_show_all(widgets->Window); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(link));
g_signal_connect(G_OBJECT(widgets->CloseButton),"clicked",G_CALLBACK(on_close_subwindow),NULL); g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(widgets->AcceptButton),"clicked",G_CALLBACK(yon_open_browser),yon_char_new(link));
g_signal_connect(G_OBJECT(widgets->AcceptButton),"clicked",G_CALLBACK(on_close_subwindow),NULL);
} else { } else {
@ -72,22 +52,14 @@ void on_link(GtkWidget *self, char* uri, gpointer user_data){
on_open_documentation_confirmation(self,uri); on_open_documentation_confirmation(self,uri);
} }
/**on_about() void on_about(GtkWidget *self, char *version_application){
* [EN] GtkBuilder *builder=gtk_builder_new_from_resource(ui_glade_path_about);
* Function for setting up and showing AboutDialog.
* Connect it to "activate" signal of Documentation MenuItem.
* [RU]
* Функиця для настройки и показа окна AboutDialog.
* Присоединять к сигналу "activate" кнопки справки типа MenuItem.
*/
void on_about(){
GtkBuilder *builder=gtk_builder_new_from_resource(ui_glade_path);
GtkWidget *window=yon_gtk_builder_get_widget(builder,"AboutWindow"); GtkWidget *window=yon_gtk_builder_get_widget(builder,"AboutWindow");
GtkWidget *title=yon_gtk_builder_get_widget(builder,"headerAboutTopic"); GtkWidget *title=yon_gtk_builder_get_widget(builder,"headerAboutTopic");
GtkWidget *hideButtonBox=yon_gtk_builder_get_widget(builder,"buttonBoxHide"); GtkWidget *hideButtonBox=yon_gtk_builder_get_widget(builder,"buttonBoxHide");
gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(window),version_application); gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(window),version_application);
gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(window),app_information.app_name); gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(window),template_app_information.app_title);
gtk_label_set_text(GTK_LABEL(title),app_information.app_name); gtk_label_set_text(GTK_LABEL(title),template_app_information.app_title);
g_signal_connect(G_OBJECT(window),"activate-link",G_CALLBACK(on_link),NULL); g_signal_connect(G_OBJECT(window),"activate-link",G_CALLBACK(on_link),NULL);
gtk_widget_set_visible(hideButtonBox,0); gtk_widget_set_visible(hideButtonBox,0);
gtk_widget_destroy(hideButtonBox); gtk_widget_destroy(hideButtonBox);
@ -97,22 +69,28 @@ void on_about(){
//functions //functions
void yon_load_proceed(char *command){ void yon_load_proceed(char *command){
if (yon_config_load_register(command)) yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
yon_ubl_status_box_render(LOCAL_SAVE_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
else
yon_ubl_status_box_render(LOAD_FAILED_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
} }
// standard functions // standard functions
int yon_ubl_connect_config(_template_config *config){
int replaces;
if(!template_config)
replaces=0;
else
replaces=1;
template_config = config;
return replaces;
}
main_window *setup_window(){ template_main_window *setup_window(){
/* Widgets getting | Получение виджетов */ /* Widgets getting | Получение виджетов */
main_window *widgets = malloc(sizeof(main_window)); template_main_window *widgets = malloc(sizeof(template_main_window));
GtkBuilder *builder = gtk_builder_new_from_resource(ui_glade_path); GtkBuilder *builder = gtk_builder_new_from_resource(ui_glade_path);
widgets->Window = yon_gtk_builder_get_widget(builder,"MainWindow"); widgets->Window = yon_gtk_builder_get_widget(builder,"MainWindow");
widgets->HatLabel = yon_gtk_builder_get_widget(builder,"headerTopic"); widgets->HeadLabel = yon_gtk_builder_get_widget(builder,"headerTopic");
widgets->PlugBox = yon_gtk_builder_get_widget(builder,"plugBox"); widgets->PlugBox = yon_gtk_builder_get_widget(builder,"plugBox");
widgets->HeadOverlay = yon_gtk_builder_get_widget(builder,"HeadOverlay"); widgets->HeadOverlay = yon_gtk_builder_get_widget(builder,"HeadOverlay");
@ -125,13 +103,11 @@ main_window *setup_window(){
widgets->StatusIcon = yon_gtk_builder_get_widget(builder,"mainStatusIcon"); widgets->StatusIcon = yon_gtk_builder_get_widget(builder,"mainStatusIcon");
widgets->StatusLabel = yon_gtk_builder_get_widget(builder,"mainStatusLabel"); widgets->StatusLabel = yon_gtk_builder_get_widget(builder,"mainStatusLabel");
widgets->SaveLabel = yon_gtk_builder_get_widget(builder,"headerSaveConfigLabel");
widgets->SaveMenuItem = yon_gtk_builder_get_widget(builder,"SaveGlobalLocalConfigurationMenuItem"); widgets->SaveMenuItem = yon_gtk_builder_get_widget(builder,"SaveGlobalLocalConfigurationMenuItem");
widgets->SaveGlobalMenuItem = yon_gtk_builder_get_widget(builder,"SaveGlobalConfigurationMenuItem"); widgets->SaveGlobalMenuItem = yon_gtk_builder_get_widget(builder,"SaveGlobalConfigurationMenuItem");
widgets->SaveLocalMenuItem = yon_gtk_builder_get_widget(builder,"SaveLocalConfigurationMenuItem"); widgets->SaveLocalMenuItem = yon_gtk_builder_get_widget(builder,"SaveLocalConfigurationMenuItem");
widgets->RightBox = yon_gtk_builder_get_widget(builder,"HeaderRightBox"); widgets->RightBox = yon_gtk_builder_get_widget(builder,"HeaderRightBox");
widgets->LoadLabel = yon_gtk_builder_get_widget(builder,"headerLoadConfigLabel");
widgets->LoadGlobalMenuItem = yon_gtk_builder_get_widget(builder,"LoadGlobalConfigurationMenuItem"); widgets->LoadGlobalMenuItem = yon_gtk_builder_get_widget(builder,"LoadGlobalConfigurationMenuItem");
widgets->LoadLocalMenuItem = yon_gtk_builder_get_widget(builder,"LoadLocalConfigurationMenuItem"); widgets->LoadLocalMenuItem = yon_gtk_builder_get_widget(builder,"LoadLocalConfigurationMenuItem");
widgets->LeftBox = yon_gtk_builder_get_widget(builder,"HeaderLeftBox"); widgets->LeftBox = yon_gtk_builder_get_widget(builder,"HeaderLeftBox");
@ -139,7 +115,10 @@ main_window *setup_window(){
widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL); widgets->DocumentationMenuItem = yon_ubl_menu_item_documentation_new(DOCUMENTATION_LABEL);
widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL); widgets->AboutMenuItem = yon_ubl_menu_item_about_new(ABOUT_LABEL);
gtk_window_set_title(GTK_WINDOW(widgets->Window),app_information.app_name); gtk_window_set_title(GTK_WINDOW(widgets->Window),template_app_information.app_title);
gtk_label_set_text(GTK_LABEL(widgets->HeadLabel),template_app_information.app_title);
gtk_label_set_text(GTK_LABEL(widgets->HeadTitleLabel),template_app_information.app_title);
gtk_label_set_text(GTK_LABEL(widgets->HeadInfoLabel),template_app_information.app_description);
GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2"); GtkWidget *menu = yon_gtk_builder_get_widget(builder,"menu2");
gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem); gtk_menu_shell_append(GTK_MENU_SHELL(menu),widgets->DocumentationMenuItem);
@ -150,7 +129,7 @@ main_window *setup_window(){
/* Signal connection | Присоединение сигналов */ /* Signal connection | Присоединение сигналов */
g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(gtk_main_quit), NULL); g_signal_connect(G_OBJECT(widgets->Window), "destroy", G_CALLBACK(gtk_main_quit), NULL);
g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),app_information.wiki_link); g_signal_connect(G_OBJECT(widgets->DocumentationMenuItem),"activate",G_CALLBACK(on_open_documentation_confirmation),template_app_information.wiki_link);
g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(on_about),NULL); g_signal_connect(G_OBJECT(widgets->AboutMenuItem),"activate",G_CALLBACK(on_about),NULL);
@ -158,29 +137,36 @@ main_window *setup_window(){
return widgets; return widgets;
} }
int yon_ubl_window_setup(GtkWidget *interface, char *app_name, char *app_description, char *locale){ int yon_ubl_window_setup(GtkWidget *interface, char *app_title, char *app_description, char *locale, char *css, char *tech_name, char *version, char *wiki){
app_information.interface=interface; template_app_information.interface=interface;
app_information.app_name=app_name; template_app_information.app_title=app_title;
app_information.app_description=app_description; template_app_information.css_path=css;
app_information.app_locale=locale; template_app_information.app_tech_name=tech_name;
template_app_information.app_version=version;
template_app_information.wiki_link=wiki;
template_app_information.app_description=app_description;
template_app_information.app_locale=locale;
} }
main_window *yon_ubl_window_init(int argc, char *argv[]){ template_main_window *yon_ubl_window_init(int argc, char *argv[]){
local=setlocale(LC_ALL, ""); textdomain (template_ui_LocaleName);
textdomain (app_information.app_locale); setlocale(LC_ALL,"");
gtk_init(&argc,&argv); // gtk_init(&argc,&argv);
main_window *widgets = setup_window(); template_main_window *widgets = setup_window();
yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,ui_banner_path); yon_ubl_header_setup_resource(widgets->HeadOverlay,widgets->HeadBox,widgets->HeadImage,ui_banner_path);
yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel); if (yon_ubl_status_box_setup(widgets->StatusIcon,widgets->StatusBox,widgets->StatusLabel)){
if (getuid()!=0) if (getuid()!=0)
yon_ubl_status_box_render(ROOT_WARNING_LABEL,BACKGROUND_IMAGE_FAIL_TYPE); yon_ubl_status_box_render(ROOT_WARNING_LABEL,BACKGROUND_IMAGE_FAIL_TYPE);
else else
yon_ubl_status_box_render(app_information.app_name,BACKGROUND_IMAGE_SUCCESS_TYPE); yon_ubl_status_box_render(LOCAL_LOAD_SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,app_information.socket_id,app_information.load_socket_id,app_information.save_socket_id); }
if(template_config)
yon_ubl_setup_sockets(widgets->PlugBox,widgets->LeftBox,widgets->RightBox,template_config->socket_id,template_config->load_socket_id,template_config->save_socket_id);
yon_window_config_setup(GTK_WINDOW(widgets->Window)); yon_window_config_setup(GTK_WINDOW(widgets->Window));
yon_window_config_load(ui_config_path); yon_window_config_load(ui_config_path);
GtkCssProvider *css=gtk_css_provider_new(); GtkCssProvider *css=gtk_css_provider_new();
@ -190,5 +176,4 @@ main_window *yon_ubl_window_init(int argc, char *argv[]){
-1); -1);
return widgets; return widgets;
gtk_main(); }
}

@ -18,37 +18,85 @@
#define _(String) gettext(String) #define _(String) gettext(String)
#define ui_glade_path "/com/ublinux/ui/ublsettings-ui.glade" #define ui_glade_path "/com/ublinux/ui/ublsettings-ui.glade"
#define ui_glade_path_documentation "/com/ublinux/ui/ublsettings-ui-documentation.glade"
#define ui_glade_path_about "/com/ublinux/ui/ublsettings-ui-about.glade"
#define ui_banner_path "/com/ublinux/images/ublsettings-ui-banner.png" #define ui_banner_path "/com/ublinux/images/ublsettings-ui-banner.png"
#define ui_CssPath "/com/ublinux/css/ublsettings-ui.css" #define ui_CssPath "/com/ublinux/css/ublsettings-ui.css"
#define ui_config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",app_information.app_locale,"/",app_information.app_locale,".conf",NULL) #define ui_config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",template_app_information.app_tech_name,"/",template_app_information.app_tech_name,".conf",NULL)
#define ui_LocalePath "/usr/share/locale" #ifndef UBL_UI
#define ui_LocaleName "ublsettings-ui" #define template_ui_LocalePath "/usr/share/locale"
typedef char* string; #define template_ui_LocaleName "ublsettings-ui"
string version_application;
char *local; #define SUCCESS_LABEL _("Operation succeeded")
#define ROOT_WARNING_LABEL _("Warning! Application was launched without root - root-dependent actions are locked")
#define ABOUT_LABEL _("About")
#define DOCUMENTATION_LABEL _("Documentation")
#define SAVE_LOCAL_LABEL _("Save to local configuration")
#define SAVE_GLOBAL_LABEL _("Save to global configuration")
#define SAVE_CONFIGURATION_LABEL _("Save configuration")
#define SAVE_LABEL _("Save")
#define LOAD_LOCAL_LABEL _("Load local configuration")
#define LOAD_GLOBAL_LABEL _("Load global configuration")
#define LOAD_LABEL _("Load")
#define CANCEL_LABEL _("Cancel")
#define ACCEPT_LABEL _("Accept")
#define HELP_TITLE_LABEL _("Would you like to read documentation in the Web?")
#define HELP_INFO_LABEL _("You will be redirected to documentation website where documentation is\ntranslated and supported by community.")
#define HELP_ALWAYS_OPEN_LABEL _("Always redirect to online documentation")
#define OPEN_HELP_LABEL _("Open documentation")
#define PROJECT_HOME_LABEL _("Project Home Page")
#define NOTHING_CHOSEN_LABEL _("Nothing were chosen")
#define GLOBAL_LOAD_SUCCESS_LABEL _("Global configuration loading succeeded.")
#define LOCAL_LOAD_SUCCESS_LABEL _("Local configuration loading succeeded.")
#define LOAD_FAILED_LABEL _("Config loading failed")
#define GLOBAL_LOCAL_SAVE_SUCCESS_LABEL _("Local and global configuration saving succeeded.")
#define GLOBAL_SAVE_SUCCESS_LABEL _("Global configuration saving succeeded.")
#define LOCAL_SAVE_SUCCESS_LABEL _("Local configuration saving succeeded.")
#endif
typedef struct { typedef struct {
GtkWidget *interface; GtkWidget *interface;
char *app_name;
char *app_description;
char *app_locale; char *app_locale;
char *css_path;
char *app_title; char *app_title;
char *app_description;
char *app_tech_name;
char *app_version;
char *wiki_link; char *wiki_link;
gboolean always_open_documentation; gboolean always_open_documentation;
} template_app_info;
static template_app_info template_app_information;
typedef struct {
int socket_id; int socket_id;
int load_socket_id; int load_socket_id;
int save_socket_id; int save_socket_id;
} app_info;
int lock_help;
int lock_save_local;
int lock_save_global;
int lock_load_global;
static app_info app_information; int always_open_documentation;
} _template_config;
static _template_config *template_config;
typedef struct { typedef struct {
//Standard
GtkWidget *Window; GtkWidget *Window;
GtkWidget *HatLabel; GtkWidget *HeadLabel;
GtkWidget *PlugBox; GtkWidget *PlugBox;
GtkWidget *HeadOverlay; GtkWidget *HeadOverlay;
@ -61,49 +109,90 @@ typedef struct {
GtkWidget *StatusIcon; GtkWidget *StatusIcon;
GtkWidget *StatusLabel; GtkWidget *StatusLabel;
GtkWidget *SaveLabel;
GtkWidget *SaveMenuItem; GtkWidget *SaveMenuItem;
GtkWidget *SaveGlobalMenuItem; GtkWidget *SaveGlobalMenuItem;
GtkWidget *SaveLocalMenuItem; GtkWidget *SaveLocalMenuItem;
GtkWidget *RightBox; GtkWidget *RightBox;
GtkWidget *LoadLabel;
GtkWidget *LoadGlobalMenuItem; GtkWidget *LoadGlobalMenuItem;
GtkWidget *LoadLocalMenuItem; GtkWidget *LoadLocalMenuItem;
GtkWidget *LeftBox; GtkWidget *LeftBox;
GtkWidget *DocumentationMenuItem; GtkWidget *DocumentationMenuItem;
GtkWidget *AboutMenuItem; GtkWidget *AboutMenuItem;
// Custom } template_main_window;
} main_window;
typedef struct { typedef struct {
GtkWidget *Window; GtkWidget *Window;
GtkWidget *HeaderLabel;
GtkWidget *HatText;
GtkWidget *HeaderText;
GtkWidget *InfoText;
GtkWidget *AlwaysOpenCheck; GtkWidget *AlwaysOpenCheck;
GtkWidget *CloseButton; GtkWidget *CloseButton;
GtkWidget *AcceptButton; GtkWidget *AcceptButton;
} documentation_confirmation_window; } template_documentation_confirmation_window;
/**yon_open_browser(GtkWidget *self, char *link)
#define GLOBAL_LOAD_SUCCESS_LABEL _("Global configuration loading succseeded.") * [EN]
#define LOCAL_LOAD_SUCCESS_LABEL _("Local configuration loading succseeded.") * Opens browser with [link] link.
#define LOAD_FAILED_LABEL _("Config loading failed") * [RU]
* Открывает браузер с [link] ссылкой.
#define GLOBAL_LOCAL_SAVE_SUCCESS_LABEL _("Local and global configuration saving succseeded.") */
#define GLOBAL_SAVE_SUCCESS_LABEL _("Global configuration saving succseeded.") void yon_open_browser(GtkWidget *self, char *link);
#define LOCAL_SAVE_SUCCESS_LABEL _("Local configuration saving succseeded.")
/**yon_ubl_connect_config(_template_config *config)
#define ABOUT_LABEL _("About") * [EN]
#define DOCUMENTATION_LABEL _("Documentation") *
* [RU]
#define SUCCESS_LABEL _("Operation succeeded") * Присоединяет конфиг основной утилиты (struct config) к стандартному интерфейсу.
#define ROOT_WARNING_LABEL _("Warning! Application was launched without root - root-dependent actions are locked") */
int yon_ubl_connect_config(_template_config *config);
main_window *yon_ubl_window_init(int argc, char *argv[]);
int yon_ubl_window_setup(GtkWidget *interface, char *app_name, char *app_description, char *locale); /**yon_ubl_window_init(int argc, char *argv[])
* [EN]
*
* [RU]
* Создаёт и настраивает основное окно приложения.
*/
template_main_window *yon_ubl_window_init(int argc, char *argv[]);
/**yon_ubl_window_setup(GtkWidget *interface, char *app_title, char *app_description, char *locale, char *css, char *tech_name, char *version, char *wiki)
* [EN]
*
* [RU]
* Установить важные значения для конфига;
* [app_title] - оботражаемое имя утилиты;
* [app_description] - отображаемое описание утилиты;
* [css] - путь к ресурсу css файла;
* [tech_name] - техническое имя утилиты (ubl-settings-)
* [version] - строка с версией приложения;
* [wiki] - ссылка на вики страницу;
*/
int yon_ubl_window_setup(GtkWidget *interface, char *app_title, char *app_description, char *locale, char *css, char *tech_name, char *version, char *wiki);
/**on_about()
* [EN]
* Function for setting up and showing AboutDialog.
* Connect it to "activate" signal of Documentation MenuItem.
* [RU]
* Функиця для настройки и показа окна AboutDialog.
* Присоединять к сигналу "activate" кнопки справки типа MenuItem.
*/
void on_about(GtkWidget *self, char *version_application);
/**on_open_documentation_confirmation(GtkWidget *self, char *link)
* [EN]
* Opens confirmation window for [link] link.
* [RU]
* Открывает окно подтверждения перехода по ссылке [link].
*/
void on_open_documentation_confirmation(GtkWidget *self, char *link);
/**on_subwindow_close(GtkWidget *self)
* [EN]
* Closes window in which [self] is contained.
* [RU]
* Закрывает окно, в котором расположен виджет [self].
*/
void on_subwindow_close(GtkWidget *self);

@ -9,6 +9,11 @@ include_directories(${GTK_INCLUDE_DIRS})
link_directories(${GTK_LIBRARY_DIRS}) link_directories(${GTK_LIBRARY_DIRS})
add_definitions(${GTK_CFLAGS_OTHER}) add_definitions(${GTK_CFLAGS_OTHER})
pkg_check_modules(VTE291 REQUIRED vte-2.91)
include_directories(${VTE291_INCLUDE_DIRS})
link_directories(${VTE291_LIBRARY_DIRS})
add_definitions(${VTE291_CFLAGS_OTHER})
find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0)
option(WEBKIT_FOUND "No" OFF) option(WEBKIT_FOUND "No" OFF)
@ -37,7 +42,7 @@ add_library(${PROJECT_NAME} SHARED
set(LIBRARIES set(LIBRARIES
${GTK_LIBRARIES} ${GTK_LIBRARIES}
${WEBKIT_LIBRARIES} ${WEBKIT_LIBRARIES}
# ${VTE291_LIBRARIES} ${VTE291_LIBRARIES}
pthread) pthread)
message(${CMAKE_INSTALL_LIBDIR}) message(${CMAKE_INSTALL_LIBDIR})

File diff suppressed because it is too large Load Diff

@ -14,8 +14,10 @@
#include <locale.h> #include <locale.h>
#include <gtk/gtk.h> #include <gtk/gtk.h>
#include <gtk/gtkx.h> #include <gtk/gtkx.h>
#include <vte/vte.h>
#include <time.h>
#include "ubl-cmake.h" #include "../compile/ubl-cmake.h"
#ifdef WEBKIT_FOUND #ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h> #include <webkit2/webkit2.h>
#endif #endif
@ -48,9 +50,11 @@ typedef struct dictionary
struct dictionary *prev; struct dictionary *prev;
struct dictionary *first; struct dictionary *first;
DICT_TYPE data_type; DICT_TYPE data_type;
int flag1;
} dictionary; } dictionary;
typedef struct apps typedef struct apps
{ {
char *Name; char *Name;
@ -64,13 +68,8 @@ typedef struct apps
typedef char** config_str; typedef char** config_str;
static dictionary *__yon__config__strings = NULL;
#define check_config if(__yon__config__strings&&__yon__config__strings->data_type==DICTIONARY_CHAR_TYPE)
#define config(key) yon_config_get_by_key(key) #define config(key) yon_config_get_by_key(key)
#define for_config dictionary temp = NULL; for_dictionary(temp,__yon__config__strings)
#define yon_remalloc(pointer, size) (!pointer) ? malloc(size) : realloc(pointer, size) #define yon_remalloc(pointer, size) (!pointer) ? malloc(size) : realloc(pointer, size)
// dictionary functions // dictionary functions
@ -124,6 +123,10 @@ void *yon_dictionary_free_all(dictionary *dictionary,void (data_manipulation)(vo
// char functions // char functions
#define yon_char_divide_search_self(str,find,delete_divider) {char *temp = str; str = yon_char_divide_search(str,find,delete_divider); free(temp);}
#define yon_char_is_empty(string) !(string&&strcmp(string,""))
int yon_char_find_last(char *source, char find); int yon_char_find_last(char *source, char find);
char *yon_char_append(char *source, char *append); char *yon_char_append(char *source, char *append);
@ -140,6 +143,10 @@ char *yon_char_divide_search(char *source, char *dividepos, int delete_divider);
char *yon_char_from_int(int int_to_convert); char *yon_char_from_int(int int_to_convert);
char *yon_char_from_float(float int_to_convert);
char *yon_char_from_long(long int_to_convert);
char *yon_char_replace(char *source, char *find, char*replace); char *yon_char_replace(char *source, char *find, char*replace);
char **yon_char_parse(char *parameters, int *size, char *divider); char **yon_char_parse(char *parameters, int *size, char *divider);
@ -148,12 +155,16 @@ char **yon_char_parsed_rip(char **char_string, int *size, int item_to_delete);
int yon_char_parsed_check_exist(char **parameters, int size, char *param); int yon_char_parsed_check_exist(char **parameters, int size, char *param);
int yon_char_parsed_check_repeats(char **parameters, int size, int *first_overlap, int *second_overlap);
int yon_char_find_count(char *source, char *find); int yon_char_find_count(char *source, char *find);
int yon_char_parsed_includes_char_parsed (config_str source, config_str to_check, int source_size, int check_size); int yon_char_parsed_includes_char_parsed (config_str source, config_str to_check, int source_size, int check_size);
config_str yon_char_parsed_new (int *size, ...); config_str yon_char_parsed_new (int *size, ...);
void yon_char_parsed_free(config_str source, int size);
void yon_char_parsed_copy(config_str *source, config_str *to_copy); void yon_char_parsed_copy(config_str *source, config_str *to_copy);
config_str yon_char_parsed_append(config_str parsed, int *size, char *string); config_str yon_char_parsed_append(config_str parsed, int *size, char *string);
@ -164,8 +175,12 @@ char *yon_ubl_root_user_get();
char *yon_ubl_user_get_home_directory(); char *yon_ubl_user_get_home_directory();
config_str yon_ubl_get_all_users(int *user_size);
// parsing functions // parsing functions
float yon_size_convert_automatic(int bytes, int *size);
config_str philos_list_user(int* size); config_str philos_list_user(int* size);
apps *yon_apps_scan_and_parse_desktops(int *sizef); apps *yon_apps_scan_and_parse_desktops(int *sizef);
@ -174,13 +189,34 @@ void yon_apps_sort(apps *applist, int size);
apps *yon_apps_get_by_name(apps *applist, char *name, int size); apps *yon_apps_get_by_name(apps *applist, char *name, int size);
config_str yon_file_open(char *file_path, int *size);
int yon_file_create(char *path, char *name, int rules);
int yon_file_create_full_path(char *path, int rules);
config_str yon_dir_get_contents(char *dir_path, int *size);
//config functions
#define ubconfig_save_command "ubconfig"
#define ubconfig_load_command "ubconfig --source"
typedef enum {
YON_CONFIG_LOCAL=0,
YON_CONFIG_GLOBAL,
YON_CONFIG_BOTH
} YON_CONFIG_TYPE;
config_str yon_config_load(char *command, int *str_len); config_str yon_config_load(char *command, int *str_len);
int yon_config_save_registered(char *command); int yon_config_save_registered(char *path);
int yon_config_force_save_registered(char *path);
char *yon_config_get_parameter(config_str parameters, int size, char *param); char *yon_config_get_parameter(config_str parameters, int size, char *param);
int yon_config_load_register(char *command); int yon_config_load_register(YON_CONFIG_TYPE config_type,char *section,char *parameter, ...);
int yon_config_remove_by_key(char *key); int yon_config_remove_by_key(char *key);
@ -190,13 +226,15 @@ int yon_config_remove_element(char *key, char *deleted);
void *yon_config_get_by_key(char *key); void *yon_config_get_by_key(char *key);
void *yon_config_get_all_by_key(char *key, int *size);
char *yon_config_get_key_by_data(char *data); char *yon_config_get_key_by_data(char *data);
int yon_config_set(char *key, void *data); int yon_config_set(char *key, void *data);
int yon_config_clean(); int yon_config_clean();
void yon_config_register(char *key, void *data); void yon_config_register(char *key, char* config_section, void *data);
config_str yon_config_get_all(); config_str yon_config_get_all();
@ -257,10 +295,18 @@ void yon_window_config_erase_custom_parameter(char *param_name, char *section);
int yon_window_config_get_parameter(char *section, char *config_parameter, void *return_value, enum YON_TYPE type); int yon_window_config_get_parameter(char *section, char *config_parameter, void *return_value, enum YON_TYPE type);
void yon_window_config_custom_window_setup(GtkWindow *window, char *window_name);
void yon_window_config_custom_window_get(GtkWindow *window, char *window_name);
void yon_window_config_custom_window_set(GtkWindow *window, char *window_name);
int yon_gtk_combo_box_fill(GtkWidget *combo, char **parameters,int size); int yon_gtk_combo_box_fill(GtkWidget *combo, char **parameters,int size);
int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find); int yon_gtk_combo_box_text_find(GtkWidget *combo_box, char *text_to_find);
void yon_gtk_column_minimal_fixed_size_set(GtkTreeViewColumn *column);
int yon_gtk_icon_view_hide_empty(dictionary *icon_view_segment); int yon_gtk_icon_view_hide_empty(dictionary *icon_view_segment);
int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...); int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...);
@ -268,6 +314,10 @@ int yon_dictionary_gtk_pack_start_multiple_widgets(GtkBox *destination, gboolean
int yon_dictionary_gtk_pack_end_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...); int yon_dictionary_gtk_pack_end_multiple_widgets(GtkBox *destination, gboolean expand, gboolean fill, int padding, ...);
void yon_gtk_widget_set_sensitive_from_toggle_button(GtkToggleButton *toggle, GtkWidget *target);
void yon_gtk_widget_set_sensitive_from_toggle_button_inversed(GtkToggleButton *toggle, GtkWidget *target);
void yon_gtk_widget_set_sensitive_from_combo_box(GtkComboBox *toggle, GtkWidget *target);
void yon_gtk_widget_set_sensitive_from_combo_box_inversed(GtkComboBox *toggle, GtkWidget *target);
typedef enum typedef enum
{ {
@ -315,6 +365,13 @@ int yon_ubl_status_box_setup(GtkWidget *icon, GtkWidget *box, GtkWidget *label);
*/ */
void yon_ubl_status_box_render(char *text, BACKGROUND_IMAGE_TYPE type); void yon_ubl_status_box_render(char *text, BACKGROUND_IMAGE_TYPE type);
void yon_ubl_status_highlight_incorrect(GtkWidget *widget);
void yon_ubl_status_list_store_highlight_incorrect(GtkListStore *list, GtkTreeIter *iter);
static int status_thread_busy;
void yon_ubl_status_box_spawn(GtkContainer *container,char *display_text, int timeout,BACKGROUND_IMAGE_TYPE type);
#ifdef __cplusplus #ifdef __cplusplus
/**yon_ubl_header_setup(overlay, head, image, imag_path) /**yon_ubl_header_setup(overlay, head, image, imag_path)

@ -0,0 +1,64 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface domain="ublsettings-ui">
<requires lib="gtk+" version="3.24"/>
<object class="GtkAboutDialog" id="AboutWindow">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window-position">center</property>
<property name="icon-name">com.ublinux.ublsettings-ui</property>
<property name="type-hint">dialog</property>
<property name="urgency-hint">True</property>
<property name="program-name">ublsettings-ui</property>
<property name="version">1.1</property>
<property name="copyright" translatable="yes">Copyright © 2022 - 2023, UBSoft LLC</property>
<property name="comments" translatable="yes">TEMPLATE Manager</property>
<property name="website">https://wiki.ublinux.ru/ru/Программное_обеспечениерограммы_и_утилиты/Все/ublsettings-ui</property>
<property name="website-label" translatable="yes">Project Home Page</property>
<property name="license" translatable="yes">Это приложение распространяется без каких-либо гарантий.
Подробнее в &lt;a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"&gt;GNU General Public License, версии 2 или позднее&lt;/a&gt;.</property>
<property name="authors">UBGroup</property>
<property name="artists">UBGroup</property>
<property name="logo-icon-name">com.ublinux.ublsettings-ui</property>
<property name="wrap-license">True</property>
<property name="license-type">gpl-2-0</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="can-focus">False</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="buttonBoxHide">
<property name="can-focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
</object>
</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="headerAboutTopic">
<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-bottom">2</property>
<property name="label" translatable="yes">TEMPLATE Manager</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
</object>
</interface>

@ -0,0 +1,208 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface domain="ublsettings-ui">
<requires lib="gtk+" version="3.24"/>
<object class="GtkApplicationWindow" id="helpConfirmationWindow">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="default-width">450</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="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="orientation">vertical</property>
<property name="spacing">10</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">
<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" translatable="yes">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">
<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" translatable="yes">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">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="AlwaysOpenDocumentationCheckbox">
<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="draw-indicator">True</property>
<style>
<class name="label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</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="spacing">30</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="CancelHelpButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image8</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="ReadHelpButton">
<property name="label" translatable="yes">Open documentation</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image9</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="webHeaderNameLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">TEMPLATE Manager</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
</object>
<object class="GtkImage" id="image8">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">process-stop-symbolic</property>
</object>
<object class="GtkImage" id="image9">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">emblem-ok-symbolic</property>
</object>
</interface>

@ -0,0 +1,145 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface domain="ublsettings-ui">
<requires lib="gtk+" version="3.24"/>
<object class="GtkImage" id="image8">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">process-stop-symbolic</property>
</object>
<object class="GtkImage" id="image9">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">emblem-ok-symbolic</property>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name UnregisteredParameter -->
<column type="gchararray"/>
<!-- column-name ParameterAction -->
<column type="gboolean"/>
</columns>
</object>
<object class="GtkApplicationWindow" id="helpConfirmationWindow">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="default-width">450</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="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="orientation">vertical</property>
<property name="spacing">10</property>
<child>
<object class="GtkTreeView">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">liststore1</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Parameter</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Save</property>
<child>
<object class="GtkCellRendererToggle"/>
<attributes>
<attribute name="active">1</attribute>
</attributes>
</child>
</object>
</child>
</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="halign">end</property>
<property name="spacing">5</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="CancelButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image8</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="AcceptButton">
<property name="label" translatable="yes">Accept</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image9</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="webHeaderNameLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">ubl-settings-TEMPLATES</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
</object>
</interface>

@ -25,69 +25,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<!-- interface-license-type gplv2 --> <!-- interface-license-type gplv2 -->
<!-- interface-name ublsettings-ui --> <!-- interface-name ublsettings-ui -->
<!-- interface-copyright UBGroup --> <!-- interface-copyright UBGroup -->
<object class="GtkAboutDialog" id="AboutWindow">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="modal">True</property>
<property name="window-position">center</property>
<property name="icon-name">com.ublinux.ublsettings-ui</property>
<property name="type-hint">dialog</property>
<property name="urgency-hint">True</property>
<property name="program-name">ublsettings-ui</property>
<property name="version">1.1</property>
<property name="copyright" translatable="yes">Copyright © 2022 - 2023, UBSoft LLC</property>
<property name="comments" translatable="yes">TEMPLATE Manager</property>
<property name="website">https://wiki.ublinux.ru/ru/Программное_обеспечениерограммы_и_утилиты/Все/ublsettings-ui</property>
<property name="website-label" translatable="yes">Project Home Page</property>
<property name="license" translatable="yes">Это приложение распространяется без каких-либо гарантий.
Подробнее в &lt;a href="https://www.gnu.org/licenses/old-licenses/gpl-2.0.html"&gt;GNU General Public License, версии 2 или позднее&lt;/a&gt;.</property>
<property name="authors">UBGroup</property>
<property name="artists">UBGroup</property>
<property name="logo-icon-name">com.ublinux.ublsettings-ui</property>
<property name="wrap-license">True</property>
<property name="license-type">gpl-2-0</property>
<child internal-child="vbox">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="buttonBoxHide">
<property name="can-focus">False</property>
<property name="layout-style">end</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
</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="headerAboutTopic">
<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-bottom">2</property>
<property name="label" translatable="yes">TEMPLATE Manager</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
</object>
<object class="GtkBox" id="HeaderBox"> <object class="GtkBox" id="HeaderBox">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>
@ -191,207 +128,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
</packing> </packing>
</child> </child>
</object> </object>
<object class="GtkImage" id="image8">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">process-stop-symbolic</property>
</object>
<object class="GtkImage" id="image9">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">emblem-ok-symbolic</property>
</object>
<object class="GtkApplicationWindow" id="helpConfirmationWindow">
<property name="can-focus">False</property>
<property name="resizable">False</property>
<property name="default-width">450</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="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">10</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="helpHeader">
<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" translatable="yes">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="helpText">
<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" translatable="yes">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">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="AlwaysOpenDocumentationCheckbox">
<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="draw-indicator">True</property>
<style>
<class name="label"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</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="spacing">30</property>
<property name="homogeneous">True</property>
<child>
<object class="GtkButton" id="CancelHelpButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image8</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="ReadHelpButton">
<property name="label" translatable="yes">Open documentation</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image9</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="webHeaderNameLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">TEMPLATE Manager</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
</object>
</child>
</object>
<object class="GtkMenu" id="menu1"> <object class="GtkMenu" id="menu1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can-focus">False</property> <property name="can-focus">False</property>

@ -17,158 +17,106 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: source/ubl-strings.h:1 #: source/ublsettings-ui.h:31
msgid "Version:"
msgstr ""
#: source/ubl-strings.h:2
msgid "ublsettings-ui version:"
msgstr ""
#: source/ubl-strings.h:2
msgid "TEMPLATE settings"
msgstr ""
#: source/ubl-strings.h:2
msgid "Usage:"
msgstr ""
#: source/ubl-strings.h:2
msgid "[OPTIONS]"
msgstr ""
#: source/ubl-strings.h:2
msgid "Options:"
msgstr ""
#: source/ubl-strings.h:2
msgid "Show this help"
msgstr ""
#: source/ubl-strings.h:2
msgid "Show package version"
msgstr ""
#: source/ubl-strings.h:2
msgid "Lock this help menu"
msgstr ""
#: source/ubl-strings.h:2
msgid "Lock configuration saving"
msgstr ""
#: source/ubl-strings.h:2
msgid "Lock local configration saving"
msgstr ""
#: source/ubl-strings.h:2
msgid "Lock global configration saving"
msgstr ""
#: source/ubl-strings.h:2
msgid "Lock global configration loading"
msgstr ""
#: source/ubl-strings.h:4
msgid "TEMPLATE Manager"
msgstr ""
#: source/ubl-strings.h:5
msgid "TEMPLATE management app"
msgstr ""
#: source/ubl-strings.h:7
msgid "Operation succeeded" msgid "Operation succeeded"
msgstr "" msgstr ""
#: source/ubl-strings.h:8 #: source/ublsettings-ui.h:32
msgid "" msgid ""
"Warning! Application was launched without root - root-dependent actions are " "Warning! Application was launched without root - root-dependent actions are "
"locked" "locked"
msgstr "" msgstr ""
#: source/ubl-strings.h:10 #: source/ublsettings-ui.h:34
msgid "About" msgid "About"
msgstr "" msgstr ""
#: source/ubl-strings.h:11 #: source/ublsettings-ui.h:35
msgid "Documentation" msgid "Documentation"
msgstr "" msgstr ""
#: source/ubl-strings.h:12 #: source/ublsettings-ui.h:37
msgid "Save to local configuration" msgid "Save to local configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:13 #: source/ublsettings-ui.h:38
msgid "Save to global configuration" msgid "Save to global configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:14 #: source/ublsettings-ui.h:39
msgid "Save configuration" msgid "Save configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:15 #: source/ublsettings-ui.h:40
msgid "Save" msgid "Save"
msgstr "" msgstr ""
#: source/ubl-strings.h:16 #: source/ublsettings-ui.h:42
msgid "Load local configuration" msgid "Load local configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:17 #: source/ublsettings-ui.h:43
msgid "Load global configuration" msgid "Load global configuration"
msgstr "" msgstr ""
#: source/ubl-strings.h:18 #: source/ublsettings-ui.h:44
msgid "Load" msgid "Load"
msgstr "" msgstr ""
#: source/ubl-strings.h:20 #: source/ublsettings-ui.h:46
msgid "Cancel" msgid "Cancel"
msgstr "" msgstr ""
#: source/ubl-strings.h:22 #: source/ublsettings-ui.h:47
msgid "Accept"
msgstr ""
#: source/ublsettings-ui.h:49
msgid "Would you like to read documentation in the Web?" msgid "Would you like to read documentation in the Web?"
msgstr "" msgstr ""
#: source/ubl-strings.h:23 #: source/ublsettings-ui.h:50
msgid "" msgid ""
"You will be redirected to documentation website where documentation is\n" "You will be redirected to documentation website where documentation is\n"
"translated and supported by community." "translated and supported by community."
msgstr "" msgstr ""
#: source/ubl-strings.h:24 #: source/ublsettings-ui.h:51
msgid "Always redirect to online documentation" msgid "Always redirect to online documentation"
msgstr "" msgstr ""
#: source/ubl-strings.h:25 #: source/ublsettings-ui.h:52
msgid "Open documentation" msgid "Open documentation"
msgstr "" msgstr ""
#: source/ubl-strings.h:26 #: source/ublsettings-ui.h:53
msgid "Project Home Page" msgid "Project Home Page"
msgstr "" msgstr ""
#: source/ubl-strings.h:27 #: source/ublsettings-ui.h:54
msgid "Nothing were chosen" msgid "Nothing were chosen"
msgstr "" msgstr ""
#: source/ubl-strings.h:30 #: source/ublsettings-ui.h:57
msgid "Global configuration loading succseeded." msgid "Global configuration loading succeeded."
msgstr ""
#: source/ublsettings-ui.h:58
msgid "Local configuration loading succeeded."
msgstr "" msgstr ""
#: source/ubl-strings.h:31 #: source/ublsettings-ui.h:59
msgid "Local configuration loading succseeded." msgid "Config loading failed"
msgstr "" msgstr ""
#: source/ubl-strings.h:33 #: source/ublsettings-ui.h:61
msgid "Local and global configuration saving succseeded." msgid "Local and global configuration saving succeeded."
msgstr "" msgstr ""
#: source/ubl-strings.h:34 #: source/ublsettings-ui.h:62
msgid "Global configuration saving succseeded." msgid "Global configuration saving succeeded."
msgstr "" msgstr ""
#: source/ubl-strings.h:35 #: source/ublsettings-ui.h:63
msgid "Local configuration saving succseeded." msgid "Local configuration saving succeeded."
msgstr "" msgstr ""

@ -17,122 +17,67 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n" "Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n" "Content-Transfer-Encoding: 8bit\n"
#: source/ubl-strings.h:1 #: source/ublsettings-ui.h:31
msgid "Version:"
msgstr "Версия:"
#: source/ubl-strings.h:2
msgid "ublsettings-ui version:"
msgstr "Версия ublsettings-ui: "
#: source/ubl-strings.h:2
msgid "TEMPLATE settings"
msgstr "Настройки TEMPLATE"
#: source/ubl-strings.h:2
msgid "Usage:"
msgstr "Использование:"
#: source/ubl-strings.h:2
msgid "[OPTIONS]"
msgstr "[АРГУМЕНТЫ]"
#: source/ubl-strings.h:2
msgid "Options:"
msgstr "Аргументы:"
#: source/ubl-strings.h:2
msgid "Show this help"
msgstr "Показать параметры справки"
#: source/ubl-strings.h:2
msgid "Show package version"
msgstr "Показать текущую версию"
#: source/ubl-strings.h:2
msgid "Lock this help menu"
msgstr "Блокировка вызова справки"
#: source/ubl-strings.h:2
#, fuzzy
msgid "Lock configuration saving"
msgstr "Блокировка сохранения локальной и глобальной конфигурации"
#: source/ubl-strings.h:2
msgid "Lock local configration saving"
msgstr "Блокировка сохранения локальной конфигурации"
#: source/ubl-strings.h:2
msgid "Lock global configration saving"
msgstr "Блокировка сохранения глобальной конфигурации"
#: source/ubl-strings.h:2
msgid "Lock global configration loading"
msgstr "Блокировка загрузки глобальной конфигурации"
#: source/ubl-strings.h:4
msgid "TEMPLATE Manager"
msgstr "Настройки TEMPLATE"
#: source/ubl-strings.h:5
msgid "TEMPLATE management app"
msgstr "Настройки TEMPLATE"
#: source/ubl-strings.h:7
msgid "Operation succeeded" msgid "Operation succeeded"
msgstr "Операция завершена" msgstr "Операция завершена"
#: source/ubl-strings.h:8 #: source/ublsettings-ui.h:32
msgid "" msgid ""
"Warning! Application was launched without root - root-dependent actions are " "Warning! Application was launched without root - root-dependent actions are "
"locked" "locked"
msgstr "Внимание! Приложение было запущено без прав суперпользователя - действия, требующие их наличия заблокированы" msgstr ""
"Внимание! Приложение было запущено без прав суперпользователя - действия, "
"требующие их наличия заблокированы"
#: source/ubl-strings.h:10 #: source/ublsettings-ui.h:34
msgid "About" msgid "About"
msgstr "О программе" msgstr "О программе"
#: source/ubl-strings.h:11 #: source/ublsettings-ui.h:35
msgid "Documentation" msgid "Documentation"
msgstr "Справка" msgstr "Справка"
#: source/ubl-strings.h:12 #: source/ublsettings-ui.h:37
msgid "Save to local configuration" msgid "Save to local configuration"
msgstr "Сохранить в локальную конфигурацию" msgstr "Сохранить в локальную конфигурацию"
#: source/ubl-strings.h:13 #: source/ublsettings-ui.h:38
msgid "Save to global configuration" msgid "Save to global configuration"
msgstr "Сохранить в глобальную конфигурацию" msgstr "Сохранить в глобальную конфигурацию"
#: source/ubl-strings.h:14 #: source/ublsettings-ui.h:39
msgid "Save configuration" msgid "Save configuration"
msgstr "Сохранить конфигурацию" msgstr "Сохранить конфигурацию"
#: source/ubl-strings.h:15 #: source/ublsettings-ui.h:40
msgid "Save" msgid "Save"
msgstr "Сохранить" msgstr "Сохранить"
#: source/ubl-strings.h:16 #: source/ublsettings-ui.h:42
msgid "Load local configuration" msgid "Load local configuration"
msgstr "Загрузить локальную конфигуруцию" msgstr "Загрузить локальную конфигуруцию"
#: source/ubl-strings.h:17 #: source/ublsettings-ui.h:43
msgid "Load global configuration" msgid "Load global configuration"
msgstr "Загрузить глобальную конфигурацию" msgstr "Загрузить глобальную конфигурацию"
#: source/ubl-strings.h:18 #: source/ublsettings-ui.h:44
msgid "Load" msgid "Load"
msgstr "Загрузить" msgstr "Загрузить"
#: source/ubl-strings.h:20 #: source/ublsettings-ui.h:46
msgid "Cancel" msgid "Cancel"
msgstr "Отмена" msgstr "Отмена"
#: source/ubl-strings.h:22 #: source/ublsettings-ui.h:47
msgid "Accept"
msgstr "Принять"
#: source/ublsettings-ui.h:49
msgid "Would you like to read documentation in the Web?" msgid "Would you like to read documentation in the Web?"
msgstr "Вы хотите прочитать справку в Сети?" msgstr "Вы хотите прочитать справку в Сети?"
#: source/ubl-strings.h:23 #: source/ublsettings-ui.h:50
msgid "" msgid ""
"You will be redirected to documentation website where documentation is\n" "You will be redirected to documentation website where documentation is\n"
"translated and supported by community." "translated and supported by community."
@ -140,38 +85,42 @@ msgstr ""
"Вы будете перенаправлены на сайт с документацией, где страницы помощи\n" "Вы будете перенаправлены на сайт с документацией, где страницы помощи\n"
"переводятся и поддерживаются сообществом." "переводятся и поддерживаются сообществом."
#: source/ubl-strings.h:24 #: source/ublsettings-ui.h:51
msgid "Always redirect to online documentation" msgid "Always redirect to online documentation"
msgstr "Всегда перенаправлять" msgstr "Всегда перенаправлять"
#: source/ubl-strings.h:25 #: source/ublsettings-ui.h:52
msgid "Open documentation" msgid "Open documentation"
msgstr "Прочитать справку" msgstr "Прочитать справку"
#: source/ubl-strings.h:26 #: source/ublsettings-ui.h:53
msgid "Project Home Page" msgid "Project Home Page"
msgstr "Домашняя страница проекта" msgstr "Домашняя страница проекта"
#: source/ubl-strings.h:27 #: source/ublsettings-ui.h:54
msgid "Nothing were chosen" msgid "Nothing were chosen"
msgstr "Ничего не было выбрано" msgstr "Ничего не было выбрано"
#: source/ubl-strings.h:30 #: source/ublsettings-ui.h:57
msgid "Global configuration loading succseeded." msgid "Global configuration loading succeeded."
msgstr "Успешно загружена глобальная конфигурация" msgstr "Успешно загружена глобальная конфигурация"
#: source/ubl-strings.h:31 #: source/ublsettings-ui.h:58
msgid "Local configuration loading succseeded." msgid "Local configuration loading succeeded."
msgstr "Успешно загружена локальная конфигурация" msgstr "Успешно загружена локальная конфигурация"
#: source/ubl-strings.h:33 #: source/ublsettings-ui.h:59
msgid "Local and global configuration saving succseeded." msgid "Config loading failed"
msgstr ""
#: source/ublsettings-ui.h:61
msgid "Local and global configuration saving succeeded."
msgstr "Успешно записаны локальная и глобальная конфигурация" msgstr "Успешно записаны локальная и глобальная конфигурация"
#: source/ubl-strings.h:34 #: source/ublsettings-ui.h:62
msgid "Global configuration saving succseeded." msgid "Global configuration saving succeeded."
msgstr "Успешно записана глобальная конфигурация" msgstr "Успешно записана глобальная конфигурация"
#: source/ubl-strings.h:35 #: source/ublsettings-ui.h:63
msgid "Local configuration saving succseeded." msgid "Local configuration saving succeeded."
msgstr "Успешно записана локальная конфигурация" msgstr "Успешно записана локальная конфигурация"
Loading…
Cancel
Save