Bug 105787 - Ark selection/extration, extracts only the last selected
Summary: Ark selection/extration, extracts only the last selected
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 2.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Harald Hvaal
URL:
Keywords:
: 106381 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-05-17 03:34 UTC by
Modified: 2005-05-29 15:07 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 2005-05-17 03:34:41 UTC
Version:           2.5 (using KDE 3.4.0, Mandrake Linux Cooker i586 - Cooker)
Compiler:          gcc version 3.4.3 (Mandrakelinux 10.2 3.4.3-7mdk)
OS:                Linux (i686) release 2.6.11-6mdk

Lets take this example, i oponed a rar archive that haves 4 files inside, of those 4 files i selected 3 with ctrl+mouse click, and what happens is that is only extracted the last file selected and not all 3 files selected.

strange..
Comment 1 Henrique Pinto 2005-05-22 03:08:13 UTC
SVN commit 416609 by henrique:

    * Fix bug #105787: Mark "Selected Files" as default in the
      extraction dialog if more than one file is selected.

      BUG: 105787



 M  +7 -2      trunk/KDE/kdeutils/ark/arkwidget.cpp  
 M  +1 -1      trunk/KDE/kdeutils/ark/arkwidget.h  
 M  +16 -0     trunk/KDE/kdeutils/ark/extractdlg.cpp  
 M  +2 -1      trunk/KDE/kdeutils/ark/extractdlg.h  


--- trunk/KDE/kdeutils/ark/arkwidget.cpp #416608:416609
@@ -1657,9 +1657,9 @@
 
 
     ExtractDlg *dlg = new ExtractDlg(this, 0, m_url.fileName());
-    
+
     QString tmp; // for KFileDialog::getStartUrl()
-    
+
     if (m_extractOnly)
     {
       dlg->setURL( KURL::fromPathOrURL( QDir::currentDirPath() ) );
@@ -1680,6 +1680,11 @@
     {
         dlg->disableSelectedFilesOption();
     }
+    else if ( m_nNumSelectedFiles > 1 )
+    {
+        dlg->setDefaultExtractOp( ExtractDlg::Selected );
+    }
+
     if (archiveContent->currentItem() == NULL)
     {
         dlg->disableCurrentFileOption();
--- trunk/KDE/kdeutils/ark/arkwidget.h #416608:416609
@@ -35,7 +35,6 @@
 #include <ktempdir.h>
 
 #include <qvbox.h>
-
 #include "arch.h"
 
 class QPoint;
@@ -45,6 +44,7 @@
 class QListViewItem;
 class QDragMoveEvent;
 class QDropEvent;
+
 class KPopupMenu;
 class KProcess;
 class KConfig;
--- trunk/KDE/kdeutils/ark/extractdlg.cpp #416608:416609
@@ -185,6 +185,22 @@
 }
 
 void
+ExtractDlg::setDefaultExtractOp( ExtractOp op )
+{
+	switch ( op )
+	{
+		case Current:
+			m_radioCurrent->setChecked(  true );
+			break;
+		case Selected:
+			m_radioSelected->setChecked( true );
+			break;
+		default:
+			m_radioAll->setChecked( true );
+	}
+}
+
+void
 ExtractDlg::extractDirChanged(const QString &text )
 {
 	enableButtonOK(!text.isEmpty());
--- trunk/KDE/kdeutils/ark/extractdlg.h #416608:416609
@@ -59,8 +59,9 @@
   KURL extractDir();
   void disableSelectedFilesOption();
   void disableCurrentFileOption() { m_radioCurrent->setEnabled(false); }
+  void setDefaultExtractOp( ExtractOp op );
   bool viewFolderAfterExtraction() const { return m_viewFolderAfterExtraction->isChecked(); }
-  
+
   void setURL( const KURL& );
 public slots:
   //void browse();
Comment 2 2005-05-22 15:25:28 UTC
Why fixes are only commited to HEAD and not also to BRANCHES?
Comment 3 Henrique Pinto 2005-05-27 04:26:59 UTC
Huh? This fix WAS commited to the branch, and will be part of KDE 3.4.1.
Comment 4 Henrique Pinto 2005-05-29 00:41:47 UTC
*** Bug 106381 has been marked as a duplicate of this bug. ***
Comment 5 Iñaki Baz Castillo 2005-05-29 13:51:34 UTC
Bug 106381 has been marked as a duplicate of this bug, but I think is not the same. If there are 4 files and I select 3 of them, arK extracts ALL the files (not just the last one selected).

Maybe it is the same bug, and it is already fixed. I hope it but don't know.
Comment 6 Henrique Pinto 2005-05-29 15:07:51 UTC
Em Dom 29 Mai 2005 08:51, ibc escreveu:
> Bug 106381 has been marked as a duplicate of this bug, but I think
> is not the same. If there are 4 files and I select 3 of them, arK extracts
> ALL the files (not just the last one selected).
>
> Maybe it is the same bug, and it is already fixed. I hope it but don't
> know.


I cannot reproduce your report with Ark 2.5.1 (part of KDE 3.4.1), which 
contains the fix for #105787, what lead me to believe that the fix also fixed 
#106381. Please reopen your report if the problem is reproducible with KDE 
3.4.1.