Comments (13)
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.
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.
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.
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.
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.
@nloveladyallen Thank you. So I'll keep working on it.
from abricotine.
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.
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.
OK, thank you.
from abricotine.
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.
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.
@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.
Done and merged osx-menu into develop.
from abricotine.
Related Issues (20)
- Editing default theme to change font does not seem to work HOT 3
- Add support for GitLab fold tags "<summary>" HOT 1
- Upgrade Electron version HOT 1
- Codeblock and LaTeX Highlighting conflict
- "Open links on click" feature is broken HOT 7
- Update Docs for OpenSUSE 15 HOT 2
- Cannot open file from file manager (.desktop file issue)
- word intelligence boxed by default HOT 1
- Cannot change theme font HOT 2
- Images: import relative path? From clipboard? HOT 1
- fails to select Abricotine for opening file HOT 4
- Feature requests: import links of many images
- Chinese input problem
- Code syntax highlighting missing HOT 1
- Android build? Ubuntu Touch? :-) HOT 1
- heading and code autopreview HOT 1
- Process keeps running when closed (Windows 11, v. 1.1.4) HOT 5
- Browser preview HOT 7
- error: cannot satisfy dependency gir1.2-webkit-3.0
- feature: resize image in markdown HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from abricotine.