summaryrefslogtreecommitdiff
path: root/vcl/source/window
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-10-09 16:27:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-10-09 16:41:56 +0100
commit54acc08629eeee8831931f3a6ba7747451e0f032 (patch)
treed40e3364ab91bc2538343e3297af267680fbbeb5 /vcl/source/window
parentae326faf5a5f4c9c078e914cb0e3adfcc04674df (diff)
default internal-children to visible, default containers to not-shown
Change-Id: I25cd15e586abeeeabfde7539986309b187690320
Diffstat (limited to 'vcl/source/window')
-rw-r--r--vcl/source/window/builder.cxx10
-rw-r--r--vcl/source/window/layout.cxx2
2 files changed, 11 insertions, 1 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 97426b549853..5ab64b3c7881 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -945,6 +945,7 @@ bool VclBuilder::sortIntoBestTabTraversalOrder::operator()(const Window *pA, con
void VclBuilder::handleChild(Window *pParent, xmlreader::XmlReader &reader)
{
Window *pCurrentChild = NULL;
+ bool bIsInternalChild = false;
xmlreader::Span name;
int nsId;
@@ -957,6 +958,10 @@ void VclBuilder::handleChild(Window *pParent, xmlreader::XmlReader &reader)
name = reader.getAttributeValue(false);
sType = OString(name.begin, name.length);
}
+ else if (name.equals(RTL_CONSTASCII_STRINGPARAM("internal-child")))
+ {
+ bIsInternalChild = true;
+ }
}
if (sType == "tab")
@@ -981,6 +986,11 @@ void VclBuilder::handleChild(Window *pParent, xmlreader::XmlReader &reader)
if (bObjectInserted)
{
+ //Internal-children default in glade to not having their visible bits set
+ //even though they are visible (generally anyway)
+ if (bIsInternalChild)
+ pCurrentChild->Show();
+
//Select the first page if its a notebook
if (pCurrentChild->GetType() == WINDOW_TABCONTROL)
{
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index 8f05785fd929..1b4e2527b655 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -15,7 +15,7 @@ VclContainer::VclContainer(Window *pParent)
: Window(WINDOW_CONTAINER)
, m_bLayoutDirty(true)
{
- ImplInit(pParent, 0, NULL);
+ ImplInit(pParent, WB_HIDE, NULL);
}
Size VclContainer::GetOptimalSize(WindowSizeType eType) const