Version: 0.8.7 (using KDE KDE 3.4.0) Installed from: Debian testing/unstable Packages OS: Linux The latest release of kuickshow has lost the ability to delete the currently viewed picture directly from the viewer. This makes it extremely inconvenient for me - scanning directories full of lots of pictures and deleting the ones I don't want to keep. Seems no reason to have removed this useful function which was in the previous release - although I can understand why some may think it dangerous, it would be perfectly acceptable to have a function without a default assigned keyboard shortcut (as long as I could assign a shortcut key).
i can reproduce this on slackware-current (0.8.7/3.4.0) seems to be a bug, can't imagine that this could be removed intentionally :)
I think this is a bug. Delete (from viewer) was working in 3.3.2. And yes it is very annoying bug!
Created attachment 10561 [details] Patch to fix the problem I presume this bug has occurred as a result of some changes in the underlying libraries that kuickshow uses rather than any change the the kuickshow code itself. The attached patch fixes the problem, although it probably could do with some improvements, namely:- 1) It assumes the use of the Delete Key - not sure how to go about making this configurable 2) Although I tested it fairly thoroughly, there seems to be a case in which if after deleting a picture, the new picture to be displayed is corrupt, after the dialog box is displayed saying that, kuickshow crashes when the user selects OK. I couldn't quite get to the bottom of why this was the case. I don't have any access to the kde repository, so someone else will have to apply the patch
*** This bug has been confirmed by popular vote. ***
SVN commit 438958 by uwolfer: Apply patch that gets Kuickshow ability to delete pictures from viewer. (author: alan chandlerfamily.org.uk) Thanks for this patch! FEATURE: 101848 M +9 -0 imagewindow.cpp M +2 -0 imagewindow.h M +17 -0 kuickshow.cpp M +1 -0 kuickshow.h --- trunk/KDE/kdegraphics/kuickshow/src/imagewindow.cpp #438957:438958 @@ -143,6 +143,9 @@ new KAction( i18n("Show Previous Image"), KStdAccel::prior(), this, SLOT( slotRequestPrevious() ), m_actions, "previous_image" ); + new KAction( i18n("Delete Image"), Key_Delete, + this, SLOT( imageDelete() ), + m_actions, "delete_image" ); new KAction( i18n("Zoom In"), Key_Plus, this, SLOT( zoomIn() ), @@ -501,6 +504,11 @@ addGamma( - kdata->gammaSteps ); } +void ImageWindow::imageDelete() +{ + emit deleteImage(); +} + /// @@ -834,6 +842,7 @@ viewerMenu->insertItem( i18n("Gamma"), gammaMenu ); viewerMenu->insertSeparator(); + m_actions->action("delete_image")->plug( viewerMenu ); m_actions->action("print_image")->plug( viewerMenu ); m_actions->action("save_image_as")->plug( viewerMenu ); m_actions->action("properties")->plug( viewerMenu ); --- trunk/KDE/kdegraphics/kuickshow/src/imagewindow.h #438957:438958 @@ -80,11 +80,13 @@ void printImage(); void toggleFullscreen(); void maximize(); + void imageDelete(); signals: void sigFocusWindow( ImageWindow * ); // go advance images back/forth void requestImage( ImageWindow *, int advance ); + void deleteImage(); void nextSlideRequested(); void prevSlideRequested(); --- trunk/KDE/kdegraphics/kuickshow/src/kuickshow.cpp #438957:438958 @@ -502,6 +502,8 @@ this, SLOT( slotAdvanceImage( ImageWindow *, int ))); connect( m_viewer, SIGNAL( pauseSlideShowSignal() ), this, SLOT( pauseSlideShow() ) ); + connect( m_viewer, SIGNAL (deleteImage ()), + this, SLOT (slotDeleteImage ())); if ( s_viewers.count() == 1 && moveToTopLeft ) { // we have to move to 0x0 before showing _and_ // after showing, otherwise we get some bogus geometry() @@ -551,6 +553,21 @@ } // isImage } +void KuickShow::slotDeleteImage() +{ + KFileItemList list; + KFileItem *item = fileWidget->getCurrentItem(false); + list.append (item); + KFileItem *next = fileWidget->getNext(true); + if (!next) + next = fileWidget->getPrevious(true); + if (next) + showImage(next, false); + else + m_viewer->close(true); + fileWidget->del(list, false,false); +} + void KuickShow::startSlideShow() { KFileItem *item = kdata->slideshowStartAtFirst ? --- trunk/KDE/kdegraphics/kuickshow/src/kuickshow.h #438957:438958 @@ -121,6 +121,7 @@ void slotSetURL( const KURL& ); void slotURLComboReturnPressed(); // void invalidateImages( const KFileItemList& items ); + void slotDeleteImage(); private: void initGUI( const KURL& startDir );
also note that in previous versions it was possible to assign a key to delete opretions in both viewer and browser components - i'm not familiar enough to determine wether this patch provides this functionality :) btw, how did this feature disappear so suddenly ?
i have found a small typo in kuichkshow source which do hide this ability, when using KDE 3-4. diff -urN kuickshow/src/kuickshow.cpp kuickshowfixed/src/kuickshow.cpp --- kuickshow/src/kuickshow.cpp 2005-02-06 23:58:13.000000000 +0300 +++ kuickshowfixed/src/kuickshow.cpp 2005-08-12 12:39:23.000000000 +0400 @@ -834,7 +834,7 @@ item_next = fileWidget->getPrevious( false ); } - else if ( fileWidget->actionCollection()->action("delete")->shortcut().contains( key )) + else if ( fileWidget->actionCollection()->action("delete")->shortcut().contains( kkey )) { // KFileItem *cur = fileWidget->getCurrentItem( false ); (void) fileWidget->getCurrentItem( false ); After fixing it, everything is fine.
so, does this mean that actually the functionality was there, only one letter had to be changed ? if so, what happens to proposed and committed patch - will it be reversed and typo fixed ?
posted it to redhat https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=165796 btw, it would be nice for kuickshow to close imagewindow, when i delete last image from list. any advices how to do it?
For those who come here to find a solution and neither want to wait for a fixed version nor want to tweak the source for themselves: In the browser shortcuts configuration tab you just have to change the shortcut for "delete" to "Del" instead of "Shift Del". Ignore the warning that it is already assigned to "trash". From now on you can delete pictures in view mode with the Del key (it really deletes but gives a yes/no question before it does so).
So it does! This is surely a case of two bugs make a feature - the shortcut should be browser only, but when reassigned it becomes a viewer shortcut too. Yay, my delete key is working again!
SVN commit 495613 by pfeiffer: - fix crash when deleting the last image without having a browser - fix deleting images from image window and browser - support moving to trash and make that the default - refactor delayed execution of events/actions (for when the browser window needs to be loaded lazily) - use F5 as default shortcut for "Reload image", keep Enter as alternative - fixed crash (right-clicking on about widget) - made the about widget not always-on-top, but a modal widget, which prevents error messages from being hidden below the about widget (i.e. when clicking the homepage link while being offline) The new strings in kuickshow.cpp are reused from kdelibs (kdiroperator.cpp) BUG: 111586 BUG: 110663 BUG: 106689 BUG: 103667 BUG: 99163 CCBUG: 101848 M +28 -1 ChangeLog M +4 -4 src/aboutwidget.cpp M +27 -12 src/imagewindow.cpp M +4 -1 src/imagewindow.h M +177 -44 src/kuickshow.cpp M +30 -8 src/kuickshow.h M +1 -1 src/kurlwidget.cpp M +1 -1 src/version.h