diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-11 17:08:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-11 20:36:07 +0000 |
commit | c971c1fa66570bc6cbf658aa5c9cee15fc470bd2 (patch) | |
tree | 410cec6596209caf95e79304e4a9b8879ee6b16e /cui | |
parent | 3d5b8f5b662cdede27942c231bd6a2922f6237ee (diff) |
convert gallery update progress dialog to .ui
Change-Id: If1bcd040fabef1d352f04898f4bb583d9f4fc8c7
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 27 | ||||
-rw-r--r-- | cui/source/dialogs/gallery.src | 28 | ||||
-rw-r--r-- | cui/source/inc/cuigaldlg.hxx | 6 | ||||
-rw-r--r-- | cui/source/inc/gallery.hrc | 4 | ||||
-rw-r--r-- | cui/uiconfig/ui/galleryupdateprogress.ui | 100 |
6 files changed, 114 insertions, 52 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index bc0f07006d09..bd3097b03284 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -61,6 +61,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/gallerythemedialog \ cui/uiconfig/ui/gallerythemeiddialog \ cui/uiconfig/ui/gallerytitledialog \ + cui/uiconfig/ui/galleryupdateprogress \ cui/uiconfig/ui/hangulhanjaadddialog \ cui/uiconfig/ui/hangulhanjaoptdialog \ cui/uiconfig/ui/hatchpage \ diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index d7f09cd709a8..32d52e47e3d7 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -443,22 +443,17 @@ void TakeProgress::StartExecuteModal( const Link& rEndDialogHdl ) // - ActualizeProgress - - - -ActualizeProgress::ActualizeProgress( Window* pWindow, GalleryTheme* pThm ) : - ModalDialog ( pWindow, CUI_RES( RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS ) ), - aFtActualizeFile ( this, CUI_RES( FT_ACTUALIZE_FILE ) ), - aFLActualizeProgress ( this, CUI_RES( FL_ACTUALIZE_PROGRESS ) ), - aBtnCancel ( this, CUI_RES( BTN_CANCEL ) ), - pTimer(NULL), - pTheme ( pThm ) +ActualizeProgress::ActualizeProgress(Window* pWindow, GalleryTheme* pThm) + : ModalDialog(pWindow, "GalleryUpdateProgress", + "cui/ui/galleryupdateprogress.ui") + , pTimer(NULL) + , pTheme(pThm) { - FreeResource(); - aBtnCancel.SetClickHdl( LINK( this, ActualizeProgress, ClickCancelBtn ) ); + get(m_pFtActualizeFile, "file"); + get(m_pBtnCancel, "cancel"); + m_pBtnCancel->SetClickHdl( LINK( this, ActualizeProgress, ClickCancelBtn ) ); } - - short ActualizeProgress::Execute() { short nRet; @@ -515,9 +510,9 @@ IMPL_LINK( ActualizeProgress, ActualizeHdl, INetURLObject*, pURL ) if( pURL ) { - aFtActualizeFile.SetText( GetReducedString( *pURL, 30 ) ); - aFtActualizeFile.Flush(); - aFtActualizeFile.Sync(); + m_pFtActualizeFile->SetText( GetReducedString( *pURL, 30 ) ); + m_pFtActualizeFile->Flush(); + m_pFtActualizeFile->Sync(); } return 0; diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src index b7cc83c0edb6..21b7ed85b7d9 100644 --- a/cui/source/dialogs/gallery.src +++ b/cui/source/dialogs/gallery.src @@ -145,34 +145,6 @@ ModalDialog RID_SVXDLG_GALLERY_TAKE_PROGRESS /******************************************************************************/ -ModalDialog RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS -{ - HelpId = HID_GALLERY_ACTUALIZE; - OutputSize = TRUE ; - Border = TRUE ; - SVLook = TRUE ; - Size = MAP_APPFONT ( 124 , 56 ) ; - Text [ en-US ] = "Update" ; - Moveable = TRUE ; - FixedLine FL_ACTUALIZE_PROGRESS - { - Pos = MAP_APPFONT ( 6 , 3 ) ; - Size = MAP_APPFONT ( 112 , 8 ) ; - Text [ en-US ] = "File" ; - }; - FixedText FT_ACTUALIZE_FILE - { - Pos = MAP_APPFONT ( 12 , 14 ) ; - Size = MAP_APPFONT ( 100 , 10 ) ; - }; - CancelButton BTN_CANCEL - { - Pos = MAP_APPFONT ( 37 , 36 ) ; - Size = MAP_APPFONT ( 50 , 14 ) ; - TabStop = TRUE ; - }; -}; - String RID_SVXSTR_GALLERY_NOFILES { Text [ en-US ] = "<No Files>" ; diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 969ce2b38b54..1026503b198b 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -151,10 +151,8 @@ public: class ActualizeProgress : public ModalDialog { private: - - FixedText aFtActualizeFile; - FixedLine aFLActualizeProgress; - CancelButton aBtnCancel; + FixedText* m_pFtActualizeFile; + CancelButton* m_pBtnCancel; Timer* pTimer; GalleryTheme* pTheme; GalleryProgress aStatusProgress; diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc index 74cf43c0d101..5487b2556680 100644 --- a/cui/source/inc/gallery.hrc +++ b/cui/source/inc/gallery.hrc @@ -24,7 +24,6 @@ // Dialogs #define RID_SVXDLG_GALLERY_TAKE_PROGRESS (RID_CUI_GALLERY_START + 7) -#define RID_SVXDLG_GALLERY_ACTUALIZE_PROGRESS (RID_CUI_GALLERY_START + 8) // Gallery-Strings #define RID_SVXSTR_GALLERY_NOFILES (RID_CUI_GALLERY_START + 12) @@ -56,7 +55,4 @@ #define BTN_MADDIN1 8 #define BTN_MADDIN2 9 -#define FL_ACTUALIZE_PROGRESS 1 -#define FT_ACTUALIZE_FILE 1 - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/uiconfig/ui/galleryupdateprogress.ui b/cui/uiconfig/ui/galleryupdateprogress.ui new file mode 100644 index 000000000000..96634c6dce7f --- /dev/null +++ b/cui/uiconfig/ui/galleryupdateprogress.ui @@ -0,0 +1,100 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkDialog" id="GalleryUpdateProgress"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Update</property> + <property name="type_hint">normal</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="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="file"> + <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">File</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> + </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> |