Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
Damillora | 2dba9271a9 | |
Damillora | 73608d17e1 | |
Damillora | 718bae29ab | |
Damillora | ef12775d84 |
2
dock.js
2
dock.js
|
@ -182,5 +182,5 @@ module.exports.navitemplate = function(win){
|
||||||
module.exports.setdock = function(win) {
|
module.exports.setdock = function(win) {
|
||||||
const dockMenu = Menu.buildFromTemplate(module.exports.navitemplate(win))
|
const dockMenu = Menu.buildFromTemplate(module.exports.navitemplate(win))
|
||||||
|
|
||||||
app.dock.setMenu(dockMenu);
|
if(process.platform == 'darwin' ) app.dock.setMenu(dockMenu);
|
||||||
}
|
}
|
||||||
|
|
6
main.js
6
main.js
|
@ -13,9 +13,11 @@ const options = {userAgent: 'Mozilla/5.0 (Linux; Android 7.1.1; Nexus 6 Build/N6
|
||||||
|
|
||||||
function createWindow () {
|
function createWindow () {
|
||||||
// Create the browser window.
|
// Create the browser window.
|
||||||
win = new BrowserWindow({width: 480, height: 600,icon: path.join(__dirname, 'ic_launcher.png')})
|
win = new BrowserWindow({width: 480, height: 600,icon: path.join(__dirname, 'icon.png')})
|
||||||
setdock.setdock(win)
|
setdock.setdock(win)
|
||||||
Menu.setApplicationMenu(themenu(win));
|
if(process.platform == 'darwin') { Menu.setApplicationMenu(themenu(win)); }
|
||||||
|
else { win.setMenu(themenu(win));
|
||||||
|
}
|
||||||
// and load the index.html of the app.
|
// and load the index.html of the app.
|
||||||
win.loadURL('http://pf.gree.net/58737',options);
|
win.loadURL('http://pf.gree.net/58737',options);
|
||||||
// Open the DevTools.
|
// Open the DevTools.
|
||||||
|
|
8
menu.js
8
menu.js
|
@ -50,12 +50,16 @@ module.exports = function(win){
|
||||||
label: 'Help',
|
label: 'Help',
|
||||||
role: 'help',
|
role: 'help',
|
||||||
submenu: [
|
submenu: [
|
||||||
|
{
|
||||||
|
label: "Million Live! Help",
|
||||||
|
click() { win.loadURL("http://imas.gree-apps.net/app/index.php/help",options)}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
label: "Project Homepage",
|
label: "Project Homepage",
|
||||||
click(){shell.openExternal("https://github.com/Damillora/MillionHopes")}
|
click(){shell.openExternal("https://github.com/Damillora/MillionHopes")}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: 'About SoundCleod',
|
label: 'About Million Hopes',
|
||||||
click() {
|
click() {
|
||||||
prefman.showAbout();
|
prefman.showAbout();
|
||||||
},
|
},
|
||||||
|
@ -109,6 +113,8 @@ module.exports = function(win){
|
||||||
label: "File",
|
label: "File",
|
||||||
submenu: [
|
submenu: [
|
||||||
{label: 'Preferences',click(){prefman.showPreferences()}},
|
{label: 'Preferences',click(){prefman.showPreferences()}},
|
||||||
|
{type: 'separator'},
|
||||||
|
{label: 'Exit', click(){ app.quit() }},
|
||||||
],
|
],
|
||||||
visible: process.platform !== 'darwin'
|
visible: process.platform !== 'darwin'
|
||||||
})
|
})
|
||||||
|
|
|
@ -10,6 +10,7 @@ require('electron-debug')();
|
||||||
function showPreferences_int(){
|
function showPreferences_int(){
|
||||||
if(!preferencesWindow){
|
if(!preferencesWindow){
|
||||||
preferencesWindow = new BrowserWindow({width: 800, height: 600})
|
preferencesWindow = new BrowserWindow({width: 800, height: 600})
|
||||||
|
if (process.platform !== 'darwin') preferencesWindow.setMenu(null);
|
||||||
preferencesWindow.loadURL(url.format({
|
preferencesWindow.loadURL(url.format({
|
||||||
pathname: path.join(__dirname, 'preferences.html'),
|
pathname: path.join(__dirname, 'preferences.html'),
|
||||||
protocol: 'file:',
|
protocol: 'file:',
|
||||||
|
|
Reference in New Issue