Bug 465468 - Use overlay progress window instead of a progress bar
Summary: Use overlay progress window instead of a progress bar
Status: RESOLVED FIXED
Alias: None
Product: lokalize
Classification: Applications
Component: general (other bugs)
Version First Reported In: 22.12.2
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: Simon Depiets
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-08 12:13 UTC by Emir SARI
Modified: 2025-04-27 02:25 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
screenshot (66.90 KB, image/png)
2023-02-08 12:13 UTC, Emir SARI
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emir SARI 2023-02-08 12:13:45 UTC
Created attachment 156068 [details]
screenshot

There are a few problems with the status bar progress indicator (see screenshot).

- When there is an operation, and user does/changes something in the project, Lokalize crashes.
- The percent view is not translatable, since I believe it's just a standart QProgressBar. Looked at the code, but haven't seen a separate percent value other than the bar itself (as far as I understand).

To remedy and improve the situation, whenever there is a file count/process operation going on, Lokalize should display a modal progress view, and block all other operations. The percent string should also be separated as well.
Comment 1 Bug Janitor Service 2025-03-25 01:52:39 UTC
A possibly relevant merge request was started @ https://invent.kde.org/sdk/lokalize/-/merge_requests/213
Comment 2 Finley Watson 2025-04-27 02:25:58 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 407285

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