Skip to content
This repository has been archived by the owner on Nov 1, 2024. It is now read-only.

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 Schmiddiii force-pushed the adaptive-message-dialog branch from c871b31 to 922c6b7 Compare October 8, 2022 08:47
@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.

@Schmiddiii Schmiddiii force-pushed the adaptive-message-dialog branch from 922c6b7 to 889c87b Compare October 8, 2022 14:00
@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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants