Set default cancelId in JavaScript
This commit is contained in:
parent
b158427271
commit
fb537d91fc
3 changed files with 14 additions and 19 deletions
|
@ -93,19 +93,16 @@ class GtkMessageBox {
|
|||
|
||||
const char* TranslateToStock(int id, const std::string& text) {
|
||||
std::string lower = base::StringToLowerASCII(text);
|
||||
if (lower == "cancel") {
|
||||
cancel_id_ = id;
|
||||
if (lower == "cancel")
|
||||
return GTK_STOCK_CANCEL;
|
||||
} else if (lower == "no") {
|
||||
cancel_id_ = id;
|
||||
else if (lower == "no")
|
||||
return GTK_STOCK_NO;
|
||||
} else if (lower == "ok") {
|
||||
else if (lower == "ok")
|
||||
return GTK_STOCK_OK;
|
||||
} else if (lower == "yes") {
|
||||
else if (lower == "yes")
|
||||
return GTK_STOCK_YES;
|
||||
} else {
|
||||
else
|
||||
return text.c_str();
|
||||
}
|
||||
}
|
||||
|
||||
void Show() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue