Add pushlog-to-tip menuitem. Fixes #61. #75

Merged
merged 1 commit into from Jun 14, 2012

2 participants

@xabolcs

It's not hidden for non-nightly channels, beware the long pushlog!
See related Issue #51 for details!

Hi!
This is a quick and easy fix!
Feel free to review!
Should I hide this menuitem as Pushlog is hidden?

@xabolcs xabolcs Issue #61 - add pushlog-to-tip menuitem.
It's not hidden for non-nightly channels, beware the long pushlog!
See related Issue #51 for details!
c5a0789
@whimboo whimboo and 1 other commented on an outdated diff Jun 3, 2012
extension/chrome/content/browserOverlay.xul
@@ -79,6 +79,7 @@
<menuseparator/>
<menuitem label="&nightly.openprofile.label;" oncommand="nightly.openProfileDir();"/>
<menuitem id="nightly-pushlog" label="&nightly.pushlog.label;" oncommand="nightly.openPushlog();"/>
+ <menuitem id="nightly-pushlog-since" label="&nightly.pushlog.since.label;" oncommand="nightly.openPushlogSinceCurrent();"/>
@whimboo
whimboo added a note Jun 3, 2012

Mind naming it 'openPushlogSinceCurrentBuild'?

@xabolcs
xabolcs added a note Jun 4, 2012

Mind naming it 'openPushlogSinceCurrentBuild'?

Renamed. Others too:

  • menuitem ids
  • entities

Refactored original nightly.openPushlog.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@whimboo whimboo commented on an outdated diff Jun 3, 2012
extension/chrome/locale/en-US/nightly.dtd
@@ -9,7 +9,8 @@
<!ENTITY nightly.extensions.aboutsup.label "Copy about:support to Pastebin">
-<!ENTITY nightly.pushlog.label "Open Pushlog">
+<!ENTITY nightly.pushlog.label "Open Pushlog">
+<!ENTITY nightly.pushlog.since.label "Open Pushlog since current build">
@whimboo
whimboo added a note Jun 3, 2012

While we change those two lines, can we modify the first entry so it says pushlog between last and current build? Otherwise people will wonder what the other item is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@xabolcs

Updated commit.
In short: mostly renames - to refer there are now "two pushlog". :)

@whimboo

@xabolcs, just for the future. When you update commits please do not rebase immediately. We will do that at the end before landing, but doing it in-between makes it hard for me to spot the additional changes you have made. Thanks.

@whimboo whimboo commented on the diff Jun 12, 2012
extension/chrome/content/nightly.js
@@ -484,11 +484,24 @@ getChangeset: function() {
return nightly.getAppIniString("App", "SourceStamp");
},
-openPushlog: function() {
+openPushlog: function(fromChange, toChange) {
@whimboo
whimboo added a note Jun 12, 2012

just a nit: if a function doesn't have a name please use a blank before the opening bracket. Otherwise someone could think that 'function' is a valid function name. In this case it would be: function (...)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@whimboo whimboo commented on the diff Jun 12, 2012
extension/chrome/content/nightly.js
@@ -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);
@whimboo
whimboo added a note Jun 12, 2012

Sweet change. Good to see that we can have a single method for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@whimboo whimboo commented on the diff Jun 12, 2012
extension/chrome/content/nightly.js
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);
@whimboo
whimboo added a note Jun 12, 2012

I would remove the extra currChangeset variable and pass in the current changeset directly. Have you thought to make that method a property instead? Would be nice to get access to it via nightly.changeset.

@xabolcs
xabolcs added a note Jun 13, 2012

whimboo commented

... Have you thought to make that method a property instead? Would be nice to get access to it via nightly.changeset`.

Issue #70 could contain that change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@whimboo whimboo merged commit 1db64d2 into mozilla:master Jun 14, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment