Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make AddNewTorrentDialog modal on macOS. Closes #3022 #6206

Closed
wants to merge 1 commit into from

Conversation

okeatime
Copy link
Contributor

@okeatime okeatime commented Jan 6, 2017

I don't know why, but a modeless dialog box does not work on macOS here.

@zeule
Copy link
Contributor

zeule commented Jan 6, 2017

Does this mean that QDialog::open() shows a non-modal dialog on OSX? Just curious.

@okeatime
Copy link
Contributor Author

okeatime commented Jan 7, 2017

Yes.
QDialog::open() causes opening multiple dialogs at the same time and they don't respond.

@zeule
Copy link
Contributor

zeule commented Jan 7, 2017

Shouldn't you report this as a bug to Qt then? Documentation for QDialog::open() states that the dialog will be modal. Also, I'm curious why do the dialogs not respond if they are not modal? In that case they do not differ from regular windows.

@Chocobo1
Copy link
Member

Chocobo1 commented Jan 8, 2017

hmmm, since the dialog is modal, using exec() could be more preferable than open() (for all OS).
That way avoids multiple modal dialog pops up at the same time which is a messy situation...

@zeule
Copy link
Contributor

zeule commented Jan 8, 2017

Maybe it would be better to make them non-modal (#6194)?

@sledgehammer999
Copy link
Member

Not directly reviewing this particular PR but in the past I semi-investigated this. I am not expert on macOS neither do I have a dedicated machine.

I think this is a peculiarity of macOS itself. Non-modal dialogs are called "drawers" IIRC. And visually, when they are painted/opened they start opening like a drawer(think drawer for clothes) from the title bar. When you open a new drawer, while the old one is still open, you can't click on anything. Neither the old drawer, nor the new one. It's as if something invisible prevents you from clicking on those windows.
IIRC ESC and tabs seemed to work. I tried to find Qt info on it but non existed. And I wasn't prepared to dwelve in the macOS API and objective-c.

@sledgehammer999
Copy link
Member

Maybe it would be better to make them non-modal (#6194)?

(and similar suggestions).

Ideally, I think we need a redesign of that dialog, a redesign of the workflow. Currently opening multiple torrents simultaneously produces poor results in terms of usability and user experience. A new approach would be to aggregate all the opened torrents in the same dialog-window, allowing users to select between them(like previous/next buttons) and having an option to "OK to all".
Also utilize the fact that mode screens nowadays are wide, so move the filelist/advanced options to a second "column" instead of new "rows" in the dialog. ie expand horizontally instead of vertically.

@okeatime
Copy link
Contributor Author

okeatime commented Jan 9, 2017

Non-modal dialogs are called "drawers" IIRC.

Ah, now I am starting to see the problem.

I see other macOS applications open ordinary non-modal dialogs.
Why Qt does strange thing (drawer) in macOS?

@vit9696
Copy link
Contributor

vit9696 commented Jun 27, 2017

Hi…

Actually I ran into this issue the day before, and wanted to check the code later. Now I am mentioned in the pull request that was added in winter, sigh, and unfortunately still not merged due to some level of misunderstanding. Let me try to clarify.

File add confirmation window type entirely depends on the application logic. If you check different apps, you will see that different types of windows appear when you drag and drop a file, e.g.: Xcode, Photoshop, Transmission, Hopper.

Each application decides on its own whether it needs to have a modal file addition window, or just a popup. I would say that the general idea for the macOS interface is to use modal windows when the main window represents the file you add. Also, window type is not really dependent on the amount of files added, file addition windows could be consolidated into one like in Xcode, but may actually not be. I am not an expert, but this is the experience I have:

  • Xcode uses a modal window, since the file is added to the project, but you work with this file in its editor;
  • Photoshop used to be multiwindow, and for this reason it creates a sequence of confirmation non-modal windows (now it has tabs on by default, but I think they left the ui for consistency);
  • Transmission uses non-modal windows, since the main window represents a torrent list;
  • Hopper uses modal windows, since every new file creates another main window.

To sum it up, the suggestion to replace the modal window with a non-modal one is entirely valid, especially since it fixes a bug. Multiple file addition window consolidation is called a usability feature, that might be a good idea to add, but it has nothing to do with app logic and a bug you have.

I will rebase this and include it in my PR to get all the right things together.

-UPD-
I have just realised that the terminology used in the discussion is entirely misleading.
Modal window is this, and non-modal window is that.
qBittorrent at the moment has modal windows on macOS, and the right way is to have non-modal ones.

@vit9696 vit9696 mentioned this pull request Jun 27, 2017
13 tasks
@sledgehammer999
Copy link
Member

Fixed in #6952. Will be available with v3.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants