Remove TreeStyleTabUtils.PromptService.

This commit is contained in:
saneyuki_s 2012-09-18 12:10:11 +09:00
parent 4a023989b9
commit a18738be8f
3 changed files with 18 additions and 25 deletions

View File

@ -1,3 +1,5 @@
Components.utils.import('resource://gre/modules/Services.jsm');
TreeStyleTabWindowHelper.extraProperties = [
TreeStyleTabService.kID,
TreeStyleTabService.kCOLLAPSED,
@ -1051,12 +1053,12 @@ TreeStyleTabWindowHelper.overrideExtensionsAfterBrowserInit = function TSTWH_ove
sv.getPref('extensions.stm.newTabPosition') != 0
) {
let checked = { value : false };
if (sv.PromptService.confirmEx(
if (Services.prompt.confirmEx(
null,
sv.treeBundle.getString('compatibility_STM_warning_title'),
sv.treeBundle.getString('compatibility_STM_warning_text'),
(sv.PromptService.BUTTON_TITLE_IS_STRING * sv.PromptService.BUTTON_POS_0) +
(sv.PromptService.BUTTON_TITLE_IS_STRING * sv.PromptService.BUTTON_POS_1),
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) +
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_1),
sv.treeBundle.getString('compatibility_STM_warning_use_TST'),
sv.treeBundle.getString('compatibility_STM_warning_use_STM'),
null,

View File

@ -277,15 +277,6 @@ var TreeStyleTabUtils = {
},
_SessionStore : null,
get PromptService()
{
if (!this._PromptService) {
this._PromptService = Services.prompt;
}
return this._PromptService;
},
_PromptService : null,
get FocusManager()
{
if (!this._FocusManager) {
@ -678,11 +669,11 @@ var TreeStyleTabUtils = {
if (behavior & this.kDROPLINK_FIXED) return behavior;
var checked = { value : false };
var newChildTab = this.PromptService.confirmEx(this.browserWindow,
var newChildTab = Services.prompt.confirmEx(this.browserWindow,
this.treeBundle.getString('dropLinkOnTab.title'),
this.treeBundle.getString('dropLinkOnTab.text'),
(this.PromptService.BUTTON_TITLE_IS_STRING * this.PromptService.BUTTON_POS_0) +
(this.PromptService.BUTTON_TITLE_IS_STRING * this.PromptService.BUTTON_POS_1),
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) +
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_1),
this.treeBundle.getString('dropLinkOnTab.openNewChildTab'),
this.treeBundle.getString('dropLinkOnTab.loadInTheTab'),
null,
@ -709,12 +700,12 @@ var TreeStyleTabUtils = {
var dummyTabFlag = behavior & this.kGROUP_BOOKMARK_USE_DUMMY;
var checked = { value : false };
var button = this.PromptService.confirmEx(this.browserWindow,
var button = Services.prompt.confirmEx(this.browserWindow,
this.treeBundle.getString('openGroupBookmarkBehavior.title'),
this.treeBundle.getString('openGroupBookmarkBehavior.text'),
(this.PromptService.BUTTON_TITLE_IS_STRING * this.PromptService.BUTTON_POS_0) +
(this.PromptService.BUTTON_TITLE_IS_STRING * this.PromptService.BUTTON_POS_1) +
(this.PromptService.BUTTON_TITLE_IS_STRING * this.PromptService.BUTTON_POS_2),
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) +
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_1) +
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_2),
this.treeBundle.getString('openGroupBookmarkBehavior.subTree'),
this.treeBundle.getString('openGroupBookmarkBehavior.separate'),
this.treeBundle.getString('openGroupBookmarkBehavior.replace'),
@ -752,11 +743,11 @@ var TreeStyleTabUtils = {
if (behavior & this.kBOOKMARK_DROPPED_TABS_FIXED) return behavior;
var checked = { value : false };
var button = this.PromptService.confirmEx(this.browserWindow,
var button = Services.prompt.confirmEx(this.browserWindow,
this.treeBundle.getString('bookmarkDroppedTabs.title'),
this.treeBundle.getString('bookmarkDroppedTabs.text'),
(this.PromptService.BUTTON_TITLE_IS_STRING * this.PromptService.BUTTON_POS_0) +
(this.PromptService.BUTTON_TITLE_IS_STRING * this.PromptService.BUTTON_POS_1),
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) +
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_1),
this.treeBundle.getString('bookmarkDroppedTabs.bookmarkAll'),
this.treeBundle.getString('bookmarkDroppedTabs.bookmarkOnlyParent'),
null,

View File

@ -1388,11 +1388,11 @@ TreeStyleTabWindow.prototype = {
var checked = { value:true };
var w = this.window;
w.focus();
var shouldClose = this.PromptService.confirmEx(w,
var shouldClose = Services.prompt.confirmEx(w,
this.tabbrowserBundle.getString('tabs.closeWarningTitle'),
this.tabbrowserBundle.getFormattedString('tabs.closeWarningMultipleTabs', [aTabsCount]),
(this.PromptService.BUTTON_TITLE_IS_STRING * this.PromptService.BUTTON_POS_0) +
(this.PromptService.BUTTON_TITLE_CANCEL * this.PromptService.BUTTON_POS_1),
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) +
(Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1),
this.tabbrowserBundle.getString('tabs.closeButtonMultiple'),
null, null,
this.tabbrowserBundle.getString('tabs.closeWarningPromptMe'),