Patch #3296 2012-06-23 21:18

alpha0010

Tabs: tidy context menu (part 2)
Download
3296-Tabs_tidy_cont.patch (955 bytes)
Category
Application::Refinement
Status
Accepted
Close date
2012-06-28 05:59
Assigned to
mortenmacfly
Index: src/sdk/editormanager.cpp
===================================================================
--- src/sdk/editormanager.cpp    (revision 8065)
+++ src/sdk/editormanager.cpp    (working copy)
@@ -2824,16 +2824,16 @@
         pop->AppendSeparator();
         if (GetEditor(event.GetSelection())->GetModified())
             pop->Append(idNBTabSave, _("Save"));
-        if (any_modified > 1)
+        if (any_modified > 1 || !GetEditor(event.GetSelection())->GetModified())
             pop->Append(idNBTabSaveAll, _("Save all"));
     }
 
     pop->AppendSeparator();
-    pop->Append(idNBSwapHeaderSource, _("Swap header/source"));
 
     cbEditor* ed = GetBuiltinEditor(event.GetSelection());
     if (ed)
     {
+        pop->Append(idNBSwapHeaderSource, _("Swap header/source"));
         pop->Append(idNBTabOpenContainingFolder, _("Open containing folder"));
         pop->Append(idNBProperties, _("Properties..."));
         pop->AppendSeparator();
alpha0010 2012-06-23 21:23

The previous partial commit created a bug which would can cause two separators in a row (two tabs, one is modified, right-click on the unmodified tab).

"Swap header/source" only belongs on default editors.