[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 105398] ark should not open internal or external viewer when
From:       Henrique Pinto <stampede () coltec ! ufmg ! br>
Date:       2005-05-27 1:50:22
Message-ID: 20050527015022.12196.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
         
http://bugs.kde.org/show_bug.cgi?id=105398         
stampede coltec ufmg br changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From stampede coltec ufmg br  2005-05-27 03:50 -------
SVN commit 418595 by henrique:

    * Fix bug #105398 (ark should not open internal or external viewer when \
extraction fails)  BUG: 105398



 M  +1 -0      ark_part.cpp  
 M  +1 -2      ark_part.h  
 M  +19 -18    arkwidget.cpp  
 M  +1 -1      arkwidget.h  


--- trunk/KDE/kdeutils/ark/ark_part.cpp #418594:418595
 @ -22,6 +22,7  @
 
 #include "ark_part.h"
 #include "arkfactory.h"
+#include "arkwidget.h"
 #include "settings.h"
 
 #include <kdebug.h>
--- trunk/KDE/kdeutils/ark/ark_part.h #418594:418595
 @ -22,8 +22,6  @
 #ifndef __ark_part_h__
 #define __ark_part_h__
 
-#include "arkwidget.h"
-
 #include <kparts/part.h>
 #include <kparts/browserextension.h>
 #include <kparts/statusbarextension.h>
 @ -35,6 +33,7  @
 
 
 class KAboutData;
+class ArkWidget;
 
 
 class ArkBrowserExtension: public KParts::BrowserExtension
--- trunk/KDE/kdeutils/ark/arkwidget.cpp #418594:418595
 @ -1893,39 +1893,40  @
 ArkWidget::action_view()
 {
     connect( arch, SIGNAL( sigExtract( bool ) ), this,
-             SLOT( viewSlotExtractDone() ) );
+             SLOT( viewSlotExtractDone( bool ) ) );
     busy( i18n( "Extracting file to view" ) );
     showCurrentFile();
 }
 
 void
-ArkWidget::viewSlotExtractDone()
+ArkWidget::viewSlotExtractDone( bool success )
 {
-    chmod( QFile::encodeName( m_strFileToView ), 0400 );
-    bool view = true;
-
-    if ( Settings::useIntegratedViewer() )
+    if ( success )
     {
-        ArkViewer * viewer = new ArkViewer( this, "viewer" );
+        chmod( QFile::encodeName( m_strFileToView ), 0400 );
+        bool view = true;
 
-        if ( !viewer->view( m_strFileToView ) )
+        if ( Settings::useIntegratedViewer() )
         {
-            kdDebug( 1601 ) << "ArkWidget::viewSlotExtractDone(): Internal Viewer \
                can't view this file." << endl;
-            QString text = i18n( "The internal viewer is not able to display this \
                file. Would you like to view it using an external program?" );
-            view = ( KMessageBox::warningYesNo( this, text ) == KMessageBox::Yes );
+            ArkViewer * viewer = new ArkViewer( this, "viewer" );
 
-            if ( view )
-                viewInExternalViewer( this, m_strFileToView );
+            if ( !viewer->view( m_strFileToView ) )
+            {
+                QString text = i18n( "The internal viewer is not able to display \
this file. Would you like to view it using an external program?" ); +                \
view = ( KMessageBox::warningYesNo( this, text ) == KMessageBox::Yes );  
+                if ( view )
+                    viewInExternalViewer( this, m_strFileToView );
+            }
         }
+        else
+        {
+            viewInExternalViewer( this, m_strFileToView );
+        }
     }
-    else
-    {
-        viewInExternalViewer( this, m_strFileToView );
-    }
 
     disconnect( arch, SIGNAL( sigExtract( bool ) ), this,
-                SLOT( viewSlotExtractDone( ) ) );
+                SLOT( viewSlotExtractDone( bool ) ) );
     // avoid race condition, don't do updates if application is exiting
     if( archiveContent )
     {
--- trunk/KDE/kdeutils/ark/arkwidget.h #418594:418595
 @ -231,7 +231,7  @
     void startDragSlotExtractDone( bool );
     void editSlotExtractDone();
     void editSlotAddDone( bool success );
-    void viewSlotExtractDone();
+    void viewSlotExtractDone( bool success );
     void openWithSlotExtractDone();
 
     void createRealArchiveSlotCreate( Arch * newArch, bool success,


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic