Use a "pasteto" action when pasting in the RMB for a directory.

This pastes into the directory instead of pasting into the current view.
#42210

svn path=/trunk/kdebase/libkonq/; revision=154296
This commit is contained in:
David Faure 2002-05-07 14:24:01 +00:00
parent bb6095502b
commit 98871775f4
4 changed files with 14 additions and 5 deletions

View file

@ -822,7 +822,7 @@ void KonqIconViewWidget::startImagePreview( const QStringList &previewSettings,
int iconSize = m_size ? m_size : KGlobal::iconLoader()->currentSize( KIcon::Desktop );
int size;
if ( group.readBoolEntry("BoostSize", true) ) {
if (iconSize < 28)
size = 48;
@ -1070,7 +1070,12 @@ void KonqIconViewWidget::copySelection()
void KonqIconViewWidget::pasteSelection()
{
KonqOperations::doPaste( this, url() );
paste( url() );
}
void KonqIconViewWidget::paste( const KURL &url )
{
KonqOperations::doPaste( this, url );
}
KURL::List KonqIconViewWidget::selectedUrls()

View file

@ -152,6 +152,7 @@ public:
virtual void copySelection();
virtual void pasteSelection();
virtual KURL::List selectedUrls();
void paste( const KURL &url );
bool sortDirectoriesFirst() const;
void setSortDirectoriesFirst( bool b );
@ -192,7 +193,7 @@ public:
* Provided for KDesktop.
*/
virtual void setWallpaper(const KURL&) { }
bool maySetWallpaper();
void setMaySetWallpaper(bool b);

View file

@ -273,7 +273,10 @@ KonqPopupMenu::KonqPopupMenu( KBookmarkManager *mgr, const KFileItemList &items,
}
if ( S_ISDIR(mode) && sWriting ) {
addAction( "paste" );
if ( currentDir )
addAction( "paste" );
else
addAction( "pasteto" );
}
// The actions in this group are defined in PopupMenuGUIClient

View file

@ -59,7 +59,7 @@ public:
* (true in konqueror, false in kdesktop and others)
*
* The actions to pass in include :
* showmenubar, back, forward, up, cut, copy, paste, trash, rename, del, shred
* showmenubar, back, forward, up, cut, copy, paste, pasteto, trash, rename, del, shred
* The others items are automatically inserted.
*
*/