Skip to content

Commit

Permalink
Add icons
Browse files Browse the repository at this point in the history
  • Loading branch information
edanchenkov committed Jan 22, 2017
1 parent 060783c commit d64a1c1
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 21 deletions.
4 changes: 3 additions & 1 deletion config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ function AppConfig() {
windowPosition : 'trayCenter',
externalLinks : false,
userAgent : 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_1 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13B143 Safari/601.1',
globalShortcuts : true
globalShortcuts : true,
icon : 'icons/icon-20x20.png',
iconPressed : 'icons/icon-inverse-20x20.png'
};

if (typeof config.store === 'object') {
Expand Down
Binary file added icons/icon-20x20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added icons/icon-inverse-20x20.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 9 additions & 1 deletion main.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ mb.on('ready', function ready() {

for (var i = 0; i < accelerators.length; i++) {
var a = accelerators[i];
if(!globalShortcut.isRegistered(a)) {
if (!globalShortcut.isRegistered(a)) {
globalShortcut.register(a, shortcutsHandler.bind(globalShortcut, a));
}
}
Expand Down Expand Up @@ -66,3 +66,11 @@ mb.on('ready', function ready() {
mb.on('after-create-window', function () {
mb.window.setResizable(false);
});

mb.on('after-show', function () {
mb.tray.setImage(AppConfig.store.iconPressed);
});

mb.on('after-hide', function () {
mb.tray.setImage(AppConfig.store.icon);
});
38 changes: 19 additions & 19 deletions views/preferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -78,25 +78,25 @@ <h1 class="title is-1">
</label>
</p>
</div>
<div class="container">
<div class="heading">
<p class="title is-3">Open external links in browser</p>
<p class="subtitle is-6">All external links (except
google authentecation service) should be
open in your local browser, instead of MenuTube</p>
</div>
<p class="control">
<label class="radio">
<input value="yes" type="radio" name="externalLinks"
checked>
Yes
</label>
<label class="radio">
<input value="no" type="radio" name="externalLinks">
No
</label>
</p>
</div>
<!--<div class="container">-->
<!--<div class="heading">-->
<!--<p class="title is-3">Open external links in browser</p>-->
<!--<p class="subtitle is-6">All external links (except-->
<!--google authentecation service) should be-->
<!--open in your local browser, instead of MenuTube</p>-->
<!--</div>-->
<!--<p class="control">-->
<!--<label class="radio">-->
<!--<input value="yes" type="radio" name="externalLinks"-->
<!--checked>-->
<!--Yes-->
<!--</label>-->
<!--<label class="radio">-->
<!--<input value="no" type="radio" name="externalLinks">-->
<!--No-->
<!--</label>-->
<!--</p>-->
<!--</div>-->
<div class="container">
<div class="heading">
<p class="title is-3">Use media key on keyboard to stop
Expand Down

0 comments on commit d64a1c1

Please sign in to comment.