Kaydet (Commit) 0dce3178 authored tarafından Caolán McNamara's avatar Caolán McNamara

convert gallery theme properties dialog to .ui

Change-Id: I32c3be9e12d1b3dafa0dc9876657844bd77c9e95
üst 2544a2a8
......@@ -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 \
......
......@@ -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 );
......
......@@ -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" ;
};
};
};
};
/******************************************************************************/
......
......@@ -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
......
......@@ -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)
......
<?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>
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