From 6931f431331d4cb5b5619c29d5f615f4245a66be Mon Sep 17 00:00:00 2001 From: Manal Alhassoun Date: Wed, 4 Dec 2013 13:40:46 +0300 Subject: convert Contour queryboxes to .ui MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie6dad2409a7d58a1c01973e8740f436cb597cb99 Reviewed-on: https://gerrit.libreoffice.org/6923 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- svx/UIConfig_svx.mk | 4 +++ svx/source/dialog/_contdlg.cxx | 10 +++--- svx/source/dialog/contdlg.hrc | 4 --- svx/source/dialog/contdlg.src | 21 ----------- svx/uiconfig/ui/querydeletecontourdialog.ui | 36 +++++++++++++++++++ svx/uiconfig/ui/querynewcontourdialog.ui | 34 ++++++++++++++++++ svx/uiconfig/ui/querysavecontchangesdialog.ui | 52 +++++++++++++++++++++++++++ svx/uiconfig/ui/queryunlinkgraphicsdialog.ui | 35 ++++++++++++++++++ 8 files changed, 166 insertions(+), 30 deletions(-) create mode 100644 svx/uiconfig/ui/querydeletecontourdialog.ui create mode 100644 svx/uiconfig/ui/querynewcontourdialog.ui create mode 100644 svx/uiconfig/ui/querysavecontchangesdialog.ui create mode 100644 svx/uiconfig/ui/queryunlinkgraphicsdialog.ui (limited to 'svx') 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 #include #include "dlgunit.hxx" +#include 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 @@ -219,27 +219,6 @@ 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 @@ + + + + + False + 12 + Delete the contour? + False + dialog + True + question + yes-no + Setting a new workspace will +cause the contour to be deleted. + Are you sure you want to continue? + + + False + vertical + 24 + + + False + end + + + False + True + end + 0 + + + + + + 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 @@ + + + + + False + 12 + Create a new contour? + False + dialog + True + question + yes-no + Do you want to create a new contour? + + + False + vertical + 24 + + + False + end + + + False + True + end + 0 + + + + + + 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 @@ + + + + + False + 12 + Save contour changes? + False + dialog + True + question + yes-no + The contour has been modified. + Do you want to save the changes? + + + False + vertical + 24 + + + False + end + + + gtk-cancel + True + True + True + True + + + False + True + 2 + + + + + False + True + end + 0 + + + + + + cancel + + + 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 @@ + + + + + False + 12 + Unlink the graphics? + False + dialog + True + question + yes-no + This graphic object is linked to the document. + Do you want to unlink the graphics in order to edit it? + + + False + vertical + 24 + + + False + end + + + False + True + end + 0 + + + + + + -- cgit