From be1e6f7523040d07259d9c5cc84e695343e40a86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Jo=C5=84ski?= Date: Mon, 27 Dec 2021 17:26:27 +0100 Subject: [PATCH] [BH-1303] Fix flat settings Fix flat settings - rename main window --- config/style_check_hook.sh | 10 ++++++---- .../ApplicationBellSettings.hpp | 3 ++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/config/style_check_hook.sh b/config/style_check_hook.sh index 1f29af00eaf5b86f56a39e535083d53daa5614bc..9154a25e193d17c9ebbb6255c8aab424a0217da6 100755 --- a/config/style_check_hook.sh +++ b/config/style_check_hook.sh @@ -22,6 +22,8 @@ L_GIT_DIR=$(git rev-parse --show-toplevel) source $L_GIT_DIR/config/format-config.sh source $L_GIT_DIR/config/clang/colors.sh source $L_GIT_DIR/config/clang/clang-common.sh +CHANGE_TARGET=${CHANGE_TARGET:-master} + # if autoformatting was disabled by user - then ignore this commit hook if [ "$DISABLE_AUTO_FORMATTING" -eq 1 ]; then @@ -47,14 +49,14 @@ check_file() { case ${last_commit} in "True") if [[ ${FIX,,} == "true" ]]; then - git diff -U0 --no-color remotes/origin/master...HEAD "${file}" | ${L_CLANG_DIFF_TOOL} -style file -p1 -i + git diff -U0 --no-color remotes/origin/"${CHANGE_TARGET}"...HEAD "${file}" | ${L_CLANG_DIFF_TOOL} -style file -p1 -i STATUS=$(git status --short -- "${file}") if [ -n "${STATUS}" ]; then git add "${file}" results["${file}"]="${FIXED}"; fi else - OUT=$(git diff -U0 --no-color remotes/origin/master...HEAD "${file}" | ${L_CLANG_DIFF_TOOL} -style file -p1 ) + OUT=$(git diff -U0 --no-color remotes/origin/"${CHANGE_TARGET}"...HEAD "${file}" | ${L_CLANG_DIFF_TOOL} -style file -p1 ) if [ -n "${OUT}" ]; then results["${file}"]="${ERROR}" return 1 @@ -115,12 +117,12 @@ case "${1}" in exit 0 ;; --last) - FILES=$(git diff --name-only remotes/origin/master...HEAD) + FILES=$(git diff --name-only remotes/origin/"${CHANGE_TARGET}"...HEAD) LAST="True" FIX="false" ;; --branch-fix) - FILES=$(git diff --name-only remotes/origin/master...HEAD) + FILES=$(git diff --name-only remotes/origin/"${CHANGE_TARGET}"...HEAD) LAST="True" FIX="true" ;; diff --git a/products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/ApplicationBellSettings.hpp b/products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/ApplicationBellSettings.hpp index 9d46d7d6ee6ed0864456724962b8f747f5431581..8ecfa6d721bbcfaa03a96f086da53b5c028fbe25 100644 --- a/products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/ApplicationBellSettings.hpp +++ b/products/BellHybrid/apps/application-bell-settings/include/application-bell-settings/ApplicationBellSettings.hpp @@ -4,12 +4,13 @@ #pragma once #include +#include #include #include namespace gui::window::name { - inline constexpr auto bellSettings = "BellSettings"; + inline constexpr auto bellSettings = gui::name::window::main_window; inline constexpr auto bellSettingsTimeUnits = "BellSettingsTimeUnits"; inline constexpr auto bellSettingsDialog = "BellSettingsDialog"; inline constexpr auto bellSettingsFinished = "BellSettingsFinished";