Allow "detail" to be empty

This commit is contained in:
Cheng Zhao 2015-07-07 17:08:30 +08:00
parent 810f14aecb
commit 9b25c16980

View file

@ -42,9 +42,9 @@ class GtkMessageBox {
GetMessageType(type), // type GetMessageType(type), // type
GTK_BUTTONS_NONE, // no buttons GTK_BUTTONS_NONE, // no buttons
"%s", message.c_str()); "%s", message.c_str());
gtk_message_dialog_format_secondary_text( if (!detail.empty())
GTK_MESSAGE_DIALOG(dialog_), gtk_message_dialog_format_secondary_text(
"%s", detail.empty() ? nullptr : detail.c_str()); GTK_MESSAGE_DIALOG(dialog_), "%s", detail.c_str());
// Set dialog's icon. // Set dialog's icon.
if (!icon.isNull()) { if (!icon.isNull()) {