From 5b2c0a5afb9a45b0549310cb362f23834c877223 Mon Sep 17 00:00:00 2001 From: Igor Belitskiy Date: Tue, 25 Apr 2023 11:34:01 +0600 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=20CMakeLists,=20define=20=D0=B2=D1=8B=D0=BD=D0=B5?= =?UTF-8?q?=D1=81=D0=B5=D0=BD=D1=8B=20=D0=B2=20=D0=BE=D0=B1=D1=89=D0=B8?= =?UTF-8?q?=D0=B9=20=D1=84=D0=B0=D0=B9=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/CMakeLists.txt | 10 ++---- source/my_cmd_and_path.h | 15 --------- source/my_localization.h | 61 ---------------------------------- source/ublexec.h | 72 +++++++++++++++++++++++++++++++++++++--- 4 files changed, 70 insertions(+), 88 deletions(-) delete mode 100644 source/my_cmd_and_path.h delete mode 100644 source/my_localization.h diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 81b3f41..5016aa3 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -8,19 +8,15 @@ include_directories(${GTK_INCLUDE_DIRS}) link_directories(${GTK_LIBRARY_DIRS}) add_definitions(${GTK_CFLAGS_OTHER}) -find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) -option(WEBKIT_FOUND "No" OFF) +option(WEBKIT_FOUND "" ON) -find_library(WEBKIT_LIBRARIES_FOUND webkit2gtk-4.0 webkit2gtk-web-extension-4.0) -if(WEBKIT_LIBRARIES_FOUND) - option(WEBKIT_FOUND "Yes" ON) +if(WEBKIT_FOUND) PKG_CHECK_MODULES(WEBKIT REQUIRED webkit2gtk-4.0 webkit2gtk-web-extension-4.0) include_directories(${WEBKIT_INCLUDE_DIRS}) link_directories(${WEBKIT_LIBRARY_DIRS}) add_definitions(${WEBKIT_CFLAGS_OTHER}) endif() -configure_file(ublexec.h.in ublexec-cm.h) #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a -g") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ @@ -29,8 +25,6 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissin -fstack-clash-protection -fcf-protection -g") set(SOURCE_FILES - my_cmd_and_path.h - ublexec-cm.h main.cc ublexec.cc ublexec.h diff --git a/source/my_cmd_and_path.h b/source/my_cmd_and_path.h deleted file mode 100644 index b700dc5..0000000 --- a/source/my_cmd_and_path.h +++ /dev/null @@ -1,15 +0,0 @@ -#ifndef MY_CMD_H -#define MY_CMD_H - -#define link_doc "https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/ublexec" -#define cmd_xdg "xdg-open " -#define cmd_execute "su -l %s -c \" DISPLAY=$DISPLAY %s \"" -#define path_app "/usr/bin/" -#define path_glade "/usr/share/ublexec/ui/ublexec.glade" -#define path_css "/usr/share/ublexec/css/ublexec.css" -#define app_name "ublexec" -#define path_img_head_background "/usr/share/ublexec/images/logo-background.png" -#define path_all_applications "/usr/share/applications/" -#define file_source_login_min_max "/etc/login.defs" -#endif - diff --git a/source/my_localization.h b/source/my_localization.h deleted file mode 100644 index f0b0e2c..0000000 --- a/source/my_localization.h +++ /dev/null @@ -1,61 +0,0 @@ - -#ifndef MY_LOCALIZATION -#define MY_LOCALIZATION -#include -#define copyright _("Copyright © UBSoft LLC, 2022 - ") -#define define_name_app _("Run as...") -#define name_app_1 _("ublexec") -#define website _("https://wiki.ublinux.com") -#define home_page _("Project Home Page") -#define space_name_app _(" Run as...") -#define str_about_1 _("About") -#define str_about _("About ubl-settings-datetime") -#define str_help _("Help") -#define str_save _("Save") -#define str_load _("Load") -#define save_all _("Save to global and local configuration") -#define save_local _("Save local configuration") -#define save_global _("Save global configuration") -#define load_global _("Load global configuration") -#define load_local _("Load local configuration") -#define read_online _("Read online") -#define cancel _("Cancel") -#define always_redirect _("Always redirect") -#define nothing_save _("Nothing to save!") -#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 str_help_h _("GTK settings datetime for UBLinux\n\n""Usage: ubl-settings-datetime [OPTIONS...]\n""Options:\n"" -h, --help Show this help\n"" -V, --version Show package version\n"" --lock-datetime Lock date and time changes\n"" --lock-timezone Lock time zone changes\n"" --lock-ntp-mode Lock NTP mode selection\n"" --lock-ntp-edit Lock editing NTP servers\n"" --lock-sync-hwclock Lock sync hwclock mode selection\n"" --lock-save Lock saving local and global configuration\n"" --lock-save-local Lock save global configuration\n"" --lock-save-global Lock load global configuration\n"" --lock-load-global Lock load global configuration\n") -#define str_version _("ublexec version: ") -#define nice_19 _("19 (Low)") -#define nice_0 _("0 (High)") -#define nice__20 _("-20 (High)") -#define str_close _("Close") -#define str_localization_system _("System") -#define str_localization_development _("Development") -#define str_localization_other _("Other") -#define str_localization_office _("Office") -#define str_localization_education _("Education") -#define str_localization_settings _("Settings") -#define str_localization_multimedia _("Multimedia") -#define str_localization_internet _("Internet") -#define str_localization_tools _("Tools") -#define str_localization_graphics _("Graphics") -#define str_localization_attention _("Attention") -#define str_localization_priority _("Priority") - -#define str_run_of_user _("Run as another user:") -#define str_select_app_program _("Select an executable file or program") -#define str_change_priority _("Change startup priority") -#define str_run_terminal _("Run in the terminal emulator") -#define str_file_overview _("File Overview") -#define str_application_overview _("Application Overview") - -#define str_run_applications_as_another _("Run applications as another user\nwith the specified priority") -#define str_localization_username _("User Name:") -#define str_selecting_programs _("Selecting Programs") -#define str_please_select_file _("Please select File") -#define str_localization_cmd_line _("Command Line") -#define str_localization_user _("User") -#define str_localization_team _("Team:") -#define str_run _("Run") -#endif \ No newline at end of file diff --git a/source/ublexec.h b/source/ublexec.h index 2b1f451..6a7ad2c 100644 --- a/source/ublexec.h +++ b/source/ublexec.h @@ -18,14 +18,78 @@ #include #include #include "ubl-util-standard.c" -#include "ublexec-cm.h" -#include "my_cmd_and_path.h" -#include "my_localization.h" #include #ifdef WEBKIT_FOUND #include - #endif + +#define copyright _("Copyright © UBSoft LLC, 2022 - ") +#define define_name_app _("Run as...") +#define name_app_1 _("ublexec") +#define website _("https://wiki.ublinux.com") +#define home_page _("Project Home Page") +#define space_name_app _(" Run as...") +#define str_about_1 _("About") +#define str_about _("About ubl-settings-datetime") +#define str_help _("Help") +#define str_save _("Save") +#define str_load _("Load") +#define save_all _("Save to global and local configuration") +#define save_local _("Save local configuration") +#define save_global _("Save global configuration") +#define load_global _("Load global configuration") +#define load_local _("Load local configuration") +#define read_online _("Read online") +#define cancel _("Cancel") +#define always_redirect _("Always redirect") +#define nothing_save _("Nothing to save!") +#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 str_help_h _("GTK settings datetime for UBLinux\n\n""Usage: ubl-settings-datetime [OPTIONS...]\n""Options:\n"" -h, --help Show this help\n"" -V, --version Show package version\n"" --lock-datetime Lock date and time changes\n"" --lock-timezone Lock time zone changes\n"" --lock-ntp-mode Lock NTP mode selection\n"" --lock-ntp-edit Lock editing NTP servers\n"" --lock-sync-hwclock Lock sync hwclock mode selection\n"" --lock-save Lock saving local and global configuration\n"" --lock-save-local Lock save global configuration\n"" --lock-save-global Lock load global configuration\n"" --lock-load-global Lock load global configuration\n") +#define str_version _("ublexec version: ") +#define nice_19 _("19 (Low)") +#define nice_0 _("0 (High)") +#define nice__20 _("-20 (High)") +#define str_close _("Close") +#define str_localization_system _("System") +#define str_localization_development _("Development") +#define str_localization_other _("Other") +#define str_localization_office _("Office") +#define str_localization_education _("Education") +#define str_localization_settings _("Settings") +#define str_localization_multimedia _("Multimedia") +#define str_localization_internet _("Internet") +#define str_localization_tools _("Tools") +#define str_localization_graphics _("Graphics") +#define str_localization_attention _("Attention") +#define str_localization_priority _("Priority") +#define str_run_of_user _("Run as another user:") +#define str_select_app_program _("Select an executable file or program") +#define str_change_priority _("Change startup priority") +#define str_run_terminal _("Run in the terminal emulator") +#define str_file_overview _("File Overview") +#define str_application_overview _("Application Overview") +#define str_run_applications_as_another _("Run applications as another user\nwith the specified priority") +#define str_localization_username _("User Name:") +#define str_selecting_programs _("Selecting Programs") +#define str_please_select_file _("Please select File") +#define str_localization_cmd_line _("Command Line") +#define str_localization_user _("User") +#define str_localization_team _("Team:") +#define str_run _("Run") + +#define link_doc "https://wiki.ublinux.com/ru/Программное_обеспечение/Программы_и_утилиты/Все/ublexec" +#define cmd_xdg "xdg-open " +#define cmd_execute "su -l %s -c \" DISPLAY=$DISPLAY %s \"" +#define path_app "/usr/bin/" +#define path_glade "/usr/share/ublexec/ui/ublexec.glade" +#define path_css "/usr/share/ublexec/css/ublexec.css" +#define app_name "ublexec" +#define path_img_head_background "/usr/share/ublexec/images/logo-background.png" +#define path_all_applications "/usr/share/applications/" +#define file_source_login_min_max "/etc/login.defs" + + using namespace std; extern string name_app_cmd;