From 7599b5b0d90be6c2156c8fcc0f83cd1ede5c3fe2 Mon Sep 17 00:00:00 2001
From: Nazar Mokrynskyi <nazar@mokrynskyi.com>
Date: Sat, 14 Dec 2024 00:03:43 +0200
Subject: [PATCH 1/3] Tiny cleanup

---
 .github/workflows/release.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 4361768..4d519f4 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -391,7 +391,7 @@ jobs:
         run: |
           # Build Debian package
           cargo deb --target ${{ matrix.build.target }} --profile production --no-build --no-strip --variant=modern
-          mv target/${{ matrix.build.target }}/debian/*.deb .          
+          mv target/${{ matrix.build.target }}/debian/*.deb .
 
           # And build AppImage as well
           wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
@@ -415,7 +415,7 @@ jobs:
         run: |
           # Build Debian package
           cargo deb --target ${{ matrix.build.target }} --profile production --no-build --no-strip
-          mv target/${{ matrix.build.target }}/debian/*.deb .          
+          mv target/${{ matrix.build.target }}/debian/*.deb .
 
           # And build AppImage as well
           wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage

From dca5659516100ed1815254e6817ec59732a74ac1 Mon Sep 17 00:00:00 2001
From: Nazar Mokrynskyi <nazar@mokrynskyi.com>
Date: Sat, 14 Dec 2024 00:26:30 +0200
Subject: [PATCH 2/3] Make plotting button change icon and tooltip on
 interaction

---
 build.rs                            |  5 +++--
 res/translations/de-DE/messages.ftl |  5 +++--
 res/translations/en/messages.ftl    |  1 +
 res/translations/es/messages.ftl    |  1 +
 res/translations/fr/messages.ftl    |  1 +
 res/translations/rs/messages.ftl    |  1 +
 res/translations/ru-RU/messages.ftl |  1 +
 res/translations/uk-UA/messages.ftl |  1 +
 res/translations/zh-CN/messages.ftl |  1 +
 src/frontend/running.rs             | 18 +++++++++++++++---
 10 files changed, 28 insertions(+), 7 deletions(-)

diff --git a/build.rs b/build.rs
index 982ddfa..7cada2c 100644
--- a/build.rs
+++ b/build.rs
@@ -38,10 +38,11 @@ fn main() {
             "cross-small",
             "checkmark",
             "grid-filled",
-            "puzzle-piece",
-            "pause",
             "menu-large",
+            "pause",
+            "play",
             "processor",
+            "puzzle-piece",
             "size-horizontally",
             "speedometer-low",
             "speedometer-medium",
diff --git a/res/translations/de-DE/messages.ftl b/res/translations/de-DE/messages.ftl
index 60f2486..dd36ffd 100644
--- a/res/translations/de-DE/messages.ftl
+++ b/res/translations/de-DE/messages.ftl
@@ -111,8 +111,9 @@ running_node_status_syncing =
 running_node_status_synced = Synced, best block #{$best_block_number}
 running_farmer_title = Farmer
 running_farmer_button_expand_details = Details zu jeder Farm erweitern
-running_farmer_button_pause_plotting = Plotten/Replotten pausieren, bitte beachten, dass aktuell laufende Encoding-Prozesse nicht unterbrochen werden.
-running_farmer_account_balance_tooltip = Gesamtsaldo des Kontos und gefarmte Coins seit Start der Anwendung, klicken, um Details in Astral anzuzeigen.
+running_farmer_button_pause_plotting = Plotten/Replotten pausieren, bitte beachten, dass aktuell laufende Encoding-Prozesse nicht unterbrochen werden
+running_farmer_button_resume_plotting = Plotten fortsetzen
+running_farmer_account_balance_tooltip = Gesamtsaldo des Kontos und gefarmte Coins seit Start der Anwendung, klicken, um Details in Astral anzuzeigen
 running_farmer_piece_cache_sync = Piece-Cache-Synchronisation {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
 running_farmer_next_reward_estimate =
     Nächste Reward-Schätzung: {$eta_string ->
diff --git a/res/translations/en/messages.ftl b/res/translations/en/messages.ftl
index ef9eea4..a723193 100644
--- a/res/translations/en/messages.ftl
+++ b/res/translations/en/messages.ftl
@@ -113,6 +113,7 @@ running_node_status_synced = Synced, best block #{$best_block_number}
 running_farmer_title = Farmer
 running_farmer_button_expand_details = Expand details about each farm
 running_farmer_button_pause_plotting = Pause plotting/replotting, note that currently encoding sectors will not be interrupted
+running_farmer_button_resume_plotting = Resume plotting
 running_farmer_account_balance_tooltip = Total account balance and coins farmed since application started, click to see details in Astral
 running_farmer_piece_cache_sync = Piece cache sync {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
 running_farmer_next_reward_estimate =
diff --git a/res/translations/es/messages.ftl b/res/translations/es/messages.ftl
index 5b9e460..696b955 100644
--- a/res/translations/es/messages.ftl
+++ b/res/translations/es/messages.ftl
@@ -113,6 +113,7 @@ running_node_status_synced = Sincronización completada, mejor bloque #{$best_bl
 running_farmer_title = Granjero
 running_farmer_button_expand_details = Amplía detalles del granjero
 running_farmer_button_pause_plotting = Pausar creación y sustitución de parcelas, ten en cuenta que el procesamiento de los sectores no será interrumpido
+running_farmer_button_resume_plotting = Reanudar la creación de la parcela
 running_farmer_account_balance_tooltip = Balance total de la cuenta y monedas granjeadas desde que la aplicación se inició, clica para ver más detalles en Astral
 running_farmer_piece_cache_sync = Caché sincronizada {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
 running_farmer_next_reward_estimate =
diff --git a/res/translations/fr/messages.ftl b/res/translations/fr/messages.ftl
index 468ec2f..3b5f89c 100644
--- a/res/translations/fr/messages.ftl
+++ b/res/translations/fr/messages.ftl
@@ -113,6 +113,7 @@ running_node_status_synced = Synchronisé, meilleur bloc #{$best_block_number}
 running_farmer_title = Ferme
 running_farmer_button_expand_details = Afficher les détails de chaque ferme
 running_farmer_button_pause_plotting = Suspendre le plotting/replotting. Notez que le codage en cours des secteurs ne sera pas interrompu
+running_farmer_button_resume_plotting = Reprendre le plotting
 running_farmer_account_balance_tooltip = Solde total et pièces gagnées depuis le lancement de l'application. Cliquez pour voir les détails dans Astral
 running_farmer_piece_cache_sync = Synchronisation du cache de morceaux à {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
 running_farmer_next_reward_estimate =
diff --git a/res/translations/rs/messages.ftl b/res/translations/rs/messages.ftl
index 5bf6705..1e2cfb6 100644
--- a/res/translations/rs/messages.ftl
+++ b/res/translations/rs/messages.ftl
@@ -117,6 +117,7 @@ running_node_status_synced = Sinhronizovano, najbolji blok #{$best_block_number}
 running_farmer_title = Farmer
 running_farmer_button_expand_details = Proširi detalje o svakoj farmi
 running_farmer_button_pause_plotting = Pauziraj plotovanje/preplotovanje, imajte na umu da trenutno kodiranje sektora neće biti prekinuto
+running_farmer_button_resume_plotting = Nastavi plotovanje
 running_farmer_account_balance_tooltip = Ukupni saldo i kovanice zarđene od početka rada aplikacije, kliknite da vidite detalje u Astral
 running_farmer_piece_cache_sync = Sinhronizacija delova keša {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
 running_farmer_next_reward_estimate =
diff --git a/res/translations/ru-RU/messages.ftl b/res/translations/ru-RU/messages.ftl
index c783062..89c6276 100644
--- a/res/translations/ru-RU/messages.ftl
+++ b/res/translations/ru-RU/messages.ftl
@@ -113,6 +113,7 @@ running_node_status_synced = Синхронизовано, лучший блок
 running_farmer_title = Ферма
 running_farmer_button_expand_details = Показать детали о каждой ферме
 running_farmer_button_pause_plotting = Приостановить плоттинг/реплоттинг. Обратите внимание, что текущее кодирование секторов не будет прервано
+running_farmer_button_resume_plotting = Продолжить плоттинг
 running_farmer_account_balance_tooltip = Общий баланс и монеты, заработанные с момента запуска приложения. Нажмите, чтобы увидеть подробности в Astral
 running_farmer_piece_cache_sync = Синхронизация фрагментов кэша {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
 running_farmer_next_reward_estimate =
diff --git a/res/translations/uk-UA/messages.ftl b/res/translations/uk-UA/messages.ftl
index 76cc6a7..29a9b25 100644
--- a/res/translations/uk-UA/messages.ftl
+++ b/res/translations/uk-UA/messages.ftl
@@ -111,6 +111,7 @@ running_node_status_synced = Синхронізовано, кращий блок
 running_farmer_title = Фармер
 running_farmer_button_expand_details = Показати деталі про кожну ферму
 running_farmer_button_pause_plotting = Призупення плотингу/реплотингу, зверніть увагу, що розпочате кодування секторів не буде перервано
+running_farmer_button_resume_plotting = Продовжити плоттинг
 running_farmer_account_balance_tooltip = Загальний баланс рахунку та монет, зароблених з моменту запуску програми, натисніть, щоб побачити деталі в Astral
 running_farmer_piece_cache_sync = Синхронізація фрагментів кешу {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
 running_farmer_next_reward_estimate =
diff --git a/res/translations/zh-CN/messages.ftl b/res/translations/zh-CN/messages.ftl
index f1bd0e6..beca207 100644
--- a/res/translations/zh-CN/messages.ftl
+++ b/res/translations/zh-CN/messages.ftl
@@ -113,6 +113,7 @@ running_node_status_synced = 同步完成, 最新区块 #{$best_block_number}
 running_farmer_title = 农民
 running_farmer_button_expand_details = 各农场的详细信息
 running_farmer_button_pause_plotting = 暂停绘图/重新绘图,当前的编码扇区不会被中断
+running_farmer_button_resume_plotting = 继续绘图
 running_farmer_account_balance_tooltip = 自启动以来耕种到的总奖励币,点击在 Astral 中查看更多详细信息
 running_farmer_piece_cache_sync = Piece缓存同步 {NUMBER($percentage, minimumFractionDigits: 2, maximumFractionDigits: 2)}%
 running_farmer_next_reward_estimate =
diff --git a/src/frontend/running.rs b/src/frontend/running.rs
index ed168fc..148e3a9 100644
--- a/src/frontend/running.rs
+++ b/src/frontend/running.rs
@@ -135,8 +135,20 @@ impl Component for RunningView {
                             set_active: model.plotting_paused,
                             set_cursor_from_name: Some("pointer"),
                             set_has_frame: false,
-                            set_icon_name: icon_names::PAUSE,
-                            set_tooltip: &T.running_farmer_button_pause_plotting(),
+                            #[track = "model.changed_plotting_paused()"]
+                            set_icon_name:
+                                if model.plotting_paused {
+                                    icon_names::PLAY
+                                } else {
+                                    icon_names::PAUSE
+                                },
+                            #[track = "model.changed_plotting_paused()"]
+                            set_tooltip:
+                                &if model.plotting_paused {
+                                    T.running_farmer_button_resume_plotting()
+                                } else {
+                                    T.running_farmer_button_pause_plotting()
+                                },
                         },
                     },
                     gtk::Box {
@@ -484,7 +496,7 @@ impl RunningView {
                 self.farms.broadcast(FarmWidgetInput::ToggleFarmDetails);
             }
             RunningInput::TogglePausePlotting => {
-                self.plotting_paused = !self.plotting_paused;
+                self.set_plotting_paused(!self.plotting_paused);
                 self.farms
                     .broadcast(FarmWidgetInput::PausePlotting(self.plotting_paused));
                 if sender

From fbec04a05b63aa37413ca8339261b6dacd761bb7 Mon Sep 17 00:00:00 2001
From: Nazar Mokrynskyi <nazar@mokrynskyi.com>
Date: Sat, 14 Dec 2024 00:27:18 +0200
Subject: [PATCH 3/3] Rename Serbian file to correct name

---
 res/translations/{rs => sr-Latn-RS}/messages.ftl | 0
 1 file changed, 0 insertions(+), 0 deletions(-)
 rename res/translations/{rs => sr-Latn-RS}/messages.ftl (100%)

diff --git a/res/translations/rs/messages.ftl b/res/translations/sr-Latn-RS/messages.ftl
similarity index 100%
rename from res/translations/rs/messages.ftl
rename to res/translations/sr-Latn-RS/messages.ftl