diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-08-06 19:59:19 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-08-06 22:34:12 +0200 |
commit | dfe9250cc3de574a2b0e7a2df936b8c9a71d9011 (patch) | |
tree | 0df69936ff4269bf8edfca9baf302f63e1d9a375 /sw | |
parent | 89fdead645bf2a777e4d438abe976d759aa48a4b (diff) |
convert use as default msgbox to .ui
Change-Id: I65c994810fd1ad16491623ed76bf85c43ffcd702
Diffstat (limited to 'sw')
-rw-r--r-- | sw/UIConfig_swriter.mk | 1 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.hrc | 1 | ||||
-rw-r--r-- | sw/source/ui/config/optcomp.src | 5 | ||||
-rw-r--r-- | sw/source/ui/inc/optcomp.hxx | 2 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/querydefaultcompatdialog.ui | 35 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/querysavelabeldialog.ui | 1 |
7 files changed, 41 insertions, 12 deletions
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk index 6e2b96c8e55a..8e7f21706ed2 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 7ea682d251b2..9184d9374285 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 ef50b8229448..6f07218e78c4 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 6ca3a034a563..3743af1cb531 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 bba8412c84c4..8adcb1167d42 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 000000000000..a6446fff67f4 --- /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 af409c09e01b..32e89557dcaf 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> |