GithubHelp home page GithubHelp logo

Comments (13)

brrd avatar brrd commented on May 21, 2024

I need more informations about this behaviour.
Did you close all the windows before opening a new document or just some of them?
Is the app still running after you close all the windows?
If it is, can you see its menu bar?

from abricotine.

terry182 avatar terry182 commented on May 21, 2024

I closed all the windows. The app is still runing when the error occurs and the menu bars still there.

The error also occurs when opening existing files.

from abricotine.

brrd avatar brrd commented on May 21, 2024

OK, so this is related to OS X behaviour.
Abricotine is supposed to exit when you close its last window, but on OS X applications remain open until you exit, even if all windows are closed. I guess that we need to rethink the way Abricotine manages its menu.
Thanks for reporting.

from abricotine.

brrd avatar brrd commented on May 21, 2024

I guess 088df47 should fix this issue but I need someone to test it on OSX please. You will have to build Abricotine from the osx-menu branch.

Expected behaviour: when all windows are closed, the menubar should be updated in order to provide fewer menu items. Please make sure that all menu items are working well when clicked from here.
When a new window is opened, the menu bar should provide all items again.

from abricotine.

nloveladyallen avatar nloveladyallen commented on May 21, 2024

When the last window is closed, the menus change as you have said should happen. When attempting to open a new window, the same error occurs, with slightly different line numbers (presumably due to incidental changes to the relevant files).

I will also note that menus on OS X do not usually change depending on whether there is a window open. If a menu is no longer relevant, all its options will become greyed out, but it still appears in the menu bar.

from abricotine.

brrd avatar brrd commented on May 21, 2024

@nloveladyallen Thank you. So I'll keep working on it.

from abricotine.

brrd avatar brrd commented on May 21, 2024

This should be fixed with a642a9e

If a menu is no longer relevant, all its options will become greyed out, but it still appears in the menu bar.

So we moved to this behaviour in d5d020c

Could someone give me feedback please? You can try it by building the app from osx-menu branch. Thanks.

from abricotine.

nloveladyallen avatar nloveladyallen commented on May 21, 2024

The menus no longer change, and regular items are greyed out. Submenus still show up with their options greyed out, while typically apps grey out the submenu entirely (hovering does nothing).

There is now a different error when opening a new window after closing the last one:

Uncaught Exception:
TypeError: abrApp.open is not a function
at Object.commands.new (/Users/noah/src/Abricotine/dist/Abricotine-darwin-x64/Abricotine.app/Contents/Resources/app.asar/app/commands-main.js:15:16)
at AbrApplication.execCommand (/Users/noah/src/Abricotine/dist/Abricotine-darwin-x64/Abricotine.app/Contents/Resources/app.asar/app/abr-application.js:126:30)
at /Users/noah/src/Abricotine/dist/Abricotine-darwin-x64/Abricotine.app/Contents/Resources/app.asar/app/abr-menu.js:33:42
at MenuItem.click (/Users/noah/src/Abricotine/dist/Abricotine-darwin-x64/Abricotine.app/Contents/Resources/atom.asar/browser/api/lib/menu-item.js:56:20)
at Function.delegate.executeCommand (/Users/noah/src/Abricotine/dist/Abricotine-darwin-x64/Abricotine.app/Contents/Resources/atom.asar/browser/api/lib/menu.js:125:71)

from abricotine.

brrd avatar brrd commented on May 21, 2024

OK, thank you.

from abricotine.

brrd avatar brrd commented on May 21, 2024

Could you try it again please?

typically apps grey out the submenu entirely (hovering does nothing)

I don't know how to do this with electron (I'm not even sure it's possible) so in this last revision menus are simply removed when all their items are disabled.

Thanks.

from abricotine.

nloveladyallen avatar nloveladyallen commented on May 21, 2024

Closing the last window and creating a new document or opening a document now works correctly.

I feel it is more disorienting to have the menus disappear than have the submenus still show as active, and that the way it worked as of d5d020c is best. It may not be possible to disable a submenu with Electron; Atom leaves submenus active as well.

from abricotine.

brrd avatar brrd commented on May 21, 2024

@nloveladyallen thanks

I feel it is more disorienting to have the menus disappear than have the submenus still show as active, and that the way it worked as of d5d020c is best.

OK, I will revert e6e97dd

from abricotine.

brrd avatar brrd commented on May 21, 2024

Done and merged osx-menu into develop.

from abricotine.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.