diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-12-24 09:55:46 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-12-24 10:21:21 +0000 |
commit | 0dce3178fa75ad1d6f663ccd6548a1c54c6a93bd (patch) | |
tree | f129998fb0e8746f7418432481f373cb86a9c866 /cui | |
parent | 2544a2a810bc9182d5f062cafb41b5be96111982 (diff) |
convert gallery theme properties dialog to .ui
Change-Id: I32c3be9e12d1b3dafa0dc9876657844bd77c9e95
Diffstat (limited to 'cui')
-rw-r--r-- | cui/UIConfig_cui.mk | 1 | ||||
-rw-r--r-- | cui/source/dialogs/cuigaldlg.cxx | 20 | ||||
-rw-r--r-- | cui/source/dialogs/gallery.src | 24 | ||||
-rw-r--r-- | cui/source/inc/cuigaldlg.hxx | 9 | ||||
-rw-r--r-- | cui/source/inc/gallery.hrc | 4 | ||||
-rw-r--r-- | cui/uiconfig/ui/gallerythemedialog.ui | 133 |
6 files changed, 151 insertions, 40 deletions
diff --git a/cui/UIConfig_cui.mk b/cui/UIConfig_cui.mk index 174b243c7359..8679be2dc1b0 100644 --- a/cui/UIConfig_cui.mk +++ b/cui/UIConfig_cui.mk @@ -44,6 +44,7 @@ $(eval $(call gb_UIConfig_add_uifiles,cui,\ cui/uiconfig/ui/effectspage \ cui/uiconfig/ui/formatcellsdialog \ cui/uiconfig/ui/gallerysearchprogress \ + cui/uiconfig/ui/gallerythemedialog \ 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 b49e8a57a1e9..ea9afc1d166a 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -589,17 +589,19 @@ IMPL_LINK_NOARG(GalleryIdDialog, ClickOkHdl) // - GalleryThemeProperties - // -------------------------- -GalleryThemeProperties::GalleryThemeProperties( Window* pParent, ExchangeData* _pData, SfxItemSet* pItemSet ) : - SfxTabDialog ( pParent, CUI_RES( RID_SVXTABDLG_GALLERYTHEME ), pItemSet ), - pData ( _pData ) +GalleryThemeProperties::GalleryThemeProperties(Window* pParent, + ExchangeData* _pData, SfxItemSet* pItemSet) + : SfxTabDialog( pParent, "GalleryThemeDialog", + "cui/ui/gallerythemedialog.ui", pItemSet) + , pData(_pData) + , m_nGeneralPageId(0) + , m_nFilesPageId(0) { - FreeResource(); - - AddTabPage( RID_SVXTABPAGE_GALLERY_GENERAL, TPGalleryThemeGeneral::Create, 0 ); - AddTabPage( RID_SVXTABPAGE_GALLERYTHEME_FILES, TPGalleryThemeProperties::Create, 0 ); + m_nGeneralPageId = AddTabPage("general", TPGalleryThemeGeneral::Create, 0); + m_nFilesPageId = AddTabPage("files", TPGalleryThemeProperties::Create, 0); if( pData->pTheme->IsReadOnly() ) - RemoveTabPage( RID_SVXTABPAGE_GALLERYTHEME_FILES ); + RemoveTabPage(m_nFilesPageId); OUString aText( GetText() ); @@ -615,7 +617,7 @@ GalleryThemeProperties::GalleryThemeProperties( Window* pParent, ExchangeData* _ void GalleryThemeProperties::PageCreated( sal_uInt16 nId, SfxTabPage &rPage ) { - if( RID_SVXTABPAGE_GALLERY_GENERAL == nId ) + if (nId == m_nGeneralPageId) ( (TPGalleryThemeGeneral&) rPage ).SetXChgData( pData ); else ( (TPGalleryThemeProperties&) rPage ).SetXChgData( pData ); diff --git a/cui/source/dialogs/gallery.src b/cui/source/dialogs/gallery.src index a80d60448d0e..d1a741359e09 100644 --- a/cui/source/dialogs/gallery.src +++ b/cui/source/dialogs/gallery.src @@ -24,30 +24,6 @@ #define MASKCOLOR MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; -TabDialog RID_SVXTABDLG_GALLERYTHEME -{ - OutputSize = TRUE ; - SVLook = TRUE ; - Text [ en-US ] = "Properties of " ; - Moveable = TRUE ; - TabControl 1 - { - OutputSize = TRUE ; - PageList = - { - PageItem - { - Identifier = RID_SVXTABPAGE_GALLERY_GENERAL ; - Text [ en-US ] = "General" ; - }; - PageItem - { - Identifier = RID_SVXTABPAGE_GALLERYTHEME_FILES ; - Text [ en-US ] = "Files" ; - }; - }; - }; -}; /******************************************************************************/ diff --git a/cui/source/inc/cuigaldlg.hxx b/cui/source/inc/cuigaldlg.hxx index 2e8d82970399..eb242ef7dece 100644 --- a/cui/source/inc/cuigaldlg.hxx +++ b/cui/source/inc/cuigaldlg.hxx @@ -197,12 +197,13 @@ class GalleryThemeProperties : public SfxTabDialog { ExchangeData* pData; - virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage ); + sal_uInt16 m_nGeneralPageId; + sal_uInt16 m_nFilesPageId; -public: + virtual void PageCreated(sal_uInt16 nId, SfxTabPage &rPage); - GalleryThemeProperties( Window* pParent, ExchangeData* pData, SfxItemSet* pItemSet ); - ~GalleryThemeProperties() {} +public: + GalleryThemeProperties(Window* pParent, ExchangeData* pData, SfxItemSet* pItemSet); }; class TPGalleryThemeGeneral : public SfxTabPage diff --git a/cui/source/inc/gallery.hrc b/cui/source/inc/gallery.hrc index 61b038a555ad..e255e7592c41 100644 --- a/cui/source/inc/gallery.hrc +++ b/cui/source/inc/gallery.hrc @@ -18,9 +18,7 @@ */ #include <cuires.hrc> -// Gallery TabDialogs/TabPages -#define RID_SVXTABDLG_GALLERYTHEME (RID_CUI_GALLERY_START + 2) - +// Gallery TabPages #define RID_SVXTABPAGE_GALLERY_GENERAL (RID_CUI_GALLERY_START + 1) #define RID_SVXTABPAGE_GALLERYTHEME_FILES (RID_CUI_GALLERY_START + 4) diff --git a/cui/uiconfig/ui/gallerythemedialog.ui b/cui/uiconfig/ui/gallerythemedialog.ui new file mode 100644 index 000000000000..8fe89d428b57 --- /dev/null +++ b/cui/uiconfig/ui/gallerythemedialog.ui @@ -0,0 +1,133 @@ +<?xml version="1.0" encoding="UTF-8"?> +<interface> + <!-- interface-requires gtk+ 3.0 --> + <object class="GtkDialog" id="GalleryThemeDialog"> + <property name="can_focus">False</property> + <property name="border_width">6</property> + <property name="title" translatable="yes">Properties of </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="ok"> + <property name="label">gtk-ok</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">0</property> + </packing> + </child> + <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="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> + <child> + <object class="GtkButton" id="help"> + <property name="label">gtk-help</property> + <property name="visible">True</property> + <property name="can_focus">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">2</property> + </packing> + </child> + <child> + <object class="GtkButton" id="reset"> + <property name="label">gtk-revert-to-saved</property> + <property name="visible">True</property> + <property name="can_focus">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">3</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="GtkNotebook" id="tabcontrol"> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="general"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">General</property> + </object> + <packing> + <property name="tab_fill">False</property> + </packing> + </child> + <child> + <placeholder/> + </child> + <child type="tab"> + <object class="GtkLabel" id="files"> + <property name="visible">True</property> + <property name="can_focus">False</property> + <property name="label" translatable="yes">Files</property> + </object> + <packing> + <property name="position">1</property> + <property name="tab_fill">False</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">ok</action-widget> + <action-widget response="0">cancel</action-widget> + <action-widget response="0">help</action-widget> + <action-widget response="0">reset</action-widget> + </action-widgets> + </object> +</interface> |