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

View file

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

View file

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

View file

@ -59,7 +59,7 @@ public:
* (true in konqueror, false in kdesktop and others) * (true in konqueror, false in kdesktop and others)
* *
* The actions to pass in include : * 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. * The others items are automatically inserted.
* *
*/ */