Kaydet (Commit) 3fcd1064 authored tarafından Rachit Gupta's avatar Rachit Gupta Kaydeden (comit) Jan Holesovsky

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
üst 53162944
......@@ -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 )
......
......@@ -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>
......
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