From 7ccb58c9d26d0ed19d30e9a18634b1f2a16196d7 Mon Sep 17 00:00:00 2001 From: thaflo Date: Tue, 22 Dec 2020 23:15:18 +0100 Subject: [PATCH 1/2] fixed warning --- shared/CatKeyStore.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared/CatKeyStore.cpp b/shared/CatKeyStore.cpp index 36e3618..c95474a 100644 --- a/shared/CatKeyStore.cpp +++ b/shared/CatKeyStore.cpp @@ -16,7 +16,7 @@ class CatKeyTranslationUnit : public TranslationUnit { void SetTranslated(BString t) { mTranslated = t; } bool Suggest() { return false; } - bool SetAsTranslation() { mStore->Synchronize(); } + bool SetAsTranslation() { mStore->Synchronize(); return true;} private: BString mSource; BString mContext; From 1716825ab415bdd91dd548c7a94ae0acd09f56fb Mon Sep 17 00:00:00 2001 From: thaflo Date: Tue, 22 Dec 2020 23:17:22 +0100 Subject: [PATCH 2/2] the next text to translate is now selected, so that after saving a translation there can be typed directly the new translation --- shared/TranslationView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/shared/TranslationView.cpp b/shared/TranslationView.cpp index 3adc154..582f01e 100644 --- a/shared/TranslationView.cpp +++ b/shared/TranslationView.cpp @@ -315,7 +315,7 @@ TranslationView::MessageReceived(BMessage *msg) mContext->SetText(mUnit->Context()); mDeveloperComment->SetText(mUnit->DeveloperComment()); mTranslated->SetText(mUnit->Translated()); - + mTranslated->SelectAll(); mWordsView->ScrollToSelection(); break; } @@ -384,7 +384,7 @@ TranslationView::MessageReceived(BMessage *msg) _UpdateView(); if(selection) mWordsView->Select(selection); - mStore->Synchronize(); + mStore->Synchronize(); break; }