Skip to content

Conversation

@tpikonen
Copy link
Contributor

A remix of / alternative to #1293. Add action definitions for context menu items and create context menus (just for channels, for now) from menus.ui.

@tpikonen tpikonen added the wip label Jun 17, 2022
@tpikonen tpikonen marked this pull request as draft June 17, 2022 08:58
@elelay
Copy link
Member

elelay commented Aug 14, 2022

From a quick glance I don't see any drawback to this. Are there any?

@auouymous
Copy link
Member

@elelay Did you look at the channel context menu? The icons are indented, and their text doesn't align with items that lack icons.

@elelay
Copy link
Member

elelay commented Aug 15, 2022

@elelay Did you look at the channel context menu? The icons are indented, and their text doesn't align with items that lack icons.

Indeed. On the other hand icons are not visible for me with the master branch.

@auouymous
Copy link
Member

Oh right, gtk3 defaults to gtk-menu-images = 0, setting it to 1 in gtk-3.0 settings.ini enables them. And gtk-button-images = 1 enables button icons.

@tpikonen
Copy link
Contributor Author

tpikonen commented Mar 2, 2023

Two releases have now been made after this PR and #1293 were proposed. Merging the context menu changes to the GMenuModel based menus used in the adaptive branch is starting to feel like useless busywork.

Could we move the master branch to GMenuModels, either by merging this or #1293? I can bring this PR up to date and finish the implementation if there's a consensus on merging this.

For reference, here are screenshots of how the channel context menu before and after:

Before:

context-menu-orig

After:

context-menu-new

@elelay
Copy link
Member

elelay commented Mar 2, 2023

ok from me but I defer to @auouymous decision

@auouymous
Copy link
Member

I don't like the indented icons. Can this use the verb-icons like popovers? We could remove the indented icons and add verb-icons at the top for the most common actions.

The popovers lack any of the flaws that normal context menus have but @elelay didn't like them (#1293 (comment)) so they are out.

@tpikonen
Copy link
Contributor Author

tpikonen commented Mar 4, 2023

Ok, I dove into GTK docs and sources and here's what I found:

  • The verb-icon attributes are used only in GtkPopovers. GtkMenus ignore it, so they cannot have horizontal button rows.
  • The non-indented icons are a feature of the deprecated GtkImageMenuItem, which is what gPodder currently uses. The GMenuModel based menus are composed of GtkModelMenuItems which can have both a check box (determined from the action type) and an icon (from the icon attribute), so this way all the icons will be aligned.

So, with GMenuModels the context menu will either be a GtkMenu with indented icons, or a GtkPopover with icons only in the horizontal button rows. I'm fine with either, but would also prefer the popovers.

@elelay
Copy link
Member

elelay commented Mar 5, 2023

Thanks for looking into it.

@auouymous @tpikonen you are both convinced that popover is better so I change my position: let's go for popovers.

@luzpaz
Copy link
Contributor

luzpaz commented Jul 21, 2023

Is there an ETA on this ?

@auouymous
Copy link
Member

@luzpaz #1293 will be merged once the injected extensions are fixed and a couple other minor fixes.

@tpikonen tpikonen closed this Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants