[Pkg-mozext-commits] [nosquint] 03/13: Fix inconsistency with return values
David Prévot
taffit at moszumanska.debian.org
Tue Apr 28 01:41:23 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to annotated tag 2.1.7
in repository nosquint.
commit bce36ac508a77501bafef7ae4ec709ebde80989d
Author: Jason Tackaberry <tack at urandom.ca>
Date: Sun Mar 31 19:47:12 2013 -0400
Fix inconsistency with return values
---
src/content/cmd.js | 27 +++++++++++++++++----------
src/content/dlg-global.js | 2 ++
src/content/dlg-site.js | 6 ++++--
3 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/src/content/cmd.js b/src/content/cmd.js
index d33ea56..16d036e 100644
--- a/src/content/cmd.js
+++ b/src/content/cmd.js
@@ -57,8 +57,10 @@ NoSquint.cmd = NoSquint.ns(function() { with (NoSquint) {
this.enlargeTextZoom = function() {
var browser = getBrowser().mCurrentBrowser;
- if (isImage(browser))
- return NSQ.cmd.enlargeFullZoom();
+ if (isImage(browser)) {
+ NSQ.cmd.enlargeFullZoom();
+ return;
+ }
var mdv = browser.markupDocumentViewer;
mdv.textZoom = Math.round(mdv.textZoom * 100.0 + NSQ.prefs.zoomIncrement) / 100.0;
NSQ.browser.saveCurrentZoom();
@@ -67,8 +69,10 @@ NoSquint.cmd = NoSquint.ns(function() { with (NoSquint) {
this.reduceTextZoom = function() {
var browser = getBrowser().mCurrentBrowser;
- if (isImage(browser))
- return NSQ.cmd.reduceFullZoom();
+ if (isImage(browser)) {
+ NSQ.cmd.reduceFullZoom();
+ return;
+ }
var mdv = browser.markupDocumentViewer;
mdv.textZoom = Math.round(mdv.textZoom * 100.0 - NSQ.prefs.zoomIncrement) / 100.0;
NSQ.browser.saveCurrentZoom();
@@ -118,10 +122,10 @@ NoSquint.cmd = NoSquint.ns(function() { with (NoSquint) {
this.statusPanelClick = function(event) {
if (event.button == 0)
// Left click, open site prefs.
- return NSQ.cmd.openSiteSettings();
+ NSQ.cmd.openSiteSettings();
else if (event.button == 1)
// Middle click, open global prefs.
- return NSQ.cmd.openGlobalSettings();
+ NSQ.cmd.openGlobalSettings();
}
this.statusPanelPrepareMenu = function(event) {
@@ -168,16 +172,19 @@ NoSquint.cmd = NoSquint.ns(function() { with (NoSquint) {
return;
var dlg = NSQ.storage.dialogs.site;
if (dlg)
- return dlg.setBrowser(NSQ.browser, browser);
- window.openDialog('chrome://nosquint/content/dlg-site.xul', 'nsqSite', 'chrome', NSQ.browser, browser);
+ dlg.setBrowser(NSQ.browser, browser);
+ else
+ window.openDialog('chrome://nosquint/content/dlg-site.xul', 'nsqSite', 'chrome', NSQ.browser, browser);
};
/* Opens global prefs dialog or focuses it if it's already open. */
this.openGlobalSettings = function(browser) {
var dlg = NSQ.storage.dialogs.global;
- if (dlg)
- return dlg.focus();
+ if (dlg) {
+ dlg.focus();
+ return;
+ }
browser = browser || gBrowser.selectedBrowser;
var host = browser.currentURI.asciiHost;
diff --git a/src/content/dlg-global.js b/src/content/dlg-global.js
index 136b859..8625305 100644
--- a/src/content/dlg-global.js
+++ b/src/content/dlg-global.js
@@ -187,6 +187,7 @@ NoSquint.dialogs.global = NoSquint.ns(function() { with (NoSquint) {
this.buttonAddException();
return false;
}
+ return true;
};
this.textPatternChange = function() {
@@ -200,6 +201,7 @@ NoSquint.dialogs.global = NoSquint.ns(function() { with (NoSquint) {
this.buttonEditException();
return false;
}
+ return true;
};
this.excListSelect = function() {
diff --git a/src/content/dlg-site.js b/src/content/dlg-site.js
index dc2cfde..c88d9d5 100644
--- a/src/content/dlg-site.js
+++ b/src/content/dlg-site.js
@@ -51,9 +51,11 @@ NoSquint.dialogs.site = NoSquint.ns(function() { with (NoSquint) {
if (this.browser != mozBrowser || this.site != site)
// Settings opened for new site, revert any changes for last site.
this.revert();
- else
+ else {
// Everything is the same.
- return window.focus();
+ window.focus();
+ return;
+ }
}
this.browser = mozBrowser;
this.site = site;
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/nosquint.git
More information about the Pkg-mozext-commits
mailing list