mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1239848 - Revert ProfileManager changes until a better UX/UI is ready, r=ehsan
This commit is contained in:
parent
45039802b8
commit
c3ee54f07c
@ -17,8 +17,6 @@ XPCOMUtils.defineLazyServiceGetter(
|
|||||||
'nsIToolkitProfileService'
|
'nsIToolkitProfileService'
|
||||||
);
|
);
|
||||||
|
|
||||||
const gManage = window.location.href.indexOf('?manage') != -1;
|
|
||||||
|
|
||||||
const bundle = Services.strings.createBundle(
|
const bundle = Services.strings.createBundle(
|
||||||
'chrome://global/locale/aboutProfiles.properties');
|
'chrome://global/locale/aboutProfiles.properties');
|
||||||
|
|
||||||
@ -54,24 +52,8 @@ function findCurrentProfile() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function initializeUI() {
|
function initializeUI() {
|
||||||
if (gManage) {
|
document.getElementById('about-profile-action-box').style.display = 'block';
|
||||||
document.getElementById('about-profile-action-box').style.display = 'none';
|
document.getElementById('profile-manager-action-box').style.display = 'none';
|
||||||
document.getElementById('profile-manager-action-box').style.display = 'block';
|
|
||||||
|
|
||||||
let autoSelect = document.getElementById("auto-select");
|
|
||||||
autoSelect.checked = ProfileService.startWithLastProfile;
|
|
||||||
autoSelect.addEventListener('change', function() {
|
|
||||||
ProfileService.startWithLastProfile = autoSelect.checked;
|
|
||||||
});
|
|
||||||
|
|
||||||
let offline = document.getElementById("work-offline");
|
|
||||||
offline.addEventListener('change', function() {
|
|
||||||
ProfileService.startOffline = offline.checked;
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
document.getElementById('about-profile-action-box').style.display = 'block';
|
|
||||||
document.getElementById('profile-manager-action-box').style.display = 'none';
|
|
||||||
}
|
|
||||||
|
|
||||||
refreshUI();
|
refreshUI();
|
||||||
}
|
}
|
||||||
@ -122,33 +104,11 @@ function display(profileData) {
|
|||||||
let nameStr = bundle.formatStringFromName('name', [profileData.profile.name], 1);
|
let nameStr = bundle.formatStringFromName('name', [profileData.profile.name], 1);
|
||||||
|
|
||||||
let name = document.createElement('h2');
|
let name = document.createElement('h2');
|
||||||
|
name.appendChild(document.createTextNode(nameStr));
|
||||||
if (gManage) {
|
|
||||||
let checkBox = document.createElement('input');
|
|
||||||
checkBox.setAttribute('type', 'radio');
|
|
||||||
checkBox.setAttribute('name', 'profile');
|
|
||||||
checkBox.setAttribute('id', profileData.profile.name);
|
|
||||||
if (profileData.isCurrentProfile) {
|
|
||||||
checkBox.setAttribute('checked', 'checked');
|
|
||||||
}
|
|
||||||
name.appendChild(checkBox);
|
|
||||||
|
|
||||||
checkBox.addEventListener('change', function() {
|
|
||||||
ProfileService.selectedProfile = profileData.profile;
|
|
||||||
ProfileService.flush();
|
|
||||||
});
|
|
||||||
|
|
||||||
let label = document.createElement('label');
|
|
||||||
label.appendChild(document.createTextNode(nameStr));
|
|
||||||
label.setAttribute('for', profileData.profile.name);
|
|
||||||
name.appendChild(label);
|
|
||||||
} else {
|
|
||||||
name.appendChild(document.createTextNode(nameStr));
|
|
||||||
}
|
|
||||||
|
|
||||||
div.appendChild(name);
|
div.appendChild(name);
|
||||||
|
|
||||||
if (!gManage && profileData.isCurrentProfile) {
|
if (profileData.isCurrentProfile) {
|
||||||
let currentProfile = document.createElement('h3');
|
let currentProfile = document.createElement('h3');
|
||||||
let currentProfileStr = bundle.GetStringFromName('currentProfile');
|
let currentProfileStr = bundle.GetStringFromName('currentProfile');
|
||||||
currentProfile.appendChild(document.createTextNode(currentProfileStr));
|
currentProfile.appendChild(document.createTextNode(currentProfileStr));
|
||||||
@ -209,7 +169,7 @@ function display(profileData) {
|
|||||||
};
|
};
|
||||||
div.appendChild(renameButton);
|
div.appendChild(renameButton);
|
||||||
|
|
||||||
if (gManage || !profileData.isCurrentProfile) {
|
if (!profileData.isCurrentProfile) {
|
||||||
let removeButton = document.createElement('button');
|
let removeButton = document.createElement('button');
|
||||||
removeButton.appendChild(document.createTextNode(bundle.GetStringFromName('remove')));
|
removeButton.appendChild(document.createTextNode(bundle.GetStringFromName('remove')));
|
||||||
removeButton.onclick = function() {
|
removeButton.onclick = function() {
|
||||||
|
@ -17,7 +17,6 @@ currentProfile = This is the profile in use and it cannot be deleted.
|
|||||||
rename = Rename
|
rename = Rename
|
||||||
remove = Remove
|
remove = Remove
|
||||||
setAsDefault = Set as default profile
|
setAsDefault = Set as default profile
|
||||||
open = Open
|
|
||||||
|
|
||||||
yes = yes
|
yes = yes
|
||||||
no = no
|
no = no
|
||||||
|
@ -7,5 +7,25 @@
|
|||||||
|
|
||||||
<!ENTITY windowtitle.label "&brandShortName; - Choose User Profile">
|
<!ENTITY windowtitle.label "&brandShortName; - Choose User Profile">
|
||||||
|
|
||||||
|
<!ENTITY profilename.label "Profile Name:">
|
||||||
|
|
||||||
<!ENTITY start.label "Start &brandShortName;">
|
<!ENTITY start.label "Start &brandShortName;">
|
||||||
<!ENTITY exit.label "Exit">
|
<!ENTITY exit.label "Exit">
|
||||||
|
|
||||||
|
<!ENTITY availprofiles.label "Available Profiles">
|
||||||
|
|
||||||
|
<!ENTITY newButton.label "Create Profile…">
|
||||||
|
<!ENTITY newButton.accesskey "C">
|
||||||
|
<!ENTITY renameButton.label "Rename Profile…">
|
||||||
|
<!ENTITY renameButton.accesskey "R">
|
||||||
|
<!ENTITY deleteButton.label "Delete Profile…">
|
||||||
|
<!ENTITY deleteButton.accesskey "D">
|
||||||
|
|
||||||
|
<!-- manager entities -->
|
||||||
|
<!ENTITY pmDescription.label "&brandShortName; stores information about your settings, preferences, and other user items in your user profile.">
|
||||||
|
|
||||||
|
<!ENTITY offlineState.label "Work offline">
|
||||||
|
<!ENTITY offlineState.accesskey "o">
|
||||||
|
|
||||||
|
<!ENTITY useSelected.label "Use the selected profile without asking at startup">
|
||||||
|
<!ENTITY useSelected.accesskey "s">
|
||||||
|
@ -13,13 +13,30 @@ restartMessageNoUnlockerMac=A copy of %S is already open. Only one copy of %S ca
|
|||||||
restartMessageUnlockerMac=A copy of %S is already open. The running copy of %S will quit in order to open this one.
|
restartMessageUnlockerMac=A copy of %S is already open. The running copy of %S will quit in order to open this one.
|
||||||
|
|
||||||
# Profile manager
|
# Profile manager
|
||||||
|
# LOCALIZATION NOTE (profileTooltip): First %S is the profile name, second %S is the path to the profile folder.
|
||||||
|
profileTooltip=Profile: '%S' - Path: '%S'
|
||||||
|
|
||||||
|
pleaseSelectTitle=Select Profile
|
||||||
|
pleaseSelect=Please select a profile to begin %S, or create a new profile.
|
||||||
|
|
||||||
profileLockedTitle=Profile In Use
|
profileLockedTitle=Profile In Use
|
||||||
profileLocked2=%S cannot use the profile "%S" because it is in use.\n\nTo continue, close the running instance of %S or choose a different profile.
|
profileLocked2=%S cannot use the profile "%S" because it is in use.\n\nTo continue, close the running instance of %S or choose a different profile.
|
||||||
|
|
||||||
|
renameProfileTitle=Rename Profile
|
||||||
|
renameProfilePrompt=Rename the profile "%S" to:
|
||||||
|
|
||||||
|
profileNameInvalidTitle=Invalid profile name
|
||||||
|
profileNameInvalid=The profile name "%S" is not allowed.
|
||||||
|
|
||||||
chooseFolder=Choose Profile Folder
|
chooseFolder=Choose Profile Folder
|
||||||
profileNameEmpty=An empty profile name is not allowed.
|
profileNameEmpty=An empty profile name is not allowed.
|
||||||
invalidChar=The character "%S" is not allowed in profile names. Please choose a different name.
|
invalidChar=The character "%S" is not allowed in profile names. Please choose a different name.
|
||||||
|
|
||||||
|
deleteTitle=Delete Profile
|
||||||
|
deleteProfileConfirm=Deleting a profile will remove the profile from the list of available profiles and cannot be undone.\nYou may also choose to delete the profile data files, including your settings, certificates and other user-related data. This option will delete the folder "%S" and cannot be undone.\nWould you like to delete the profile data files?
|
||||||
|
deleteFiles=Delete Files
|
||||||
|
dontDeleteFiles=Don't Delete Files
|
||||||
|
|
||||||
profileCreationFailed=Profile couldn't be created. Probably the chosen folder isn't writable.
|
profileCreationFailed=Profile couldn't be created. Probably the chosen folder isn't writable.
|
||||||
profileCreationFailedTitle=Profile Creation failed
|
profileCreationFailedTitle=Profile Creation failed
|
||||||
profileExists=A profile with this name already exists. Please choose another name.
|
profileExists=A profile with this name already exists. Please choose another name.
|
||||||
@ -28,8 +45,6 @@ profileFinishText=Click Finish to create this new profile.
|
|||||||
profileFinishTextMac=Click Done to create this new profile.
|
profileFinishTextMac=Click Done to create this new profile.
|
||||||
profileMissing=Your %S profile cannot be loaded. It may be missing or inaccessible.
|
profileMissing=Your %S profile cannot be loaded. It may be missing or inaccessible.
|
||||||
profileMissingTitle=Profile Missing
|
profileMissingTitle=Profile Missing
|
||||||
pleaseSelectTitle=Select Profile
|
|
||||||
pleaseSelect=Please select a profile to begin %S, or create a new profile.
|
|
||||||
|
|
||||||
# Profile reset
|
# Profile reset
|
||||||
# LOCALIZATION NOTE (resetBackupDirectory): Directory name for the profile directory backup created during reset. This directory is placed in a location users will see it (ie. their desktop). %S is the application name.
|
# LOCALIZATION NOTE (resetBackupDirectory): Directory name for the profile directory backup created during reset. This directory is placed in a location users will see it (ie. their desktop). %S is the application name.
|
||||||
|
@ -4,10 +4,11 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
const {classes: Cc, interfaces: Ci, utils: Cu, results: Cr} = Components;
|
Components.utils.import("resource://gre/modules/AppConstants.jsm");
|
||||||
|
Components.utils.import("resource://gre/modules/Services.jsm");
|
||||||
|
|
||||||
Cu.import("resource://gre/modules/AppConstants.jsm");
|
const C = Components.classes;
|
||||||
Cu.import("resource://gre/modules/Services.jsm");
|
const I = Components.interfaces;
|
||||||
|
|
||||||
const ToolkitProfileService = "@mozilla.org/toolkit/profile-service;1";
|
const ToolkitProfileService = "@mozilla.org/toolkit/profile-service;1";
|
||||||
|
|
||||||
@ -18,22 +19,57 @@ var gProfileService;
|
|||||||
|
|
||||||
function startup()
|
function startup()
|
||||||
{
|
{
|
||||||
gDialogParams = window.arguments[0].QueryInterface(Ci.nsIDialogParamBlock);
|
try {
|
||||||
|
gDialogParams = window.arguments[0].
|
||||||
|
QueryInterface(I.nsIDialogParamBlock);
|
||||||
|
|
||||||
gProfileService = Cc[ToolkitProfileService].getService(Ci.nsIToolkitProfileService);
|
gProfileService = C[ToolkitProfileService].getService(I.nsIToolkitProfileService);
|
||||||
|
|
||||||
gProfileManagerBundle = document.getElementById("bundle_profileManager");
|
gProfileManagerBundle = document.getElementById("bundle_profileManager");
|
||||||
gBrandBundle = document.getElementById("bundle_brand");
|
gBrandBundle = document.getElementById("bundle_brand");
|
||||||
|
|
||||||
document.documentElement.centerWindowOnScreen();
|
document.documentElement.centerWindowOnScreen();
|
||||||
document.documentElement.getButton('accept').focus();
|
|
||||||
|
var profilesElement = document.getElementById("profiles");
|
||||||
|
|
||||||
|
var profileList = gProfileService.profiles;
|
||||||
|
while (profileList.hasMoreElements()) {
|
||||||
|
var profile = profileList.getNext().QueryInterface(I.nsIToolkitProfile);
|
||||||
|
|
||||||
|
var listitem = profilesElement.appendItem(profile.name, "");
|
||||||
|
|
||||||
|
var tooltiptext =
|
||||||
|
gProfileManagerBundle.getFormattedString("profileTooltip", [profile.name, profile.rootDir.path]);
|
||||||
|
listitem.setAttribute("tooltiptext", tooltiptext);
|
||||||
|
listitem.setAttribute("class", "listitem-iconic");
|
||||||
|
listitem.profile = profile;
|
||||||
|
try {
|
||||||
|
if (profile === gProfileService.selectedProfile) {
|
||||||
|
setTimeout(function(a) {
|
||||||
|
profilesElement.ensureElementIsVisible(a);
|
||||||
|
profilesElement.selectItem(a);
|
||||||
|
}, 0, listitem);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch(e) { }
|
||||||
|
}
|
||||||
|
|
||||||
|
var autoSelectLastProfile = document.getElementById("autoSelectLastProfile");
|
||||||
|
autoSelectLastProfile.checked = gProfileService.startWithLastProfile;
|
||||||
|
profilesElement.focus();
|
||||||
|
}
|
||||||
|
catch(e) {
|
||||||
|
window.close();
|
||||||
|
throw (e);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function acceptDialog()
|
function acceptDialog()
|
||||||
{
|
{
|
||||||
var appName = gBrandBundle.getString("brandShortName");
|
var appName = gBrandBundle.getString("brandShortName");
|
||||||
|
|
||||||
var selectedProfile = gProfileService.selectedProfile;
|
var profilesElement = document.getElementById("profiles");
|
||||||
|
var selectedProfile = profilesElement.selectedItem;
|
||||||
if (!selectedProfile) {
|
if (!selectedProfile) {
|
||||||
var pleaseSelectTitle = gProfileManagerBundle.getString("pleaseSelectTitle");
|
var pleaseSelectTitle = gProfileManagerBundle.getString("pleaseSelectTitle");
|
||||||
var pleaseSelect =
|
var pleaseSelect =
|
||||||
@ -46,10 +82,10 @@ function acceptDialog()
|
|||||||
var profileLock;
|
var profileLock;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
profileLock = selectedProfile.lock({ value: null });
|
profileLock = selectedProfile.profile.lock({ value: null });
|
||||||
}
|
}
|
||||||
catch (e) {
|
catch (e) {
|
||||||
if (!selectedProfile.rootDir.exists()) {
|
if (!selectedProfile.profile.rootDir.exists()) {
|
||||||
var missingTitle = gProfileManagerBundle.getString("profileMissingTitle");
|
var missingTitle = gProfileManagerBundle.getString("profileMissingTitle");
|
||||||
var missing =
|
var missing =
|
||||||
gProfileManagerBundle.getFormattedString("profileMissing", [appName]);
|
gProfileManagerBundle.getFormattedString("profileMissing", [appName]);
|
||||||
@ -59,21 +95,175 @@ function acceptDialog()
|
|||||||
|
|
||||||
var lockedTitle = gProfileManagerBundle.getString("profileLockedTitle");
|
var lockedTitle = gProfileManagerBundle.getString("profileLockedTitle");
|
||||||
var locked =
|
var locked =
|
||||||
gProfileManagerBundle.getFormattedString("profileLocked2", [appName, selectedProfile.name, appName]);
|
gProfileManagerBundle.getFormattedString("profileLocked2", [appName, selectedProfile.profile.name, appName]);
|
||||||
Services.prompt.alert(window, lockedTitle, locked);
|
Services.prompt.alert(window, lockedTitle, locked);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
gDialogParams.objects.insertElementAt(profileLock.nsIProfileLock, 0, false);
|
gDialogParams.objects.insertElementAt(profileLock.nsIProfileLock, 0, false);
|
||||||
|
|
||||||
|
gProfileService.selectedProfile = selectedProfile.profile;
|
||||||
|
gProfileService.defaultProfile = selectedProfile.profile;
|
||||||
|
updateStartupPrefs();
|
||||||
|
|
||||||
gDialogParams.SetInt(0, 1);
|
gDialogParams.SetInt(0, 1);
|
||||||
gDialogParams.SetString(0, selectedProfile.name);
|
|
||||||
|
gDialogParams.SetString(0, selectedProfile.profile.name);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function exitDialog()
|
function exitDialog()
|
||||||
{
|
{
|
||||||
|
updateStartupPrefs();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function updateStartupPrefs()
|
||||||
|
{
|
||||||
|
var autoSelectLastProfile = document.getElementById("autoSelectLastProfile");
|
||||||
|
gProfileService.startWithLastProfile = autoSelectLastProfile.checked;
|
||||||
|
|
||||||
|
/* Bug 257777 */
|
||||||
|
gProfileService.startOffline = document.getElementById("offlineState").checked;
|
||||||
|
}
|
||||||
|
|
||||||
|
// handle key event on listboxes
|
||||||
|
function onProfilesKey(aEvent)
|
||||||
|
{
|
||||||
|
switch( aEvent.keyCode )
|
||||||
|
{
|
||||||
|
case KeyEvent.DOM_VK_BACK_SPACE:
|
||||||
|
if (AppConstants.platform != "macosx")
|
||||||
|
break;
|
||||||
|
case KeyEvent.DOM_VK_DELETE:
|
||||||
|
ConfirmDelete();
|
||||||
|
break;
|
||||||
|
case KeyEvent.DOM_VK_F2:
|
||||||
|
RenameProfile();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onProfilesDblClick(aEvent)
|
||||||
|
{
|
||||||
|
if(aEvent.target.localName == "listitem")
|
||||||
|
document.documentElement.acceptDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
// invoke the createProfile Wizard
|
||||||
|
function CreateProfileWizard()
|
||||||
|
{
|
||||||
|
window.openDialog('chrome://mozapps/content/profile/createProfileWizard.xul',
|
||||||
|
'', 'centerscreen,chrome,modal,titlebar', gProfileService);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Called from createProfileWizard to update the display.
|
||||||
|
*/
|
||||||
|
function CreateProfile(aProfile)
|
||||||
|
{
|
||||||
|
var profilesElement = document.getElementById("profiles");
|
||||||
|
|
||||||
|
var listitem = profilesElement.appendItem(aProfile.name, "");
|
||||||
|
|
||||||
|
var tooltiptext =
|
||||||
|
gProfileManagerBundle.getFormattedString("profileTooltip", [aProfile.name, aProfile.rootDir.path]);
|
||||||
|
listitem.setAttribute("tooltiptext", tooltiptext);
|
||||||
|
listitem.setAttribute("class", "listitem-iconic");
|
||||||
|
listitem.profile = aProfile;
|
||||||
|
|
||||||
|
profilesElement.ensureElementIsVisible(listitem);
|
||||||
|
profilesElement.selectItem(listitem);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rename the selected profile
|
||||||
|
function RenameProfile()
|
||||||
|
{
|
||||||
|
var profilesElement = document.getElementById("profiles");
|
||||||
|
var selectedItem = profilesElement.selectedItem;
|
||||||
|
if (!selectedItem) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var selectedProfile = selectedItem.profile;
|
||||||
|
|
||||||
|
var oldName = selectedProfile.name;
|
||||||
|
var newName = {value: oldName};
|
||||||
|
|
||||||
|
var dialogTitle = gProfileManagerBundle.getString("renameProfileTitle");
|
||||||
|
var msg =
|
||||||
|
gProfileManagerBundle.getFormattedString("renameProfilePrompt", [oldName]);
|
||||||
|
|
||||||
|
if (Services.prompt.prompt(window, dialogTitle, msg, newName, null, {value:0})) {
|
||||||
|
newName = newName.value;
|
||||||
|
|
||||||
|
// User hasn't changed the profile name. Treat as if cancel was pressed.
|
||||||
|
if (newName == oldName)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
selectedProfile.name = newName;
|
||||||
|
}
|
||||||
|
catch (e) {
|
||||||
|
var alTitle = gProfileManagerBundle.getString("profileNameInvalidTitle");
|
||||||
|
var alMsg = gProfileManagerBundle.getFormattedString("profileNameInvalid", [newName]);
|
||||||
|
Services.prompt.alert(window, alTitle, alMsg);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedItem.label = newName;
|
||||||
|
var tiptext = gProfileManagerBundle.
|
||||||
|
getFormattedString("profileTooltip",
|
||||||
|
[newName, selectedProfile.rootDir.path]);
|
||||||
|
selectedItem.setAttribute("tooltiptext", tiptext);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function ConfirmDelete()
|
||||||
|
{
|
||||||
|
var deleteButton = document.getElementById("delbutton");
|
||||||
|
var profileList = document.getElementById( "profiles" );
|
||||||
|
|
||||||
|
var selectedItem = profileList.selectedItem;
|
||||||
|
if (!selectedItem) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
var selectedProfile = selectedItem.profile;
|
||||||
|
var deleteFiles = false;
|
||||||
|
|
||||||
|
if (selectedProfile.rootDir.exists()) {
|
||||||
|
var dialogTitle = gProfileManagerBundle.getString("deleteTitle");
|
||||||
|
var dialogText =
|
||||||
|
gProfileManagerBundle.getFormattedString("deleteProfileConfirm",
|
||||||
|
[selectedProfile.rootDir.path]);
|
||||||
|
|
||||||
|
var buttonPressed = Services.prompt.confirmEx(window, dialogTitle, dialogText,
|
||||||
|
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_0) +
|
||||||
|
(Services.prompt.BUTTON_TITLE_CANCEL * Services.prompt.BUTTON_POS_1) +
|
||||||
|
(Services.prompt.BUTTON_TITLE_IS_STRING * Services.prompt.BUTTON_POS_2),
|
||||||
|
gProfileManagerBundle.getString("dontDeleteFiles"),
|
||||||
|
null,
|
||||||
|
gProfileManagerBundle.getString("deleteFiles"),
|
||||||
|
null, {value:0});
|
||||||
|
if (buttonPressed == 1)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
if (buttonPressed == 2)
|
||||||
|
deleteFiles = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
selectedProfile.remove(deleteFiles);
|
||||||
|
profileList.removeChild(selectedItem);
|
||||||
|
if (profileList.firstChild != undefined) {
|
||||||
|
profileList.selectItem(profileList.firstChild);
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
|
<!-- -*- Mode: SGML; indent-tabs-mode: nil; -*- -->
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
@ -6,7 +6,7 @@
|
|||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
- file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
|
||||||
|
|
||||||
<?xml-stylesheet href="chrome://global/skin/global.css" type="text/css"?>
|
<?xml-stylesheet href="chrome://mozapps/skin/profile/profileSelection.css" type="text/css"?>
|
||||||
|
|
||||||
<!DOCTYPE window [
|
<!DOCTYPE window [
|
||||||
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
<!ENTITY % brandDTD SYSTEM "chrome://branding/locale/brand.dtd">
|
||||||
@ -17,12 +17,12 @@
|
|||||||
|
|
||||||
<dialog
|
<dialog
|
||||||
id="profileWindow"
|
id="profileWindow"
|
||||||
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||||
class="non-resizable"
|
class="non-resizable"
|
||||||
title="&windowtitle.label;"
|
title="&windowtitle.label;"
|
||||||
orient="vertical"
|
orient="vertical"
|
||||||
buttons="accept,cancel"
|
buttons="accept,cancel"
|
||||||
style="width: 60em; height: 40em;"
|
style="width: 30em;"
|
||||||
onload="startup();"
|
onload="startup();"
|
||||||
ondialogaccept="return acceptDialog()"
|
ondialogaccept="return acceptDialog()"
|
||||||
ondialogcancel="return exitDialog()"
|
ondialogcancel="return exitDialog()"
|
||||||
@ -36,6 +36,35 @@
|
|||||||
|
|
||||||
<script type="application/javascript" src="chrome://mozapps/content/profile/profileSelection.js"/>
|
<script type="application/javascript" src="chrome://mozapps/content/profile/profileSelection.js"/>
|
||||||
|
|
||||||
<browser id="browser" src="about:profiles?manage" flex="1" />
|
<description class="label">&pmDescription.label;</description>
|
||||||
|
|
||||||
|
<separator class="thin"/>
|
||||||
|
|
||||||
|
<hbox class="profile-box indent" flex="1">
|
||||||
|
|
||||||
|
<vbox id="managebuttons">
|
||||||
|
<button id="newbutton" label="&newButton.label;"
|
||||||
|
accesskey="&newButton.accesskey;" oncommand="CreateProfileWizard();"/>
|
||||||
|
<button id="renbutton" label="&renameButton.label;"
|
||||||
|
accesskey="&renameButton.accesskey;" oncommand="RenameProfile();"/>
|
||||||
|
<button id="delbutton" label="&deleteButton.label;"
|
||||||
|
accesskey="&deleteButton.accesskey;" oncommand="ConfirmDelete();"/>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
<separator flex="1"/>
|
||||||
|
|
||||||
|
<vbox flex="1">
|
||||||
|
<listbox id="profiles" rows="5" seltype="single"
|
||||||
|
ondblclick="onProfilesDblClick(event)"
|
||||||
|
onkeypress="onProfilesKey(event);">
|
||||||
|
</listbox>
|
||||||
|
|
||||||
|
<!-- Bug 257777 -->
|
||||||
|
<checkbox id="offlineState" label="&offlineState.label;" accesskey="&offlineState.accesskey;"/>
|
||||||
|
|
||||||
|
<checkbox id="autoSelectLastProfile" label="&useSelected.label;"
|
||||||
|
accesskey="&useSelected.accesskey;"/>
|
||||||
|
</vbox>
|
||||||
|
|
||||||
|
</hbox>
|
||||||
</dialog>
|
</dialog>
|
||||||
|
@ -48,6 +48,7 @@ toolkit.jar:
|
|||||||
skin/classic/mozapps/plugins/pluginGeneric-16.png (plugins/pluginGeneric-16.png)
|
skin/classic/mozapps/plugins/pluginGeneric-16.png (plugins/pluginGeneric-16.png)
|
||||||
skin/classic/mozapps/plugins/pluginHelp-16.png (plugins/pluginHelp-16.png)
|
skin/classic/mozapps/plugins/pluginHelp-16.png (plugins/pluginHelp-16.png)
|
||||||
skin/classic/mozapps/profile/profileicon.png (profile/profileicon.png)
|
skin/classic/mozapps/profile/profileicon.png (profile/profileicon.png)
|
||||||
|
skin/classic/mozapps/profile/profileSelection.css (profile/profileSelection.css)
|
||||||
skin/classic/mozapps/profile/profileicon-selected.png (profile/profileicon-selected.png)
|
skin/classic/mozapps/profile/profileicon-selected.png (profile/profileicon-selected.png)
|
||||||
skin/classic/mozapps/update/buttons.png (update/buttons.png)
|
skin/classic/mozapps/update/buttons.png (update/buttons.png)
|
||||||
* skin/classic/mozapps/update/updates.css (update/updates.css)
|
* skin/classic/mozapps/update/updates.css (update/updates.css)
|
||||||
|
29
toolkit/themes/osx/mozapps/profile/profileSelection.css
Normal file
29
toolkit/themes/osx/mozapps/profile/profileSelection.css
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
|
||||||
|
@import url("chrome://global/skin/global.css");
|
||||||
|
|
||||||
|
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||||
|
|
||||||
|
#profiles > listitem {
|
||||||
|
list-style-image: url("chrome://mozapps/skin/profile/profileicon.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
#profiles:focus > listitem[selected="true"] {
|
||||||
|
list-style-image: url("chrome://mozapps/skin/profile/profileicon-selected.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
#profiles > listitem > listcell > image {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
box#managebuttons > button {
|
||||||
|
min-width: 8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#managebuttons {
|
||||||
|
padding-top: 1em;
|
||||||
|
}
|
@ -155,6 +155,7 @@
|
|||||||
#endif
|
#endif
|
||||||
skin/classic/mozapps/plugins/pluginBlocked-64.png (../../windows/mozapps/plugins/pluginBlocked-64.png)
|
skin/classic/mozapps/plugins/pluginBlocked-64.png (../../windows/mozapps/plugins/pluginBlocked-64.png)
|
||||||
skin/classic/mozapps/plugins/pluginHelp-16.png (../../windows/mozapps/plugins/pluginHelp-16.png)
|
skin/classic/mozapps/plugins/pluginHelp-16.png (../../windows/mozapps/plugins/pluginHelp-16.png)
|
||||||
|
skin/classic/mozapps/profile/profileSelection.css (../../windows/mozapps/profile/profileSelection.css)
|
||||||
skin/classic/mozapps/update/downloadButtons.png (../../windows/mozapps/update/downloadButtons.png)
|
skin/classic/mozapps/update/downloadButtons.png (../../windows/mozapps/update/downloadButtons.png)
|
||||||
* skin/classic/mozapps/xpinstall/xpinstallConfirm.css (../../windows/mozapps/extensions/xpinstallConfirm.css)
|
* skin/classic/mozapps/xpinstall/xpinstallConfirm.css (../../windows/mozapps/extensions/xpinstallConfirm.css)
|
||||||
|
|
||||||
|
25
toolkit/themes/windows/mozapps/profile/profileSelection.css
Normal file
25
toolkit/themes/windows/mozapps/profile/profileSelection.css
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||||
|
|
||||||
|
|
||||||
|
@import url("chrome://global/skin/global.css");
|
||||||
|
|
||||||
|
@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
|
||||||
|
|
||||||
|
#profiles > listitem {
|
||||||
|
list-style-image: url("chrome://mozapps/skin/profile/profileicon.png");
|
||||||
|
}
|
||||||
|
|
||||||
|
#profiles > listitem > listcell > image {
|
||||||
|
width: 16px;
|
||||||
|
height: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
box#managebuttons > button {
|
||||||
|
min-width: 8em;
|
||||||
|
}
|
||||||
|
|
||||||
|
#managebuttons {
|
||||||
|
padding-top: 1em;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user