simple, blue, black三种配色

This commit is contained in:
life
2015-03-04 01:20:54 +08:00
parent 55b650a086
commit 94f39da8b9
11 changed files with 378 additions and 31 deletions

View File

@@ -90,8 +90,8 @@ win.on('blur', function() {
console.log('not focuse ');
});
function isURL(str_url){
var re = new RegExp("^((https|http|ftp|rtsp|mms)://).+");
function isURL(str_url) {
var re = new RegExp("^((https|http|ftp|rtsp|mms|emailto)://).+");
return re.test(str_url);
}
@@ -132,12 +132,15 @@ function Menu() {
this.menu.append(this.paste);
this.menu.append(new gui.MenuItem({ type: 'separator' }));
this.menu.append(this.openInBrowser);
// You can have submenu!
/*
var submenu = new gui.Menu();
submenu.append(new gui.MenuItem({ label: 'checkbox 啊' , type: 'checkbox'}));
submenu.append(new gui.MenuItem({ label: 'Item 2', type: 'checkbox'}));
submenu.append(new gui.MenuItem({ label: 'Item 3'}));
this.openInBrowser.submenu = submenu;
*/
}
Menu.prototype.canCopy = function(bool) {
this.cut.enabled = bool;