diff options
| -rw-r--r-- | github.js | 12 | ||||
| -rw-r--r-- | gui.js | 10 |
2 files changed, 20 insertions, 2 deletions
@@ -222,7 +222,8 @@ GitHubBackend.prototype.getProjectList = function (callBack, errorCall) { var user = myself.gh.getUser(); if (user === null) { - errorCall.call(myself, localize('Please login'), 'GitHub'); + myself.message('You are not logged in'); + return; } user.getRepos().then( @@ -270,10 +271,17 @@ GitHubBackend.prototype.getProjectList = function (callBack, errorCall) { } ); } else { - errorCall.call(myself, localize('Please login'), 'GitHub'); + myself.message('You are not logged in'); + return; } }; GitHubBackend.prototype.logout = function (callBack) { this.clear(); }; + +// GitHub: user messages (to be overridden) + +GitHubBackend.prototype.message = function (string) { + alert(string); +}; @@ -268,6 +268,16 @@ IDE_Morph.prototype.openIn = function (world) { }, 2000); }; + GitHub.message = function (string) { + var m = new MenuMorph(null, string), + intervalHandle; + m.popUpCenteredInWorld(world); + intervalHandle = setInterval(function () { + m.destroy(); + clearInterval(intervalHandle); + }, 2000); + }; + // prevent non-DialogBoxMorphs from being dropped // onto the World in user-mode world.reactToDropOf = function (morph) { |
