Skip to content

Commit

Permalink
v3.8.0
Browse files Browse the repository at this point in the history
  • Loading branch information
sidneys committed Feb 21, 2017
1 parent 3d4c33b commit 023eb34
Show file tree
Hide file tree
Showing 8 changed files with 74 additions and 61 deletions.
6 changes: 6 additions & 0 deletions app/scripts/components/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ if (electronSquirrelStartup) {
app.quit();
}

/**
* Disable GPU
* @global
*/
app.disableHardwareAcceleration();


/** @listens Electron.App#before-quit */
app.on('before-quit', () => {
Expand Down
2 changes: 1 addition & 1 deletion app/scripts/configuration/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ let configurationItems = {
/** @readonly */
keypath: 'soundVolume',
/** @default */
default: 0.25,
default: 0.5,

init(){
logger.debug('settings', this.keypath, 'init()');
Expand Down
28 changes: 14 additions & 14 deletions app/scripts/menus/tray-menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ const appRootPath = require('app-root-path').path;
* @global
* @constant
*/
// const connectivityService = require(path.join(appRootPath, 'app', 'scripts', 'services', 'connectivity-service'));
const logger = require(path.join(appRootPath, 'lib', 'logger'))({ writeToFile: true });
const packageJson = require(path.join(appRootPath, 'package.json'));
const platformHelper = require(path.join(appRootPath, 'lib', 'platform-helper'));
const settings = require(path.join(appRootPath, 'app', 'scripts', 'configuration', 'settings'));
const connectivityService = require(path.join(appRootPath, 'app', 'scripts', 'services', 'connectivity-service'));
const snoozerService = require(path.join(appRootPath, 'app', 'scripts', 'services', 'snoozer-service'));


Expand Down Expand Up @@ -233,19 +233,19 @@ class TrayMenu extends Tray {
}


/** @listens connectivityService#on */
connectivityService.on('online', () => {
//logger.debug('tray-menu', 'connectivityService:online');
if (snoozerService.isActive()) { return; }
trayMenu.setState('default');
});

/** @listens connectivityService#on */
connectivityService.on('offline', () => {
//logger.debug('tray-menu', 'connectivityService:offline');
if (snoozerService.isActive()) { return; }
trayMenu.setState('transparent');
});
// /** @listens connectivityService#on */
// connectivityService.on('online', () => {
// //logger.debug('tray-menu', 'connectivityService:online');
// if (snoozerService.isActive()) { return; }
// trayMenu.setState('default');
// });
//
// /** @listens connectivityService#on */
// connectivityService.on('offline', () => {
// //logger.debug('tray-menu', 'connectivityService:offline');
// if (snoozerService.isActive()) { return; }
// trayMenu.setState('transparent');
// });

/** @listens snoozerService#on */
snoozerService.on('snooze', (snoozing) => {
Expand Down
21 changes: 9 additions & 12 deletions app/scripts/renderer/pushbullet/push.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ let pb;
* @constant
* @default
*/
let notificationInterval = 3000;
let maxRecentNotifications = 5;
const notificationInterval = 3000;
const maxRecentNotifications = 5;
const soundVolume = parseFloat(settings.getConfigurationItem('soundVolume').get());

/**
* Notification Defaults
Expand Down Expand Up @@ -99,10 +100,8 @@ let playSoundFile = function(filePath, callback) {
return cb(null, soundFile);
});

settings.electronSettings.get('soundVolume').then(soundVolume => {
AudioElement.volume = parseFloat(soundVolume);
AudioElement.play();
});
AudioElement.volume = parseFloat(soundVolume);
AudioElement.play();
};

/**
Expand Down Expand Up @@ -246,9 +245,8 @@ class PushbulletNotification {
settings.electronSettings.get('soundEnabled')
.then(soundEnabled => {
if (soundEnabled === true) {
settings.electronSettings.get('soundFile')
.then(notificationFile => {
playSoundFile(notificationFile, function(err, file) {
settings.electronSettings.get('soundFile').then(soundFile => {
playSoundFile(soundFile, function(err, file) {
if (err) {
logger.error('playSoundFile', file, err);
}
Expand Down Expand Up @@ -368,10 +366,9 @@ let enqueuePushList = (pushesList, filterPushes, cb) => {
// Show local notification
createPushbulletNotification(push);

// Update 'lastNotification' with timestamp from most recent push
if (push.created > notifyAfter) {
// Sync Settings
settings.electronSettings.set('lastNotification', push.modified).then(() => {});
// Update 'lastNotification' with timestamp from most recent push
settings.getConfigurationItem('lastNotification').set(push.modified);
}

// Callback
Expand Down
36 changes: 18 additions & 18 deletions app/scripts/renderer/webview.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const parseDomain = require('parse-domain');
* @global
* @constant
*/
const connectivityService = require(path.join(appRootPath, 'app', 'scripts', 'services', 'connectivity-service'));
// const connectivityService = require(path.join(appRootPath, 'app', 'scripts', 'services', 'connectivity-service'));
const dom = require(path.join(appRootPath, 'app', 'scripts', 'utils', 'dom'));
const isDebug = require(path.join(appRootPath, 'lib', 'is-debug'));
const isLivereload = require(path.join(appRootPath, 'lib', 'is-livereload'));
Expand Down Expand Up @@ -72,19 +72,19 @@ let dismissSpinner = function() {
};


/** @listens connectivityService#on */
connectivityService.on('online', () => {
logger.debug('webview', 'connectivityService:online');

dismissSpinner();
});

/** @listens connectivityService#on */
connectivityService.on('offline', () => {
logger.debug('webview', 'connectivityService:offline');

presentSpinner();
});
// /** @listens connectivityService#on */
// connectivityService.on('online', () => {
// logger.debug('webview', 'connectivityService:online');
//
// dismissSpinner();
// });
//
// /** @listens connectivityService#on */
// connectivityService.on('offline', () => {
// logger.debug('webview', 'connectivityService:offline');
//
// presentSpinner();
// });


/** @listens webview:dom-ready */
Expand All @@ -111,18 +111,18 @@ webview.addEventListener('dom-ready', () => {
webview.addEventListener('did-fail-load', () => {
logger.debug('webview', 'webview:did-fail-load');

if (!connectivityService.online) {
// if (!connectivityService.online) {
presentSpinner();
}
// }
});

/** @listens webview:did-finish-load */
webview.addEventListener('did-finish-load', () => {
logger.debug('webview', 'webview:did-finish-load');

if (connectivityService.online) {
// if (connectivityService.online) {
dismissSpinner();
}
// }
});

/** @listens webview:new-window */
Expand Down
9 changes: 5 additions & 4 deletions app/scripts/windows/main-window.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,13 @@ class MainWindow extends BrowserWindow {
transparent: false,
vibrancy: 'dark',
webPreferences: {
nodeIntegration: true,
allowDisplayingInsecureContent: true,
experimentalFeatures: true,
allowRunningInsecureContent: true,
webSecurity: false,
webaudio: true
experimentalFeatures: true,
nodeIntegration: true,
webaudio: true,
webgl: false,
webSecurity: false
}
});

Expand Down
2 changes: 1 addition & 1 deletion lib/deploy-github.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ let getArtifactsList = function(directory) {
return;
}

let installerFilePathPattern = path.join(path.resolve(directoryOutput), '**', '*.{AppImage,deb,dmg,exe,json,pacman,zip}');
let installerFilePathPattern = path.join(path.resolve(directoryOutput), '**', '*.{AppImage,deb,dmg,exe,json,pacman,rpm,zip}');
let installerIgnorePatternList = [
path.join(path.resolve(directoryOutput), 'mac', '*.app', '**', '*'),
path.join(path.resolve(directoryOutput), '*-unpacked', '**', '*'),
Expand Down
31 changes: 20 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "pb-for-desktop",
"productName": "PB for Desktop",
"version": "3.6.0",
"version": "3.8.0",
"description": "PushBullet desktop application for macOS, Windows and Linux",
"license": "MIT",
"homepage": "https://sidneys.github.io/pb-for-desktop",
Expand Down Expand Up @@ -47,23 +47,23 @@
"app-root-path": "^2.0.1",
"appdirectory": "^0.1.0",
"auto-launch": "^5.0.1",
"babel-cli": "^6.22.2",
"babel-preset-electron": "^0.37.8",
"babel-cli": "^6.23.0",
"babel-preset-electron": "^1.4.15",
"chalk": "^1.1.3",
"electron-compile": "^5.1.3",
"electron-compilers": "^5.4.0",
"electron-compile": "^6.1.1",
"electron-compilers": "^5.5.1",
"electron-connect": "^0.6.1",
"electron-editor-context-menu": "^1.1.1",
"electron-settings": "^2.2.2",
"electron-squirrel-startup": "^1.0.0",
"electron-updater": "^1.2.0",
"electron-updater": "^1.7.1",
"file-type": "^4.1.0",
"file-url": "^2.0.1",
"file-url": "^2.0.2",
"fs-extra": "^2.0.0",
"is-online": "^6.0.1",
"is-online": "^6.1.0",
"keypath": "^0.0.1",
"lodash": "^4.17.4",
"parse-domain": "^1.0.0",
"parse-domain": "^1.1.0",
"read-chunk": "^2.0.0",
"semver-compare": "^1.0.0",
"semver-regex": "^1.0.0"
Expand All @@ -75,7 +75,7 @@
"fkill": "^4.1.0",
"glob": "^7.1.1",
"gulp": "^3.9.1",
"gulp-load-plugins": "^1.4.0",
"gulp-load-plugins": "^1.5.0",
"minimist": "^1.2.0",
"progress": "^1.1.8",
"publish-release": "^1.3.3"
Expand Down Expand Up @@ -128,7 +128,8 @@
"target": [
"AppImage",
"deb",
"pacman"
"pacman",
"rpm"
],
"category": "Utility"
},
Expand All @@ -155,6 +156,14 @@
"libnotify"
]
},
"rpm": {
"depends": [
"libappindicator1",
"libgconf-2-4",
"libnotify-bin",
"libnotify4"
]
},
"squirrelWindows": {
"iconUrl": "https://raw.githubusercontent.com/sidneys/pb-for-desktop/release/icons/win32/icon.ico",
"loadingGif": "./icons/win32/background-setup.gif"
Expand Down

0 comments on commit 023eb34

Please sign in to comment.