Permalink
Browse files

Merge pull request #75 from xabolcs/branch-issue-61-pushlog-after

Add pushlog-to-tip menuitem (#75)
  • Loading branch information...
2 parents 7cadadd + c5a0789 commit 1db64d29c371931760b7a2c022ab26906a8204b1 @whimboo whimboo committed Jun 14, 2012
@@ -78,7 +78,8 @@
oncommand="nightly.pastebinAboutSupport();"/>
<menuseparator/>
<menuitem label="&nightly.openprofile.label;" oncommand="nightly.openProfileDir();"/>
- <menuitem id="nightly-pushlog" label="&nightly.pushlog.label;" oncommand="nightly.openPushlog();"/>
+ <menuitem id="nightly-pushlog-lasttocurrent" label="&nightly.pushlog.lasttocurrent.label;" oncommand="nightly.openPushlogToCurrentBuild();"/>
+ <menuitem id="nightly-pushlog-currenttotip" label="&nightly.pushlog.currenttotip.label;" oncommand="nightly.openPushlogSinceCurrentBuild();"/>
<menuseparator/>
<menuitem label="&nightly.screenshot.full.label;" oncommand="nightly.getScreenshot();"/>
<menuitem label="&nightly.customize.label;" oncommand="nightly.openCustomize();"/>
@@ -118,7 +119,8 @@
oncommand="nightly.pastebinAboutSupport();"/>
<menuseparator/>
<menuitem label="&nightly.openprofile.label;" oncommand="nightly.openProfileDir();"/>
- <menuitem id="nightly-pushlog" label="&nightly.pushlog.label;" oncommand="nightly.openPushlog();"/>
+ <menuitem id="nightly-pushlog-lasttocurrent" label="&nightly.pushlog.lasttocurrent.label;" oncommand="nightly.openPushlogToCurrentBuild();"/>
+ <menuitem id="nightly-pushlog-currenttotip" label="&nightly.pushlog.currenttotip.label;" oncommand="nightly.openPushlogSinceCurrentBuild();"/>
<menuseparator/>
<menuitem label="&nightly.screenshot.full.label;" oncommand="nightly.getScreenshot();"/>
<menuitem label="&nightly.customize.label;" oncommand="nightly.openCustomize();"/>
@@ -66,7 +66,8 @@
<menuitem id="nightly-list-copy" label="&nightly.extensions.copy.label;" oncommand="nightly.copyExtensions();"/>
<menuitem id="nightly-list-insert" label="&nightly.extensions.insert.label;" oncommand="nightly.insertExtensions();"/>
<menuitem label="&nightly.openprofile.label;" oncommand="nightly.openProfileDir();"/>
- <menuitem id="nightly-pushlog" label="&nightly.pushlog.label;" oncommand="nightly.openPushlog();"/>
+ <menuitem id="nightly-pushlog-lasttocurrent" label="&nightly.pushlog.lasttocurrent.label;" oncommand="nightly.openPushlogToCurrentBuild();"/>
+ <menuitem id="nightly-pushlog-currenttotip" label="&nightly.pushlog.currenttotip.label;" oncommand="nightly.openPushlogSinceCurrentBuild();"/>
<menuseparator/>
<menuitem label="&nightly.screenshot.full.label;" oncommand="nightly.getScreenshot();"/>
<menuitem label="&nightly.customize.label;" oncommand="nightly.openCustomize();"/>
@@ -289,7 +289,7 @@ menuPopup: function(event, menupopup) {
node.hidden = !attext;
if (node.id.indexOf("-copy") != -1)
node.hidden = attext;
- if (node.id == 'nightly-pushlog') {
+ if (node.id == 'nightly-pushlog-lasttocurrent') {
node.hidden = !nightly.isTrunk();
node.disabled = !nightly.preferences.getCharPref("prevChangeset");
}
@@ -484,11 +484,24 @@ getChangeset: function() {
return nightly.getAppIniString("App", "SourceStamp");
},
-openPushlog: function() {
+openPushlog: function(fromChange, toChange) {
+ if (fromChange) {
+ var pushlogUrl = nightly.getRepo() + "/pushloghtml?fromchange=" + fromChange;
+ if (toChange)
+ pushlogUrl += "&tochange=" + toChange;
+ nightlyApp.openURL(pushlogUrl);
+ }
+},
+
+openPushlogToCurrentBuild: function() {
var prevChangeset = nightly.preferences.getCharPref("prevChangeset");
- var pushlogUrl = nightly.getRepo() + "/pushloghtml?fromchange=" + prevChangeset
- + "&tochange=" + nightly.getChangeset();
- nightlyApp.openURL(pushlogUrl);
+ var currChangeset = nightly.getChangeset();
+ nightly.openPushlog(prevChangeset, currChangeset);
+},
+
+openPushlogSinceCurrentBuild: function() {
+ var currChangeset = nightly.getChangeset();
+ nightly.openPushlog(currChangeset);
},
toggleCompatibility: function() {
@@ -65,7 +65,8 @@
oncommand="nightly.pastebinAboutSupport();"/>
<menuseparator/>
<menuitem label="&nightly.openprofile.label;" oncommand="nightly.openProfileDir();"/>
- <menuitem id="nightly-pushlog" label="&nightly.pushlog.label;" oncommand="nightly.openPushlog();"/>
+ <menuitem id="nightly-pushlog-lasttocurrent" label="&nightly.pushlog.lasttocurrent.label;" oncommand="nightly.openPushlogToCurrentBuild();"/>
+ <menuitem id="nightly-pushlog-currenttotip" label="&nightly.pushlog.currenttotip.label;" oncommand="nightly.openPushlogSinceCurrentBuild();"/>
<menuseparator/>
<menuitem label="&nightly.screenshot.full.label;" oncommand="nightly.getScreenshot();"/>
<menuseparator/>
@@ -9,7 +9,8 @@
<!ENTITY nightly.extensions.aboutsup.label "Copy about:support to Pastebin">
-<!ENTITY nightly.pushlog.label "Open Pushlog">
+<!ENTITY nightly.pushlog.lasttocurrent.label "Open Pushlog between last and current build">
+<!ENTITY nightly.pushlog.currenttotip.label "Open Pushlog after current build">
<!ENTITY nightly.customize.label "Customize Titlebar">

0 comments on commit 1db64d2

Please sign in to comment.