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

Adaptive Import-dialog #102

Merged
merged 1 commit into from
Oct 8, 2022
Merged

Adaptive Import-dialog #102

merged 1 commit into from
Oct 8, 2022

Conversation

Schmiddiii
Copy link
Collaborator

Licensing

  • I confirm that this is either my code or was released under the terms of a GPLv3-or-later compatible license. Also I agree to release it here under the terms of the GPLv3-or-later.

Description

This exchanges the dialog to be a AdwMessageDialog. The transient-for property is still set, but I am still unsure it applies.

Linked Issue

Relates to #95.

Copy link
Contributor

@TheEvilSkeleton TheEvilSkeleton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a good start so far.

I have a couple of suggestions:

  • File pickers aren't transient with the parent window with the current MR, so I suggest to do so.
  • File pickers should only open appropriate file types by default. If I recall correctly, NewPipe exports JSON files. So, to import NewPipe list, the file picker should filter JSON. I believe it's this one https://docs.gtk.org/gtk4/property.FileChooser.filter.html.
  • File pickers don't have a title, so the title bar is entirely empty.
    image
    For NewPipe, I suggest to call it "Select NewPipe subscription file". For YouTube, I don't know exactly what we're supposed to import.

data/resources/ui/import_window.ui Outdated Show resolved Hide resolved
data/resources/ui/import_window.ui Outdated Show resolved Hide resolved
@Schmiddiii
Copy link
Collaborator Author

I have applied your suggestions. FileFilters were already in use and worked for me (NewPipe: JSON, YouTube: CSV).

@TheEvilSkeleton
Copy link
Contributor

TheEvilSkeleton commented Oct 8, 2022

Huh, sorry for that then. I was really confused by the file picker displaying "(None)" in the filter list.

That said, I just tested the artifact and it looks like the file pickers still aren't transient with the parent window.

@Schmiddiii
Copy link
Collaborator Author

Schmiddiii commented Oct 8, 2022

I just checked the docs again, and I think what you are refering to as transient is transient and modal:

Sets a window modal or non-modal.

Modal windows prevent interaction with other windows in the same application. To keep modal dialogs on top of main application windows, use gtk_window_set_transient_for() to make the dialog transient for the parent; most window managers will then disallow lowering the dialog below the parent.

Update: I now updated the MR to also make things modal.

@TheEvilSkeleton
Copy link
Contributor

OH, sorry for saying the wrong term all along! 😅 I tested the build artifact and I can confirm that filepickers are now modal.

@Schmiddiii Schmiddiii merged commit 89775a8 into master Oct 8, 2022
@Schmiddiii Schmiddiii deleted the adaptive-message-dialog branch October 8, 2022 14:32
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

2 participants