Index: src/sdk/editormanager.cpp
===================================================================
--- src/sdk/editormanager.cpp	(revision 8050)
+++ src/sdk/editormanager.cpp	(working copy)
@@ -2808,36 +2808,63 @@
         pop->Append(idNBTabCloseAll, _("Close all"));
         pop->Append(idNBTabCloseAllOthers, _("Close all others"));
     }
+
+    int any_modified = 0;
+    for (int i = 0; i < GetEditorsCount(); ++i)
+    {
+        EditorBase* ed = GetEditor(i);
+        if (ed && ed->GetModified())
+        {
+            if(++any_modified > 1)
+                break;
+        }
+    }
+    if (any_modified > 0)
+    {
+        pop->AppendSeparator();
+        if (GetEditor(event.GetSelection())->GetModified())
+            pop->Append(idNBTabSave, _("Save"));
+        if (any_modified > 1 || !GetEditor(event.GetSelection())->GetModified())
+            pop->Append(idNBTabSaveAll, _("Save all"));
+    }
+
     pop->AppendSeparator();
-    pop->Append(idNBTabSave, _("Save"));
-    pop->Append(idNBTabSaveAll, _("Save all"));
-    pop->AppendSeparator();
-    pop->Append(idNBSwapHeaderSource, _("Swap header/source"));
-    pop->Append(idNBTabOpenContainingFolder, _("Open containing folder"));
-    pop->AppendSeparator();
-    pop->Append(idNBTabTop, _("Tabs at top"));
-    pop->Append(idNBTabBottom, _("Tabs at bottom"));
+    wxString name = GetEditor(event.GetSelection())->GetFilename().Lower();
+    if (name.EndsWith(FileFilters::C_DOT_EXT)    ||
+        name.EndsWith(FileFilters::CPP_DOT_EXT)  ||
+        name.EndsWith(FileFilters::CC_DOT_EXT)   ||
+        name.EndsWith(FileFilters::CXX_DOT_EXT)  ||
+        name.EndsWith(FileFilters::CPLPL_DOT_EXT))
+    {
+        pop->Append(idNBSwapHeaderSource, _("Switch to header"));
+    }
+    else if (FileTypeOf(name) == ftHeader)
+        pop->Append(idNBSwapHeaderSource, _("Switch to source"));
+    cbEditor* ed = GetBuiltinEditor(event.GetSelection());
+    if (ed)
+    {
+        pop->Append(idNBTabOpenContainingFolder, _("Open containing folder"));
+        pop->Append(idNBProperties, _("Properties..."));
+        pop->AppendSeparator();
+    }
+
     if (Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/editor_tabs_bottom"), false))
-        pop->FindItem(idNBTabBottom)->Enable(false);
+        pop->Append(idNBTabTop, _("Tabs at top"));
     else
-        pop->FindItem(idNBTabTop)->Enable(false);
+        pop->Append(idNBTabBottom, _("Tabs at bottom"));
 
-    cbEditor* ed = GetBuiltinEditor(event.GetSelection());
     if (ed)
     {
-        pop->AppendSeparator();
-        pop->Append(idNBProperties, _("Properties..."));
-
         wxMenu* splitMenu = new wxMenu;
-        splitMenu->Append(idNBTabSplitHorz, _("Horizontally"));
-        splitMenu->Append(idNBTabSplitVert, _("Vertically"));
-        splitMenu->AppendSeparator();
-        splitMenu->Append(idNBTabUnsplit, _("Unsplit"));
-        splitMenu->Enable(idNBTabSplitHorz, ed->GetSplitType() != cbEditor::stHorizontal);
-        splitMenu->Enable(idNBTabSplitVert, ed->GetSplitType() != cbEditor::stVertical);
-        splitMenu->Enable(idNBTabUnsplit, ed->GetSplitType() != cbEditor::stNoSplit);
-
-        pop->AppendSeparator();
+        if (ed->GetSplitType() != cbEditor::stHorizontal)
+            splitMenu->Append(idNBTabSplitHorz, _("Horizontally"));
+        if (ed->GetSplitType() != cbEditor::stVertical)
+            splitMenu->Append(idNBTabSplitVert, _("Vertically"));
+        if (ed->GetSplitType() != cbEditor::stNoSplit)
+        {
+            splitMenu->AppendSeparator();
+            splitMenu->Append(idNBTabUnsplit, _("Unsplit"));
+        }
         pop->Append(-1, _("Split view"), splitMenu);
 
         if (Manager::Get()->GetProjectManager()->GetActiveProject()) // project must be open
@@ -2855,21 +2882,6 @@
         }
     }
 
-    bool any_modified = false;
-
-    for (int i = 0; i < GetEditorsCount(); ++i)
-    {
-        EditorBase* ed = GetEditor(i);
-        if (ed && ed->GetModified())
-        {
-            any_modified = true;
-            break;
-        }
-    }
-
-    pop->Enable(idNBTabSave, GetEditor(event.GetSelection())->GetModified());
-    pop->Enable(idNBTabSaveAll, any_modified );
-
     // allow plugins to use this menu
     Manager::Get()->GetPluginManager()->AskPluginsForModuleMenu(mtEditorTab, pop);
 
Index: src/sdk/projectmanager.cpp
===================================================================
--- src/sdk/projectmanager.cpp	(revision 8050)
+++ src/sdk/projectmanager.cpp	(working copy)
@@ -1948,12 +1948,10 @@
 void ProjectManager::OnTabContextMenu(wxAuiNotebookEvent& /*event*/)
 {
     wxMenu* NBmenu = new wxMenu();
-    NBmenu->Append(idNB_TabTop, _("Tabs at top"));
-    NBmenu->Append(idNB_TabBottom, _("Tabs at bottom"));
     if (Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/project_tabs_bottom"), false))
-        NBmenu->FindItem(idNB_TabBottom)->Enable(false);
+        NBmenu->Append(idNB_TabTop, _("Tabs at top"));
     else
-        NBmenu->FindItem(idNB_TabTop)->Enable(false);
+        NBmenu->Append(idNB_TabBottom, _("Tabs at bottom"));
     m_pNotebook->PopupMenu(NBmenu);
     delete NBmenu;
 }
Index: src/src/infopane.cpp
===================================================================
--- src/src/infopane.cpp	(revision 8050)
+++ src/src/infopane.cpp	(working copy)
@@ -347,12 +347,10 @@
     page.Sort(&CompareIndexes);
     wxMenu menu;
     wxMenu* view = new wxMenu;
-    menu.Append(idNB_TabTop, _("Tabs at top"));
-    menu.Append(idNB_TabBottom, _("Tabs at bottom"));
     if (Manager::Get()->GetConfigManager(_T("app"))->ReadBool(_T("/environment/infopane_tabs_bottom"), false))
-    	menu.FindItem(idNB_TabBottom)->Enable(false);
+    	menu.Append(idNB_TabTop, _("Tabs at top"));
     else
-    	menu.FindItem(idNB_TabTop)->Enable(false);
+    	menu.Append(idNB_TabBottom, _("Tabs at bottom"));
 
     int selection = GetSelection();
     if (selection >= 0 &&
