aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2010-10-08 13:07:08 +0200
committerMatěj Cepl <mcepl@redhat.com>2010-10-08 13:07:08 +0200
commit5be47e95d1cef282046cdf8d159cd69f986245c8 (patch)
treea70db8d4566d3507c1e09e35fc64cb74664e5970 /lib
parent825d2333294b76b5964a2e52e5ffcf34a1ace3eb (diff)
downloadbugzilla-triage-5be47e95d1cef282046cdf8d159cd69f986245c8.tar.gz
Remove notification method in utils.js, provided by the Jetpack module.
Diffstat (limited to 'lib')
-rw-r--r--lib/main.js1
-rw-r--r--lib/prompts.js35
2 files changed, 0 insertions, 36 deletions
diff --git a/lib/main.js b/lib/main.js
index 9eb62f0..ea01925 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -11,7 +11,6 @@
// http://ehsanakhgari.org/blog/2010-05-31/my-experience-jetpack-sdk#comment-1253
//
"use strict";
-var prompts = require("prompts");
var logger = require("logger");
var browser = require("tab-browser");
var selfMod = require("self");
diff --git a/lib/prompts.js b/lib/prompts.js
index 45f388a..d4a5293 100644
--- a/lib/prompts.js
+++ b/lib/prompts.js
@@ -111,38 +111,3 @@ exports.promptFileOpenPicker = function promptFilePicker (win) {
}
return null;
};
-
-/**
- * Show a system notification with the given message
- *
- * @param msg String or Object with a message to be shown in a default
- * notification or object with properties title, icon, and body
- * @param callback Function called when user clicks on the notification (optional)
- * @return None
- */
-exports.notification = function notification(msg) {
- var body = msg;
- var title = "Bugzilla Notification";
- var icon = null;
- var textClickable = false;
-
- if (typeof(msg) === "object") {
- body = msg.body;
- if ("title" in msg) {
- title = msg.title;
- }
- if ("icon" in msg) {
- icon = msg.icon;
- }
- }
- try {
- var classObj = Cc["@mozilla.org/alerts-service;1"];
- var alertService = classObj.getService(Ci.nsIAlertsService);
-
- alertService.showAlertNotification(icon, title, body);
- return true;
- } catch (e) {
- console.error("Unable to display notification:", msg);
- return false;
- }
-};