sumatrapdfreader / sumatrapdf

SumatraPDF reader
http://www.sumatrapdfreader.org
GNU General Public License v3.0
13.56k stars 1.72k forks source link

Tab mode: allow multiple windows, moving tabs between windows #18

Closed kjk closed 1 year ago

kjk commented 9 years ago

This only applies to tabs ui mode.

We need to implement drag&drop of tabs, with the following behavior:

As a bonus, when drag&drop is initated, the drag image is a thumbnail of the document.

When dragging out the last tab of the window, we close the window.

cheesecracker commented 9 years ago

Please add the following behaviour:

theFork commented 8 years ago

+1 Support for multiple windows would be nice, regardless how to un-dock tabs.

Balls0fSteel commented 7 years ago

Subscribed, this would be awesome.

AndyDurden commented 7 years ago

Very interested in this

p0te commented 7 years ago

How would one contribute to this issue? I plan on looking at how this behavior is accomplished in chromium and Firefox, but I'm not nearly skilled enough to try to replicate that code. I guess I'll see what I can gather from the source and post my findings here. or is there a better mechanism for that in GitHub? (i.e. If I have an idea of how to implement the solution, but not the skills to implement it myself, how do I share that idea )

kjk commented 7 years ago

Really the only thing that would help is a working implementation. It's just a lot of work.

CrimsonVex commented 6 years ago

Would really like this feature

spok7 commented 6 years ago

Workaround for multiple tabs:

  1. Run SumatraPDF
  2. Create and go to a new virtual desktop (Task View Button or Win+Tab, New desktop)
  3. Run SumatraPDF in new desktop (this should run a new instance in the new desktop)
  4. Drag window from one virtual desktop to the other in task view
  5. Close unused virtual desktop
  6. Profit

Edit: I am running Windows 10 Pro, and I am not able to run more than 2 instances with this method.

spok7 commented 6 years ago

Sadly that solution only works for Windows 10 systems. Shout outs to all of the awesome devs that are working on these features!

strandloper commented 6 years ago

I tried the suggestion from @spok7 but it didn't work for me. When I tried to launch the new instance of SumatraPDF on the second desktop, it just switched to the first desktop and focused the already running SumatraPDF instance. This on Windows 10 Fall Creator's Edition.

strandloper commented 6 years ago

I have just found an easier way to launch a second SumatraPDF instance. No need for virtual desktops; just make a second copy of SumatraPDF.exe, I just copied and pasted so I have "SumatraPDF - Copy.exe". Execute both executables and you end up with two instances of SumatraPDF.

ThrosturX commented 6 years ago

How has this PDF viewer survived 4 years since this issue opened?? Do people really only read 1 PDF at a time, like ever?

EDIT: Best workaround so far: Options > Use tabs (uncheck)

RazinShaikh commented 5 years ago

Workaround suggested by @ThrosturX can also be used to open multiple windows with multiple tabs.

  1. Open the tabs you want in one window
  2. Options > Use tabs (uncheck)
  3. Open another window
  4. Options > Use tabs (check)
  5. Open files in the new window as tabs
  6. Repeat as needed
GitHubRulesOK commented 4 years ago

There are several ways to run two windows together like this (explained elswhere but repeated here for relevance to this thread) image

The option I am showing is to add a section in external viewers which uses the suggestion above to use a copy of the main exe. So find the folder with your current SumatraPDF.exe (In my case it is c:\users\username\AppData\local\SumatraPDF) and add a new folder. I simply called it 2 for brevity also copy the SumatraPDF.exe by default it is called SumatraPDF - Copy.exe image

In the SumatraPDF-settings.txt file you need to modify my entry to suit your own locations adding the following few lines in the ExternalViewers section

ExternalViewers [
    [
        CommandLine = "C:\Users\Username\AppData\Local\SumatraPDF\SumatraPDF - copy.exe" -appdata "C:\Users\Username\AppData\Local\SumatraPDF\2" "%1" -page %p
        Name = Second Window
    ]
]
kjk commented 4 years ago

Some progress, available in latest pre-release (https://www.sumatrapdfreader.org/prerelease.html).

I've implemented Ctrl-Shift-N which opens a new window showing a currently shown document (i.e. "duplicate in current window).

There's also Ctrl-N to open a new, empty window (like Chrome's Ctrl-N) and "File / New window" menu item.

aneutron commented 4 years ago

@kjk Thank you very much for this much needed feature

horychen commented 4 years ago

I am surprised reading this thread... Before Sumatra 3, it has the multiple window feature. Just go to its official site and download the 2.5.2 version.

SumatraPeter commented 4 years ago

@horychen: What's there to be so surprised about? Before 3.0 Sumatra did not support multiple tabs inside a single window. You can still turn off tabs if you want to go back to previous behavior, instead of reverting to such an old version.

horychen commented 4 years ago

@horychen: What's there to be so surprised about? Before 3.0 Sumatra did not support multiple tabs inside a single window. You can still turn off tabs if you want to go back to previous behavior, instead of reverting to such an old version.

It seems I misunderstood the issue. People want tabs feature and multiple window feature at the same time, while I was looking for multiple window feature with SumatraPDF 3. After reading your comment I managed to use multiple window with SumatraPDF 3 by check "settings-options-advanced-Use tabs". This is exactly what I was looking for. Thanks!

GitHubRulesOK commented 1 year ago

@kjk much of the desires except drag from one group to the other (which oddly/naturally opens a third window :-) are now realised in 3.5.x Pre-release

Perhaps time to close this long thread in favour of one to cover residual desire(s) in 3.5+

kjk commented 1 year ago

Well, well, well. Only 9 years but it's done now: https://github.com/sumatrapdfreader/sumatrapdf/commits/master

LinuxOnTheDesktop commented 6 months ago

In Sumatra v. 3.6, I failed to find in any menu the option to get a new window showing the same document as the existing tab. I was about to file a feature request but then I found this very webpage - giving the keyboard shortcut of ctrl-alt-n. I welcome the functionality but should the feature not be available from a menu too? Otherwise, as my case shows, there is a discoverability problem!

GitHubRulesOK commented 6 months ago

@LinuxOnTheDesktop That question has been raised before just cant remembered where but without checking, the generic answer was there would be too many to list and show all occasionally over time some get added for one reason or another so probably less now "not shown" than in the past

LinuxOnTheDesktop commented 6 months ago

@GitHubRulesOK : right. Thanks for the information. Some sort of 'More . .' menu option might be in order. I note also that there are a couple of requests (#3990 and #1467) that there be a way of showing all the keyboards shortcuts.

('[S]o probably less now "not shown" than in the past': for the avoidance of confusion you might want to change 'less' to 'fewer'.)

GitHubRulesOK commented 6 months ago

@LinuxOnTheDesktop the functionality was improved by adding the CTRL K options but that does not show "shortcuts" and even one very very old one such as F for fullscreen only recently added to docs :-) as many are generic to windows apps.

LinuxOnTheDesktop commented 6 months ago

@GitHubRulesOK

I'm sorry, but you are going to have to spell things out a bit here. '[T]hat functionality was improved by adding the CTRL K options but that does not show "shortcuts"' - what functionality? What 'CTRL K' options? When I press CTRL-K a menu today with 'multimedia trust options' appears . .

GitHubRulesOK commented 6 months ago

@LinuxOnTheDesktop I meant the list of options for commands are shown using CTRL+K but the key press will not be shown so for >new or >fu Thus it is more keyboard intense before mouse click but helps when unsure of a normal or custom shortcut key image image