From da77940652eb52e76eaa3569d557f8f0c26dcfaf Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Wed, 19 Jul 2023 10:18:27 +0600 Subject: [PATCH] Updated header file --- source/ubl-settings-manager.h | 52 ++++++++++++++++++++++++++++++++--- 1 file changed, 48 insertions(+), 4 deletions(-) diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index ee01f90..04d1de1 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -4,18 +4,27 @@ #include #include #include +#include +#include "ubl-cmake.h" +#ifdef WEBKIT_FOUND +#include +#endif + +#define UBLINUX_WIKI_COMMAND "xdg-open https://wiki.ublinux.ru/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-manager" +#define UBLINUX_WIKI_LINK " https://wiki.ublinux.ru/ru/Программное_обеспечение/Программы_и_утилиты/Все/ubl-settings-manager" + +#define check_web2kit_command "ldconfig -p |grep webkit2" #define cmdVersionText yon_char_get_augumented(yon_char_get_augumented(_("Version: "),version_application),"\n") #define cmdHelpText yon_char_get_augumented(yon_char_get_augumented(_("ubl-settings-manager version: "),version_application),_("\nGTK settings manager for UBLinux\nUsage: ubl-settings-manager [OPTIONS...]\nOptions:\n -h, --help Show this help\n -V, --version Show package version\n --lock-settings Lock menu settings\n")) -#define GladePath "/usr/share/ubl-settings-manager/ui/ubl-settings-manager.glade" -#define CssPath "/usr/share/ubl-settings-manager/css/ubl-settings-manager.css" +#define GladePath "/com/ublinux/ui/ubl-settings-manager.glade" +#define CssPath "/com/ublinux/css/ubl-settings-manager.css" #define GlobalConfigPath "/etc/xdg/ubl-settings-manager/ubl-settings-manager.conf" #define UserConfigPath "/.config/ubl-settings-manager/ubl-settings-manager.conf" #define AppIconPath "com.ublinux.ubl-settings-manager" -#define AppBannerPath "/usr/share/ubl-settings-manager/images/ubl-settings-manager-banner.png" +#define AppBannerPath "/com/ublinux/images/ubl-settings-manager-banner.png" #define DesktopPath "/usr/share/applications/" #define IconPicturesPath "/usr/share/icons/hicolor/scalable/apps/" -#define ublinux_logo "/usr/share/ubl-settings-manager/images/ublinux-logo.svg" #define LocalePath "/usr/share/locale" #define LocaleName "ubl-settings-manager" #define ubl_settings_infoPath "ubl-settings-info" @@ -23,6 +32,29 @@ typedef char* string; string version_application; +#define UBL_SETTINGS_MANAGER_TITLE _("UBLinux Settings Manager") +#define UBL_SETTINGS_MANAGER_ABOUT_TITLE _("About UBLinux Settings Manager") +#define ABOUT_PROJECT_HOME_PAGE_LABEL _("Project Home Page") +#define ABOUT_PROJECT_COMMENTS_LABEL _("Settings manager for UBLinux") +#define CONFIG_LOAD_ERROR _("Config loading failed!\n") +#define DOUBLE_CLICK_SELECTION_LABEL _("Double click selection") +#define SECTIONS_MANAGEMENT_LABEL _("Sections management") +#define UNDERSTOOD_LABEL _("Understood") +#define ABOUT_LABEL _("About...") +#define DOCUMENTATION_LABEL _("Documentation") +#define SETTINGS_LABEL _("Settings") +#define ALWAYS_REDIRECT_LABEL _("Always redirect") +#define APPLY_LABEL _("Apply") +#define SAVE_AND_APPLY_LABEL _("Save and apply") +#define CLOSE_LABEL _("Close") +#define CANCEL_LABEL _("Cancel") +#define READ_ONLINE_LABEL _("Read online") +#define REDIRECTION_COMMENT_LABEL _("You will be redirected to documentation site, where user help pages are translated and supported by community.") +#define REDIRECTION_LABEL _("Would you like to read documentation in the Web?") +#define WINDOW_THEME_LABEL _("Window theme") +#define ICON_SIZE_LABEL _("Icon size") +#define BACK_TO_ALL_SETTINGS_LABEL _("All settings") + typedef struct apps{ char *Name; @@ -83,7 +115,11 @@ typedef struct { int changed; int fullscreen; int lock_settings; + int GnomeDoubleClick; + int MainDoubleClick; + int *currentDoubleClick; dictionary *SettingsSections; + int BannerHidden; } config; typedef struct { @@ -165,6 +201,11 @@ typedef struct { GtkWidget *infoWarningWindow; GtkWidget *infoWarningButton; GtkWidget *infoWarningLabel; + GtkWidget *BannerRevealer; + GtkWidget *Revealer; + GtkWidget *settingsDoubleClickSwitch; + GtkWidget *settingsDoubleClickLabel; + GtkWidget *BackToSettingsLabel; } actionWidgets; @@ -203,6 +244,7 @@ void sort_apps(apps *applist,int size); apps *find_apps(int *sizef); int check_categories(apps app, char *catstocheck); int setup_config(); +void update_double_clicks(dictionary *widgetsD); void yon_icv_resize_item(dictionary *icdict, GtkWidget *paned); dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *theme_id, apps *applist, int appsize); char *yon_char_get_augumented(char *source, char *append); @@ -221,6 +263,7 @@ dictionary *yon_dictionary_get_last(dictionary *dict); dictionary *yon_dictionary_switch_places(dictionary *dict,int aim); dictionary *yon_dictionary_create_with_data(char *key, void *data); dictionary *yon_dictionary_create_with_data_connected(dictionary *dict, char *key, void *data); +dictionary *yon_dictionary_connect(dictionary *old, dictionary *toconnect); SectionSettingSegment *yon_create_section_setting(char *name, char *categories); void yon_segments_show(actionWidgets *widgets); void yon_segments_hide(actionWidgets *widgets); @@ -235,5 +278,6 @@ void yon_time_reg_for_average(dictionary *listofregs, int size, time_t tm); void yon_dictionary_switch_to_last(dictionary **dict); dictionary *yon_dictionary_create_conneced(dictionary *targetdict); int yon_get_icon_size(int size); +char *yon_char_from_int(int int_to_convert); #endif \ No newline at end of file