[beast/ebeast] EBEAST: show About dialog on Help » About...
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast/ebeast] EBEAST: show About dialog on Help » About...
- Date: Tue, 7 Mar 2017 22:48:27 +0000 (UTC)
commit 59e20203fcc577314f38cc0e84bae67df898733f
Author: Tim Janik <timj gnu org>
Date: Tue Mar 7 02:08:50 2017 +0100
EBEAST: show About dialog on Help » About...
Signed-off-by: Tim Janik <timj gnu org>
ebeast/index.html | 2 +-
ebeast/menus.js | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ebeast/index.html b/ebeast/index.html
index be07eef..dca68d9 100644
--- a/ebeast/index.html
+++ b/ebeast/index.html
@@ -16,7 +16,7 @@
const Menus = require ('./menus.js');
0 + Menus; // FIXME 'unused' warnings
const App = {
- show_about: true,
+ show_about: false,
__proto__ : Electron.app
};
Object.preventExtensions (App);
diff --git a/ebeast/menus.js b/ebeast/menus.js
index 0237f0f..b78d491 100644
--- a/ebeast/menus.js
+++ b/ebeast/menus.js
@@ -9,9 +9,13 @@ const view_menu = [
{ label: 'Toggle Fullscreen', role: 'toggle-fulscreen', accelerator: 'F11', },
{ label: 'Toggle Developer Tools', role: 'toggle-devtools', accelerator: 'Shift+Ctrl+I', },
];
+const help_menu = [
+ { label: '&About...', role: 'about-dialog', },
+];
const menubar_menus = [
{ label: '&File', submenu: file_menu, accelerator: 'Alt+F' },
{ label: '&View', submenu: view_menu, accelerator: 'Alt+W' },
+ { label: '&Help', submenu: help_menu, accelerator: 'Alt+H' },
];
// add 'click' handlers to menu templates
@@ -52,5 +56,9 @@ function app_command (role, _data) {
console.log ('open-file: ' + result);
});
break;
+ case 'about-dialog':
+ App.show_about = !App.show_about;
+ Mithril.redraw();
+ break;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]