mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 22:01:30 +00:00
Bug 538028 - nsIAlertsService::showAlertNotification with null title shows short (1px tall) alerts on Linux. r=roc
This commit is contained in:
parent
019fb76261
commit
9960767985
@ -353,9 +353,15 @@ nsAlertsIconListener::InitAlertAsync(const nsAString & aImageUrl,
|
||||
if (!gHasActions && aAlertTextClickable)
|
||||
return NS_ERROR_FAILURE; // No good, fallback to XUL
|
||||
|
||||
mAlertTitle = NS_ConvertUTF16toUTF8(aAlertTitle);
|
||||
mAlertText = NS_ConvertUTF16toUTF8(aAlertText);
|
||||
// Workaround for a libnotify bug - blank titles aren't dealt with
|
||||
// properly so we use a space
|
||||
if (aAlertTitle.IsEmpty()) {
|
||||
mAlertTitle = NS_LITERAL_CSTRING(" ");
|
||||
} else {
|
||||
mAlertTitle = NS_ConvertUTF16toUTF8(aAlertTitle);
|
||||
}
|
||||
|
||||
mAlertText = NS_ConvertUTF16toUTF8(aAlertText);
|
||||
mAlertHasAction = aAlertTextClickable;
|
||||
|
||||
mAlertListener = aAlertListener;
|
||||
|
Loading…
Reference in New Issue
Block a user