From 74a625e7bfbda7a1df5ec0c5d29bc2a6f97eaf0a Mon Sep 17 00:00:00 2001 From: smolBlackCat <66385489+smolBlackCat@users.noreply.github.com> Date: Sun, 3 Nov 2024 15:29:35 -0300 Subject: [PATCH] (ui): Update Board dialog UI * Mark new strings for translation * Discard old UI --- po/POTFILES | 2 +- po/bg.po | 124 ++++++++++----------- po/en_GB.po | 124 ++++++++++----------- po/en_US.po | 124 ++++++++++----------- po/es.po | 124 ++++++++++----------- po/it.po | 124 ++++++++++----------- po/nl.po | 124 ++++++++++----------- po/progress-tracker.pot | 91 ++++++---------- po/pt_BR.po | 124 ++++++++++----------- po/ru_RU.po | 124 ++++++++++----------- po/tr.po | 124 ++++++++++----------- po/uk_UA.po | 124 ++++++++++----------- src/dialog/board-dialog.cpp | 121 +++++++++++++-------- src/dialog/board-dialog.h | 71 +++++++----- src/dialog/create_board_dialog.cpp | 85 ++++++--------- src/dialog/create_board_dialog.h | 10 +- src/dialog/preferences-board-dialog.cpp | 91 +++++++--------- src/dialog/preferences-board-dialog.h | 22 +--- src/resources.xml | 2 +- src/resources/ui/board-dialog.ui | 85 +++++++++++++++ src/resources/ui/create-board-dialog.ui | 137 ------------------------ src/window.cpp | 23 ++-- src/window.h | 3 - 23 files changed, 965 insertions(+), 1018 deletions(-) create mode 100644 src/resources/ui/board-dialog.ui delete mode 100644 src/resources/ui/create-board-dialog.ui diff --git a/po/POTFILES b/po/POTFILES index 854fd6d..4c74832 100644 --- a/po/POTFILES +++ b/po/POTFILES @@ -4,9 +4,9 @@ src/dialog/board-dialog.cpp src/dialog/create_board_dialog.cpp src/dialog/preferences-board-dialog.cpp src/resources/ui/app-window.ui -src/resources/ui/create-board-dialog.ui src/resources/ui/card-details-dialog.ui src/resources/ui/card-widget.ui +src/resources/ui/board-dialog.ui src/widgets/board-widget.cpp src/widgets/card.cpp src/widgets/cardlist-widget.cpp diff --git a/po/bg.po b/po/bg.po index f3809dd..0b1d031 100644 --- a/po/bg.po +++ b/po/bg.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: unnamed project\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: 2024-04-22 20:40+0200\n" "Last-Translator: twlvnn \n" "Language-Team: Bulgarian \n" @@ -26,19 +26,19 @@ msgstr "Изберете дъските, които да бъдат премах msgid "Delete" msgstr "Изтриване" -#: src/window.cpp:20 src/dialog/board-dialog.cpp:21 +#: src/window.cpp:20 msgid "Cancel" msgstr "Отказване" -#: src/window.cpp:128 +#: src/window.cpp:129 msgid "It was not possible to load this board" msgstr "Не беше възможно да се зареди тази дъска" -#: src/window.cpp:197 +#: src/window.cpp:198 msgid "De Moura © All rights reserved" msgstr "De Moura © Всички права запазени" -#: src/window.cpp:199 +#: src/window.cpp:200 msgid "translator-credits" msgstr "twlvnn " @@ -54,60 +54,23 @@ msgstr "" msgid "Set Due Date" msgstr "" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "Име на дъската" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "Изберете файл" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "Избиране на файл" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "Няма избран файл" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "Изображения" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "Създаване на дъска" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "Създаване" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "Не са позволени дъски с празни имена" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "файл трябва да е избран" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "Не беше възможно да се създаде дъска с даденото име" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "Редактиране на дъската" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "Запазване" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "Няма избран файл" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "Начална страница" @@ -132,18 +95,6 @@ msgstr "Относно „Progress“" msgid "Preferences" msgstr "Настройки" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "Фон" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "Като файл" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "Като цвят" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "" @@ -194,7 +145,7 @@ msgstr "Преименуване" msgid "Card Cover" msgstr "" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "" @@ -207,6 +158,26 @@ msgstr "" msgid "Remove" msgstr "Премахване" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "Създаване на дъска" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "Добавяне на списък" @@ -262,6 +233,39 @@ msgstr "Добавяне на карта" msgid "Convert to card" msgstr "" +#~ msgid "Board's name" +#~ msgstr "Име на дъската" + +#~ msgid "Select File" +#~ msgstr "Избиране на файл" + +#~ msgid "No file selected" +#~ msgstr "Няма избран файл" + +#~ msgid "Create" +#~ msgstr "Създаване" + +#~ msgid "A file must be selected" +#~ msgstr "файл трябва да е избран" + +#~ msgid "It was not possible to create a Board with given name" +#~ msgstr "Не беше възможно да се създаде дъска с даденото име" + +#~ msgid "Edit Board" +#~ msgstr "Редактиране на дъската" + +#~ msgid "No file was selected" +#~ msgstr "Няма избран файл" + +#~ msgid "Background" +#~ msgstr "Фон" + +#~ msgid "As a file" +#~ msgstr "Като файл" + +#~ msgid "As a color" +#~ msgstr "Като цвят" + #~ msgid "About" #~ msgstr "Относно" diff --git a/po/en_GB.po b/po/en_GB.po index 3181c54..52afd5d 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: 2024-07-10 11:12-0300\n" "Last-Translator: Gabriel de Moura \n" "Language-Team: English (British) <(nothing)>\n" @@ -25,19 +25,19 @@ msgstr "Select the boards to be deleted" msgid "Delete" msgstr "Delete" -#: src/window.cpp:20 src/dialog/board-dialog.cpp:21 +#: src/window.cpp:20 msgid "Cancel" msgstr "Cancel" -#: src/window.cpp:128 +#: src/window.cpp:129 msgid "It was not possible to load this board" msgstr "It was not possible to load this board" -#: src/window.cpp:197 +#: src/window.cpp:198 msgid "De Moura © All rights reserved" msgstr "De Moura © All rights reserved" -#: src/window.cpp:199 +#: src/window.cpp:200 msgid "translator-credits" msgstr "Gabriel de Moura" @@ -53,60 +53,23 @@ msgstr "" msgid "Set Due Date" msgstr "" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "Board's name" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "Select a file" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "Select File" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "No file selected" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "Image Files" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "Create Board" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "Create" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "Empty board names are not allowed" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "A file must be selected" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "It was not possible to create a Board with given name" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "Edit Board" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "Save" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "No file was selected" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "Homepage" @@ -131,18 +94,6 @@ msgstr "About Progress" msgid "Preferences" msgstr "Preferences" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "Background" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "As a file" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "As a colour" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "" @@ -193,7 +144,7 @@ msgstr "Rename" msgid "Card Cover" msgstr "Card Cover" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "Set Colour" @@ -206,6 +157,26 @@ msgstr "" msgid "Remove" msgstr "Remove" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "Create Board" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "Add List" @@ -261,5 +232,38 @@ msgstr "Add card" msgid "Convert to card" msgstr "" +#~ msgid "Board's name" +#~ msgstr "Board's name" + +#~ msgid "Select File" +#~ msgstr "Select File" + +#~ msgid "No file selected" +#~ msgstr "No file selected" + +#~ msgid "Create" +#~ msgstr "Create" + +#~ msgid "A file must be selected" +#~ msgstr "A file must be selected" + +#~ msgid "It was not possible to create a Board with given name" +#~ msgstr "It was not possible to create a Board with given name" + +#~ msgid "Edit Board" +#~ msgstr "Edit Board" + +#~ msgid "No file was selected" +#~ msgstr "No file was selected" + +#~ msgid "Background" +#~ msgstr "Background" + +#~ msgid "As a file" +#~ msgstr "As a file" + +#~ msgid "As a color" +#~ msgstr "As a colour" + #~ msgid "Clear Color Frame" #~ msgstr "Clear Colour Frame" diff --git a/po/en_US.po b/po/en_US.po index 47d3086..133ef94 100644 --- a/po/en_US.po +++ b/po/en_US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: 2024-07-10 11:11-0300\n" "Last-Translator: Gabriel de Moura \n" "Language-Team: English\n" @@ -25,19 +25,19 @@ msgstr "Select the boards to be deleted" msgid "Delete" msgstr "Delete" -#: src/window.cpp:20 src/dialog/board-dialog.cpp:21 +#: src/window.cpp:20 msgid "Cancel" msgstr "Cancel" -#: src/window.cpp:128 +#: src/window.cpp:129 msgid "It was not possible to load this board" msgstr "It was not possible to load this board" -#: src/window.cpp:197 +#: src/window.cpp:198 msgid "De Moura © All rights reserved" msgstr "De Moura © All rights reserved" -#: src/window.cpp:199 +#: src/window.cpp:200 msgid "translator-credits" msgstr "Gabriel de Moura" @@ -53,60 +53,23 @@ msgstr "" msgid "Set Due Date" msgstr "" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "Board's name" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "Select a file" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "Select File" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "No file selected" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "Image Files" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "Create Board" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "Create" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "Empty board names are not allowed" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "A file must be selected" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "It was not possible to create a Board with given name" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "Edit Board" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "Save" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "No file was selected" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "Homepage" @@ -131,18 +94,6 @@ msgstr "About Progress" msgid "Preferences" msgstr "Preferences" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "Background" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "As a file" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "As a color" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "" @@ -193,7 +144,7 @@ msgstr "Rename" msgid "Card Cover" msgstr "Card Cover" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "Set Color" @@ -206,6 +157,26 @@ msgstr "" msgid "Remove" msgstr "Remove" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "Create Board" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "Add List" @@ -261,5 +232,38 @@ msgstr "Add card" msgid "Convert to card" msgstr "" +#~ msgid "Board's name" +#~ msgstr "Board's name" + +#~ msgid "Select File" +#~ msgstr "Select File" + +#~ msgid "No file selected" +#~ msgstr "No file selected" + +#~ msgid "Create" +#~ msgstr "Create" + +#~ msgid "A file must be selected" +#~ msgstr "A file must be selected" + +#~ msgid "It was not possible to create a Board with given name" +#~ msgstr "It was not possible to create a Board with given name" + +#~ msgid "Edit Board" +#~ msgstr "Edit Board" + +#~ msgid "No file was selected" +#~ msgstr "No file was selected" + +#~ msgid "Background" +#~ msgstr "Background" + +#~ msgid "As a file" +#~ msgstr "As a file" + +#~ msgid "As a color" +#~ msgstr "As a color" + #~ msgid "Clear Color Frame" #~ msgstr "Clear Color Frame" diff --git a/po/es.po b/po/es.po index faf4143..0510d4d 100644 --- a/po/es.po +++ b/po/es.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: 2024-05-10 20:17-0400\n" "Last-Translator: \n" "Language-Team: \n" @@ -25,19 +25,19 @@ msgstr "Seleccione los tableros que desea eliminar" msgid "Delete" msgstr "Eliminar" -#: src/window.cpp:20 src/dialog/board-dialog.cpp:21 +#: src/window.cpp:20 msgid "Cancel" msgstr "Cancelar" -#: src/window.cpp:128 +#: src/window.cpp:129 msgid "It was not possible to load this board" msgstr "No ha sido posible cargar este tablero" -#: src/window.cpp:197 +#: src/window.cpp:198 msgid "De Moura © All rights reserved" msgstr "De Moura © Todos los derechos reservados" -#: src/window.cpp:199 +#: src/window.cpp:200 msgid "translator-credits" msgstr "haggen88" @@ -53,60 +53,23 @@ msgstr "" msgid "Set Due Date" msgstr "" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "Nombre del tablero" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "Seleccione un archivo" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "Seleccionar archivo" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "No se ha seleccionado ningún archivo" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "Archivos de imagen" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "Crear tablero" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "Crear" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "No se permiten nombres de tablero vacíos" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "Se debe seleccionar un archivo" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "No ha sido posible crear un tablero con el nombre dado" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "Editar tablero" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "Guardar" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "No se seleccionó ningún archivo" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "Página de inicio" @@ -131,18 +94,6 @@ msgstr "Acerca de Progress" msgid "Preferences" msgstr "Preferencias" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "Fondo" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "Como archivo" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "Como color" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "" @@ -193,7 +144,7 @@ msgstr "Renombrar" msgid "Card Cover" msgstr "" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "" @@ -206,6 +157,26 @@ msgstr "" msgid "Remove" msgstr "Eliminar" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "Crear tablero" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "Añadir lista" @@ -261,6 +232,39 @@ msgstr "Añadir tarjeta" msgid "Convert to card" msgstr "" +#~ msgid "Board's name" +#~ msgstr "Nombre del tablero" + +#~ msgid "Select File" +#~ msgstr "Seleccionar archivo" + +#~ msgid "No file selected" +#~ msgstr "No se ha seleccionado ningún archivo" + +#~ msgid "Create" +#~ msgstr "Crear" + +#~ msgid "A file must be selected" +#~ msgstr "Se debe seleccionar un archivo" + +#~ msgid "It was not possible to create a Board with given name" +#~ msgstr "No ha sido posible crear un tablero con el nombre dado" + +#~ msgid "Edit Board" +#~ msgstr "Editar tablero" + +#~ msgid "No file was selected" +#~ msgstr "No se seleccionó ningún archivo" + +#~ msgid "Background" +#~ msgstr "Fondo" + +#~ msgid "As a file" +#~ msgstr "Como archivo" + +#~ msgid "As a color" +#~ msgstr "Como color" + #~ msgid "About" #~ msgstr "Acerca de" diff --git a/po/it.po b/po/it.po index 53b313c..8b68e65 100644 --- a/po/it.po +++ b/po/it.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: 2024-04-28 13:17+0100\n" "Last-Translator: Albano Battistella \n" "Language-Team: Italian \n" @@ -24,19 +24,19 @@ msgstr "Seleziona le bacheche da eliminare" msgid "Delete" msgstr "Elimina" -#: src/window.cpp:20 src/dialog/board-dialog.cpp:21 +#: src/window.cpp:20 msgid "Cancel" msgstr "Annulla" -#: src/window.cpp:128 +#: src/window.cpp:129 msgid "It was not possible to load this board" msgstr "Non è stato possibile caricare questa bacheca" -#: src/window.cpp:197 +#: src/window.cpp:198 msgid "De Moura © All rights reserved" msgstr "De Moura © Tutti i diritti riservati" -#: src/window.cpp:199 +#: src/window.cpp:200 msgid "translator-credits" msgstr "Albano Battistella " @@ -52,60 +52,23 @@ msgstr "" msgid "Set Due Date" msgstr "" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "Nome della bacheca" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "Seleziona un file" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "Seleziona file" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "Nessun file selezionato" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "File di immagini" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "Crea bacheca" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "Crea" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "Non sono ammessi nomi di bacheche vuote" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "È necessario selezionare un file" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "Non è stato possibile creare una bacheca con il nome indicato" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "Modifica bacheca" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "Salva" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "Nessun file è stato selezionato" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "Homepage" @@ -130,18 +93,6 @@ msgstr "Informazioni su Progress" msgid "Preferences" msgstr "Preferenze" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "Sfondo" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "Come file" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "Come colore" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "" @@ -192,7 +143,7 @@ msgstr "Rinomina" msgid "Card Cover" msgstr "" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "" @@ -205,6 +156,26 @@ msgstr "" msgid "Remove" msgstr "Rimuovi" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "Crea bacheca" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "Aggiungi elenco" @@ -260,6 +231,39 @@ msgstr "Aggiungi scheda" msgid "Convert to card" msgstr "" +#~ msgid "Board's name" +#~ msgstr "Nome della bacheca" + +#~ msgid "Select File" +#~ msgstr "Seleziona file" + +#~ msgid "No file selected" +#~ msgstr "Nessun file selezionato" + +#~ msgid "Create" +#~ msgstr "Crea" + +#~ msgid "A file must be selected" +#~ msgstr "È necessario selezionare un file" + +#~ msgid "It was not possible to create a Board with given name" +#~ msgstr "Non è stato possibile creare una bacheca con il nome indicato" + +#~ msgid "Edit Board" +#~ msgstr "Modifica bacheca" + +#~ msgid "No file was selected" +#~ msgstr "Nessun file è stato selezionato" + +#~ msgid "Background" +#~ msgstr "Sfondo" + +#~ msgid "As a file" +#~ msgstr "Come file" + +#~ msgid "As a color" +#~ msgstr "Come colore" + #~ msgid "About" #~ msgstr "Informazioni" diff --git a/po/nl.po b/po/nl.po index 0f79273..9301436 100644 --- a/po/nl.po +++ b/po/nl.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: 2024-03-28 17:47+0100\n" "Last-Translator: Heimen Stoffels \n" "Language-Team: \n" @@ -26,19 +26,19 @@ msgstr "Selecteer de te wissen borden" msgid "Delete" msgstr "Wissen" -#: src/window.cpp:20 src/dialog/board-dialog.cpp:21 +#: src/window.cpp:20 msgid "Cancel" msgstr "Annuleren" -#: src/window.cpp:128 +#: src/window.cpp:129 msgid "It was not possible to load this board" msgstr "Het bord kan niet worden geladen" -#: src/window.cpp:197 +#: src/window.cpp:198 msgid "De Moura © All rights reserved" msgstr "De Moura © Alle rechten voorbehouden" -#: src/window.cpp:199 +#: src/window.cpp:200 msgid "translator-credits" msgstr "Heimen Stoffels " @@ -54,60 +54,23 @@ msgstr "" msgid "Set Due Date" msgstr "" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "Bordnaam" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "Kies een bestand" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "Bestand kiezen" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "Er is geen bestand gekozen" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "Afbeeldingsbestanden" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "Bord aanmaken" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "Maken" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "Geef het bord een naam" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "Kies een bestand" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "Het bord kan niet worden aangemaakt onder de huidige naam" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "Bord bewerken" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "Opslaan" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "Er is geen bestand gekozen" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "" @@ -133,18 +96,6 @@ msgstr "" msgid "Preferences" msgstr "Voorkeuren" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "Achtergrond" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "Als bestand" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "Als kleur" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "" @@ -195,7 +146,7 @@ msgstr "Naam wijzigen" msgid "Card Cover" msgstr "" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "" @@ -208,6 +159,26 @@ msgstr "" msgid "Remove" msgstr "Verwijderen" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "Bord aanmaken" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "Lijst toevoegen" @@ -263,6 +234,39 @@ msgstr "Kaart toevoegen" msgid "Convert to card" msgstr "" +#~ msgid "Board's name" +#~ msgstr "Bordnaam" + +#~ msgid "Select File" +#~ msgstr "Bestand kiezen" + +#~ msgid "No file selected" +#~ msgstr "Er is geen bestand gekozen" + +#~ msgid "Create" +#~ msgstr "Maken" + +#~ msgid "A file must be selected" +#~ msgstr "Kies een bestand" + +#~ msgid "It was not possible to create a Board with given name" +#~ msgstr "Het bord kan niet worden aangemaakt onder de huidige naam" + +#~ msgid "Edit Board" +#~ msgstr "Bord bewerken" + +#~ msgid "No file was selected" +#~ msgstr "Er is geen bestand gekozen" + +#~ msgid "Background" +#~ msgstr "Achtergrond" + +#~ msgid "As a file" +#~ msgstr "Als bestand" + +#~ msgid "As a color" +#~ msgstr "Als kleur" + #~ msgid "About" #~ msgstr "Over" diff --git a/po/progress-tracker.pot b/po/progress-tracker.pot index f7035e2..75f50d8 100644 --- a/po/progress-tracker.pot +++ b/po/progress-tracker.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -26,19 +26,19 @@ msgstr "" msgid "Delete" msgstr "" -#: src/window.cpp:20 src/dialog/board-dialog.cpp:21 +#: src/window.cpp:20 msgid "Cancel" msgstr "" -#: src/window.cpp:128 +#: src/window.cpp:129 msgid "It was not possible to load this board" msgstr "" -#: src/window.cpp:197 +#: src/window.cpp:198 msgid "De Moura © All rights reserved" msgstr "" -#: src/window.cpp:199 +#: src/window.cpp:200 msgid "translator-credits" msgstr "" @@ -54,60 +54,23 @@ msgstr "" msgid "Set Due Date" msgstr "" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "" @@ -132,18 +95,6 @@ msgstr "" msgid "Preferences" msgstr "" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "" @@ -194,7 +145,7 @@ msgstr "" msgid "Card Cover" msgstr "" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "" @@ -207,6 +158,26 @@ msgstr "" msgid "Remove" msgstr "" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "" diff --git a/po/pt_BR.po b/po/pt_BR.po index b3c3700..e3fe8f7 100644 --- a/po/pt_BR.po +++ b/po/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: 2024-02-10 12:25-0300\n" "Last-Translator: Gabriel de Moura \n" "Language-Team: Brazilian Portuguese " @@ -54,60 +54,23 @@ msgstr "Nova Tarefa" msgid "Set Due Date" msgstr "Marcar Prazo" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "Nome do Quadro" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "Selecione um Arquivo" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "Selecionar Arquivo" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "Nenhum arquivo selecionado" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "Arquivos de Imagem" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "Criar Quadro" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "Criar" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "Nomes de quadro vazios não são permitidos" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "Um arquivo deve ser selecionado" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "Não foi possível criar um quadro com este nome" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "Editar Quadro" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "Salvar" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "Nenhum arquivo foi selecionado" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "Página Inicial" @@ -132,18 +95,6 @@ msgstr "Sobre Progress" msgid "Preferences" msgstr "Preferências" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "Papel de Parede" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "Imagem" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "Cor sólida" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "Título do Cartão" @@ -194,7 +145,7 @@ msgstr "Renomear" msgid "Card Cover" msgstr "Capa do Cartão" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "Selecionar Cor" @@ -207,6 +158,26 @@ msgstr "Remover Cor" msgid "Remove" msgstr "Remover" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "Título do Quadro" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "Plano de Fundo do Quadro" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "Clique para selecionar um plano de fundo para o quadro" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "Criar Quadro" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "Selecionar Imagem" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "Adicionar Lista" @@ -262,6 +233,39 @@ msgstr "Adicionar cartão" msgid "Convert to card" msgstr "Converter para cartão" +#~ msgid "Board's name" +#~ msgstr "Nome do Quadro" + +#~ msgid "Select File" +#~ msgstr "Selecionar Arquivo" + +#~ msgid "No file selected" +#~ msgstr "Nenhum arquivo selecionado" + +#~ msgid "Create" +#~ msgstr "Criar" + +#~ msgid "A file must be selected" +#~ msgstr "Um arquivo deve ser selecionado" + +#~ msgid "It was not possible to create a Board with given name" +#~ msgstr "Não foi possível criar um quadro com este nome" + +#~ msgid "Edit Board" +#~ msgstr "Editar Quadro" + +#~ msgid "No file was selected" +#~ msgstr "Nenhum arquivo foi selecionado" + +#~ msgid "Background" +#~ msgstr "Papel de Parede" + +#~ msgid "As a file" +#~ msgstr "Imagem" + +#~ msgid "As a color" +#~ msgstr "Cor sólida" + #~ msgid "Card Name" #~ msgstr "Nome do Cartão" diff --git a/po/ru_RU.po b/po/ru_RU.po index d9c5685..0c71350 100644 --- a/po/ru_RU.po +++ b/po/ru_RU.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: https://github.com/smolBlackCat/progress-tracker\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: 2024-04-28 21:10+0300\n" "Last-Translator: volkov \n" "Language-Team: volkov \n" @@ -26,20 +26,20 @@ msgstr "Выберите доски для удаления" msgid "Delete" msgstr "Удалить" -#: src/window.cpp:20 src/dialog/board-dialog.cpp:21 +#: src/window.cpp:20 msgid "Cancel" msgstr "Отменить" -#: src/window.cpp:128 +#: src/window.cpp:129 msgid "It was not possible to load this board" msgstr "Не удалось загрузить эту доску" -#: src/window.cpp:197 +#: src/window.cpp:198 msgid "De Moura © All rights reserved" msgstr "De Moura © Все права защищены" # Что такое "Канбан" - https://ru.wikipedia.org/wiki/%D0%9A%D0%B0%D0%BD%D0%B1%D0%B0%D0%BD -#: src/window.cpp:199 +#: src/window.cpp:200 msgid "translator-credits" msgstr "volkov " @@ -55,60 +55,23 @@ msgstr "" msgid "Set Due Date" msgstr "" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "Название доски" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "Выбрать файл" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "Выбрать файл" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "Файл не был выбран" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "Файлы изображений" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "Создать доску" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "Создать" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "Нельзя создать доску с пустым именем" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "Нужно выбрать файл" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "Не удалось создать доску с таким названием" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "Редактирование доски" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "Сохранить" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "Файл не был выбран" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "Домашняя страница" @@ -133,18 +96,6 @@ msgstr "Про приложение" msgid "Preferences" msgstr "Настройки" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "Добавить обои в качестве…" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "Файла изображения" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "Сплошного цвета" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "" @@ -195,7 +146,7 @@ msgstr "Переименовать" msgid "Card Cover" msgstr "" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "" @@ -208,6 +159,26 @@ msgstr "" msgid "Remove" msgstr "Удалить" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "Создать доску" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "Добавить список" @@ -262,3 +233,36 @@ msgstr "Добавить карточку" #: src/widgets/task-widget.cpp:49 msgid "Convert to card" msgstr "" + +#~ msgid "Board's name" +#~ msgstr "Название доски" + +#~ msgid "Select File" +#~ msgstr "Выбрать файл" + +#~ msgid "No file selected" +#~ msgstr "Файл не был выбран" + +#~ msgid "Create" +#~ msgstr "Создать" + +#~ msgid "A file must be selected" +#~ msgstr "Нужно выбрать файл" + +#~ msgid "It was not possible to create a Board with given name" +#~ msgstr "Не удалось создать доску с таким названием" + +#~ msgid "Edit Board" +#~ msgstr "Редактирование доски" + +#~ msgid "No file was selected" +#~ msgstr "Файл не был выбран" + +#~ msgid "Background" +#~ msgstr "Добавить обои в качестве…" + +#~ msgid "As a file" +#~ msgstr "Файла изображения" + +#~ msgid "As a color" +#~ msgstr "Сплошного цвета" diff --git a/po/tr.po b/po/tr.po index c3ac759..1bfcaac 100644 --- a/po/tr.po +++ b/po/tr.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: io.github.smolblackcat.Progress\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: 2024-04-19 13:36+0300\n" "Last-Translator: Sabri Ünal \n" "Language-Team: Turkish \n" @@ -27,19 +27,19 @@ msgstr "Silinecek panoları seç" msgid "Delete" msgstr "Sil" -#: src/window.cpp:20 src/dialog/board-dialog.cpp:21 +#: src/window.cpp:20 msgid "Cancel" msgstr "İptal" -#: src/window.cpp:128 +#: src/window.cpp:129 msgid "It was not possible to load this board" msgstr "Bu pano yüklenemedi" -#: src/window.cpp:197 +#: src/window.cpp:198 msgid "De Moura © All rights reserved" msgstr "De Moura © Tüm hakları saklıdır" -#: src/window.cpp:199 +#: src/window.cpp:200 msgid "translator-credits" msgstr "Sabri Ünal " @@ -55,60 +55,23 @@ msgstr "" msgid "Set Due Date" msgstr "" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "Pano adı" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "Dosya seç" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "Dosya Seç" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "Dosya seçilmedi" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "Görüntü Dosyaları" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "Pano Oluştur" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "Oluştur" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "Boş pano adlarına izin verilmez" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "Bir dosya seçilmeli" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "Verilen adla pano oluşturulamadı" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "Panoyu Düzenle" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "Kaydet" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "Hiçbir dosya seçilmedi" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "Ana Sayfa" @@ -133,18 +96,6 @@ msgstr "Progress Hakkında" msgid "Preferences" msgstr "Tercihler" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "Arka plan" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "Dosya olarak" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "Renk olarak" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "" @@ -195,7 +146,7 @@ msgstr "Yeniden Adlandır" msgid "Card Cover" msgstr "" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "" @@ -208,6 +159,26 @@ msgstr "" msgid "Remove" msgstr "Kaldır" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "Pano Oluştur" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "Liste Ekle" @@ -260,6 +231,39 @@ msgstr "Kart ekle" msgid "Convert to card" msgstr "" +#~ msgid "Board's name" +#~ msgstr "Pano adı" + +#~ msgid "Select File" +#~ msgstr "Dosya Seç" + +#~ msgid "No file selected" +#~ msgstr "Dosya seçilmedi" + +#~ msgid "Create" +#~ msgstr "Oluştur" + +#~ msgid "A file must be selected" +#~ msgstr "Bir dosya seçilmeli" + +#~ msgid "It was not possible to create a Board with given name" +#~ msgstr "Verilen adla pano oluşturulamadı" + +#~ msgid "Edit Board" +#~ msgstr "Panoyu Düzenle" + +#~ msgid "No file was selected" +#~ msgstr "Hiçbir dosya seçilmedi" + +#~ msgid "Background" +#~ msgstr "Arka plan" + +#~ msgid "As a file" +#~ msgstr "Dosya olarak" + +#~ msgid "As a color" +#~ msgstr "Renk olarak" + #~ msgid "About" #~ msgstr "Hakkında" diff --git a/po/uk_UA.po b/po/uk_UA.po index a3b0867..e4cb0aa 100644 --- a/po/uk_UA.po +++ b/po/uk_UA.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: https://github.com/smolBlackCat/progress-tracker\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-02 06:57-0300\n" +"POT-Creation-Date: 2024-11-03 15:26-0300\n" "PO-Revision-Date: 2024-04-28 21:10+0300\n" "Last-Translator: volkov \n" "Language-Team: volkov \n" @@ -26,20 +26,20 @@ msgstr "Оберіть дошки які треба видалити" msgid "Delete" msgstr "Видалити" -#: src/window.cpp:20 src/dialog/board-dialog.cpp:21 +#: src/window.cpp:20 msgid "Cancel" msgstr "Скасувати" -#: src/window.cpp:128 +#: src/window.cpp:129 msgid "It was not possible to load this board" msgstr "Не вдалося завантажити цю дошку" -#: src/window.cpp:197 +#: src/window.cpp:198 msgid "De Moura © All rights reserved" msgstr "De Moura © Всі права захищені" # Що таке "Канбан" - https://uk.wikipedia.org/wiki/%D0%9A%D0%B0%D0%BD%D0%B1%D0%B0%D0%BD -#: src/window.cpp:199 +#: src/window.cpp:200 msgid "translator-credits" msgstr "volkov " @@ -55,60 +55,23 @@ msgstr "" msgid "Set Due Date" msgstr "" -#: src/dialog/board-dialog.cpp:20 -msgid "Board's name" -msgstr "Назва дошки" - -#: src/dialog/board-dialog.cpp:22 src/dialog/board-dialog.cpp:49 -#: src/dialog/preferences-board-dialog.cpp:79 +#: src/dialog/board-dialog.cpp:55 msgid "Select a file" msgstr "Вибір файлу" -#: src/dialog/board-dialog.cpp:23 -msgid "Select File" -msgstr "Обрати файл" - -#: src/dialog/board-dialog.cpp:40 -msgid "No file selected" -msgstr "Не було обрано файл" - -#: src/dialog/board-dialog.cpp:54 +#: src/dialog/board-dialog.cpp:60 msgid "Image Files" msgstr "Файли зображень" -#: src/dialog/create_board_dialog.cpp:11 -msgid "Create Board" -msgstr "Створити дошку" - -#: src/dialog/create_board_dialog.cpp:15 -msgid "Create" -msgstr "Створити" - -#: src/dialog/create_board_dialog.cpp:39 +#: src/dialog/create_board_dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:56 msgid "Empty board names are not allowed" msgstr "Неможливо створити дошку з порожньою назвою" -#: src/dialog/create_board_dialog.cpp:47 -msgid "A file must be selected" -msgstr "Треба обрати файл" - -#: src/dialog/create_board_dialog.cpp:63 -msgid "It was not possible to create a Board with given name" -msgstr "Не вдалося створити дошку з такою назвою" - -#: src/dialog/preferences-board-dialog.cpp:16 -msgid "Edit Board" -msgstr "Редагування дошки" - -#: src/dialog/preferences-board-dialog.cpp:19 +#: src/dialog/preferences-board-dialog.cpp:14 msgid "Save" msgstr "Зберегти" -#: src/dialog/preferences-board-dialog.cpp:34 -#: src/dialog/preferences-board-dialog.cpp:51 -msgid "No file was selected" -msgstr "Не було обрано жодного файлу" - #: src/resources/ui/app-window.ui:15 msgid "Homepage" msgstr "Домашня сторінка" @@ -133,18 +96,6 @@ msgstr "Про додаток" msgid "Preferences" msgstr "Налаштування" -#: src/resources/ui/create-board-dialog.ui:24 -msgid "Background" -msgstr "Відобразити тло як…" - -#: src/resources/ui/create-board-dialog.ui:53 -msgid "As a file" -msgstr "Файлом зображення" - -#: src/resources/ui/create-board-dialog.ui:96 -msgid "As a color" -msgstr "Суцільним кольором" - #: src/resources/ui/card-details-dialog.ui:27 msgid "Card Title" msgstr "" @@ -195,7 +146,7 @@ msgstr "Перейменувати" msgid "Card Cover" msgstr "" -#: src/resources/ui/card-widget.ui:109 +#: src/resources/ui/card-widget.ui:109 src/resources/ui/board-dialog.ui:78 msgid "Set Color" msgstr "" @@ -208,6 +159,26 @@ msgstr "" msgid "Remove" msgstr "Видалити" +#: src/resources/ui/board-dialog.ui:26 +msgid "Board Title" +msgstr "" + +#: src/resources/ui/board-dialog.ui:42 +msgid "Board Background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:57 +msgid "Click to set a board background" +msgstr "" + +#: src/resources/ui/board-dialog.ui:67 +msgid "Create Board" +msgstr "Створити дошку" + +#: src/resources/ui/board-dialog.ui:82 +msgid "Set Image" +msgstr "" + #: src/widgets/board-widget.cpp:22 msgid "Add List" msgstr "Додати список" @@ -262,3 +233,36 @@ msgstr "Додати картку" #: src/widgets/task-widget.cpp:49 msgid "Convert to card" msgstr "" + +#~ msgid "Board's name" +#~ msgstr "Назва дошки" + +#~ msgid "Select File" +#~ msgstr "Обрати файл" + +#~ msgid "No file selected" +#~ msgstr "Не було обрано файл" + +#~ msgid "Create" +#~ msgstr "Створити" + +#~ msgid "A file must be selected" +#~ msgstr "Треба обрати файл" + +#~ msgid "It was not possible to create a Board with given name" +#~ msgstr "Не вдалося створити дошку з такою назвою" + +#~ msgid "Edit Board" +#~ msgstr "Редагування дошки" + +#~ msgid "No file was selected" +#~ msgstr "Не було обрано жодного файлу" + +#~ msgid "Background" +#~ msgstr "Відобразити тло як…" + +#~ msgid "As a file" +#~ msgstr "Файлом зображення" + +#~ msgid "As a color" +#~ msgstr "Суцільним кольором" diff --git a/src/dialog/board-dialog.cpp b/src/dialog/board-dialog.cpp index 7e27512..b1cbef2 100644 --- a/src/dialog/board-dialog.cpp +++ b/src/dialog/board-dialog.cpp @@ -1,49 +1,55 @@ #include "board-dialog.h" +#include #include +#include + +#include "core/colorable.h" namespace ui { -BoardDialog::BoardDialog(BaseObjectType* cobject, - const Glib::RefPtr& builder) - : Gtk::Window{cobject}, - p_board_name_entry{builder->get_widget("board-name-entry")}, - p_select_file_label{builder->get_widget("select-file-label")}, - p_background_selector_stack{ - builder->get_widget("background-selector-stack")}, - p_colour_button{ - builder->get_widget("colour-button")}, - p_file_image{builder->get_widget("file-image")}, - p_left_button{builder->get_widget("left-button")}, - p_right_button{builder->get_widget("right-button")}, - p_select_file_button{ - builder->get_widget("select-file-button")} { - p_board_name_entry->set_placeholder_text(_("Board's name")); - p_left_button->set_label(_("Cancel")); - p_select_file_label->set_label(_("Select a file")); - p_select_file_button->set_label(_("Select File")); - - p_left_button->signal_clicked().connect( - sigc::mem_fun(*this, &BoardDialog::close_window)); - p_colour_button->property_rgba().signal_changed().connect( - sigc::mem_fun(*this, &BoardDialog::on_colourbutton_set)); - p_select_file_button->signal_clicked().connect( - sigc::mem_fun(*this, &BoardDialog::on_bg_button_click)); + +BoardDialog::BoardDialog() + : builder{Gtk::Builder::create_from_resource(BOARD_DIALOG)}, + color_dialog{Gtk::ColorDialog::create()}, + board_dialog{builder->get_object("board-dialog")}, + board_title_entry{builder->get_widget("board-title-entry")}, + background_setter_menubutton{ + builder->get_widget("background-setter-menubutton")}, + board_picture{builder->get_widget("board-picture")}, + footer_button{builder->get_widget("footer-button")} { + g_signal_connect(board_dialog->gobj(), "close-attempt", + G_CALLBACK(+[](AdwDialog* self, gpointer data) { + reinterpret_cast(data)->close(); + }), + this); + set_picture(Gdk::RGBA{0, 120, 212}); + auto group = Gio::SimpleActionGroup::create(); + + group->add_action("set-color", + sigc::mem_fun(*this, &BoardDialog::on_set_color)); + group->add_action("set-image", + sigc::mem_fun(*this, &BoardDialog::on_set_image)); + background_setter_menubutton->insert_action_group("board-dialog", group); + footer_button->signal_clicked().connect( + sigc::mem_fun(*this, &BoardDialog::on_footer_button_click)); } -void BoardDialog::open_window() { set_visible(); } +BoardDialog::~BoardDialog() {} -void BoardDialog::close_window() { - set_visible(false); +void BoardDialog::open(Gtk::Window& parent) { + adw_dialog_present(ADW_DIALOG(board_dialog->gobj()), + static_cast(parent).gobj()); + this->parent = &parent; +} - // Cleanup any inserted data - p_board_name_entry->set_text(""); - p_select_file_label->set_text(_("No file selected")); - p_file_image->clear(); - p_colour_button->set_rgba(Gdk::RGBA("#FFFFFF")); - file_selected = false; +void BoardDialog::close() { + adw_dialog_force_close(ADW_DIALOG(board_dialog->gobj())); + // This line assumes that BoardDialog children will only be allocated to the + // heap + delete this; } -void BoardDialog::on_bg_button_click() { +void BoardDialog::on_set_image() { auto dialog = Gtk::FileDialog::create(); dialog->set_title(_("Select a file")); @@ -59,20 +65,35 @@ void BoardDialog::on_bg_button_click() { dialog->set_filters(filters); dialog->open( - *this, + *parent, sigc::bind(sigc::mem_fun(*this, &ui::BoardDialog::on_filedialog_finish), dialog)); } +void BoardDialog::on_set_color() { + color_dialog->set_modal(); + color_dialog->choose_rgba( + *parent, sigc::mem_fun(*this, &BoardDialog::on_color_finish)); +} + +void BoardDialog::on_color_finish( + const Glib::RefPtr& result) { + try { + rgba = color_dialog->choose_rgba_finish(result); + bg_type = BackgroundType::COLOR; + set_picture(rgba); + } catch (Gtk::DialogError& err) { + err.what(); + } +} + void BoardDialog::on_filedialog_finish( const Glib::RefPtr& result, const Glib::RefPtr& dialog) { try { - selected_file = dialog->open_finish(result); - p_file_image->property_paintable().set_value( - Gdk::Texture::create_from_file(selected_file)); - p_select_file_label->set_text(selected_file->get_path()); - file_selected = true; + image_filename = dialog->open_finish(result)->get_path(); + bg_type = BackgroundType::IMAGE; + set_picture(image_filename); } catch (Gtk::DialogError& err) { err.what(); } catch (Glib::Error& err) { @@ -80,7 +101,21 @@ void BoardDialog::on_filedialog_finish( } } -void BoardDialog::on_colourbutton_set() { - selected_colour = p_colour_button->get_rgba(); +void BoardDialog::set_picture(const Gdk::RGBA& rgba) { + auto color_frame_pixbuf = + Gdk::Pixbuf::create(Gdk::Colorspace::RGB, false, 8, 30, 30); + color_frame_pixbuf->fill((static_cast(rgba.get_red_u()) << 24) | + (static_cast(rgba.get_green_u()) << 16) | + (static_cast(rgba.get_blue_u()) << 8) | + static_cast(1)); + if (board_picture->get_paintable()) { + board_picture->set_paintable(nullptr); + } + board_picture->set_paintable( + Gdk::Texture::create_for_pixbuf(color_frame_pixbuf)); +} + +void BoardDialog::set_picture(const std::string& image_filename) { + board_picture->set_filename(image_filename); } } // namespace ui \ No newline at end of file diff --git a/src/dialog/board-dialog.h b/src/dialog/board-dialog.h index 2e03629..2e590ec 100644 --- a/src/dialog/board-dialog.h +++ b/src/dialog/board-dialog.h @@ -1,41 +1,54 @@ #pragma once +#include #include namespace ui { -class BoardDialog : public Gtk::Window { +class BoardDialog { public: - BoardDialog(BaseObjectType* cobject, - const Glib::RefPtr& builder); - virtual ~BoardDialog() = default; + virtual ~BoardDialog(); + /** + * @brief Opens the board dialog + */ + void open(Gtk::Window& parent); - virtual void open_window(); - virtual void close_window(); + /** + * @brief Closes the window dialog. The dialog is then destroyed + */ + void close(); protected: - virtual void on_bg_button_click(); - virtual void on_filedialog_finish( - const Glib::RefPtr& result, - const Glib::RefPtr& dialog); - virtual void on_colourbutton_set(); - - // File Dialog attributes helpers - Glib::RefPtr selected_file; - Gdk::RGBA selected_colour; - bool file_selected = false; - - // Board Dialog Widgets - Gtk::Entry* p_board_name_entry; - Gtk::Label* p_select_file_label; - Gtk::Stack* p_background_selector_stack; - Gtk::ColorDialogButton* p_colour_button; - Gtk::Image* p_file_image; - Gtk::Button* p_left_button; - Gtk::Button* p_right_button; - Gtk::Button* p_select_file_button; - - static constexpr const char* BOARD_RESOURCE = - "/io/github/smolblackcat/Progress/create-board-dialog.ui"; + BoardDialog(); + void on_set_image(); + void on_set_color(); + + void on_filedialog_finish(const Glib::RefPtr& result, + const Glib::RefPtr& dialog); + + void on_color_finish(const Glib::RefPtr& result); + + virtual void on_footer_button_click() = 0; + + void set_picture(const Gdk::RGBA& rgba); + void set_picture(const std::string& image_filename); + + Glib::RefPtr builder; + + Gtk::Window* parent = nullptr; + Glib::RefPtr board_dialog; + Glib::RefPtr color_dialog; + Gtk::Entry* board_title_entry; + Gtk::MenuButton* background_setter_menubutton; + Gtk::Picture* board_picture; + Gtk::Button* footer_button; + + Gdk::RGBA rgba; + std::string image_filename; + + BackgroundType bg_type; + + static constexpr const char* BOARD_DIALOG = + "/io/github/smolblackcat/Progress/board-dialog.ui"; }; } // namespace ui \ No newline at end of file diff --git a/src/dialog/create_board_dialog.cpp b/src/dialog/create_board_dialog.cpp index b7ac21b..d0f94a8 100644 --- a/src/dialog/create_board_dialog.cpp +++ b/src/dialog/create_board_dialog.cpp @@ -4,72 +4,47 @@ #include namespace ui { -CreateBoardDialog::CreateBoardDialog( - BaseObjectType* cobject, const Glib::RefPtr& ref_builder, - ProgressWindow& board_creator) - : BoardDialog{cobject, ref_builder}, board_creator{board_creator} { - set_title(_("Create Board")); - p_left_button->add_css_class("destructive-action"); - p_right_button->add_css_class("suggested-action"); - - p_right_button->set_label(_("Create")); - - // variable name is weird. But in this context board_creator is still a - // window - set_transient_for(board_creator); - - /** - * TODO: Create a helper class BoardManager. There is no need for having - * CreateBoardDialog connected to the parent window - */ - p_right_button->signal_clicked().connect( - sigc::mem_fun(*this, &CreateBoardDialog::create_board)); -} +CreateBoardDialog::CreateBoardDialog(ProgressWindow& board_creator) + : BoardDialog{}, board_creator{board_creator} {} CreateBoardDialog* CreateBoardDialog::create(ProgressWindow& board_creator) { - auto builder = Gtk::Builder::create_from_resource(BOARD_RESOURCE); - - return Gtk::Builder::get_widget_derived( - builder, "create-board", board_creator); + return new CreateBoardDialog(board_creator); } +void CreateBoardDialog::on_footer_button_click() { create_board(); } + void CreateBoardDialog::create_board() { - if (p_board_name_entry->get_text_length() == 0) { + if (board_title_entry->get_text_length() == 0) { auto message_dialog = Gtk::AlertDialog::create(_("Empty board names are not allowed")); - message_dialog->show(*this); + message_dialog->show(*parent); return; } - if ((!file_selected) && - p_background_selector_stack->get_visible_child_name() == "as-file") { - auto message_dialog = - Gtk::AlertDialog::create(_("A file must be selected")); - message_dialog->show(*this); - return; + BoardBackend backend{BackendType::LOCAL}; + backend.set_attribute("filepath", + gen_unique_filename(board_title_entry->get_text())); + + switch (bg_type) { + case BackgroundType::COLOR: { + Board board = + backend.create(board_title_entry->get_text(), rgba.to_string()); + board.save(); + break; + } + case BackgroundType::IMAGE: { + Board board = + backend.create(board_title_entry->get_text(), image_filename); + board.save(); + break; + } + default: { + // Report probable data corruption + break; + } } - std::string background_type = - p_background_selector_stack->get_visible_child_name(); - std::string background = background_type == "as-file" - ? p_select_file_label->get_text() - : p_colour_button->get_rgba().to_string(); - BoardBackend board_backend{BackendType::LOCAL}; - std::string new_file_path = - gen_unique_filename(p_board_name_entry->get_text()); - - if (!board_backend.set_attribute("filepath", new_file_path)) { - auto message_dialog = Gtk::AlertDialog::create( - _("It was not possible to create a Board with given name")); - message_dialog->show(*this); - } else { - Board board = - board_backend.create(p_board_name_entry->get_text(), background); - board.save(); // Write to file - - // Add entry button to grid page - board_creator.add_local_board(board_backend); - close_window(); - } + board_creator.add_local_board(backend); + close(); } } // namespace ui diff --git a/src/dialog/create_board_dialog.h b/src/dialog/create_board_dialog.h index 46455e9..b164bb6 100644 --- a/src/dialog/create_board_dialog.h +++ b/src/dialog/create_board_dialog.h @@ -13,12 +13,6 @@ namespace ui { */ class CreateBoardDialog : public BoardDialog { public: - /** - * @brief Dialog Window constructor - */ - CreateBoardDialog(BaseObjectType* cobject, - const Glib::RefPtr& ref_builder, - ProgressWindow& board_creator); /** * @brief Creates a Board settings dialog for creation @@ -29,7 +23,11 @@ class CreateBoardDialog : public BoardDialog { */ static CreateBoardDialog* create(ProgressWindow& board_creator); + void on_footer_button_click() override; + protected: + CreateBoardDialog(ProgressWindow& board_creator); + ProgressWindow& board_creator; void create_board(); }; diff --git a/src/dialog/preferences-board-dialog.cpp b/src/dialog/preferences-board-dialog.cpp index 2b5abc1..9cb62b5 100644 --- a/src/dialog/preferences-board-dialog.cpp +++ b/src/dialog/preferences-board-dialog.cpp @@ -5,90 +5,77 @@ #include -namespace ui { +#include "gtkmm/messagedialog.h" -PreferencesBoardDialog::PreferencesBoardDialog( - BaseObjectType* cobject, const Glib::RefPtr& builder, - Gtk::Window& parent, BoardWidget& board_widget) - : BoardDialog{cobject, builder}, - board_widget{board_widget}, - parent{parent} { - set_title(_("Edit Board")); - set_transient_for(parent); +namespace ui { - p_right_button->set_label(_("Save")); - p_right_button->add_css_class("suggested-action"); - p_right_button->signal_clicked().connect( - sigc::mem_fun(*this, &PreferencesBoardDialog::on_save_changes)); +PreferencesBoardDialog::PreferencesBoardDialog(BoardWidget& board_widget) + : BoardDialog{}, board_widget{board_widget} { + footer_button->set_label(_("Save")); + load_board(); } PreferencesBoardDialog::~PreferencesBoardDialog() {} void PreferencesBoardDialog::load_board() { - p_board_name_entry->set_text(board_widget.get_name()); + board_title_entry->set_text(board_widget.get_name()); BackgroundType bg_type = Board::get_background_type(board_widget.get_background()); switch (bg_type) { case BackgroundType::COLOR: { - file_selected = false; - p_select_file_label->set_label(_("No file was selected")); - p_file_image->set(""); - - p_colour_button->set_rgba(Gdk::RGBA{board_widget.get_background()}); - selected_colour.set(board_widget.get_background()); + this->bg_type = bg_type; + set_picture(Gdk::RGBA{board_widget.get_background()}); break; } case BackgroundType::IMAGE: { - file_selected = true; - selected_file = - Gio::File::create_for_path(board_widget.get_background()); - p_file_image->set(board_widget.get_background()); - p_select_file_label->set_text(board_widget.get_background()); + this->bg_type = bg_type; + image_filename = board_widget.get_background(); + set_picture(image_filename); break; } case BackgroundType::INVALID: { - file_selected = false; - p_select_file_label->set_label(_("No file was selected")); - p_file_image->set(""); - - p_colour_button->set_rgba(Gdk::RGBA{board_widget.get_background()}); - selected_colour.set(board_widget.get_background()); + this->bg_type = BackgroundType::COLOR; + set_picture(Gdk::RGBA{}); break; } } } PreferencesBoardDialog* PreferencesBoardDialog::create( - Gtk::Window& parent, BoardWidget& board_widget) { - auto builder = Gtk::Builder::create_from_resource(BOARD_RESOURCE); - auto preferences_board_dialog = - Gtk::Builder::get_widget_derived( - builder, "create-board", parent, board_widget); - - return preferences_board_dialog; + BoardWidget& board_widget) { + return new PreferencesBoardDialog(board_widget); } -void PreferencesBoardDialog::open_window() { - BoardDialog::open_window(); - load_board(); -} +void PreferencesBoardDialog::on_footer_button_click() { on_save_changes(); } void PreferencesBoardDialog::on_save_changes() { - if (p_background_selector_stack->get_visible_child_name() == "as-file") { - if (!file_selected) { - Gtk::AlertDialog::create(_("Select a file"))->show(*this); - return; + std::string new_name = board_title_entry->get_text(); + + if (new_name.empty()) { + auto message_dialog = + Gtk::AlertDialog::create(_("Empty board names are not allowed")); + message_dialog->show(*parent); + return; + } + + switch (bg_type) { + case BackgroundType::COLOR: { + board_widget.set_background(rgba.to_string()); + break; + } + case BackgroundType::IMAGE: { + board_widget.set_background(image_filename); + break; + } + default: { + // Report probable corruption } - board_widget.set_background(selected_file->get_path()); - } else { - board_widget.set_background(selected_colour.to_string()); } const std::string& previous_name = board_widget.get_name(); - std::string new_name = p_board_name_entry->get_text(); if (previous_name != new_name) { board_widget.set_name(new_name); - parent.set_title(new_name); + parent->set_title(new_name); auto& board_backend = board_widget.get_board()->backend; if (board_backend.get_type() == BackendType::LOCAL) { std::string previous_filepath = @@ -100,6 +87,6 @@ void PreferencesBoardDialog::on_save_changes() { } board_widget.save(false); - close_window(); + close(); } } // namespace ui diff --git a/src/dialog/preferences-board-dialog.h b/src/dialog/preferences-board-dialog.h index c8047ab..1b1add5 100644 --- a/src/dialog/preferences-board-dialog.h +++ b/src/dialog/preferences-board-dialog.h @@ -11,30 +11,14 @@ namespace ui { */ class PreferencesBoardDialog : public BoardDialog { public: - PreferencesBoardDialog(BaseObjectType* cobject, - const Glib::RefPtr& builder, - Gtk::Window& parent, BoardWidget& board_widget); - + static PreferencesBoardDialog* create(BoardWidget& board_widget); ~PreferencesBoardDialog() override; - /** - * @brief Opens and loads the current board settings - */ - void open_window() override; - - /** - * @brief Creates a Board settings dialog for modification - * - * @param parent parent the dialog is transient for - * - * @return an object pointer to a PreferencesBoardDialog instance - */ - static PreferencesBoardDialog* create(Gtk::Window& parent, - BoardWidget& board_widget); + void on_footer_button_click() override; protected: + PreferencesBoardDialog(BoardWidget& board_widget); BoardWidget& board_widget; - Gtk::Window& parent; void load_board(); void on_save_changes(); }; diff --git a/src/resources.xml b/src/resources.xml index 63d5176..a1039d3 100644 --- a/src/resources.xml +++ b/src/resources.xml @@ -5,8 +5,8 @@ io.github.smolblackcat.Progress.svg style.css style-dark.css - create-board-dialog.ui card-widget.ui app-window.ui + board-dialog.ui diff --git a/src/resources/ui/board-dialog.ui b/src/resources/ui/board-dialog.ui new file mode 100644 index 0000000..b09be10 --- /dev/null +++ b/src/resources/ui/board-dialog.ui @@ -0,0 +1,85 @@ + + + + + + + + + False + + + 15 + 15 + 15 + 15 + vertical + 10 + + + vertical + 2 + + + title-4 + start + Board Title + + + + + + + + + + vertical + 2 + + + title-4 + start + Board Background + + + + + + + cover + frame + 10 + 10 + + + right + bg-setter-menu-model + Click to set a board background + True + + + + + + + suggested-action + False + Create Board + + + + + 450 + 400 + + + + board-dialog.set-color + Set Color + + + board-dialog.set-image + Set Image + + + diff --git a/src/resources/ui/create-board-dialog.ui b/src/resources/ui/create-board-dialog.ui deleted file mode 100644 index 7a19a73..0000000 --- a/src/resources/ui/create-board-dialog.ui +++ /dev/null @@ -1,137 +0,0 @@ - - - - - 500 - 500 - false - true - - - vertical - 4 - - - 10 - 10 - 6 - Board's name - - - - - start - Background - 10 - 10 - - - - - - - - background-selector-stack - 6 - 6 - - - - - 6 - 6 - 6 - 6 - - - 6 - 6 - slide-left-right - - - as-file - As a file - - - 4 - vertical - - - Select a file - 6 - - - - - vertical - - - 256 - center - end - - - - - - No file selected yet - center - true - start - - - - - - - - - - - - - as-colour - As a color - - - vertical - 4 - - - 10 - #FFFFFF - - - - - - - - - - - - - - - - Create Board - - - False - - - Cancel - - - - - Create - - - - - - \ No newline at end of file diff --git a/src/window.cpp b/src/window.cpp index bbd8634..eec2a75 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -57,9 +57,6 @@ ProgressWindow::ProgressWindow(BaseObjectType* cobject, adw_style_manager{ adw_style_manager_get_for_display(this->get_display()->gobj())}, css_provider{Gtk::CssProvider::create()}, - create_board_dialog{CreateBoardDialog::create(*this)}, - preferences_board_dialog{ - PreferencesBoardDialog::create(*this, board_widget)}, progress_settings{progress_settings} { Gtk::StyleProvider::add_provider_for_display( get_display(), css_provider, GTK_STYLE_PROVIDER_PRIORITY_USER); @@ -80,8 +77,11 @@ ProgressWindow::ProgressWindow(BaseObjectType* cobject, home_button_p->signal_clicked().connect( sigc::mem_fun(*this, &ProgressWindow::on_main_menu)); - add_board_button_p->signal_clicked().connect( - sigc::mem_fun(*create_board_dialog, &CreateBoardDialog::open_window)); + add_board_button_p->signal_clicked().connect([this]() { + auto create_board_dialog = CreateBoardDialog::create(*this); + + create_board_dialog->open(*this); + }); setup_menu_button(); boards_grid_p->set_sort_func([](Gtk::FlowBoxChild* child1, @@ -106,10 +106,7 @@ ProgressWindow::ProgressWindow(BaseObjectType* cobject, app_stack_p->add(board_widget, "board-page"); } -ProgressWindow::~ProgressWindow() { - delete create_board_dialog; - delete preferences_board_dialog; -} +ProgressWindow::~ProgressWindow() {} void ProgressWindow::add_local_board(BoardBackend board_backend) { auto board_card_button = Gtk::make_managed(board_backend); @@ -207,9 +204,11 @@ void ProgressWindow::setup_menu_button() { }); action_group->add_action( "delete", sigc::mem_fun(*this, &ProgressWindow::on_delete_board_mode)); - action_group->add_action( - "preferences", sigc::mem_fun(*preferences_board_dialog, - &PreferencesBoardDialog::open_window)); + action_group->add_action("preferences", [this]() { + auto preference_dialog = + PreferencesBoardDialog::create(this->board_widget); + preference_dialog->open(*this); + }); app_menu_button_p->insert_action_group("win", action_group); } diff --git a/src/window.h b/src/window.h index 081b26b..ee3e315 100644 --- a/src/window.h +++ b/src/window.h @@ -77,9 +77,6 @@ class ProgressWindow : public Gtk::ApplicationWindow { Glib::RefPtr& progress_settings; bool on_delete_mode = false; - - ui::CreateBoardDialog* create_board_dialog; - ui::PreferencesBoardDialog* preferences_board_dialog; ui::DeleteBoardsBar delete_boards_bar; ui::BoardWidget board_widget; Gtk::Button *home_button_p, *add_board_button_p;