Bug 135112 - close ark after extraction
Summary: close ark after extraction
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR wishlist
Target Milestone: ---
Assignee: Harald Hvaal
URL:
Keywords: junior-jobs
Depends on:
Blocks:
 
Reported: 2006-10-04 20:52 UTC by Thomas Schildknecht
Modified: 2010-01-08 05:48 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to add close after extraction functionality. (11.86 KB, patch)
2010-01-03 02:56 UTC, Matthew Leach
Details
Patch to add close functionality to Ark after extraction has completeted. (4.05 KB, patch)
2010-01-04 15:57 UTC, Matthew Leach
Details
Patch to add close functionality after extraction V3 (4.81 KB, patch)
2010-01-05 20:33 UTC, Matthew Leach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Schildknecht 2006-10-04 20:52:11 UTC
Version:           2.6.3 (using KDE 3.5.4, Kubuntu Package 4:3.5.4-0ubuntu2~dapper1 )
Compiler:          Target: i486-linux-gnu
OS:                Linux (i686) release 2.6.15-27-386

in the "extract file" dialog box, it could be usefull if there is a checkbox to close ark when the extraction is finished

I often open archives directly from internet, extract them and automatically open the folder with the "open the destination folder after extraction" but I need to manually close Ark after that
Comment 1 Matthew Leach 2010-01-03 02:56:38 UTC
Created attachment 39505 [details]
Patch to add close after extraction functionality.
Comment 2 Raphael Kubo da Costa 2010-01-03 20:40:06 UTC
Thanks a lot for the patch! I've reviewed it, and here are some comments:

 * Please don't use tabs for indentation. We follow the kdelibs coding style (4 spaces for indentation) - for more information, see http://techbase.kde.org/Policies/Kdelibs_Coding_Style
 * The patch for the ui file changed the formatting of the XML file (the original file was written a few years ago, so Designer now tries to automatically remove some whitespace etc). It would be nice if this patch only added the needed objects.
 * closeAfterExtraction() is a const method, so please add the const keyword to its declaration (I've noticed the other accessor methods aren't declared const either, I'll fix that).
 * You've forgotten to load closeAfterExtraction's state in loadSettings().
 * The patch itself seems to specify the paths incorrectly - mainwindow.cpp and part.cpp should be preceded by their parent directories at least, so that a simple "patch -p0" works cleanly.

Once again, thank you for the patch. Could you please fix these issues and resubmit it so that I can commit it?

On a sidenote, if you're in the mood for it you can also make batch extraction hide the "close after extraction" checkbox, since Ark will close automatically anyway. That's entirely optional, though.

Cheers!
Comment 3 Matthew Leach 2010-01-04 15:57:55 UTC
Created attachment 39555 [details]
Patch to add close functionality to Ark after extraction has completeted.

Many thanks for the comments, they where very helpful. Please see attached for a second attempt at the patch. I hope I got it right this time :)

Matt
Comment 4 Raphael Kubo da Costa 2010-01-04 19:09:12 UTC
Thanks for the second patch :)

I've got some final, minor nitpicks:
 * The quitApp() signal could be renamed to just quit() -- I forgot to add this to the previous comment :(
 * In the part.cpp part of the patch, please add a newline before the if clause you've added and a space between the if and the '('
 * You seem to have forgotten to load the variable state in loadSettings ;)

Could you please fix these final issues? After that I guess I can finally commit it to 4.5 -- KDE SC 4.4 is closed for string changes such as those required by the patch, and trunk will be open for 4.5 tomorrow (hopefully).

Cheers!
Comment 5 Matthew Leach 2010-01-05 20:33:14 UTC
Created attachment 39596 [details]
Patch to add close functionality after extraction V3

Hi,

Once again, thank you for the comments!
I've made the changes outlined in your post. If there are any more problems, please let me know. :)

Matt
Comment 6 Raphael Kubo da Costa 2010-01-08 05:46:31 UTC
SVN commit 1071450 by rkcosta:

Make it possible to close Ark after a successful extraction.

A future improvement could be hiding the option if in batch
extraction mode.

Patch written by Matthew Leach, thanks a lot!

CCMAIL: matthew@theleachfamily.co.uk
FEATURE: 135112

 M  +1 -0      app/mainwindow.cpp  
 M  +4 -0      kerfuffle/ark.kcfg  
 M  +12 -0     kerfuffle/extractiondialog.cpp  
 M  +2 -0      kerfuffle/extractiondialog.h  
 M  +9 -2      kerfuffle/extractiondialog.ui  
 M  +4 -0      part/part.cpp  
 M  +1 -0      part/part.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1071450
Comment 7 Raphael Kubo da Costa 2010-01-08 05:48:49 UTC
Hey Matthew, thanks for the patch!

It will be available for consumption from 4.5 onwards. If you're interested in carrying on working on KDE, please consider taking a look at the other bug reports so that you can ask for an SVN account later :)