Use lower-case about panel option keys
This commit is contained in:
Родитель
13f9a6c273
Коммит
1e4ef195bb
|
@ -261,7 +261,18 @@ void Browser::ShowAboutPanel() {
|
||||||
|
|
||||||
void Browser::SetAboutPanelOptions(const base::DictionaryValue& options) {
|
void Browser::SetAboutPanelOptions(const base::DictionaryValue& options) {
|
||||||
about_panel_options_.Clear();
|
about_panel_options_.Clear();
|
||||||
about_panel_options_.MergeDictionary(&options);
|
|
||||||
|
// Upper case option keys for orderFrontStandardAboutPanelWithOptions format
|
||||||
|
for (base::DictionaryValue::Iterator iter(options);
|
||||||
|
!iter.IsAtEnd();
|
||||||
|
iter.Advance()) {
|
||||||
|
std::string key = iter.key();
|
||||||
|
std::string value;
|
||||||
|
if (!key.empty() && iter.value().GetAsString(&value)) {
|
||||||
|
key[0] = base::ToUpperASCII(key[0]);
|
||||||
|
about_panel_options_.SetString(key, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace atom
|
} // namespace atom
|
||||||
|
|
|
@ -856,11 +856,11 @@ details.
|
||||||
### `app.setAboutPanelOptions(options)` _macOS_
|
### `app.setAboutPanelOptions(options)` _macOS_
|
||||||
|
|
||||||
* `options` Object
|
* `options` Object
|
||||||
* `ApplicationName` String (optional) - The app's name.
|
* `applicationName` String (optional) - The app's name.
|
||||||
* `ApplicationVersion` String (optional) - The app's version.
|
* `applicationVersion` String (optional) - The app's version.
|
||||||
* `Copyright` String (optional) - Copyright information.
|
* `copyright` String (optional) - Copyright information.
|
||||||
* `Credits` String (optional) - Credit information.
|
* `credits` String (optional) - Credit information.
|
||||||
* `Version` String (optional) - The app's build version number.
|
* `version` String (optional) - The app's build version number.
|
||||||
|
|
||||||
Set the about panel options. This will override the values defined in the app's
|
Set the about panel options. This will override the values defined in the app's
|
||||||
`.plist` file. See the [Apple docs][about-panel-options] for more details.
|
`.plist` file. See the [Apple docs][about-panel-options] for more details.
|
||||||
|
|
Загрузка…
Ссылка в новой задаче