diff options
author | Jan Holesovsky <kendy@suse.cz> | 2012-12-06 08:29:02 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2012-12-06 08:42:02 +0100 |
commit | 93fce951784cd561f308c5019aa0b3a178116a92 (patch) | |
tree | 2778fac2c43f181c5f6847e1087bdd8b78205cda /cui/source/options/personalization.cxx | |
parent | 4774eff21caa200fff6ffc03c9f7304d49c1d6e7 (diff) |
Personas: Force selection when the 'own' clicked, but nothing chosen yet.
Change-Id: Iaf5a82a7f12ed7112f86bfa1c5f243ab00ca4285
Diffstat (limited to 'cui/source/options/personalization.cxx')
-rw-r--r-- | cui/source/options/personalization.cxx | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index 33fb11d77056..562b7b48d16a 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -90,7 +90,9 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( Window *pParent, const Sfx // background image get( m_pNoBackground, "no_background" ); get( m_pDefaultBackground, "default_background" ); + get( m_pOwnBackground, "own_background" ); + m_pOwnBackground->SetClickHdl( LINK( this, SvxPersonalizationTabPage, ForceSelect ) ); get( m_pSelectBackground, "select_background" ); m_pSelectBackground->SetClickHdl( LINK( this, SvxPersonalizationTabPage, SelectBackground ) ); @@ -98,10 +100,11 @@ SvxPersonalizationTabPage::SvxPersonalizationTabPage( Window *pParent, const Sfx // persona get( m_pNoPersona, "no_persona" ); get( m_pDefaultPersona, "default_persona" ); + get( m_pOwnPersona, "own_persona" ); + m_pOwnPersona->SetClickHdl( LINK( this, SvxPersonalizationTabPage, ForceSelect ) ); get( m_pSelectPersona, "select_persona" ); - LINK( this, SvxPersonalizationTabPage, SelectPersona ); m_pSelectPersona->SetClickHdl( LINK( this, SvxPersonalizationTabPage, SelectPersona ) ); } @@ -245,6 +248,16 @@ IMPL_LINK( SvxPersonalizationTabPage, SelectPersona, PushButton*, /*pButton*/ ) return 0; } +IMPL_LINK( SvxPersonalizationTabPage, ForceSelect, RadioButton*, pButton ) +{ + if ( pButton == m_pOwnBackground && m_aBackgroundURL.isEmpty() ) + SelectBackground( m_pSelectBackground ); + else if ( pButton == m_pOwnPersona && m_aPersonaSettings.isEmpty() ) + SelectPersona( m_pSelectPersona ); + + return 0; +} + /// Find the value on the Persona page, and convert it to a usable form. static OUString searchValue( const OString &rBuffer, sal_Int32 from, const OString &rIdentifier ) { |