Bug 175715

Summary: Download % on title bar not correctly updated
Product: [Applications] kget Reporter: FiNeX <finex>
Component: CoreAssignee: KGet authors <kget>
Status: RESOLVED FIXED    
Severity: normal CC: jgoday
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Update the mainwindow window title when a transfer is removed or stopped

Description FiNeX 2008-11-20 23:20:34 UTC
Two problems in current trunk:

- when you've only a file transfer and, while the download is active, you click on "delete selected", the transfer list is emptied, but the title bar still has the last % value.

- when you have 2 file transfer and you stop the first and, after a while, you stop the second one, the % on the title is related to the last stopped transfer. Instead if you stop them togheter the % is calculated from both.

bye
Comment 1 Javier goday 2008-11-21 15:16:53 UTC
Created attachment 28727 [details]
Update the mainwindow window title when a transfer is removed or stopped

Attach a patch to solve this problems:

1- Update the kget window title when a transfer is removed too (MainWindowGroupObserver::removedTransferEvent)

2- We only show the percent of the active transfers (Call to updateTitle when a transfer status is changed)
Comment 2 FiNeX 2008-11-21 15:37:30 UTC
@Javier: I've tested the patch and it works perfectly. You can commit it :-)

Thanks!
Comment 3 Lukas Appelhans 2008-11-21 18:53:58 UTC
No, it's wrong actually...
If a Transfer's status changes the group status does not automatically change... ;)
We should better go with a clean sollution, probably update the title from GenericTransferObserver?

Lukas
Comment 4 Javier goday 2008-12-08 17:13:35 UTC
Why not tell the TransferGroup about the transfer changes using the 
GenericTransferObserver::transferChangedEvent ?

something like transfer->group()->setGroupChange([Some conversion between the transfer and the group changeFlags], true);
Comment 5 Lukas Appelhans 2008-12-08 19:10:10 UTC
It's a change of the Transfer, not of the Group actually...

Lukas
Comment 6 Javier goday 2008-12-23 22:51:01 UTC
SVN commit 900895 by jgoday:

BUG: 175715
Add a transferObserver to the mainWindow to upload the titleBar


 M  +23 -4     mainwindow.cpp  
 M  +20 -2     mainwindow.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=900895