Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-26 Thread David Kopp
I’ve been thinking about this some more, and I really didn’t like the idea of adding a new method to the Application class for each application menu thing we wanted to support. I think it is much better to add a new, final ApplicationMenu class to javafx.application. I have also added what I th

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-24 Thread Thiago Milczarek Sayão
Hi, I'm not really sure about this feature, but integration with linux desktops should be done with XDG Desktop Portals https://flatpak.github.io/xdg-desktop-portal/docs/ Em qua., 23 de out. de 2024 às 14:23, David Kopp escreveu: > That is a good question. I need to look into what Ubuntu doe

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-23 Thread David Kopp
Ok, thanks. Have a blessed day. > On Oct 23, 2024, at 12:54 PM, Michael Strauß wrote: > > Don’t worry about the JBS ticket for now. You can create a branch on your own > JFX fork and give it whatever name you want. If this proceeds, you’ll later > create a PR from your personal branch to the

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-23 Thread Michael Strauß
I think we don't need separate ConditionalFeatures, because an application that supports one type of app menu item will support all of them. Maybe something like ConditionalFeature.APPLICATION_MENU will suffice. In addition to that, I've looked at several other applications, and most of them have

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-23 Thread Michael Strauß
Don’t worry about the JBS ticket for now. You can create a branch on your own JFX fork and give it whatever name you want. If this proceeds, you’ll later create a PR from your personal branch to the JFX master branch, and we can get the JBS ticket sorted out then. David Kopp schrieb am Mi. 23. O

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-23 Thread David Kopp
That is a good question. I need to look into what Ubuntu does in that regard. I only really looked at the SDK code for the MacApplication. I think it would be helpful for someone to create a bug tracker issue so we could create a branch to start working on various approaches. > On Oct 23, 2024

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-23 Thread David Kopp
Michael, would you be willing to create an issue in the JavaFX issue tracker so I could start working on this? Have a blessed day, David Kopp > On Oct 14, 2024, at 7:29 PM, David Kopp wrote: > > I have looked into the Desktop API implementation in the JDK. They have their > own code to man

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-14 Thread David Kopp
I have looked into the Desktop API implementation in the JDK. They have their own code to manipulate the Application menu, so I don’t think it will be possible to get the About and Settings menu items to show up via the Desktop API. I tried the code you had posted in your last email, but the men

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-14 Thread David Kopp
My personal preference would be to make the existing java.awt.Desktop class work correctly with JavaFX. I know the MacOS build of JavaFX requires the java.desktop module anyway. APP_ABOUT and APP_PREFERENCES are only supported on MacOS. They were added to provide a public API to replace the old

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-14 Thread David Kopp
Thank you for your feedback. I did look at ConditionalFeature, but I thought they were more Platform as a whole related. However, I have no problem with your suggestion. My first take here was basically wholesale theft of the java.awt.Desktop API. > On Oct 12, 2024, at 6:10 PM, Michael Strauß

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-12 Thread Michael Hall
> On Oct 12, 2024, at 9:35 AM, David Kopp wrote: > > Hello everyone, > > I develop cross platform JavaFX applications. On MacOS one of the annoying > things about JavaFX is that it does not provide a way to add About > <> and Settings… to the application menu bar like the > java.awt.Desktop

Re: API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-12 Thread Michael Strauß
Hi David, this sounds like a good enhancement. As far as the API is concerned, here are some quick comments: 1. We already have the ConditionalFeature enum, there's probably no need to invent another one. 2. AboutHandler and PreferencesHandler can be Runnable instead, there's nothing special abo

API addition proposal -- Add Action enum and methods to javafx.application.Application

2024-10-12 Thread David Kopp
Hello everyone, I develop cross platform JavaFX applications. On MacOS one of the annoying things about JavaFX is that it does not provide a way to add About <> and Settings… to the application menu bar like the java.awt.Desktop class does in Swing. My proposal is to add similar functionality