diff options
author | Rachit Gupta <rachitgupta1792@gmail.com> | 2014-08-05 21:27:20 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-08-14 19:43:33 +0200 |
commit | 3fcd1064b31af66f5575a27e5ebbf7659d7675bd (patch) | |
tree | 3252e9e29fa06e598f0716c1376a7585c619f293 /cui | |
parent | 53162944da82a837bfe83b71b47b380280f779c6 (diff) |
Changed Select Persona Dialog.
The result buttons are visible initially but are disabled. These get
enabled when the results are available.
A little code clean up.
Change-Id: I6217d59220d871909bd001a6c7f3636b05cdf911
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/options/personalization.cxx | 30 | ||||
-rw-r--r-- | cui/uiconfig/ui/select_persona_dialog.ui | 9 |
2 files changed, 20 insertions, 19 deletions
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index 2e53087ece47..90ce9a3f69fc 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -74,31 +74,20 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent ) m_pCancelButton->SetClickHdl( LINK( this, SelectPersonaDialog, ActionCancel ) ); get( m_vResultList[0], "result1" ); - m_vResultList[0]->SetClickHdl( LINK( this, SelectPersonaDialog, SelectPersona ) ); - get( m_vResultList[1], "result2" ); - m_vResultList[1]->SetClickHdl( LINK( this, SelectPersonaDialog, SelectPersona ) ); - get( m_vResultList[2], "result3" ); - m_vResultList[2]->SetClickHdl( LINK( this, SelectPersonaDialog, SelectPersona ) ); - get( m_vResultList[3], "result4" ); - m_vResultList[3]->SetClickHdl( LINK( this, SelectPersonaDialog, SelectPersona ) ); - get( m_vResultList[4], "result5" ); - m_vResultList[4]->SetClickHdl( LINK( this, SelectPersonaDialog, SelectPersona ) ); - get( m_vResultList[5], "result6" ); - m_vResultList[5]->SetClickHdl( LINK( this, SelectPersonaDialog, SelectPersona ) ); - get( m_vResultList[6], "result7" ); - m_vResultList[6]->SetClickHdl( LINK( this, SelectPersonaDialog, SelectPersona ) ); - get( m_vResultList[7], "result8" ); - m_vResultList[7]->SetClickHdl( LINK( this, SelectPersonaDialog, SelectPersona ) ); - get( m_vResultList[8], "result9" ); - m_vResultList[8]->SetClickHdl( LINK( this, SelectPersonaDialog, SelectPersona ) ); + + for (sal_Int32 nIndex = 0; nIndex < 9; ++nIndex) + { + m_vResultList[nIndex]->SetClickHdl( LINK( this, SelectPersonaDialog, SelectPersona ) ); + m_vResultList[nIndex]->Disable(); + } } OUString SelectPersonaDialog::GetSelectedPersona() const @@ -216,7 +205,7 @@ void SelectPersonaDialog::SetProgress( OUString& rProgress ) void SelectPersonaDialog::SetImages( Image aImage, sal_Int32 nIndex ) { - m_vResultList[nIndex]->Show(); + m_vResultList[nIndex]->Enable(); m_vResultList[nIndex]->SetModeImage( aImage ); } @@ -230,7 +219,10 @@ void SelectPersonaDialog::ClearSearchResults() m_vPersonaSettings.clear(); m_aSelectedPersona = ""; for( sal_Int32 nIndex = 0; nIndex < 9; nIndex++ ) - m_vResultList[nIndex]->Hide(); + { + m_vResultList[nIndex]->Disable(); + m_vResultList[nIndex]->SetModeImage(Image()); + } } SvxPersonalizationTabPage::SvxPersonalizationTabPage( Window *pParent, const SfxItemSet &rSet ) diff --git a/cui/uiconfig/ui/select_persona_dialog.ui b/cui/uiconfig/ui/select_persona_dialog.ui index 0d99baea1121..2826a19d3f80 100644 --- a/cui/uiconfig/ui/select_persona_dialog.ui +++ b/cui/uiconfig/ui/select_persona_dialog.ui @@ -262,6 +262,7 @@ <property name="column_homogeneous">True</property> <child> <object class="GtkButton" id="result1"> + <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> @@ -276,6 +277,7 @@ </child> <child> <object class="GtkButton" id="result2"> + <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> @@ -290,6 +292,7 @@ </child> <child> <object class="GtkButton" id="result3"> + <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> @@ -304,6 +307,7 @@ </child> <child> <object class="GtkButton" id="result4"> + <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> @@ -318,6 +322,7 @@ </child> <child> <object class="GtkButton" id="result5"> + <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> @@ -332,6 +337,7 @@ </child> <child> <object class="GtkButton" id="result6"> + <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> @@ -346,6 +352,7 @@ </child> <child> <object class="GtkButton" id="result7"> + <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> @@ -360,6 +367,7 @@ </child> <child> <object class="GtkButton" id="result8"> + <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> @@ -374,6 +382,7 @@ </child> <child> <object class="GtkButton" id="result9"> + <property name="visible">True</property> <property name="can_focus">True</property> <property name="receives_default">True</property> <property name="hexpand">True</property> |