Fix tab-specific actions (eg. Copy, Paste) not appearing in Configure Shortcuts dialog.

Add action collection for current controller to dialog before showing and reload UI
for other controllers after the dialog is accepted.

There is a known bug at the moment where changing a shortcut from a custom value to
the default shortcut only updates the current tab and tabs created after the change.
This is a kdelibs issue being looked into.

BUG: 161021
BACKPORT: 4.1

svn path=/trunk/KDE/kdebase/apps/konsole/; revision=837726
This commit is contained in:
Robert Knight
2008-07-25 15:05:05 +00:00
parent 8f5f805112
commit 39a84903df
3 changed files with 27 additions and 6 deletions

View File

@@ -375,8 +375,21 @@ bool MainWindow::queryClose()
void MainWindow::showShortcutsDialog()
{
KShortcutsDialog::configure( actionCollection() ,
KShortcutsEditor::LetterShortcutsDisallowed, this );
KShortcutsDialog dialog(KShortcutsEditor::AllActions, KShortcutsEditor::LetterShortcutsDisallowed, this);
// add actions from this window and the current session controller
foreach(KXMLGUIClient* client, guiFactory()->clients())
dialog.addCollection(client->actionCollection());
if (dialog.configure())
{
// reload session actions (defined in "sessionui.rc") in other session controllers
foreach(SessionController* controller, SessionController::allControllers())
{
if (controller != _pluggedController)
controller->reloadXML();
}
}
}
void MainWindow::newFromProfile(Profile::Ptr profile)