diff options
author | Rachit Gupta <rachitgupta1792@gmail.com> | 2014-06-02 23:26:11 +0530 |
---|---|---|
committer | Rachit Gupta <rachitgupta1792@gmail.com> | 2014-08-04 20:27:45 +0530 |
commit | 91249abbf0136096f6fc0b5b31575dd666e2cb7a (patch) | |
tree | 127bdc5fbcfb86cee34d423b16915234191ce9ca | |
parent | 4c4c1d492d1181f3c691283a9935eddb2a01b0a5 (diff) |
Changed images to buttons so they are clickable.
Changed some variable names too.
Change-Id: I166d996389c84d00782cba42169c991f8f0f923e
-rw-r--r-- | cui/source/options/personalization.cxx | 28 | ||||
-rw-r--r-- | cui/source/options/personalization.hxx | 2 | ||||
-rw-r--r-- | cui/uiconfig/ui/select_persona_dialog.ui | 83 |
3 files changed, 72 insertions, 41 deletions
diff --git a/cui/source/options/personalization.cxx b/cui/source/options/personalization.cxx index 8493fdd2952d..838652de5667 100644 --- a/cui/source/options/personalization.cxx +++ b/cui/source/options/personalization.cxx @@ -43,15 +43,15 @@ SelectPersonaDialog::SelectPersonaDialog( Window *pParent ) get( m_pProgressLabel, "progress_label" ); - get(m_vImageList[0], "image1"); - get(m_vImageList[1], "image2"); - get(m_vImageList[2], "image3"); - get(m_vImageList[3], "image4"); - get(m_vImageList[4], "image5"); - get(m_vImageList[5], "image6"); - get(m_vImageList[6], "image7"); - get(m_vImageList[7], "image8"); - get(m_vImageList[8], "image9"); + get(m_vResultList[0], "result1"); + get(m_vResultList[1], "result2"); + get(m_vResultList[2], "result3"); + get(m_vResultList[3], "result4"); + get(m_vResultList[4], "result5"); + get(m_vResultList[5], "result6"); + get(m_vResultList[6], "result7"); + get(m_vResultList[7], "result8"); + get(m_vResultList[8], "result9"); } OUString SelectPersonaDialog::GetPersonaURL() const @@ -86,7 +86,9 @@ void SelectPersonaDialog::SetImages( std::vector<Image> &rImageList ) sal_Int32 nCount = 0; for( std::vector<Image>::iterator it=rImageList.begin(); it!=rImageList.end(); ++it ) { - m_vImageList[nCount++]->SetImage( *it ); + m_vResultList[nCount]->Show(); + m_vResultList[nCount]->SetModeImage( *it ); + nCount++; } } @@ -357,7 +359,7 @@ void SearchAndParseThread::execute() std::vector<OUString> vLearnmoreURLs = pHandler->getLearnmoreURLs(); std::vector<OUString>::iterator it; - std::vector<Image> vImageList; + std::vector<Image> vResultList; GraphicFilter aFilter; Graphic aGraphic; @@ -367,9 +369,9 @@ void SearchAndParseThread::execute() INetURLObject aURLObj( sHeaderFile ); aFilter.ImportGraphic( aGraphic, aURLObj ); Bitmap aBmp = aGraphic.GetBitmap(); - vImageList.push_back( Image( aBmp ) ); + vResultList.push_back( Image( aBmp ) ); } - m_pPersonaDialog->SetImages( vImageList ); + m_pPersonaDialog->SetImages( vResultList ); sProgress = ""; m_pPersonaDialog->SetProgress( sProgress ); m_pPersonaDialog->setOptimalLayoutSize(); diff --git a/cui/source/options/personalization.hxx b/cui/source/options/personalization.hxx index 2c28f5a38c83..4be8f8d88ea4 100644 --- a/cui/source/options/personalization.hxx +++ b/cui/source/options/personalization.hxx @@ -65,7 +65,7 @@ private: Edit *m_pEdit; ///< The input line for the Persona URL PushButton *m_pButton; FixedText *m_pProgressLabel; - FixedImage *m_vImageList[9]; + PushButton *m_vResultList[9]; public: SelectPersonaDialog( Window *pParent ); diff --git a/cui/uiconfig/ui/select_persona_dialog.ui b/cui/uiconfig/ui/select_persona_dialog.ui index ab4c89cb052a..2c9f5a1afc2f 100644 --- a/cui/uiconfig/ui/select_persona_dialog.ui +++ b/cui/uiconfig/ui/select_persona_dialog.ui @@ -132,11 +132,16 @@ <object class="GtkGrid" id="grid1"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="row_spacing">6</property> + <property name="column_spacing">6</property> <child> - <object class="GtkImage" id="image1"> + <object class="GtkButton" id="result1"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="left_attach">0</property> @@ -146,10 +151,13 @@ </packing> </child> <child> - <object class="GtkImage" id="image2"> + <object class="GtkButton" id="result2"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="left_attach">1</property> @@ -159,10 +167,13 @@ </packing> </child> <child> - <object class="GtkImage" id="image3"> + <object class="GtkButton" id="result3"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="left_attach">2</property> @@ -172,10 +183,13 @@ </packing> </child> <child> - <object class="GtkImage" id="image4"> + <object class="GtkButton" id="result4"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="left_attach">0</property> @@ -185,10 +199,13 @@ </packing> </child> <child> - <object class="GtkImage" id="image5"> + <object class="GtkButton" id="result5"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="left_attach">1</property> @@ -198,10 +215,13 @@ </packing> </child> <child> - <object class="GtkImage" id="image6"> + <object class="GtkButton" id="result6"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="left_attach">2</property> @@ -211,10 +231,13 @@ </packing> </child> <child> - <object class="GtkImage" id="image7"> + <object class="GtkButton" id="result7"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="left_attach">0</property> @@ -224,10 +247,13 @@ </packing> </child> <child> - <object class="GtkImage" id="image8"> + <object class="GtkButton" id="result8"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="left_attach">1</property> @@ -237,10 +263,13 @@ </packing> </child> <child> - <object class="GtkImage" id="image9"> + <object class="GtkButton" id="result9"> <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-missing-image</property> + <property name="can_focus">True</property> + <property name="receives_default">True</property> + <child> + <placeholder/> + </child> </object> <packing> <property name="left_attach">2</property> |