Bug 538028 - nsIAlertsService::showAlertNotification with null title shows short (1px tall) alerts on Linux. r=roc

This commit is contained in:
Michael Ventnor 2010-01-20 11:22:54 +01:00
Родитель 581b01ea74
Коммит 06fd3e1cfc
1 изменённых файлов: 8 добавлений и 2 удалений

Просмотреть файл

@ -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;