1.1 --- a/mainwindow.cpp Mon Apr 10 11:00:23 2006 +0000
1.2 +++ b/mainwindow.cpp Tue Apr 11 14:36:20 2006 +0000
1.3 @@ -73,7 +73,7 @@
1.4 extern QAction *actionEditAddBranchHere;
1.5 extern QAction *actionEditAddBranchAbove;
1.6 extern QAction *actionEditAddBranchBelow;
1.7 -extern QAction *actionEditRemoveBranchHere;
1.8 +extern QAction *actionEditRemoveBranchKeepChilds;
1.9 extern QAction *actionEditRemoveChilds;
1.10 extern QAction *actionEditImportAdd;
1.11 extern QAction *actionEditImportReplace;
1.12 @@ -109,6 +109,7 @@
1.13 extern QAction *actionFormatHideLinkUnselected;
1.14
1.15 extern QAction *actionViewToggleNoteEditor;
1.16 +extern QAction *actionViewToggleHistoryWindow;
1.17
1.18 extern QAction* actionSettingsAutoedit;
1.19 extern QAction* actionSettingsAutoselectHeading;
1.20 @@ -628,10 +629,10 @@
1.21
1.22 // Only remove branch, not its childs
1.23 a = new QAction( tr( "Remove only branch and keep its childs" ),tr( "Remove only branch " ), ALT + Key_Delete, this, "removeBranchHere" );
1.24 - connect( a, SIGNAL( activated() ), this, SLOT( editRemoveBranchHere() ) );
1.25 + connect( a, SIGNAL( activated() ), this, SLOT( editRemoveBranchKeepChilds() ) );
1.26 a->setEnabled (false);
1.27 actionListBranches.append(a);
1.28 - actionEditRemoveBranchHere=a;
1.29 + actionEditRemoveBranchKeepChilds=a;
1.30
1.31 // Only remove childs of a branch
1.32 a = new QAction( tr( "Remove childs of branch" ),tr( "Remove childs" ), SHIFT + Key_Delete, this, "removeBranchChilds" );
1.33 @@ -787,6 +788,8 @@
1.34 connect( a, SIGNAL( activated() ), this, SLOT( viewZoomOut() ) );
1.35 a->addTo( tb );
1.36 a->addTo( menu );
1.37 +
1.38 +
1.39 a = new QAction( tr( "Toggle Note Editor" ), QPixmap(flagsPath+"flag-note.png"), tr( "Toggle Note Editor" ), CTRL + Key_E , this, "noteEditor" );
1.40 connect( a, SIGNAL( activated() ), this, SLOT(windowToggleNoteEditor() ) );
1.41 a->setToggleAction(true);
1.42 @@ -797,6 +800,13 @@
1.43 a->addTo( tb );
1.44 a->addTo( menu );
1.45 actionViewToggleNoteEditor=a;
1.46 +
1.47 + a = new QAction( tr( "Toggle history window" ), QPixmap(), tr( "Toggle history window" ), CTRL + Key_H , this, "historyWindow" );
1.48 + connect( a, SIGNAL( activated() ), this, SLOT(windowToggleHistory() ) );
1.49 + a->setToggleAction(false);
1.50 + a->addTo( menu );
1.51 + actionViewToggleHistoryWindow=a;
1.52 +
1.53 a = new QAction( tr( "&Next Window" ), QPixmap(), tr( "Next Window" ), ALT + Key_N , this, "nextWindow" );
1.54 connect( a, SIGNAL( activated() ), this, SLOT(windowNextEditor() ) );
1.55 a->addTo( menu );
1.56 @@ -1132,7 +1142,7 @@
1.57 branchRemoveContextMenu =new QPopupMenu (this);
1.58 actionEditCut->addTo ( branchRemoveContextMenu );
1.59 actionEditDelete->addTo ( branchRemoveContextMenu );
1.60 - actionEditRemoveBranchHere->addTo( branchRemoveContextMenu );
1.61 + actionEditRemoveBranchKeepChilds->addTo( branchRemoveContextMenu );
1.62 actionEditRemoveChilds->addTo( branchRemoveContextMenu );
1.63
1.64 branchContextMenu->insertItem (tr("Add"),branchAddContextMenu);
1.65 @@ -2283,7 +2293,7 @@
1.66 void Main::editToggleHideExport()
1.67 {
1.68 if (currentMapEditor())
1.69 - currentMapEditor()->setHideExport();
1.70 + currentMapEditor()->toggleHideExport();
1.71 }
1.72
1.73 void Main::editMapInfo()
1.74 @@ -2365,10 +2375,10 @@
1.75 fileSaveAs (PartOfMap);
1.76 }
1.77
1.78 -void Main::editRemoveBranchHere()
1.79 +void Main::editRemoveBranchKeepChilds()
1.80 {
1.81 if (currentMapEditor())
1.82 - currentMapEditor()->removeBranchHere();
1.83 + currentMapEditor()->removeBranchKeepChilds();
1.84 }
1.85
1.86 void Main::editRemoveChilds()
1.87 @@ -2628,6 +2638,12 @@
1.88 windowShowNoteEditor();
1.89 }
1.90
1.91 +void Main::windowToggleHistory()
1.92 +{
1.93 + if (currentMapEditor())
1.94 + currentMapEditor()->toggleHistoryWindow();
1.95 +}
1.96 +
1.97 void Main::updateNoteFlag()
1.98 {
1.99 if (currentMapEditor())