summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-09-08 11:17:45 +0100
committerCaolán McNamara <caolanm@redhat.com>2020-09-08 15:16:41 +0200
commit50761e3c3da45772473f3329d5a7519b34fb1106 (patch)
tree0e780003a9f5ef34bfdc1bd6de92ed23edcfb7f4 /vcl/source/window
parent0603b571230db1a1c6ff9f75f990675883e16717 (diff)
tdf#134477 add VclMessageType::Other to indicate image-less generic InfoBox
Change-Id: I76e86bf4d82b33771ea2900517712be57ae7f03d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102232 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/layout.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index d6b9247b73ed..917723b0c297 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -2221,11 +2221,13 @@ void MessageDialog::create_message_area()
case VclMessageType::Error:
m_pImage->SetImage(GetStandardErrorBoxImage());
break;
+ case VclMessageType::Other:
+ break;
}
m_pImage->set_grid_left_attach(0);
m_pImage->set_grid_top_attach(0);
m_pImage->set_valign(VclAlign::Start);
- m_pImage->Show();
+ m_pImage->Show(m_eMessageType != VclMessageType::Other);
WinBits nWinStyle = WB_CLIPCHILDREN | WB_LEFT | WB_VCENTER | WB_NOLABEL | WB_NOTABSTOP;
@@ -2376,6 +2378,9 @@ MessageDialog::MessageDialog(vcl::Window* pParent,
case VclMessageType::Error:
SetText(GetStandardErrorBoxText());
break;
+ case VclMessageType::Other:
+ SetText(Application::GetDisplayName());
+ break;
}
}
@@ -2445,6 +2450,8 @@ bool MessageDialog::set_property(const OString &rKey, const OUString &rValue)
eMode = VclMessageType::Question;
else if (rValue == "error")
eMode = VclMessageType::Error;
+ else if (rValue == "other")
+ eMode = VclMessageType::Other;
else
{
SAL_WARN("vcl.layout", "unknown message type mode" << rValue);