From 4e84484cc6bcf02819b097a666ee79bbc2ecf1b0 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 25 Aug 2014 16:00:58 +0100 Subject: convert MessBox with custom buttons to .ui Change-Id: I05704746ce5f098a2caaafafdc574009b279e458 --- svx/UIConfig_svx.mk | 1 + svx/source/form/datanavi.cxx | 13 +------ svx/source/form/datanavi.src | 11 ------ svx/source/inc/datanavi.hxx | 3 +- svx/uiconfig/ui/formlinkwarndialog.ui | 71 +++++++++++++++++++++++++++++++++++ 5 files changed, 75 insertions(+), 24 deletions(-) create mode 100644 svx/uiconfig/ui/formlinkwarndialog.ui (limited to 'svx') diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk index c1f856a68b51..21ac190369f8 100644 --- a/svx/UIConfig_svx.mk +++ b/svx/UIConfig_svx.mk @@ -32,6 +32,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\ svx/uiconfig/ui/findreplacedialog \ svx/uiconfig/ui/fontworkgallerydialog \ svx/uiconfig/ui/fontworkspacingdialog \ + svx/uiconfig/ui/formlinkwarndialog \ svx/uiconfig/ui/headfootformatpage \ svx/uiconfig/ui/imapdialog \ svx/uiconfig/ui/linkwarndialog \ diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index 9f2a0eb3a3b4..2b2fae5a3458 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -3322,20 +3322,11 @@ namespace svxform return 0; } - LinkedInstanceWarningBox::LinkedInstanceWarningBox( Window* pParent ) : - - MessBox( pParent, SVX_RES( RID_QRY_LINK_WARNING ) ) - + LinkedInstanceWarningBox::LinkedInstanceWarningBox( Window* pParent ) + : MessageDialog(pParent, "FormLinkWarnDialog", "svx/ui/formlinkwarndialog.ui") { - SetText( Application::GetDisplayName() ); - SetImage( QueryBox::GetStandardImage() ); - AddButton( SVX_RESSTR( RID_STR_DATANAV_LINKWARN_BUTTON ), RET_OK, BUTTONDIALOG_DEFBUTTON ); - AddButton( BUTTON_CANCEL, RET_CANCEL, BUTTONDIALOG_CANCELBUTTON ); } - } // namespace svxform - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svx/source/form/datanavi.src b/svx/source/form/datanavi.src index debd9eec8acb..82b18a368230 100644 --- a/svx/source/form/datanavi.src +++ b/svx/source/form/datanavi.src @@ -90,12 +90,6 @@ String RID_STR_QRY_REMOVE_BINDING Text [ en-US ] = "Deleting the binding '$BINDINGNAME' affects all controls currently bound to this binding.\n\nDo you really want to delete this binding?" ; }; -MessBox RID_QRY_LINK_WARNING -{ - Buttons = 0 ; - Message [ en-US ] = "This instance is linked with the form.\n\nThe changes you make to this instance will be lost when the form is reloaded.\n\nHow do you want to proceed?" ; -}; - String RID_STR_INVALID_XMLNAME { Text [ en-US ] = "The name '%1' is not valid in XML. Please enter a different name." ; @@ -293,11 +287,6 @@ String RID_STR_DATANAV_REMOVE_SUBMISSION Text [ en-US ] = "Delete Submission" ; }; -String RID_STR_DATANAV_LINKWARN_BUTTON -{ - Text [ en-US ] = "~Edit" ; -}; - String RID_STR_ELEMENT { Text [ en-US ] = "Element" ; diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx index 0ed799825e61..8c79cbafc27c 100644 --- a/svx/source/inc/datanavi.hxx +++ b/svx/source/inc/datanavi.hxx @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include @@ -648,7 +647,7 @@ namespace svxform }; - class LinkedInstanceWarningBox : public MessBox + class LinkedInstanceWarningBox : public MessageDialog { public: LinkedInstanceWarningBox( Window* pParent ); diff --git a/svx/uiconfig/ui/formlinkwarndialog.ui b/svx/uiconfig/ui/formlinkwarndialog.ui new file mode 100644 index 000000000000..ba156d8a5ac8 --- /dev/null +++ b/svx/uiconfig/ui/formlinkwarndialog.ui @@ -0,0 +1,71 @@ + + + + + + False + 12 + False + dialog + True + question + This instance is linked with the form. + +The changes you make to this instance will be lost when the form is reloaded. + +How do you want to proceed? + + + False + vertical + 24 + + + False + end + + + _Edit + True + True + True + True + True + True + + + False + True + 1 + + + + + gtk-cancel + True + True + True + True + + + False + True + 2 + + + + + False + True + end + 0 + + + + + + ok + cancel + + + -- cgit