summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-01 12:47:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-07-01 12:55:03 +0100
commit3af5cc2797277082dc82f531d08bfbf90df31306 (patch)
tree5c95cb4e6ef5041254081ae77c0078b9243a7f5c /vcl/source
parent2e874cb1079d552147362058a3fb837e8706def6 (diff)
prototype native gtk3 .ui loading message dialogfeature/gtk3nativedialogs
native gtkbuilder loading our .ui files Change-Id: Iff07d8d0d92e0c0f67fb10605f7329d46235aeff
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/app/salvtables.cxx7
-rw-r--r--vcl/source/window/layout.cxx14
-rw-r--r--vcl/source/window/syswin.cxx3
3 files changed, 19 insertions, 5 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx
index 4c5636372a48..ffa6f084dc25 100644
--- a/vcl/source/app/salvtables.cxx
+++ b/vcl/source/app/salvtables.cxx
@@ -27,7 +27,7 @@
#include <salbmp.hxx>
#include <salobj.hxx>
#include <salmenu.hxx>
-
+#include <vcl/layout.hxx>
SalFrame::SalFrame()
: m_bPaintsBlocked(false)
@@ -93,6 +93,11 @@ void SalInstance::DestroyMenuItem( SalMenuItem* pItem )
OSL_ENSURE( pItem == 0, "DestroyMenu called with non-native menus" );
}
+VclPtr<MessageDialogImpl> SalInstance::CreateSalDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
+{
+ return VclPtr<VclMessageDialog>::Create(pParent, rID, rUIXMLDescription);
+}
+
SalTimer::~SalTimer()
{
}
diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx
index cf44b0930f0d..d8aab933664e 100644
--- a/vcl/source/window/layout.cxx
+++ b/vcl/source/window/layout.cxx
@@ -14,6 +14,8 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include "window.h"
+#include "svdata.hxx"
+#include "salinst.hxx"
VclContainer::VclContainer(vcl::Window *pParent, WinBits nStyle)
: Window(WINDOW_CONTAINER)
@@ -1978,9 +1980,8 @@ MessageDialogImpl::~MessageDialogImpl()
MessageDialog::MessageDialog(vcl::Window* pParent, const OString& rID, const OUString& rUIXMLDescription)
{
-// SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : NULL;
-// m_pImpl = pSVData->mpDefInst->CreateChildFrame( pSystemParentData, nFrameStyle | SAL_FRAME_STYLE_PLUG );
- m_pImpl = new VclMessageDialog(pParent, rID, rUIXMLDescription);
+ ImplSVData* pSVData = ImplGetSVData();
+ m_xImpl = pSVData->mpDefInst->CreateSalDialog(pParent, rID, rUIXMLDescription);
}
MessageDialog::MessageDialog(vcl::Window* pParent, const OUString &rMessage, VclMessageType eMessageType,
@@ -1988,7 +1989,12 @@ MessageDialog::MessageDialog(vcl::Window* pParent, const OUString &rMessage, Vcl
{
// SalFrame* pParentFrame = pParent ? pParent->mpWindowImpl->mpFrame : NULL;
// m_pImpl = pSVData->mpDefInst->CreateChildFrame( pSystemParentData, nFrameStyle | SAL_FRAME_STYLE_PLUG );
- m_pImpl = new VclMessageDialog(pParent, rMessage, eMessageType, eButtonsType);
+ m_xImpl = VclPtr<VclMessageDialog>::Create(pParent, rMessage, eMessageType, eButtonsType);
+}
+
+MessageDialog::~MessageDialog()
+{
+ disposeOnce();
}
void VclMessageDialog::create_owned_areas()
diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx
index c08a60168a93..0bc02e5e0614 100644
--- a/vcl/source/window/syswin.cxx
+++ b/vcl/source/window/syswin.cxx
@@ -93,6 +93,7 @@ SystemWindow::SystemWindow(WindowType nType)
: Window(nType)
, mbIsDefferedInit(false)
{
+ fprintf(stderr, "SystemWindow ctor %p\n", this);
Init();
}
@@ -106,11 +107,13 @@ void SystemWindow::loadUI(vcl::Window* pParent, const OString& rID, const OUStri
SystemWindow::~SystemWindow()
{
+ fprintf(stderr, "SystemWindow dtor %p\n", this);
disposeOnce();
}
void SystemWindow::dispose()
{
+ fprintf(stderr, "SystemWindow dispose %p\n", this);
maLayoutIdle.Stop();
delete mpImplData;
mpImplData = NULL;