Kaydet (Commit) ef0217f2 authored tarafından Miklos Vajna's avatar Miklos Vajna

abpilot: add checkbox to embed data source in datasourcepage

Change-Id: Iea9984af3f08ed214815b9477019695f2339a7f3
üst eea5ac79
......@@ -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
......
......@@ -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();
......
......@@ -33,6 +33,20 @@ Now, just enter the name under which you want to register the data source in %PR
<property name="can_focus">False</property>
<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>
......@@ -40,7 +54,7 @@ Now, just enter the name under which you want to register the data source in %PR
<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>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment