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

Add preferences for optional album info to notifications #681

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rcalixte
Copy link

@rcalixte rcalixte commented Aug 30, 2022

No description provided.

@rcalixte rcalixte marked this pull request as draft August 16, 2023 23:46
@rcalixte rcalixte force-pushed the notify_album branch 3 times, most recently from 1a3acf0 to 05e0099 Compare September 3, 2023 20:04
@rcalixte rcalixte force-pushed the notify_album branch 4 times, most recently from 02533d6 to b8d7ff4 Compare September 3, 2023 20:35
@rcalixte rcalixte force-pushed the notify_album branch 19 times, most recently from 2c36c2f to 55b8739 Compare September 4, 2023 15:57
@rcalixte rcalixte changed the title Add album info to notifications Add preferences for optional album info to notifications Sep 4, 2023
@rcalixte rcalixte marked this pull request as ready for review September 4, 2023 16:31
@rcalixte
Copy link
Author

rcalixte commented Sep 4, 2023

@TingPing Thank you for the patience. This is now ready for review.

pithos/plugins/notify.py Outdated Show resolved Hide resolved
pithos/plugins/notify.py Outdated Show resolved Hide resolved
self.settings = settings
self.show_album = self.settings['data'] == 'True' if self.settings['data'] else False

box = Gtk.Box()
Copy link
Member

Choose a reason for hiding this comment

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

It looks very squished together, you should set the margin. Like 6 all around maybe?

Copy link
Author

Choose a reason for hiding this comment

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

The spacing helped but I just added a pair of new-lines to the label. I think it helps how it looks?

self.switch.set_valign(Gtk.Align.CENTER)
box.pack_end(self.switch, False, False, 2)

content_area = self.get_content_area()
Copy link
Member

Choose a reason for hiding this comment

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

This is deprecated, can you just do self.add(box)? I forget if that works if you could test.

Copy link
Author

Choose a reason for hiding this comment

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

(pithos:2): Gtk-WARNING **: 13:00:25.803: Attempting to add a widget with type GtkBox to a NotifyPluginPrefsDialog, but as a GtkBin subclass a NotifyPluginPrefsDialog can only contain one widget at a time; it already contains a widget of type GtkBox

I'll test with it though.

Copy link
Author

@rcalixte rcalixte Sep 4, 2023

Choose a reason for hiding this comment

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

The variable naming is different but the latest (assuming it's up to date since it was last edited over two years ago) example suggests the structure is correct.

I'll see if I can find more recent examples.

Copy link
Author

Choose a reason for hiding this comment

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

I see the deprecation notice with GTK4. I've switched it from a GtkDialog to a GtkWindow object and that seems to be working fine minus one issue where the preference is displayed away from the plugins and main application windows. I'll keep looking to see if I can resolve this.

Copy link
Author

Choose a reason for hiding this comment

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

I think this is just a byproduct of using Gtk.Window instead of Gtk.Dialog. Window managers will position the Window object the same as other window objects. The other preferences are still using Gtk.Dialog so this will create a bit of inconsistency in terms of user experience.

I'll commit whichever you prefer. If it's Gtk.Window, this is ready to merge as is. If it is Gtk.Dialog, I can push the previous state.

Copy link
Author

Choose a reason for hiding this comment

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

I thought of another thing. If Gtk.Window is the direction you want things to go while also wanting the user experience to be uniform, I can work on PRs for all of the other plugins with preferences. Then the PRs could be review/merged simultaneously.

@rcalixte rcalixte force-pushed the notify_album branch 5 times, most recently from cb95dc2 to 6afc120 Compare September 4, 2023 18:33
@rcalixte
Copy link
Author

@TingPing Will you have a chance to provide feedback on direction here? I believe this is ready to merge but I can make any edits if needed as well.

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