summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorManal Alhassoun <malhassoun@kacst.edu.sa>2013-12-04 13:40:46 +0300
committerCaolán McNamara <caolanm@redhat.com>2013-12-04 05:25:53 -0600
commit6931f431331d4cb5b5619c29d5f615f4245a66be (patch)
treeebd68e3f7525127d9cc2fcc29d14329716276e73 /svx
parentcbeb028519d0383ae3089c48f9ceefe9ee817188 (diff)
convert Contour queryboxes to .ui
Change-Id: Ie6dad2409a7d58a1c01973e8740f436cb597cb99 Reviewed-on: https://gerrit.libreoffice.org/6923 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.mk4
-rw-r--r--svx/source/dialog/_contdlg.cxx10
-rw-r--r--svx/source/dialog/contdlg.hrc4
-rw-r--r--svx/source/dialog/contdlg.src21
-rw-r--r--svx/uiconfig/ui/querydeletecontourdialog.ui36
-rw-r--r--svx/uiconfig/ui/querynewcontourdialog.ui34
-rw-r--r--svx/uiconfig/ui/querysavecontchangesdialog.ui52
-rw-r--r--svx/uiconfig/ui/queryunlinkgraphicsdialog.ui35
8 files changed, 166 insertions, 30 deletions
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 1780983c49d3..fb29eb1cf07c 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -21,6 +21,10 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/linkwarndialog \
svx/uiconfig/ui/optgridpage \
svx/uiconfig/ui/passwd \
+ svx/uiconfig/ui/querydeletecontourdialog \
+ svx/uiconfig/ui/querynewcontourdialog \
+ svx/uiconfig/ui/querysavecontchangesdialog \
+ svx/uiconfig/ui/queryunlinkgraphicsdialog \
svx/uiconfig/ui/redlinecontrol \
svx/uiconfig/ui/redlinefilterpage \
svx/uiconfig/ui/redlineviewpage \
diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx
index d0fcd9ec4fba..a3051b403b89 100644
--- a/svx/source/dialog/_contdlg.cxx
+++ b/svx/source/dialog/_contdlg.cxx
@@ -43,6 +43,7 @@
#include <vcl/svapp.hxx>
#include <vcl/virdev.hxx>
#include "dlgunit.hxx"
+#include <vcl/layout.hxx>
SFX_IMPL_FLOATINGWINDOW_WITHID( SvxContourDlgChildWindow, SID_CONTOUR_DLG );
@@ -303,8 +304,7 @@ sal_Bool SvxSuperContourDlg::Close()
if ( aTbx1.IsItemEnabled( TBI_APPLY ) )
{
- QueryBox aQBox( this, WB_YES_NO_CANCEL | WB_DEF_YES,
- CONT_RESID(STR_CONTOURDLG_MODIFY).toString() );
+ MessageDialog aQBox( this,"QuerySaveContourChangesDialog","svx/ui/querysavecontchangesdialog.ui");
const long nRet = aQBox.Execute();
if ( nRet == RET_YES )
@@ -439,7 +439,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx )
{
if ( aTbx1.IsItemChecked( TBI_WORKPLACE ) )
{
- QueryBox aQBox( this, WB_YES_NO | WB_DEF_NO, CONT_RESID(STR_CONTOURDLG_WORKPLACE).toString() );
+ MessageDialog aQBox( this,"QueryDeleteContourDialog","svx/ui/querydeletecontourdialog.ui");
if ( !aContourWnd.IsContourChanged() || ( aQBox.Execute() == RET_YES ) )
aContourWnd.SetWorkplaceMode( sal_True );
@@ -535,7 +535,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx )
aStbStatus.Invalidate();
else if ( bGraphicLinked )
{
- QueryBox aQBox( this, WB_YES_NO | WB_DEF_YES, CONT_RESID(STR_CONTOURDLG_LINKED).toString() );
+ MessageDialog aQBox( this,"QueryUnlinkGraphicsDialog","svx/ui/queryunlinkgraphicsdialog.ui");
if ( aQBox.Execute() != RET_YES )
{
@@ -733,7 +733,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow*, pWnd )
if( !!aMask )
{
- QueryBox aQBox( this, WB_YES_NO | WB_DEF_YES, CONT_RESID(STR_CONTOURDLG_NEWPIPETTE).toString() );
+ MessageDialog aQBox( this,"QueryNewContourDialog","svx/ui/querynewcontourdialog.ui");
sal_Bool bNewContour;
aRedoGraphic = Graphic();
diff --git a/svx/source/dialog/contdlg.hrc b/svx/source/dialog/contdlg.hrc
index 07afc01d7b41..aec18aa74e5e 100644
--- a/svx/source/dialog/contdlg.hrc
+++ b/svx/source/dialog/contdlg.hrc
@@ -61,9 +61,5 @@
/******************************************************************************/
-#define STR_CONTOURDLG_MODIFY (RID_SVX_CONTOURDLG_START + 2)
-#define STR_CONTOURDLG_NEWPIPETTE (RID_SVX_CONTOURDLG_START + 3)
-#define STR_CONTOURDLG_WORKPLACE (RID_SVX_CONTOURDLG_START + 4)
-#define STR_CONTOURDLG_LINKED (RID_SVX_CONTOURDLG_START + 5)
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/dialog/contdlg.src b/svx/source/dialog/contdlg.src
index 41bee8434770..519b73c1b115 100644
--- a/svx/source/dialog/contdlg.src
+++ b/svx/source/dialog/contdlg.src
@@ -220,26 +220,5 @@ FloatingWindow RID_SVXDLG_CONTOUR
};
/******************************************************************************/
-String STR_CONTOURDLG_MODIFY
-{
- Text [ en-US ] = "The contour has been modified.\nDo you want to save the changes?" ;
-};
-
-String STR_CONTOURDLG_NEWPIPETTE
-{
- Text [ en-US ] = "Do you want to create a new contour?" ;
-};
-
-String STR_CONTOURDLG_WORKPLACE
-{
- Text [ en-US ] = "Setting a new workspace will\ncause the contour to be deleted.\nAre you sure you want to continue?" ;
-};
-
-String STR_CONTOURDLG_LINKED
-{
- Text [ en-US ] = "This graphic object is linked to the document. Do you want to unlink the graphics in order to edit it?" ;
-};
-
-/******************************************************************************/
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/uiconfig/ui/querydeletecontourdialog.ui b/svx/uiconfig/ui/querydeletecontourdialog.ui
new file mode 100644
index 000000000000..95390e333ee8
--- /dev/null
+++ b/svx/uiconfig/ui/querydeletecontourdialog.ui
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkMessageDialog" id="QueryDeleteContourDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Delete the contour?</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">Setting a new workspace will
+cause the contour to be deleted.</property>
+ <property name="secondary_text" translatable="yes">Are you sure you want to continue?</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">24</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/svx/uiconfig/ui/querynewcontourdialog.ui b/svx/uiconfig/ui/querynewcontourdialog.ui
new file mode 100644
index 000000000000..9305f55628ee
--- /dev/null
+++ b/svx/uiconfig/ui/querynewcontourdialog.ui
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkMessageDialog" id="QueryNewContourDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Create a new contour?</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 create a new contour?</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">24</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/svx/uiconfig/ui/querysavecontchangesdialog.ui b/svx/uiconfig/ui/querysavecontchangesdialog.ui
new file mode 100644
index 000000000000..df421ab8f285
--- /dev/null
+++ b/svx/uiconfig/ui/querysavecontchangesdialog.ui
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkMessageDialog" id="QuerySaveContourChangesDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Save contour 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 contour 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-vbox">
+ <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_area">
+ <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/queryunlinkgraphicsdialog.ui b/svx/uiconfig/ui/queryunlinkgraphicsdialog.ui
new file mode 100644
index 000000000000..0b884032ca97
--- /dev/null
+++ b/svx/uiconfig/ui/queryunlinkgraphicsdialog.ui
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkMessageDialog" id="QueryUnlinkGraphicsDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Unlink the graphics?</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">This graphic object is linked to the document.</property>
+ <property name="secondary_text" translatable="yes">Do you want to unlink the graphics in order to edit it?</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">24</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>