mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 08:51:24 +00:00
Moved "ShowDeleteComand" check to libkonq -> simplify konq and make kdesktop
work the same way. This also fixes Shift+Del in kdesktop. svn path=/trunk/kdebase/konqueror/; revision=381462
This commit is contained in:
parent
e031a588cc
commit
1846ecfe71
|
@ -3824,10 +3824,6 @@ void KonqMainWindow::initActions()
|
|||
|
||||
m_paDelete = new KAction( i18n( "&Delete" ), "editdelete", SHIFT+Key_Delete, actionCollection(), "del" );
|
||||
|
||||
KConfig config("kdeglobals", true, false);
|
||||
config.setGroup( "KDE" );
|
||||
m_bShowDelete = config.readBoolEntry( "ShowDeleteCommand", false );
|
||||
|
||||
m_paAnimatedLogo = new KonqLogoAction( i18n("Animated Logo"), 0, this, SLOT( slotDuplicateWindow() ), actionCollection(), "animated_logo" );
|
||||
|
||||
// Location bar
|
||||
|
@ -4542,6 +4538,7 @@ void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global
|
|||
popupMenuCollection.insert( m_paPaste );
|
||||
popupMenuCollection.insert( m_paTrash );
|
||||
popupMenuCollection.insert( m_paRename );
|
||||
popupMenuCollection.insert( m_paDelete );
|
||||
|
||||
// The pasteto action is used when clicking on a dir, to paste into it.
|
||||
KAction *actPaste = KStdAction::paste( this, SLOT( slotPopupPasteTo() ), &popupMenuCollection, "pasteto" );
|
||||
|
@ -4562,9 +4559,6 @@ void KonqMainWindow::slotPopupMenu( KXMLGUIClient *client, const QPoint &_global
|
|||
m_popupServiceType = QString::null;
|
||||
}
|
||||
|
||||
if ( !m_popupURL.isLocalFile() || m_bShowDelete )
|
||||
popupMenuCollection.insert( m_paDelete );
|
||||
|
||||
if ( (_items.count() == 1) && !m_popupServiceType.isEmpty() ) {
|
||||
QString currentServiceName = currentView->service()->desktopEntryName();
|
||||
|
||||
|
@ -4769,11 +4763,6 @@ void KonqMainWindow::reparseConfiguration()
|
|||
m_bHTMLAllowed = config->readBoolEntry( "HTMLAllowed", false );
|
||||
m_sViewModeForDirectory = config->readEntry( "ViewMode" );
|
||||
|
||||
// Update display of "Delete" command if necessary
|
||||
KConfig globalconfig("kdeglobals", true, false);
|
||||
globalconfig.setGroup( "KDE" );
|
||||
m_bShowDelete = globalconfig.readBoolEntry( "ShowDeleteCommand", false );
|
||||
|
||||
MapViews::ConstIterator it = m_mapViews.begin();
|
||||
MapViews::ConstIterator end = m_mapViews.end();
|
||||
for (; it != end; ++it )
|
||||
|
|
|
@ -677,7 +677,6 @@ private:
|
|||
// Global settings
|
||||
uint m_bSaveViewPropertiesLocally:1;
|
||||
uint m_bHTMLAllowed:1;
|
||||
uint m_bShowDelete:1;
|
||||
// Set in constructor, used in slotRunFinished
|
||||
uint m_bNeedApplyKonqMainWindowSettings:1;
|
||||
uint m_bViewModeToggled:1;
|
||||
|
|
|
@ -544,7 +544,13 @@ void KonqPopupMenu::setup(KonqPopupFlags kpf)
|
|||
addAction( "trash" );
|
||||
|
||||
if ( sDeleting ) {
|
||||
addAction( "del" );
|
||||
if ( !isLocal )
|
||||
addAction( "del" );
|
||||
else {
|
||||
KConfigGroup configGroup( kapp->config(), "KDE" );
|
||||
if ( configGroup.readBoolEntry( "ShowDeleteCommand", false ) )
|
||||
addAction( "del" );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue