From d926cd8dc0e5c8ee38812713632e988bfa085ed3 Mon Sep 17 00:00:00 2001 From: asmeron Date: Mon, 20 Mar 2023 10:36:28 +0600 Subject: [PATCH 1/5] [package] update --- Makefile | 158 +++++++++--------- README.md | 26 +++ ...vg => com.ublinux.ubl-settings-manager.svg | 0 source/CMakeLists.txt | 6 +- source/ubl-settings-manager.h | 8 +- ubl-settings-manager.desktop | 2 +- ubl-settings-manager.glade | 14 +- ubl-settings-manager.pot | 22 +-- ubl-settings-manager_ru.po | 24 +-- 9 files changed, 147 insertions(+), 113 deletions(-) rename ru.ublinux.ubl-settings-manager.svg => com.ublinux.ubl-settings-manager.svg (100%) diff --git a/Makefile b/Makefile index 16ade97..b66026b 100644 --- a/Makefile +++ b/Makefile @@ -6,47 +6,49 @@ MAKEFILE_DIR := $(notdir $(patsubst %/,%,$(dir $(MAKEFILE_FILEPATH)))) MAKEFILE_PATH := $(dir $(MAKEFILE_FILEPATH)) CMAKE_COMMAND = cmake -#CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source -#CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile -CMAKE_SOURCE_DIR = ./source -CMAKE_BUILD_DIR = ./compile -DEPENDS = cmake +CMAKE_SOURCE_DIR = $(MAKEFILE_PATH)source +CMAKE_BUILD_DIR = $(MAKEFILE_PATH)compile +#CMAKE_SOURCE_DIR = ./source +#CMAKE_BUILD_DIR = ./compile +FILE_VERSION = VERSION.md +DEPENDS = /bin/cmake +PREFIX ?= /usr PKGNAME = $(MAKEFILE_DIR) #PKGNAME = ubl-settings-manager default_target: all +.PHONY: all init depend debug prepare check build uninstall install clean up_ver help + all: init build init: @echo "Initialize ..."; \ - version="$$(cat VERSION.md)"; \ - version=$${version:8}; \ - search="s/string version_application.*"; \ - replace="string version_application = \"$${version}\";"; \ - sed -i -e "$$search/$$replace/gi" source/ubl-settings-manager.h; \ - echo "-- Build path: ${CMAKE_BUILD_DIR}" - + sed -r "s/(version_application = ).*/\1\"$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2)\";/" -i source/ubl-settings-manager.h; \ + echo "-- Build path: ${CMAKE_BUILD_DIR}" + depend: - @echo "Check depends ..."; \ - if [ ! -f /bin/cmake ]; then \ - echo "-- Depend 'cmake' not found !"; \ - exit 1; \ - fi; \ + @echo "Check depends ..." + @for FILE_DEPEND in $(DEPENDS); do \ + if [ ! -f $${FILE_DEPEND} ]; then \ + echo "ERROR: Depend '$${FILE_DEPEND}' not found !"; \ + exit 1; \ + fi; \ + done; \ echo "Check depends: OK" # $(CMAKE_COMMAND) -S$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1 debug: @echo "Debug ..." if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ - cmake -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="/usr"; \ + $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ fi; \ echo "Debug: OK" prepare: @echo "Prepare ..."; \ if [ ! -d ${CMAKE_BUILD_DIR} ]; then \ - cmake -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="/usr"; \ + $(CMAKE_COMMAND) -S${CMAKE_SOURCE_DIR} -B${CMAKE_BUILD_DIR} -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX="${PREFIX}"; \ fi; \ echo "Prepare: OK" @@ -66,65 +68,64 @@ build: depend prepare uninstall: @echo "Uninstall ..." + @for FILE_PO in $(wildcard *.po); do \ + LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ + FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ + PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ + $(RM) "$${PATH_FILE_MO}"; \ + done @for SIZE in 16x16 32x32 48x48 scalable; do \ - $(RM) "/usr/share/icons/hicolor/$${SIZE}/apps/${PKGNAME}.svg"; \ - $(RM) "/usr/share/"${pkgname}"/images/${PKGNAME}.png"; \ + $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ + $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/apps/com.ublinux.${PKGNAME}.png"; \ done @for FILE_SVG in $(wildcard *.svg); do \ for SIZE in 16x16 32x32 48x48 scalable; do \ - $(RM) "/usr/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \ + $(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}/status/$${FILE_SVG%.*}".{svg,png,jpg}; \ done; \ done - @for FILE_PO in $(wildcard *.po); do \ - LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ - FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ - PATH_FILE_MO="/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ - $(RM) "/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ - done - @$(RM) "/usr/bin/${PKGNAME}" - @$(RM) "/usr/share/applications/${PKGNAME}.desktop" - @$(RM) "/usr/share/icons/hicolor/scalable/apps/ru.ublinux.${PKGNAME}.svg" - @$(RM) "/usr/share/${PKGNAME}/ui/ublinux-logo.svg" - @$(RM) "/usr/share/${PKGNAME}/ui/${PKGNAME}.glade" - @$(RM) "/usr/share/${PKGNAME}/css/${PKGNAME}.css" - @$(RM) "/usr/share/${PKGNAME}/ui/${PKGNAME}-banner.png" - @$(RM) -d "/usr/share/${PKGNAME}/css" - @$(RM) -d "/usr/share/${PKGNAME}/ui" - @$(RM) -d "/usr/share/${PKGNAME}" - @$(RM) "/etc/xdg/${PKGNAME}/${PKGNAME}.conf" - @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null - @update-desktop-database --quiet 2>/dev/null - @touch /usr/share/applications + @$(RM) "${DESTDIR}${PREFIX}/bin/${PKGNAME}" + @$(RM) "${DESTDIR}${PREFIX}/etc/xdg/${PKGNAME}/${PKGNAME}.conf" + @$(RM) "${DESTDIR}${PREFIX}/share/applications/${PKGNAME}.desktop" + @$(RM) "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/com.ublinux.${PKGNAME}.svg" + @$(RM) -rd "${DESTDIR}${PREFIX}/share/${PKGNAME}" + @if [ -z ${DESTDIR} ]; then \ + [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ + update-desktop-database --quiet &>/dev/null || true; \ + [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ + fi @echo "Uninstall: OK" install: check uninstall @echo "Install ..." @for FILE_PO in $(wildcard *.po); do \ LANG=$${FILE_PO##*_};LANG=$${LANG%.*}; \ - install -dm755 /usr/share/locale/$${LANG}/LC_MESSAGES; \ + install -dm755 "${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES"; \ FILE_MO=$${FILE_PO##*/}; FILE_MO="$${FILE_MO%_*.po}.mo"; \ - PATH_FILE_MO="/usr/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ - echo $${FILE_PO}; \ + PATH_FILE_MO="${DESTDIR}${PREFIX}/share/locale/$${LANG}/LC_MESSAGES/$${FILE_MO}"; \ + echo "$${FILE_PO}"; \ msgfmt "$${FILE_PO}" -v -f -o "$${PATH_FILE_MO}"; \ done @for SIZE in 16 32 48; do \ - install -dm755 /usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps; \ - rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data ru.ublinux.${PKGNAME}.svg -o "/usr/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/ru.ublinux.${PKGNAME}.svg"; \ + install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps"; \ + rsvg-convert -w $${SIZE} -h $${SIZE} -f svg --keep-image-data "com.ublinux.${PKGNAME}.svg" -o "${DESTDIR}${PREFIX}/share/icons/hicolor/$${SIZE}x$${SIZE}/apps/com.ublinux.${PKGNAME}.svg"; \ done - @install -dm755 /usr/share/icons/hicolor/scalable/apps - @install -Dm644 -t /usr/share/icons/hicolor/scalable/apps/ ru.ublinux.${PKGNAME}.svg - @install -Dm755 -t /usr/bin/ ${CMAKE_BUILD_DIR}/${PKGNAME} - @install -Dm644 -t /usr/share/applications/ ${PKGNAME}.desktop - @install -Dm755 /usr/share/${PKGNAME}/ -d ui - @install -Dm755 /usr/share/${PKGNAME}/ -d css - @install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}.glade - @install -Dm644 -t /usr/share/${PKGNAME}/css/ ${PKGNAME}.css - @install -Dm644 -t /usr/share/${PKGNAME}/ui/ ublinux-logo.svg - @install -Dm766 -t /etc/xdg/${PKGNAME}/ ${PKGNAME}.conf - @install -Dm644 -t /usr/share/${PKGNAME}/ui/ ${PKGNAME}-banner.png - @gtk-update-icon-cache -fiq /usr/share/icons/hicolor/ &>/dev/null - @update-desktop-database --quiet 2>/dev/null - @touch /usr/share/applications + @install -dm755 "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/icons/hicolor/scalable/apps/" "com.ublinux.${PKGNAME}.svg" + @install -Dm755 -t "${DESTDIR}${PREFIX}/bin/" "${CMAKE_BUILD_DIR}/${PKGNAME}" + @install -dm755 "${DESTDIR}${PREFIX}/etc/xdg" + @install -Dm744 -t "${DESTDIR}${PREFIX}/etc/xdg/${PKGNAME}/" "${PKGNAME}.conf" + @install -dm755 "${DESTDIR}${PREFIX}/share/applications" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/applications/" "${PKGNAME}.desktop" + @install -dm755 "${DESTDIR}${PREFIX}/share/${PKGNAME}"/{ui,css,images} + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/ui/" "${PKGNAME}.glade" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/css/" "${PKGNAME}.css" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "ublinux-logo.svg" + @install -Dm644 -t "${DESTDIR}${PREFIX}/share/${PKGNAME}/images/" "${PKGNAME}-banner.png" + @if [ -z ${DESTDIR} ]; then \ + [ -d "${DESTDIR}${PREFIX}/share/icons/hicolor/" ] && gtk-update-icon-cache -fiq "${DESTDIR}${PREFIX}/share/icons/hicolor/" &>/dev/null || true; \ + update-desktop-database --quiet &>/dev/null || true; \ + [ -d "${DESTDIR}${PREFIX}/share/applications" ] && touch "${DESTDIR}${PREFIX}/share/applications" &>/dev/null || true; \ + fi @echo "Install: OK" clean: @@ -134,21 +135,24 @@ clean: echo "Clean: error, compile directory exist ${CMAKE_BUILD_DIR}"; \ else \ echo "Clean: OK"; \ - fi; \ - version="$$(cat VERSION.md)"; \ - version=$${version:8}; \ - search="s/string version_application.*"; \ - echo $$search; \ - replace="string version_application = ;"; \ - sed -i -e "$$search/$$replace/gi" source/ubl-settings-manager.h; \ + fi + +up_ver: + @CURRENT=$$(grep 'VERSION' ${FILE_VERSION} | cut -d" " -f2); \ + MAJOR=$$(cut -d. -f1 <<< $${CURRENT}); \ + MINOR=$$(cut -d. -f2 <<< $${CURRENT}); \ + VER="$${MAJOR}.$$(($${MINOR}+1))"; \ + sed "s/VERSION *[[:digit:]]*.*/VERSION $${VER}/" -i ${FILE_VERSION}; \ + echo "Updated version to VERSION.md: $${CURRENT} to $${VER}" help: - @echo "The following are some of the valid targets for this Makefile:" - @echo "... all (the default if no target is provided)" - @echo "... init" - @echo "... debug" - @echo "... prepare" - @echo "... compile" - @echo "... install" - @echo "... uninstall" - @echo "... clean" + @echo "The following are some of the valid targets for this Makefile:"; \ + echo "... all (the default if no target is provided)"; \ + echo "... init"; \ + echo "... debug"; \ + echo "... prepare"; \ + echo "... compile"; \ + echo "... install"; \ + echo "... uninstall"; \ + echo "... clean"; \ + echo "... up_ver" diff --git a/README.md b/README.md index 7a5f510..fb8e193 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,28 @@ # ubl-settings-manager +# Выполнить +# Build +In order to build ubl-settings-manager you will need: + +- CMake +- C compiler +- GTK+ 3 & dependencies + +Once you have all the necessary dependencies, you can use: +```sh +$ make +``` + +# Installation +After a successful build, just use: +```sh +$ sudo make install clean +``` + +# Uninstallation +After a successful build, just use: +```sh +$ sudo make uninstall +``` + +![alt text](screenshot/screenshot.png) diff --git a/ru.ublinux.ubl-settings-manager.svg b/com.ublinux.ubl-settings-manager.svg similarity index 100% rename from ru.ublinux.ubl-settings-manager.svg rename to com.ublinux.ubl-settings-manager.svg diff --git a/source/CMakeLists.txt b/source/CMakeLists.txt index 6279e9e..1859049 100644 --- a/source/CMakeLists.txt +++ b/source/CMakeLists.txt @@ -9,7 +9,11 @@ link_directories(${GTK_LIBRARY_DIRS}) add_definitions(${GTK_CFLAGS_OTHER}) #set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -std=c++2a") -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -lm") +#set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always -lm") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Werror -Wmissing-declarations -fdiagnostics-color=always \ + -O2 -pipe -fno-plt -fexceptions \ + -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security \ + -fstack-clash-protection -fcf-protection") set(SOURCE_FILES ubl-settings-manager.c diff --git a/source/ubl-settings-manager.h b/source/ubl-settings-manager.h index 383bd04..af8076c 100644 --- a/source/ubl-settings-manager.h +++ b/source/ubl-settings-manager.h @@ -11,17 +11,17 @@ #define CssPath "/usr/share/ubl-settings-manager/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 "ru.ublinux.ubl-settings-manager" -#define AppBannerPath "/usr/share/ubl-settings-manager/ui/ubl-settings-manager-banner.png" +#define AppIconPath "com.ublinux.ubl-settings-manager" +#define AppBannerPath "/usr/share/ubl-settings-manager/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/ui/ublinux-logo.svg" +#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" #define ubl_settings_infoPathLaunch "ubl-settings-info --socket-id=" typedef char* string; -string version_application = ; +string version_application = "1.2"; typedef struct apps{ diff --git a/ubl-settings-manager.desktop b/ubl-settings-manager.desktop index afec07e..c16cec7 100644 --- a/ubl-settings-manager.desktop +++ b/ubl-settings-manager.desktop @@ -8,7 +8,7 @@ Comment=ubl-settings-manager Comment[ru]=Приложение для управления настройками UBLinux Type=Application Exec=ubl-settings-manager -Icon=ru.ublinux.ubl-settings-manager +Icon=com.ublinux.ubl-settings-manager Terminal=false X-XfcePluggable=false Categories=XFCE;GTK;Settings;DesktopSettings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings; diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade index 612a89d..107cc48 100644 --- a/ubl-settings-manager.glade +++ b/ubl-settings-manager.glade @@ -456,7 +456,7 @@ 64 True False - ru.ublinux.ubl-settings-manager + com.ublinux.ubl-settings-manager False @@ -627,7 +627,7 @@ True False 32 - ru.ublinux.ubl-settings-manager + com.ublinux.ubl-settings-manager 5 @@ -800,7 +800,7 @@ True False 32 - ru.ublinux.ubl-settings-manager + com.ublinux.ubl-settings-manager 5 @@ -1202,7 +1202,7 @@ True False 32 - ru.ublinux.ubl-settings-manager + com.ublinux.ubl-settings-manager 5 @@ -1455,7 +1455,7 @@ True False 32 - ru.ublinux.ubl-settings-manager + com.ublinux.ubl-settings-manager 5 @@ -1885,7 +1885,7 @@ True False 32 - ru.ublinux.ubl-settings-manager + com.ublinux.ubl-settings-manager 5 @@ -1971,7 +1971,7 @@ Project Home Page UBGroup UBGroup - ru.ublinux.ubl-settings-manager + com.ublinux.ubl-settings-manager gpl-2-0 diff --git a/ubl-settings-manager.pot b/ubl-settings-manager.pot index 8681e7d..0f94860 100644 --- a/ubl-settings-manager.pot +++ b/ubl-settings-manager.pot @@ -1,20 +1,20 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. +# Language translations for ubl-settings-manager package. +# Copyright (C) 2022, UBTech LLC +# This file is distributed under the same license as the ubl-settings-manager package. +# UBLinux Team , 2022 # #, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-17 18:00+0600\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"Project-Id-Version: ubl-settings-manager 1.0\n" +"Report-Msgid-Bugs-To: info@ublinux.com\n" +"POT-Creation-Date: 2023-01-01 00:00+0600\n" +"PO-Revision-Date: 2023-01-01 00:00+0600\n" +"Last-Translator: UBLinux Team \n" +"Language-Team: UBLinux Team \n" "Language: \n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" +"Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: source/ubl-settings-manager.c:632 diff --git a/ubl-settings-manager_ru.po b/ubl-settings-manager_ru.po index 15e3a47..24c6e99 100644 --- a/ubl-settings-manager_ru.po +++ b/ubl-settings-manager_ru.po @@ -1,18 +1,18 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. +# Russian translations for ubl-settings-manager package. +# Copyright (C) 2022, UBTech LLC +# This file is distributed under the same license as the ubl-settings-manager package. +# UBLinux Team , 2022 # #, fuzzy -msgid "translateinfo\n" +msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-16 12:28+0600\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"Language: \n" +"Project-Id-Version: ubl-settings-manager 1.0\n" +"Report-Msgid-Bugs-To: info@ublinux.com\n" +"POT-Creation-Date: 2023-01-01 00:00+0600\n" +"PO-Revision-Date: 2023-01-01 00:00+0600\n" +"Last-Translator: UBLinux Team \n" +"Language-Team: Russian - UBLinux Team \n" +"Language: Russian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" From 964ea64f4ee023ba89be0b5530638717f90c5802 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 20 Mar 2023 11:06:12 +0600 Subject: [PATCH 2/5] Fixed Menu styles --- ubl-settings-manager.css | 43 +++++++++++++++++++++++++++++++++++--- ubl-settings-manager.glade | 3 --- 2 files changed, 40 insertions(+), 6 deletions(-) diff --git a/ubl-settings-manager.css b/ubl-settings-manager.css index 67166dc..0354832 100644 --- a/ubl-settings-manager.css +++ b/ubl-settings-manager.css @@ -21,31 +21,51 @@ background-color: #404040; } .roundborder * { border-width:0px; +} +.roundborder::backdrop * { + border-width:0px; border-radius:5px; } .noborder { border: none; } .menu:hover { - border-color:alpha(@theme_text_color, 0.01); + border-radius:0px; } .menu { - border-color:alpha(@theme_text_color, 0.01); + border-radius:0px; } .menu:hover >* { - border-color:alpha(@theme_text_color, 0.01); + border-radius:0px; } .menuitembottom{ margin-top:0px; margin-bottom:3px; + border-style: solid; + border-bottom-width: 1px; + border-left-width: 1px; + border-right-width: 1px; + border-color:alpha(@theme_text_color, 0.3); + border-radius:0px; } .menuitemmiddle{ margin-top:0px; margin-bottom:0px; + border-style: solid; + border-left-width: 1px; + border-right-width: 1px; + border-color:alpha(@theme_text_color, 0.3); + border-radius:0px; } .menuitemtop{ margin-bottom:0px; + border-style: solid; + border-top-width: 1px; + border-left-width: 1px; + border-right-width: 1px; + border-color:alpha(@theme_text_color, 0.3); + border-radius:0px; } .menuitemtop *{ margin:2px 2px 0 2px; @@ -61,12 +81,29 @@ background-color: #404040; } .menuitemtop:hover { background:@theme_bg_color; + border-style: solid; + border-top-width: 1px; + border-left-width: 1px; + border-right-width: 1px; + border-color:alpha(@theme_text_color, 0.3); + border-radius:0px; } .menuitemmiddle:hover { background:@theme_bg_color; + border-style: solid; + border-left-width: 1px; + border-right-width: 1px; + border-color:alpha(@theme_text_color, 0.3); + border-radius:0px; } .menuitembottom:hover { background:@theme_bg_color; + border-style: solid; + border-bottom-width: 1px; + border-left-width: 1px; + border-right-width: 1px; + border-color:alpha(@theme_text_color, 0.3); + border-radius:0px; } .menuitemtop:hover* { diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade index 612a89d..77f48a1 100644 --- a/ubl-settings-manager.glade +++ b/ubl-settings-manager.glade @@ -1491,9 +1491,6 @@ - False From 8bfbf92147e75846491f63775b4cd41ca4212799 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 20 Mar 2023 11:06:49 +0600 Subject: [PATCH 3/5] localisation changes --- ubl-settings-manager.pot | 30 +++++++++++------------------- ubl-settings-manager_ru.po | 4 ++++ 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/ubl-settings-manager.pot b/ubl-settings-manager.pot index 8681e7d..f2ec33c 100644 --- a/ubl-settings-manager.pot +++ b/ubl-settings-manager.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2023-03-17 18:00+0600\n" +"POT-Creation-Date: 2023-03-20 09:44+0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -69,30 +69,34 @@ msgid "Save and apply" msgstr "" #: source/ubl-settings-manager.c:1683 -msgid "Always redirect" +msgid "Apply" msgstr "" #: source/ubl-settings-manager.c:1684 -msgid "Settings" +msgid "Always redirect" msgstr "" #: source/ubl-settings-manager.c:1685 -msgid "About..." +msgid "Settings" msgstr "" #: source/ubl-settings-manager.c:1686 -msgid "Understood" +msgid "About..." msgstr "" #: source/ubl-settings-manager.c:1687 +msgid "Understood" +msgstr "" + +#: source/ubl-settings-manager.c:1688 msgid "Sections management" msgstr "" -#: source/ubl-settings-manager.c:1792 +#: source/ubl-settings-manager.c:1793 msgid "Standard theme" msgstr "" -#: source/ubl-settings-manager.c:1793 +#: source/ubl-settings-manager.c:1794 msgid "GNOME theme" msgstr "" @@ -114,15 +118,3 @@ msgid "" " -V, --version\t \t Show package version\n" " --lock-settings Lock menu settings\n" msgstr "" - -msgid "Personal" -msgstr "" - -msgid "Hardware" -msgstr "" - -msgid "System" -msgstr "" - -msgid "Misc" -msgstr "" diff --git a/ubl-settings-manager_ru.po b/ubl-settings-manager_ru.po index 15e3a47..5145313 100644 --- a/ubl-settings-manager_ru.po +++ b/ubl-settings-manager_ru.po @@ -68,6 +68,10 @@ msgstr "Закрыть" msgid "Save and apply" msgstr "Сохранить и применить" +#: source/ubl-settings-manager.c:1683 +msgid "Apply" +msgstr "Применить" + #: source/ubl-settings-manager.c:1666 msgid "Always redirect" msgstr "Всегда перенаправлять" From 387e4778a794998c27b4e0690c6ce4b2cd0a4a57 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 20 Mar 2023 11:07:11 +0600 Subject: [PATCH 4/5] localisation changes --- source/ubl-settings-manager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/source/ubl-settings-manager.c b/source/ubl-settings-manager.c index c7a18d3..08e279f 100644 --- a/source/ubl-settings-manager.c +++ b/source/ubl-settings-manager.c @@ -1680,6 +1680,7 @@ dictionary *yon_theme_new(dictionary **widgetss, GtkBuilder *builder, char *them gtk_button_set_label(GTK_BUTTON(curWidgets->CancelHelpButton),_("Cancel")); gtk_button_set_label(GTK_BUTTON(curWidgets->settingsCancel),_("Close")); gtk_button_set_label(GTK_BUTTON(curWidgets->settingsAccept),_("Save and apply")); + gtk_button_set_label(GTK_BUTTON(curWidgets->SectionSettingsSaveButton),_("Apply")); gtk_button_set_label(GTK_BUTTON(curWidgets->AlwaysOpenDocumentation),_("Always redirect")); gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemSettings),_("Settings")); gtk_menu_item_set_label(GTK_MENU_ITEM(curWidgets->MenuItemDocumentation),_("About...")); From 5630a07e735147e7a809dc2550e068d442c6e51b Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 20 Mar 2023 12:37:50 +0600 Subject: [PATCH 5/5] Menu styles fixes without effects --- ubl-settings-manager.css | 74 +++++++++++++++----------------------- ubl-settings-manager.glade | 22 +++++------- 2 files changed, 37 insertions(+), 59 deletions(-) diff --git a/ubl-settings-manager.css b/ubl-settings-manager.css index 0354832..8d44fac 100644 --- a/ubl-settings-manager.css +++ b/ubl-settings-manager.css @@ -19,61 +19,48 @@ background-color: #404040; font-weight: bold; } -.roundborder * { +.roundborder > * { border-width:0px; } -.roundborder::backdrop * { +.roundborder:backdrop > * { border-width:0px; border-radius:5px; } .noborder { border: none; } -.menu:hover { - border-radius:0px; -} -.menu { - border-radius:0px; -} -.menu:hover >* { - border-radius:0px; -} + .menuitembottom{ margin-top:0px; margin-bottom:3px; - border-style: solid; - border-bottom-width: 1px; - border-left-width: 1px; - border-right-width: 1px; - border-color:alpha(@theme_text_color, 0.3); - border-radius:0px; + border-color:inherit; + border-left-width:inherit; + border-right-width:inherit; } .menuitemmiddle{ margin-top:0px; margin-bottom:0px; - border-style: solid; - border-left-width: 1px; - border-right-width: 1px; - border-color:alpha(@theme_text_color, 0.3); - border-radius:0px; + border-color:inherit; + border-left-width:inherit; + border-right-width:inherit; } .menuitemtop{ margin-bottom:0px; - border-style: solid; - border-top-width: 1px; - border-left-width: 1px; - border-right-width: 1px; - border-color:alpha(@theme_text_color, 0.3); - border-radius:0px; + border-color:inherit; + border-top-width:inherit; + border-left-width:inherit; + border-right-width:inherit; } .menuitemtop *{ margin:2px 2px 0 2px; padding: 5px 10px 3px 5px; + border:transparent; } .menuitemmiddle *{ margin:0 2px 0 2px; padding: 3px 10px 3px 5px; + border:transparent; } .menuitembottom *{ margin:0 2px 2px 2px; @@ -81,29 +68,23 @@ background-color: #404040; } .menuitemtop:hover { background:@theme_bg_color; - border-style: solid; - border-top-width: 1px; - border-left-width: 1px; - border-right-width: 1px; - border-color:alpha(@theme_text_color, 0.3); - border-radius:0px; + border-color:inherit; + border-top-width:inherit; + border-left-width:inherit; + border-right-width:inherit; } .menuitemmiddle:hover { background:@theme_bg_color; - border-style: solid; - border-left-width: 1px; - border-right-width: 1px; - border-color:alpha(@theme_text_color, 0.3); - border-radius:0px; + border-color:inherit; + border-left-width:inherit; + border-right-width:inherit; } .menuitembottom:hover { background:@theme_bg_color; - border-style: solid; - border-bottom-width: 1px; - border-left-width: 1px; - border-right-width: 1px; - border-color:alpha(@theme_text_color, 0.3); - border-radius:0px; + border-color:inherit; + border-bottom-width:0px; + border-left-width:inherit; + border-right-width:inherit; } .menuitemtop:hover* { @@ -128,14 +109,17 @@ background-color: #404040; .workingbg, #workingbg { background-color:@theme_base_color; } + .workingbg.view.cell:selected { background-color:@theme_selected_bg_color; } + .workingbg.view.cell:hover { background-color:darker(@theme_selected_bg_color); color:@theme_selected_text_color; border-radius:3px; } + .bkim { transition: 200ms ease-out; background-image: none; diff --git a/ubl-settings-manager.glade b/ubl-settings-manager.glade index d2d04ba..c5b9de8 100644 --- a/ubl-settings-manager.glade +++ b/ubl-settings-manager.glade @@ -123,9 +123,6 @@ - False @@ -338,13 +335,10 @@ Documentation True - True @@ -456,7 +450,7 @@ 64 True False - com.ublinux.ubl-settings-manager + ru.ublinux.ubl-settings-manager False @@ -627,7 +621,7 @@ True False 32 - com.ublinux.ubl-settings-manager + ru.ublinux.ubl-settings-manager 5 @@ -800,7 +794,7 @@ True False 32 - com.ublinux.ubl-settings-manager + ru.ublinux.ubl-settings-manager 5 @@ -1202,7 +1196,7 @@ True False 32 - com.ublinux.ubl-settings-manager + ru.ublinux.ubl-settings-manager 5 @@ -1455,7 +1449,7 @@ True False 32 - com.ublinux.ubl-settings-manager + ru.ublinux.ubl-settings-manager 5 @@ -1882,7 +1876,7 @@ True False 32 - com.ublinux.ubl-settings-manager + ru.ublinux.ubl-settings-manager 5 @@ -1968,7 +1962,7 @@ Project Home Page UBGroup UBGroup - com.ublinux.ubl-settings-manager + ru.ublinux.ubl-settings-manager gpl-2-0