Bug 407285

Summary: When starting lokalize with a project file the percentage processed in the lower right corner does not disappear
Product: [Applications] lokalize Reporter: Freek de Kruijf <freekdekruijf>
Component: project managementAssignee: Simon Depiets <sdepiets>
Status: RESOLVED FIXED    
Severity: normal CC: shafff
Priority: NOR    
Version First Reported In: 19.04.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Freek de Kruijf 2019-05-07 08:04:59 UTC
SUMMARY
When starting lokalize with a project file the percentage processed in the lower right corner does not always disappear. It may even show a percentage lower than 100%.

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.15.4
(available in About System)
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3

ADDITIONAL INFORMATION
Comment 1 Finley Watson 2025-04-27 02:25:50 UTC
Git commit ca26cd1198ea4c31e67b25efa09135898f414d9d by Finley Watson.
Committed on 27/04/2025 at 02:25.
Pushed by finw into branch 'master'.

Single status bar using signals and slots

Use a class for the status bar, inspired by KTorrent, and use a single status
bar belonging to the main window, which adapts to the tab shown, rather than 
using multiple status bars owned by the tabs. Instead, the tabs generate signals,
the main window handles connecting the signals to the relevant status bar slots,
disconnecting / reconnecting when different tabs are focused, and clearing
/ showing / hiding the status bar when the tab changes / no tabs are visible.

The progress bar that shows % project loaded has been removed because the
surrounding code was buggy. It already doesn't always hide at 100% loaded
state like it should because too many signals are triggering at the same time
as the project loads. I can add it back in in the future but not in this
merge request since the logic needs rethinking.

Status bar not updating correctly when switching tabs was also reported
by @ ltoscano , on matrix. This came from commit 053fb00b5ec5d26e3e42be5039b2e3e8291a5597
but I'm not sure what exactly I broke: my suspicion was needing to call
unregisterStatusBar() but that didn't fix the project total appearing in the
status bar for the editor tabs, after my problematic commit. This MR is the
result of that bug report as well as other state save / restore weirdness I
was seeing that I don't understand the cause of.

(Sort of):
Related: bug 465468

Before (Project Overview tab):
![delwedd](/uploads/8061a28bd51f38338e19b2b847e1f77e/delwedd.png){width=721 height=32}

After (Project Overview tab):
![delwedd](/uploads/6087d586d32e7ef61bd23347a28845c2/delwedd.png){width=721 height=32}

Before (Editor tab):
![delwedd](/uploads/2fd86f698c9cf945a6b3332547e87fcc/delwedd.png){width=721 height=32}

After (Editor tab):
![delwedd](/uploads/317ad84c571a1364bf8d4d49112dd8e3/delwedd.png){width=721 height=32}

M  +2    -2    src/CMakeLists.txt
D  +0    -36   src/actionproxy.cpp
D  +0    -50   src/actionproxy.h
M  +22   -27   src/editortab.cpp
M  +2    -1    src/editortab.h
M  +8    -6    src/filesearch/filesearchtab.cpp
M  +2    -0    src/filesearch/filesearchtab.h
M  +1    -1    src/lokalize.pro
M  +20   -10   src/lokalizemainwindow.cpp
M  +18   -3    src/lokalizemainwindow.h
M  +0    -33   src/lokalizetabpagebase.cpp
M  +20   -8    src/lokalizetabpagebase.h
M  +13   -43   src/project/projecttab.cpp
M  +8    -6    src/project/projecttab.h
A  +154  -0    src/statusbar.cpp     [License: GPL(v2.0+)]
A  +72   -0    src/statusbar.h     [License: GPL(v2.0+)]
M  +4    -7    src/tm/tmtab.cpp

https://invent.kde.org/sdk/lokalize/-/commit/ca26cd1198ea4c31e67b25efa09135898f414d9d