convert use as default msgbox to .ui
Change-Id: I65c994810fd1ad16491623ed76bf85c43ffcd702
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 6e2b96c..8e7f217 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -119,6 +119,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/outlinenumbering \
sw/uiconfig/swriter/ui/outlinenumberingpage \
sw/uiconfig/swriter/ui/outlinepositionpage \
sw/uiconfig/swriter/ui/querydefaultcompatdialog \
sw/uiconfig/swriter/ui/querysavelabeldialog \
sw/uiconfig/swriter/ui/queryshowchangesdialog \
sw/uiconfig/swriter/ui/paradialog \
diff --git a/sw/source/ui/config/optcomp.cxx b/sw/source/ui/config/optcomp.cxx
index 7ea682d..9184d93 100644
--- a/sw/source/ui/config/optcomp.cxx
+++ b/sw/source/ui/config/optcomp.cxx
@@ -29,7 +29,7 @@
#include "optcomp.hrc"
#include "globals.hrc"
#include <unotools/configmgr.hxx>
#include <vcl/msgbox.hxx>
#include <vcl/layout.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/fcontnr.hxx>
@@ -112,7 +112,6 @@ SwCompatibilityOptPage::SwCompatibilityOptPage( Window* pParent, const SfxItemSe
m_aResetPB ( this, SW_RES( PB_RESET ) ),
m_aDefaultPB ( this, SW_RES( PB_DEFAULT ) ),
m_sUserEntry ( SW_RES( STR_USERENTRY ) ),
m_sUseAsDefaultQuery( SW_RES( STR_QRYBOX_USEASDEFAULT ) ),
m_pWrtShell ( NULL ),
m_pImpl ( new SwCompatibilityOptPage_Impl ),
m_nSavedOptions ( 0 )
@@ -382,8 +381,9 @@ IMPL_LINK_NOARG(SwCompatibilityOptPage, SelectHdl)
IMPL_LINK_NOARG(SwCompatibilityOptPage, UseAsDefaultHdl)
{
QueryBox aBox( this, WinBits( WB_YES_NO | WB_DEF_YES ), m_sUseAsDefaultQuery );
if ( aBox.Execute() == RET_YES )
MessageDialog aQuery(this, "QueryDefaultCompatDialog",
"modules/swriter/ui/querydefaultcompatdialog.ui");
if (aQuery.Execute() == RET_YES)
{
for ( vector< CompatibilityItem >::iterator pItem = m_pImpl->m_aList.begin();
pItem != m_pImpl->m_aList.end(); ++pItem )
diff --git a/sw/source/ui/config/optcomp.hrc b/sw/source/ui/config/optcomp.hrc
index ef50b82..6f07218 100644
--- a/sw/source/ui/config/optcomp.hrc
+++ b/sw/source/ui/config/optcomp.hrc
@@ -30,7 +30,6 @@
// the option strings
#define STR_USERENTRY 10
#define STR_QRYBOX_USEASDEFAULT 11
#define STR_COMP_OPTIONS_START 100
#define STR_PRINTER_METRICS (STR_COMP_OPTIONS_START + 0)
diff --git a/sw/source/ui/config/optcomp.src b/sw/source/ui/config/optcomp.src
index 6ca3a03..3743af1 100644
--- a/sw/source/ui/config/optcomp.src
+++ b/sw/source/ui/config/optcomp.src
@@ -81,11 +81,6 @@ TabPage TP_OPTCOMPATIBILITY_PAGE
Text [ en-US ] = "<User settings>";
};
String STR_QRYBOX_USEASDEFAULT
{
Text [ en-US ] = "Do you want to change the compatibility options of the default template?\nThis will affect all new documents based on the default template.";
};
// the option strings ----------------------------------------------------
String STR_PRINTER_METRICS
diff --git a/sw/source/ui/inc/optcomp.hxx b/sw/source/ui/inc/optcomp.hxx
index bba8412..8adcb11 100644
--- a/sw/source/ui/inc/optcomp.hxx
+++ b/sw/source/ui/inc/optcomp.hxx
@@ -44,8 +44,6 @@ private:
SvtCompatibilityOptions m_aConfigItem;
// text of the user entry
String m_sUserEntry;
// text of the "use as default" querybox
String m_sUseAsDefaultQuery;
// shell of the current document
SwWrtShell* m_pWrtShell;
// impl object
diff --git a/sw/uiconfig/swriter/ui/querydefaultcompatdialog.ui b/sw/uiconfig/swriter/ui/querydefaultcompatdialog.ui
new file mode 100644
index 0000000..a6446ff
--- /dev/null
+++ b/sw/uiconfig/swriter/ui/querydefaultcompatdialog.ui
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.6 -->
<object class="GtkMessageDialog" id="QueryDefaultCompatDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Use as default?</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="message_type">question</property>
<property name="buttons">yes-no</property>
<property name="text" translatable="yes">Do you want to change the compatibility options of the default template?</property>
<property name="secondary_text" translatable="yes">This will affect all new documents based on the default template.</property>
<child internal-child="vbox">
<object class="GtkBox" id="messagedialog-vbox">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="messagedialog-action_area">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
</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>
</object>
</child>
</object>
</interface>
diff --git a/sw/uiconfig/swriter/ui/querysavelabeldialog.ui b/sw/uiconfig/swriter/ui/querysavelabeldialog.ui
index af409c09..32e8955 100644
--- a/sw/uiconfig/swriter/ui/querysavelabeldialog.ui
+++ b/sw/uiconfig/swriter/ui/querysavelabeldialog.ui
@@ -5,6 +5,7 @@
<property name="can_focus">False</property>
<property name="border_width">6</property>
<property name="title" translatable="yes">Save label?</property>
<property name="resizable">False</property>
<property name="type_hint">dialog</property>
<property name="skip_taskbar_hint">True</property>
<property name="message_type">question</property>