[beast: 26/70] EBEAST: display an 'about:' window containing version information
- From: Tim Janik <timj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [beast: 26/70] EBEAST: display an 'about:' window containing version information
- Date: Tue, 28 Mar 2017 23:23:53 +0000 (UTC)
commit cef44af2905318b6f58cca2197215b8b88486079
Author: Tim Janik <timj gnu org>
Date: Tue Feb 21 22:44:38 2017 +0100
EBEAST: display an 'about:' window containing version information
Signed-off-by: Tim Janik <timj gnu org>
ebeast/ebeast.html | 43 +++++++++++++++++++++++++++++++++++++++++++
ebeast/main.js | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 79 insertions(+), 0 deletions(-)
---
diff --git a/ebeast/ebeast.html b/ebeast/ebeast.html
new file mode 100644
index 0000000..ef9fb8f
--- /dev/null
+++ b/ebeast/ebeast.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html> <!-- GNU LGPL v2.1+: http://www.gnu.org/licenses/lgpl.html -->
+<html>
+<head>
+ <title>Untitled.bse (0 tracks, inactive) – BEAST</title>
+ <script>
+ "use strict";
+ const app = require ('electron').remote.app;
+ const Bse = require ('./v8bse/v8bse.node');
+ </script>
+ <style>
+ html { color: #fff; }
+ </style>
+</head>
+<body>
+
+ <div style="margin: 1em auto; display: table">
+ <h1 style="float:right; margin-top: 0">BEAST/BSE</h1>
+ <style>
+ table.version-table th { text-align: right; padding-right: .5em; }
+ table.version-table td { font-family: monospace; }
+ </style>
+ <script> const os = require ('os'); </script>
+ <table class="version-table">
+ <tr> <th> Application: </th> <td><script> document.write (app.getName() + ' ' + app.getVersion());
</script></td> </tr>
+ <tr> <th> OS: </th> <td><script> document.write (process.platform + ' ' + process.arch + ' ('
+ os.release() + ')'); </script></td> </tr>
+ <tr> <th> Electron: </th> <td><script> document.write (process.versions.electron); </script></td>
</tr>
+ <tr> <th> Chrome: </th> <td><script> document.write (process.versions.chrome); </script></td>
</tr>
+ <tr> <th> V8: </th> <td><script> document.write (process.versions.v8); </script></td> </tr>
+ <tr> <th> Node.js: </th> <td><script> document.write (process.versions.node); </script></td> </tr>
+ <tr> <th> Bse: </th> <td><script> document.write (Bse.server.get_version()); </script></td>
</tr>
+ <tr> <th> Vorbis: </th> <td><script> document.write (Bse.server.get_vorbis_version());
</script></td> </tr>
+ <tr> <th> Libuv: </th> <td><script> document.write (process.versions.uv); </script></td> </tr>
+ <tr> <th> Executable: </th> <td><script> document.write (app.getPath ('exe')); </script></td> </tr>
+ <tr> <th> Working Dir: </th> <td><script> document.write (app.getAppPath()); </script></td> </tr>
+ <tr> <th> Desktop Dir: </th> <td><script> document.write (app.getPath ('desktop')); </script></td>
</tr>
+ <tr> <th> Config Path: </th> <td><script> document.write (app.getPath ('userData')); </script></td>
</tr>
+ <tr> <th> Music Path: </th> <td><script> document.write (app.getPath ('music')); </script></td> </tr>
+ </table>
+ </div>
+
+</body>
+</html>
+
diff --git a/ebeast/main.js b/ebeast/main.js
new file mode 100644
index 0000000..7bced11
--- /dev/null
+++ b/ebeast/main.js
@@ -0,0 +1,36 @@
+// Licensed GNU LGPL v2.1 or later: http://www.gnu.org/licenses/lgpl.html
+const {app, BrowserWindow, ipcMain} = require ('electron');
+
+// create the main ebeast window
+var win;
+function create_window ()
+{
+ options = {
+ width: 1820, height: 1024, // calling win.maximize() flickers, using a big size not
+ webPreferences: {
+ defaultEncoding: 'UTF-8',
+ defaultFontSize: 15,
+ defaultMonospaceFontSize: 14,
+ defaultFontFamily: {
+ standard: 'Candara', // 'Times New Roman',
+ serif: 'Constantia', // 'Times New Roman',
+ sansSerif: 'Candara', // 'Arial',
+ monospace: 'Courier', // 'Courier New',
+ cursive: 'Script', // 'Script',
+ fantasy: 'Impact', // 'Impact',
+ },
+ },
+ show: false, // avoid incremental load effect, see 'ready-to-show'
+ darkTheme: true,
+ backgroundColor: '#333333',
+ };
+ win = new BrowserWindow (options);
+ win.once ('ready-to-show', () => { win.show(); });
+ win.loadURL ('file:///' + __dirname + '/ebeast.html');
+ // win.webContents.openDevTools();
+ win.on ('closed', () => { win = null });
+}
+app.on ('ready', create_window); // create window once everything is loaded
+
+// quit when all windows are closed.
+app.on ('window-all-closed', app.quit);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]