summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-08-09 09:14:01 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-08-09 09:24:26 +0100
commit17664f377bf499cfa3438c95bbf5ac16ec7d8674 (patch)
tree22fb5a3887a72fcf520a5d4ba8bba99cda613f83
parent24de9f9a55b5b73a1c7bb863e4487d6349142cfc (diff)
convert wrap dialog to .ui
Change-Id: I453c7d50dad00f510770c425629594f1c197fdef
-rw-r--r--sfx2/uiconfig/ui/singletabdialog.ui2
-rw-r--r--sw/UIConfig_swriter.mk1
-rw-r--r--sw/source/ui/frmdlg/frmui.src4
-rw-r--r--sw/source/ui/frmdlg/wrap.cxx17
-rw-r--r--sw/source/ui/inc/frmui.hrc1
-rw-r--r--sw/source/ui/inc/wrap.hxx7
-rw-r--r--sw/uiconfig/swriter/ui/wrapdialog.ui81
7 files changed, 91 insertions, 22 deletions
diff --git a/sfx2/uiconfig/ui/singletabdialog.ui b/sfx2/uiconfig/ui/singletabdialog.ui
index 8ad458f39851..647f94636e00 100644
--- a/sfx2/uiconfig/ui/singletabdialog.ui
+++ b/sfx2/uiconfig/ui/singletabdialog.ui
@@ -8,7 +8,7 @@
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
- <property name="spacing">2</property>
+ <property name="spacing">12</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index cd3820989182..634ee531d7dc 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -148,6 +148,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/titlepage \
sw/uiconfig/swriter/ui/viewoptionspage \
sw/uiconfig/swriter/ui/wordcount \
+ sw/uiconfig/swriter/ui/wrapdialog \
sw/uiconfig/swriter/ui/wrappage \
))
diff --git a/sw/source/ui/frmdlg/frmui.src b/sw/source/ui/frmdlg/frmui.src
index 679fc121be72..f771bb7a5dc2 100644
--- a/sw/source/ui/frmdlg/frmui.src
+++ b/sw/source/ui/frmdlg/frmui.src
@@ -106,10 +106,6 @@ String STR_FRMUI_PATTERN
{
Text [ en-US ] = "Background" ;
};
-String STR_FRMUI_WRAP
-{
- Text [ en-US ] = "Wrap" ;
-};
InfoBox MSG_COLUMN_ERR_BOUNDWIDTH
{
BUTTONS = WB_OK ;
diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx
index 9194bb582ccb..a48715008a83 100644
--- a/sw/source/ui/frmdlg/wrap.cxx
+++ b/sw/source/ui/frmdlg/wrap.cxx
@@ -51,23 +51,16 @@ static sal_uInt16 aWrapPageRg[] = {
0
};
-SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode) :
- SfxNoLayoutSingleTabDialog(pParent, rSet, 0),
- pWrtShell(pSh)
+SwWrapDlg::SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode)
+ : SfxSingleTabDialog(pParent, rSet, "WrapDialog", "modules/swriter/ui/wrapdialog.ui")
+ , pWrtShell(pSh)
{
// create TabPage
- SwWrapTabPage* pNewPage = (SwWrapTabPage*) SwWrapTabPage::Create(this, rSet);
+ SwWrapTabPage* pNewPage = (SwWrapTabPage*) SwWrapTabPage::Create(get_content_area(), rSet);
pNewPage->SetFormatUsed(sal_False, bDrawMode);
pNewPage->SetShell(pWrtShell);
- SetTabPage(pNewPage);
-
- String sTitle(SW_RES(STR_FRMUI_WRAP));
- SetText(sTitle);
-}
-
-SwWrapDlg::~SwWrapDlg()
-{
+ setTabPage(pNewPage);
}
SwWrapTabPage::SwWrapTabPage(Window *pParent, const SfxItemSet &rSet)
diff --git a/sw/source/ui/inc/frmui.hrc b/sw/source/ui/inc/frmui.hrc
index cc03279e8eca..c893ac3b3923 100644
--- a/sw/source/ui/inc/frmui.hrc
+++ b/sw/source/ui/inc/frmui.hrc
@@ -30,7 +30,6 @@
#define STR_FRMUI_BORDER (RC_FRMDLG_BEGIN + 16)
#define STR_FRMUI_PATTERN (RC_FRMDLG_BEGIN + 17)
-#define STR_FRMUI_WRAP (RC_FRMDLG_BEGIN + 18)
#define BMP_BEGIN (RC_FRMDLG_BEGIN + 18)
#define BMP_NOWRAP (BMP_BEGIN+5)
diff --git a/sw/source/ui/inc/wrap.hxx b/sw/source/ui/inc/wrap.hxx
index 7190ab9acc77..96223fbe7a4d 100644
--- a/sw/source/ui/inc/wrap.hxx
+++ b/sw/source/ui/inc/wrap.hxx
@@ -29,15 +29,14 @@ class Window;
class SfxItemSet;
class SwWrtShell;
-class SwWrapDlg : public SfxNoLayoutSingleTabDialog
+class SwWrapDlg : public SfxSingleTabDialog
{
SwWrtShell* pWrtShell;
public:
- SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, sal_Bool bDrawMode);
- ~SwWrapDlg();
+ SwWrapDlg(Window* pParent, SfxItemSet& rSet, SwWrtShell* pSh, bool bDrawMode);
- inline SwWrtShell* GetWrtShell() { return pWrtShell; }
+ SwWrtShell* GetWrtShell() { return pWrtShell; }
};
diff --git a/sw/uiconfig/swriter/ui/wrapdialog.ui b/sw/uiconfig/swriter/ui/wrapdialog.ui
new file mode 100644
index 000000000000..bff683a1aa82
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/wrapdialog.ui
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkDialog" id="WrapDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">Wrap</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>
+ </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>
+ <placeholder/>
+ </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-widgets>
+ </object>
+</interface>