diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-17 11:59:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-17 12:15:59 +0000 |
commit | bd225bc2b8e0c46a2aa0e7366211452439caa622 (patch) | |
tree | 3e812ba91cd8d507721524b3a91d8975a3c8c09c /cui | |
parent | 0240aa98de2148be78a40a23b94fc24ac621412e (diff) |
convert gallery search progress dialog to .ui
Change-Id: I77d9530ebc6529d87e2484c8440794e246aab5b9
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 19 | ||||
-rw-r--r-- | cui/source/dialogs/gallery.src | 41 | ||||
-rw-r--r-- | cui/source/inc/cuigaldlg.hxx | 13 | ||||
-rw-r--r-- | cui/source/inc/gallery.hrc | 5 | ||||
-rw-r--r-- | cui/source/inc/helpid.hrc | 1 | ||||
-rw-r--r-- | cui/uiconfig/ui/gallerysearchprogress.ui | 142 |
7 files changed, 157 insertions, 65 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 8101925d3eb4..1ae0d8377d5e 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -42,6 +42,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/dbregisterpage \ cui/uiconfig/ui/effectspage \ cui/uiconfig/ui/formatcellsdialog \ + cui/uiconfig/ui/gallerysearchprogress \ cui/uiconfig/ui/gallerythemeiddialog \ cui/uiconfig/ui/gallerytitledialog \ cui/uiconfig/ui/hangulhanjaadddialog \ diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index a81dbd8201e6..b49e8a57a1e9 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -204,17 +204,16 @@ void SearchThread::ImplSearch( const INetURLObject& rStartURL, // - SearchProgress - // ------------------ -SearchProgress::SearchProgress( Window* pParent, const INetURLObject& rStartURL ) : - ModalDialog ( pParent, CUI_RES(RID_SVXDLG_GALLERY_SEARCH_PROGRESS ) ), - aFtSearchDir ( this, CUI_RES( FT_SEARCH_DIR ) ), - aFLSearchDir ( this, CUI_RES( FL_SEARCH_DIR ) ), - aFtSearchType ( this, CUI_RES( FT_SEARCH_TYPE ) ), - aFLSearchType ( this, CUI_RES( FL_SEARCH_TYPE ) ), - aBtnCancel ( this, CUI_RES( BTN_CANCEL ) ), - parent_(pParent), startUrl_(rStartURL) +SearchProgress::SearchProgress( Window* pParent, const INetURLObject& rStartURL ) + : ModalDialog(pParent, "GallerySearchProgress", "cui/ui/gallerysearchprogress.ui") + , parent_(pParent) + , startUrl_(rStartURL) { - FreeResource(); - aBtnCancel.SetClickHdl( LINK( this, SearchProgress, ClickCancelBtn ) ); + get(m_pFtSearchDir, "dir"); + get(m_pFtSearchType, "file"); + m_pFtSearchType->set_width_request(m_pFtSearchType->get_preferred_size().Width()); + get(m_pBtnCancel, "cancel"); + m_pBtnCancel->SetClickHdl( LINK( this, SearchProgress, ClickCancelBtn ) ); } // ------------------------------------------------------------------------ diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src index cba3d941f030..a80d60448d0e 100644 --- a/cui/source/dialogs/gallery.src +++ b/cui/source/dialogs/gallery.src @@ -219,47 +219,6 @@ TabPage RID_SVXTABPAGE_GALLERYTHEME_FILES /******************************************************************************/ -ModalDialog RID_SVXDLG_GALLERY_SEARCH_PROGRESS -{ - HelpId = HID_GALLERY_SEARCH ; - OutputSize = TRUE ; - Border = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 124 , 86 ) ; - Text [ en-US ] = "Find" ; - Moveable = TRUE ; - FixedLine FL_SEARCH_DIR - { - Pos = MAP_APPFONT ( 6 , 33 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "Directory" ; - }; - FixedText FT_SEARCH_DIR - { - Pos = MAP_APPFONT ( 12 , 44 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 37 , 66 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; - FixedLine FL_SEARCH_TYPE - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "File type" ; - }; - FixedText FT_SEARCH_TYPE - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; - }; -}; - -/******************************************************************************/ - ModalDialog RID_SVXDLG_GALLERY_TAKE_PROGRESS { HelpId = HID_GALLERY_APPLY ; diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 67d2f9ee8498..2e8d82970399 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -80,12 +80,9 @@ public: class SearchProgress : public ModalDialog { private: - - FixedText aFtSearchDir; - FixedLine aFLSearchDir; - FixedText aFtSearchType; - FixedLine aFLSearchType; - CancelButton aBtnCancel; + FixedText* m_pFtSearchDir; + FixedText* m_pFtSearchType; + CancelButton* m_pBtnCancel; Window * parent_; INetURLObject startUrl_; rtl::Reference< SearchThread > maSearchThread; @@ -101,8 +98,8 @@ public: virtual short Execute(); virtual void StartExecuteModal( const Link& rEndDialogHdl ); - void SetFileType( const OUString& rType ) { aFtSearchType.SetText( rType ); } - void SetDirectory( const INetURLObject& rURL ) { aFtSearchDir.SetText( GetReducedString( rURL, 30 ) ); } + void SetFileType( const OUString& rType ) { m_pFtSearchType->SetText( rType ); } + void SetDirectory( const INetURLObject& rURL ) { m_pFtSearchDir->SetText( GetReducedString( rURL, 30 ) ); } }; class TakeThread: public salhelper::Thread diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc index ce977055a174..61b038a555ad 100644 --- a/cui/source/inc/gallery.hrc +++ b/cui/source/inc/gallery.hrc @@ -25,7 +25,6 @@ #define RID_SVXTABPAGE_GALLERYTHEME_FILES (RID_CUI_GALLERY_START + 4) // Dialogs -#define RID_SVXDLG_GALLERY_SEARCH_PROGRESS (RID_CUI_GALLERY_START + 6) #define RID_SVXDLG_GALLERY_TAKE_PROGRESS (RID_CUI_GALLERY_START + 7) #define RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS (RID_CUI_GALLERY_START + 8) @@ -53,10 +52,6 @@ #define CBX_PREVIEW 3 #define FT_FILETYPE 2 #define CBB_FILETYPE 1 -#define FL_SEARCH_DIR 1 -#define FL_SEARCH_TYPE 2 -#define FT_SEARCH_DIR 1 -#define FT_SEARCH_TYPE 2 #define FL_TAKE_PROGRESS 1 #define FT_TAKE_FILE 1 #define BTN_TAKEALL 1 diff --git a/cui/source/inc/helpid.hrc b/cui/source/inc/helpid.hrc index e0c5d2fa09b6..11bbf69bb77f 100644 --- a/cui/source/inc/helpid.hrc +++ b/cui/source/inc/helpid.hrc @@ -183,7 +183,6 @@ #define HID_SEARCH_BTN_SEARCH "CUI_HID_SEARCH_BTN_SEARCH" #define HID_SEARCH_BTN_CLOSE "CUI_HID_SEARCH_BTN_CLOSE" #define HID_GALLERY_BROWSER "CUI_HID_GALLERY_BROWSER" -#define HID_GALLERY_SEARCH "CUI_HID_GALLERY_SEARCH" #define HID_GALLERY_APPLY "CUI_HID_GALLERY_APPLY" #define HID_CONFIG_ACCEL "CUI_HID_CONFIG_ACCEL" #define HID_ACCELCONFIG_LISTBOX "CUI_HID_ACCELCONFIG_LISTBOX" diff --git a/cui/uiconfig/ui/gallerysearchprogress.ui b/cui/uiconfig/ui/gallerysearchprogress.ui new file mode 100644 index 000000000000..821a896c56a9 --- /dev/null +++ b/cui/uiconfig/ui/gallerysearchprogress.ui @@ -0,0 +1,142 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="GallerySearchProgress"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Find</property> + <property name="type_hint">dialog</property> + <child internal-child="vbox"> + <object class="GtkBox" id="dialog-vbox1"> + <property name="can_focus">False</property> + <property name="orientation">vertical</property> + <property name="spacing">12</property> + <child internal-child="action_area"> + <object class="GtkButtonBox" id="dialog-action_area1"> + <property name="can_focus">False</property> + <property name="layout_style">end</property> + <child> + <object class="GtkButton" id="cancel"> + <property name="label">gtk-cancel</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">True</property> + <property name="receives_default">True</property> + <property name="use_stock">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="pack_type">end</property> + <property name="position">0</property> + </packing> + </child> + <child> + <object class="GtkGrid" id="grid1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="row_spacing">12</property> + <child> + <object class="GtkFrame" id="frame1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkLabel" id="file"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="xalign">0</property> + <property name="ellipsize">end</property> + <property name="width_chars">40</property> + <property name="single_line_mode">True</property> + <property name="max_width_chars">40</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label1"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">File type</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + <child> + <object class="GtkFrame" id="frame2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label_xalign">0</property> + <property name="shadow_type">none</property> + <child> + <object class="GtkAlignment" id="alignment2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="top_padding">6</property> + <property name="left_padding">12</property> + <child> + <object class="GtkLabel" id="dir"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="width_chars">40</property> + </object> + </child> + </object> + </child> + <child type="label"> + <object class="GtkLabel" id="label2"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Directory</property> + <attributes> + <attribute name="weight" value="bold"/> + </attributes> + </object> + </child> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + <property name="width">1</property> + <property name="height">1</property> + </packing> + </child> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="position">1</property> + </packing> + </child> + </object> + </child> + <action-widgets> + <action-widget response="0">cancel</action-widget> + </action-widgets> + </object> +</interface> |