summaryrefslogtreecommitdiff
path: root/cui/source/options
diff options
context:
space:
mode:
Diffstat (limited to 'cui/source/options')
-rw-r--r--cui/source/options/personalization.cxx15
-rw-r--r--cui/source/options/personalization.hxx3
2 files changed, 17 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 )
{
diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx
index 499a0a0e8287..c3ff06e3bcf5 100644
--- a/cui/source/options/personalization.hxx
+++ b/cui/source/options/personalization.hxx
@@ -50,6 +50,9 @@ private:
/// Handle the Persona selection
DECL_LINK( SelectPersona, PushButton* );
+ /// When 'own' is chosen, but the background image or Persona is not chosen yet.
+ DECL_LINK( ForceSelect, RadioButton* );
+
/// Download the bitmaps + color settings, and copy them to user's profile.
bool CopyPersonaToGallery( const OUString &rURL );
};