summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-09-01 22:26:37 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-09-02 12:14:51 +0100
commit2f76c093f5e7150914c27d49d5275c885a6ff8dc (patch)
treed8a2c221407342b7e27a259e6d643d2e81e100b1 /vcl
parentrearrange matters to get FloatingWindows working loaded from .ui (diff)
downloadcore-2f76c093f5e7150914c27d49d5275c885a6ff8dc.tar.gz
core-2f76c093f5e7150914c27d49d5275c885a6ff8dc.zip
map deletable to WB_CLOSEABLE
Change-Id: I13fd6878c3443055428f01bb946caaaf7e6dddb0
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/window/builder.cxx14
-rw-r--r--vcl/source/window/dialog.cxx4
-rw-r--r--vcl/source/window/floatwin.cxx4
-rw-r--r--vcl/source/window/syswin.cxx2
4 files changed, 20 insertions, 4 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 3016ea67de54..ed310f0b8337 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -595,6 +595,18 @@ namespace
return bResizable;
}
+ bool extractCloseable(VclBuilder::stringmap &rMap)
+ {
+ bool bCloseable = true;
+ VclBuilder::stringmap::iterator aFind = rMap.find(OString("deletable"));
+ if (aFind != rMap.end())
+ {
+ bCloseable = toBool(aFind->second);
+ rMap.erase(aFind);
+ }
+ return bCloseable;
+ }
+
bool extractEntry(VclBuilder::stringmap &rMap)
{
bool bHasEntry = false;
@@ -1694,7 +1706,7 @@ Window *VclBuilder::insertObject(Window *pParent, const OString &rClass,
if (pParent->IsSystemWindow())
{
SystemWindow *pSysWin = static_cast<SystemWindow*>(pCurrentChild);
- pSysWin->doDeferredInit(extractResizable(rProps));
+ pSysWin->doDeferredInit(extractResizable(rProps), extractCloseable(rProps));
m_bToplevelHasDeferredInit = false;
}
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index d23d2af64f3e..5f04074d1293 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -477,11 +477,13 @@ OUString VclBuilderContainer::getUIRootDir()
//we can't change sizeable after the fact, so need to defer until we know and then
//do the init. Find the real parent stashed in mpDialogParent.
-void Dialog::doDeferredInit(bool bResizable)
+void Dialog::doDeferredInit(bool bResizable, bool bCloseable)
{
WinBits nBits = WB_3DLOOK|WB_CLOSEABLE|WB_MOVEABLE;
if (bResizable)
nBits |= WB_SIZEABLE;
+ if (bCloseable)
+ nBits |= WB_CLOSEABLE;
Window *pParent = mpDialogParent;
mpDialogParent = NULL;
ImplInit(pParent, nBits);
diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx
index 5b35585847a4..37e7a222ee1d 100644
--- a/vcl/source/window/floatwin.cxx
+++ b/vcl/source/window/floatwin.cxx
@@ -171,11 +171,13 @@ FloatingWindow::FloatingWindow(Window* pParent, const OString& rID, const OUStri
}
//Find the real parent stashed in mpDialogParent.
-void FloatingWindow::doDeferredInit(bool bResizable)
+void FloatingWindow::doDeferredInit(bool bResizable, bool bCloseable)
{
WinBits nBits = WB_MOVEABLE|WB_3DLOOK;
if (bResizable)
nBits |= WB_SIZEABLE;
+ if (bCloseable)
+ nBits |= WB_CLOSEABLE;
Window *pParent = mpDialogParent;
mpDialogParent = NULL;
ImplInit(pParent, nBits);
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index db072cce083f..1cf207c46ab7 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -1104,7 +1104,7 @@ void SystemWindow::DoInitialLayout()
}
}
-void SystemWindow::doDeferredInit(bool /*bResizable*/)
+void SystemWindow::doDeferredInit(bool /*bResizable*/, bool /*bCloseable*/)
{
SAL_WARN("vcl.layout", "SystemWindow in layout without doDeferredInit impl");
}