summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorManal Alhassoun <malhassoun@kacst.edu.sa>2013-12-26 15:11:57 +0300
committerCaolán McNamara <caolanm@redhat.com>2013-12-27 21:38:20 +0000
commit4c26083959637ffa9ca8bc1eed99f3c218447123 (patch)
tree50e7ad924eba5ef64c97d3232ae9863ec18963a5 /svx
parent6cbccc8efa49dbf4ff21cabbfb9e74059d67b170 (diff)
convert save and modify imageMaps queryboxes to .ui
Change-Id: I222ce47187e46f7de9916bd559846d28c30d4562 Reviewed-on: https://gerrit.libreoffice.org/7201 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/UIConfig_svx.mk2
-rw-r--r--svx/source/dialog/imapdlg.cxx11
-rw-r--r--svx/source/dialog/imapdlg.hrc7
-rw-r--r--svx/source/dialog/imapdlg.src9
-rw-r--r--svx/uiconfig/ui/querymodifyimagemapchangesdialog.ui52
-rw-r--r--svx/uiconfig/ui/querysaveimagemapchangesdialog.ui52
6 files changed, 111 insertions, 22 deletions
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index f2a8087fb13e..e82509cbc76a 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -28,8 +28,10 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/optgridpage \
svx/uiconfig/ui/passwd \
svx/uiconfig/ui/querydeletecontourdialog \
+ svx/uiconfig/ui/querymodifyimagemapchangesdialog \
svx/uiconfig/ui/querynewcontourdialog \
svx/uiconfig/ui/querysavecontchangesdialog \
+ svx/uiconfig/ui/querysaveimagemapchangesdialog \
svx/uiconfig/ui/queryunlinkgraphicsdialog \
svx/uiconfig/ui/redlinecontrol \
svx/uiconfig/ui/redlinefilterpage \
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 8c1b46ffd9ea..3cc0bb635d03 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -40,6 +40,7 @@
#include <sfx2/docfile.hxx>
#include <unotools/localedatawrapper.hxx>
#include <comphelper/processfactory.hxx>
+#include <vcl/layout.hxx>
#define _IMAPDLG_PRIVATE
#include "svx/imapdlg.hxx"
@@ -225,8 +226,7 @@ sal_Bool SvxIMapDlg::Close()
if ( aTbxIMapDlg1.IsItemEnabled( TBI_APPLY ) )
{
- QueryBox aQBox( this, WB_YES_NO_CANCEL | WB_DEF_YES,
- SVX_RESSTR( STR_IMAPDLG_MODIFY ) );
+ MessageDialog aQBox( this,"QueryModifyImageMapChangesDialog","svx/ui/querymodifyimagemapchangesdialog.ui");
const long nRet = aQBox.Execute();
if( nRet == RET_YES )
@@ -240,8 +240,7 @@ sal_Bool SvxIMapDlg::Close()
}
else if( pIMapWnd->IsChanged() )
{
- QueryBox aQBox( this, WB_YES_NO_CANCEL | WB_DEF_YES,
- SVX_RESSTR( STR_IMAPDLG_SAVE ) );
+ MessageDialog aQBox( this,"QuerySaveImageMapChangesDialog","svx/ui/querysaveimagemapchangesdialog.ui");
const long nRet = aQBox.Execute();
if( nRet == RET_YES )
@@ -727,8 +726,8 @@ IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl)
if ( pOwnData->pUpdateEditingObject != pCheckObj )
{
if ( pIMapWnd->IsChanged() &&
- ( QueryBox( this, WB_YES_NO | WB_DEF_YES,
- SVX_RESSTR( STR_IMAPDLG_SAVE ) ).Execute() == RET_YES ) )
+ ( MessageDialog( this,"QuerySaveImageMapChangesDialog",
+ "svx/ui/querysaveimagemapchangesdialog.ui" ).Execute() == RET_YES ) )
{
DoSave();
}
diff --git a/svx/source/dialog/imapdlg.hrc b/svx/source/dialog/imapdlg.hrc
index 40ba35b478a1..bcc2569e880a 100644
--- a/svx/source/dialog/imapdlg.hrc
+++ b/svx/source/dialog/imapdlg.hrc
@@ -86,11 +86,4 @@
/******************************************************************************/
-
-#define STR_IMAPDLG_SAVE (RID_SVX_IMAPDLG_START + 5)
-#define STR_IMAPDLG_MODIFY (RID_SVX_IMAPDLG_START + 6)
-
-
-/******************************************************************************/
-
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/imapdlg.src b/svx/source/dialog/imapdlg.src
index 730ef28e11ea..486217ae0a28 100644
--- a/svx/source/dialog/imapdlg.src
+++ b/svx/source/dialog/imapdlg.src
@@ -344,14 +344,5 @@ Menu RID_SVXMN_IMAP
/******************************************************************************/
-String STR_IMAPDLG_SAVE
-{
- Text [ en-US ] = "The ImageMap has been modified.\nDo you want to save the changes?";
-};
-
-String STR_IMAPDLG_MODIFY
-{
- Text [ en-US ] = "The ImageMap has been modified.\nDo you want to save the changes?" ;
-};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/uiconfig/ui/querymodifyimagemapchangesdialog.ui b/svx/uiconfig/ui/querymodifyimagemapchangesdialog.ui
new file mode 100644
index 000000000000..33e388e4a550
--- /dev/null
+++ b/svx/uiconfig/ui/querymodifyimagemapchangesdialog.ui
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkMessageDialog" id="QueryModifyImageMapChangesDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Save ImageMap changes?</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">The ImageMap has been modified.</property>
+ <property name="secondary_text" translatable="yes">Do you want to save the changes?</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="messagedialog-vbox5">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">24</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="messagedialog-action_area5">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <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">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>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+</interface>
diff --git a/svx/uiconfig/ui/querysaveimagemapchangesdialog.ui b/svx/uiconfig/ui/querysaveimagemapchangesdialog.ui
new file mode 100644
index 000000000000..bf49e7315634
--- /dev/null
+++ b/svx/uiconfig/ui/querysaveimagemapchangesdialog.ui
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkMessageDialog" id="QuerySaveImageMapChangesDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Save ImageMap changes?</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">The ImageMap has been modified.</property>
+ <property name="secondary_text" translatable="yes">Do you want to save the changes?</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="messagedialog-vbox4">
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">24</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="messagedialog-action_area4">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <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">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>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">cancel</action-widget>
+ </action-widgets>
+ </object>
+</interface>