Bug 573108 - Remove references to chrome://weave from services [r=mconnor]

Remove openWindow/Dialog helpers and inline into ui bits for prefs-common and pass arguments into generic-change.
This commit is contained in:
Edward Lee 2010-06-18 13:59:30 -07:00
parent 919ecb4821
commit cc4ff52606

View File

@ -713,50 +713,6 @@ let Utils = {
return [stream, file];
},
/**
* Open/reshow a window/dialog based on its name and type.
*
* @param name
* Name of the window/dialog to reshow if already open
* @param type
* Opening behavior: "Window" or "Dialog"
* @param args
* More arguments go here depending on the type
*/
_openWin: function Utils__openWin(name, type /*, args... */) {
// Just re-show the window if it's already open
let openedWindow = Svc.WinMediator.getMostRecentWindow("Weave:" + name);
if (openedWindow) {
openedWindow.focus();
return;
}
// Open up the window/dialog!
let win = Svc.WinWatcher;
if (type == "Dialog")
win = win.activeWindow;
win["open" + type].apply(win, Array.slice(arguments, 2));
},
_openChromeWindow: function Utils_openCWindow(name, uri, options, args) {
Utils.openWindow(name, "chrome://weave/content/" + uri, options, args);
},
openWindow: function Utils_openWindow(name, uri, options, args) {
Utils._openWin(name, "Window", null, uri, "",
options || "centerscreen,chrome,dialog,resizable=yes", args);
},
openDialog: function Utils_openDialog(name, uri, options, args) {
Utils._openWin(name, "Dialog", "chrome://weave/content/" + uri, "",
options || "centerscreen,chrome,dialog,modal,resizable=no", args);
},
openGenericDialog: function Utils_openGenericDialog(type) {
this._genericDialogType = type;
this.openDialog("ChangeSomething", "generic-change.xul");
},
getIcon: function(iconUri, defaultIcon) {
try {
let iconURI = Utils.makeURI(iconUri);