diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-04 12:01:25 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-06-04 15:14:22 +0200 |
commit | ef0217f24e99a3313ed1467c6f2f496a14777db2 (patch) | |
tree | 601502573d5a2ab3c9fb0dd7c5114f78e9e6e317 /extensions | |
parent | eea5ac7910d61796d77fe2cc03681dd24bb7dd95 (diff) |
abpilot: add checkbox to embed data source in datasourcepage
Change-Id: Iea9984af3f08ed214815b9477019695f2339a7f3
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/abpilot/abpfinalpage.cxx | 16 | ||||
-rw-r--r-- | extensions/source/abpilot/abpfinalpage.hxx | 3 | ||||
-rw-r--r-- | extensions/uiconfig/sabpilot/ui/datasourcepage.ui | 22 |
3 files changed, 37 insertions, 4 deletions
diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index 0be3156f4329..ccbd9b637bde 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -49,7 +49,9 @@ namespace abp get(m_pLocation, "location"); get(m_pBrowse, "browse"); get(m_pRegisterName, "available"); + get(m_pEmbed, "embed"); get(m_pNameLabel, "nameft"); + get(m_pLocationLabel, "locationft"); get(m_pName, "name"); get(m_pDuplicateNameError, "warning"); m_pLocationController = new svx::DatabaseLocationInputController(_pParent->getORB(), @@ -59,6 +61,9 @@ namespace abp m_pLocation->SetModifyHdl( LINK(this, FinalPage, OnNameModified) ); m_pRegisterName->SetClickHdl( LINK( this, FinalPage, OnRegister ) ); m_pRegisterName->Check(true); + m_pEmbed->SetClickHdl( LINK( this, FinalPage, OnEmbed ) ); + m_pEmbed->Check(true); + OnEmbed(m_pEmbed); } FinalPage::~FinalPage() @@ -72,7 +77,9 @@ namespace abp m_pLocation.clear(); m_pBrowse.clear(); m_pRegisterName.clear(); + m_pEmbed.clear(); m_pNameLabel.clear(); + m_pLocationLabel.clear(); m_pName.clear(); m_pDuplicateNameError.clear(); AddressBookSourcePage::dispose(); @@ -219,6 +226,15 @@ namespace abp return 0L; } + IMPL_LINK_NOARG(FinalPage, OnEmbed) + { + bool bEmbed = m_pEmbed->IsChecked(); + m_pLocationLabel->Enable(!bEmbed); + m_pLocation->Enable(!bEmbed); + m_pBrowse->Enable(!bEmbed); + return 0L; + } + } // namespace abp diff --git a/extensions/source/abpilot/abpfinalpage.hxx b/extensions/source/abpilot/abpfinalpage.hxx index d601e8d3e48d..ceb1d0b66353 100644 --- a/extensions/source/abpilot/abpfinalpage.hxx +++ b/extensions/source/abpilot/abpfinalpage.hxx @@ -38,7 +38,9 @@ namespace abp VclPtr< ::svt::OFileURLControl> m_pLocation; VclPtr<PushButton> m_pBrowse; VclPtr<CheckBox> m_pRegisterName; + VclPtr<CheckBox> m_pEmbed; VclPtr<FixedText> m_pNameLabel; + VclPtr<FixedText> m_pLocationLabel; VclPtr<Edit> m_pName; VclPtr<FixedText> m_pDuplicateNameError; @@ -67,6 +69,7 @@ namespace abp private: DECL_LINK( OnNameModified, Edit* ); DECL_LINK(OnRegister, void *); + DECL_LINK(OnEmbed, void *); bool isValidName() const; void implCheckName(); diff --git a/extensions/uiconfig/sabpilot/ui/datasourcepage.ui b/extensions/uiconfig/sabpilot/ui/datasourcepage.ui index cce60fe384b8..0339bd75e5df 100644 --- a/extensions/uiconfig/sabpilot/ui/datasourcepage.ui +++ b/extensions/uiconfig/sabpilot/ui/datasourcepage.ui @@ -34,13 +34,27 @@ Now, just enter the name under which you want to register the data source in %PR <property name="hexpand">True</property> <property name="row_spacing">6</property> <child> + <object class="GtkCheckButton" id="embed"> + <property name="label" translatable="yes">Embed this address book definition into the current document.</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + </packing> + </child> + <child> <object class="GtkGrid" id="grid4"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="hexpand">True</property> <property name="column_spacing">12</property> <child> - <object class="GtkLabel" id="label1"> + <object class="GtkLabel" id="locationft"> <property name="visible">True</property> <property name="can_focus">False</property> <property name="xalign">0</property> @@ -92,7 +106,7 @@ Now, just enter the name under which you want to register the data source in %PR </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="top_attach">1</property> <property name="width">1</property> <property name="height">1</property> </packing> @@ -108,7 +122,7 @@ Now, just enter the name under which you want to register the data source in %PR </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="top_attach">2</property> <property name="width">1</property> <property name="height">1</property> </packing> @@ -190,7 +204,7 @@ Now, just enter the name under which you want to register the data source in %PR </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="top_attach">3</property> <property name="width">1</property> <property name="height">1</property> </packing> |