Bug 52362 - does not work via KIO
Summary: does not work via KIO
Status: RESOLVED FIXED
Alias: None
Product: kuickshow
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR wishlist
Target Milestone: ---
Assignee: Carsten Pfeiffer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-12-28 13:22 UTC by matze
Modified: 2002-12-28 17:26 UTC (History)
0 users

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 matze 2002-12-28 13:22:22 UTC
Version:            (using KDE KDE 3.0.99)
Installed from:    Compiled From Sources
Compiler:          gcc 2.95.3 
OS:          Linux

I'd like to be able to display a collection of pictures that's on a SAMBA server, and to which I have access via smb:// in konqueror. This does not seem to be possible right now.

How to Reproduce:
* Bind kuickshow to inode/directory
* browse to a directory containing images via smb:// in konqueror
* right-click into konquerors window, select "Open with->kuickshow"
* kuickshow starts and terminates immediately, displaying an error message just to short to be readable

Expected Behaviour:
* kuickshow should display the directory content and let me browse through the images like with local files.
Comment 1 Carsten Pfeiffer 2002-12-28 17:26:48 UTC
Subject: kdegraphics/kuickshow/src

CVS commit by pfeiffer: 

CCMAIL: 52362-close@bugs.kde.org
works now, will clean this up later


  M +5 -5      filewidget.cpp   1.13
  M +10 -6     kuickshow.cpp   1.58


--- kdegraphics/kuickshow/src/filewidget.cpp  #1.12:1.13
@@ -203,8 +203,8 @@ bool FileWidget::eventFilter( QObject *o
 bool FileWidget::isImage( const KFileItem *item )
 {
-    return item && !item->isDir();
+//     return item && !item->isDir();
 
-//     return ( item && item->isReadable() &&
-//           item->mimetype().startsWith( "image/") );
+    return ( item && item->isReadable() &&
+             item->mimetype().startsWith( "image/") );
 }
         

--- kdegraphics/kuickshow/src/kuickshow.cpp  #1.57:1.58
@@ -631,9 +631,11 @@ void KuickShow::slotAdvanceImage( ImageW
 
     if ( FileWidget::isImage( item ) ) {
-        view->showNextImage( item->url().path() ); // ###
+        QString filename;
+        KIO::NetAccess::download(item->url(), filename);
+        view->showNextImage( filename );
         if (m_slideTimer->isActive())
           m_slideTimer->start( kdata->slideDelay );
 
-        if ( kdata->preloadImage ) // preload next image
+        if ( kdata->preloadImage && item_next->url().isLocalFile() ) // preload next image
             if ( FileWidget::isImage( item_next ) )
                 view->cacheImage( item_next->url().path() ); // ###
@@ -770,7 +772,9 @@ bool KuickShow::eventFilter( QObject *o,
 
             if ( FileWidget::isImage( item ) ) {
-                m_viewer->showNextImage( item->url().path() ); // ###
+                QString filename;
+                KIO::NetAccess::download(item->url(), filename);
+                m_viewer->showNextImage( filename );
                 
-                if ( kdata->preloadImage ) // preload next image
+                if ( kdata->preloadImage && item_next->url().isLocalFile() ) // preload next image
                     if ( FileWidget::isImage( item_next ) )
                         m_viewer->cacheImage( item_next->url().path() ); // ###