diff -r 68495946fe33 -r 3492af261af2 mainwindow.cpp --- a/mainwindow.cpp Tue Apr 11 14:34:14 2006 +0000 +++ b/mainwindow.cpp Tue Apr 11 14:34:14 2006 +0000 @@ -73,7 +73,7 @@ extern QAction *actionEditAddBranchHere; extern QAction *actionEditAddBranchAbove; extern QAction *actionEditAddBranchBelow; -extern QAction *actionEditRemoveBranchHere; +extern QAction *actionEditRemoveBranchKeepChilds; extern QAction *actionEditRemoveChilds; extern QAction *actionEditImportAdd; extern QAction *actionEditImportReplace; @@ -109,6 +109,7 @@ extern QAction *actionFormatHideLinkUnselected; extern QAction *actionViewToggleNoteEditor; +extern QAction *actionViewToggleHistoryWindow; extern QAction* actionSettingsAutoedit; extern QAction* actionSettingsAutoselectHeading; @@ -628,10 +629,10 @@ // Only remove branch, not its childs a = new QAction( tr( "Remove only branch and keep its childs" ),tr( "Remove only branch " ), ALT + Key_Delete, this, "removeBranchHere" ); - connect( a, SIGNAL( activated() ), this, SLOT( editRemoveBranchHere() ) ); + connect( a, SIGNAL( activated() ), this, SLOT( editRemoveBranchKeepChilds() ) ); a->setEnabled (false); actionListBranches.append(a); - actionEditRemoveBranchHere=a; + actionEditRemoveBranchKeepChilds=a; // Only remove childs of a branch a = new QAction( tr( "Remove childs of branch" ),tr( "Remove childs" ), SHIFT + Key_Delete, this, "removeBranchChilds" ); @@ -787,6 +788,8 @@ connect( a, SIGNAL( activated() ), this, SLOT( viewZoomOut() ) ); a->addTo( tb ); a->addTo( menu ); + + a = new QAction( tr( "Toggle Note Editor" ), QPixmap(flagsPath+"flag-note.png"), tr( "Toggle Note Editor" ), CTRL + Key_E , this, "noteEditor" ); connect( a, SIGNAL( activated() ), this, SLOT(windowToggleNoteEditor() ) ); a->setToggleAction(true); @@ -797,6 +800,13 @@ a->addTo( tb ); a->addTo( menu ); actionViewToggleNoteEditor=a; + + a = new QAction( tr( "Toggle history window" ), QPixmap(), tr( "Toggle history window" ), CTRL + Key_H , this, "historyWindow" ); + connect( a, SIGNAL( activated() ), this, SLOT(windowToggleHistory() ) ); + a->setToggleAction(false); + a->addTo( menu ); + actionViewToggleHistoryWindow=a; + a = new QAction( tr( "&Next Window" ), QPixmap(), tr( "Next Window" ), ALT + Key_N , this, "nextWindow" ); connect( a, SIGNAL( activated() ), this, SLOT(windowNextEditor() ) ); a->addTo( menu ); @@ -1132,7 +1142,7 @@ branchRemoveContextMenu =new QPopupMenu (this); actionEditCut->addTo ( branchRemoveContextMenu ); actionEditDelete->addTo ( branchRemoveContextMenu ); - actionEditRemoveBranchHere->addTo( branchRemoveContextMenu ); + actionEditRemoveBranchKeepChilds->addTo( branchRemoveContextMenu ); actionEditRemoveChilds->addTo( branchRemoveContextMenu ); branchContextMenu->insertItem (tr("Add"),branchAddContextMenu); @@ -2283,7 +2293,7 @@ void Main::editToggleHideExport() { if (currentMapEditor()) - currentMapEditor()->setHideExport(); + currentMapEditor()->toggleHideExport(); } void Main::editMapInfo() @@ -2365,10 +2375,10 @@ fileSaveAs (PartOfMap); } -void Main::editRemoveBranchHere() +void Main::editRemoveBranchKeepChilds() { if (currentMapEditor()) - currentMapEditor()->removeBranchHere(); + currentMapEditor()->removeBranchKeepChilds(); } void Main::editRemoveChilds() @@ -2628,6 +2638,12 @@ windowShowNoteEditor(); } +void Main::windowToggleHistory() +{ + if (currentMapEditor()) + currentMapEditor()->toggleHistoryWindow(); +} + void Main::updateNoteFlag() { if (currentMapEditor())