On 08/04/2010 15:33, Alexander Klenin wrote:
On Thu, Apr 8, 2010 at 05:41, Martin<[email protected]>  wrote:
You can also view (and edit) the same source across 2 or more windows
(Context-Menu "Move to new Window"). So you can look at different locations
in the same file, without the need of jumping forward and backward.
Works good (it is, of course, "Copy to new Window").
How about "Copy to new tab"? would be handy in some cases

you mean having 2 tabs with the same source, in just one window?
It can be added, but I though it wasn't needed (since you can only view one of them at any time)

From discussions it has emerged, that splitting the space within one tab (so you have 2 editors or 2 views in the same tab) would be desirable... someday...

---
if you want to enable tabs in the same window

SourceEditor.pp line 4905 onwards
(and find similar checks in TSourceDraggableNotebook)

    {$IFnDEF SingleSrcWindow}
    SrcEditMenuMoveToOtherWindowList.Clear;
    NBAvail := False;
    for i := 0 to Manager.SourceWindowCount - 1 do
      if (i <> Manager.IndexOfSourceWindow(self)) and
(Manager.SourceWindows[i].IndexOfEditorInShareWith(GetActiveSE) < 0)
      then begin
        NBAvail := True;
        with RegisterIDEMenuCommand(SrcEditMenuMoveToOtherWindowList,
                                    'MoveToWindow'+IntToStr(i),
                                    Manager.SourceWindows[i].Caption,
@SrcEditMenuMoveToExistingWindowClicked)
        do
          Tag := i;
      end;
    SrcEditMenuMoveToNewWindow.Visible := not NBAvail;
    SrcEditMenuMoveToNewWindow.Enabled := PageCount > 1;
    SrcEditMenuMoveToOtherWindow.Visible := NBAvail;
    SrcEditMenuMoveToOtherWindowNew.Enabled := (PageCount > 1);

    NBAvail := False;
    SrcEditMenuCopyToOtherWindowList.Clear;
    for i := 0 to Manager.SourceWindowCount - 1 do
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
// remove the if below / always registerIDEMenuCommand / and Always NBAvail := true.
// XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
if (Manager.SourceWindows[i].IndexOfEditorInShareWith(GetActiveSE) < 0) and
         (i <> Manager.IndexOfSourceWindow(self))
      then begin
        NBAvail := True;
        with RegisterIDEMenuCommand(SrcEditMenuCopyToOtherWindowList,
                                    'CopyToWindow'+IntToStr(i),
                                    Manager.SourceWindows[i].Caption,
@SrcEditMenuCopyToExistingWindowClicked)
        do
          Tag := i;
      end;
    SrcEditMenuCopyToNewWindow.Visible := not NBAvail;
    SrcEditMenuCopyToOtherWindow.Visible := NBAvail;
    {$ENDIF}

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to