From 58a7a9bf0463c87b8e4bb483da558d9b62b032f9 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Mon, 25 Aug 2014 13:29:33 +0100 Subject: convert QUERY_BRW_SAVEMODIFIED with custom buttons to .ui Change-Id: I184ffcda39b3e38ae4e4c4729f8dae62158afdae --- dbaccess/UIConfig_dbaccess.mk | 1 + dbaccess/source/ui/browser/brwctrlr.cxx | 5 +- dbaccess/source/ui/browser/sbabrw.src | 7 --- dbaccess/source/ui/inc/dbu_resource.hrc | 1 - dbaccess/uiconfig/ui/savemodifieddialog.ui | 83 ++++++++++++++++++++++++++++++ 5 files changed, 87 insertions(+), 10 deletions(-) create mode 100644 dbaccess/uiconfig/ui/savemodifieddialog.ui diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk index 41567d70e479..e6365fa9a0dd 100644 --- a/dbaccess/UIConfig_dbaccess.mk +++ b/dbaccess/UIConfig_dbaccess.mk @@ -55,6 +55,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \ dbaccess/uiconfig/ui/rowheightdialog \ dbaccess/uiconfig/ui/rtfcopytabledialog \ dbaccess/uiconfig/ui/savedialog \ + dbaccess/uiconfig/ui/savemodifieddialog \ dbaccess/uiconfig/ui/specialjdbcconnectionpage \ dbaccess/uiconfig/ui/specialsettingspage \ dbaccess/uiconfig/ui/sortdialog \ diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 328d0eef5d38..e275b7daa573 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -83,7 +83,6 @@ #include #include #include -#include #include using namespace ::com::sun::star; @@ -2173,7 +2172,9 @@ bool SbaXDataBrowserController::SaveModified(sal_Bool bAskFor) { getBrowserView()->getVclControl()->GrabFocus(); - QueryBox aQry(getBrowserView()->getVclControl(), ModuleRes(QUERY_BRW_SAVEMODIFIED)); + MessageDialog aQry(getBrowserView()->getVclControl(), + "SaveModifiedDialog", + "dbaccess/ui/savemodifieddialog.ui"); switch (aQry.Execute()) { diff --git a/dbaccess/source/ui/browser/sbabrw.src b/dbaccess/source/ui/browser/sbabrw.src index 4e304e2ddd30..01888a4ed425 100644 --- a/dbaccess/source/ui/browser/sbabrw.src +++ b/dbaccess/source/ui/browser/sbabrw.src @@ -22,13 +22,6 @@ #include #include "toolbox.hrc" -QueryBox QUERY_BRW_SAVEMODIFIED -{ - Buttons = WB_YES_NO_CANCEL ; - DefButton = WB_DEF_YES ; - Message [ en-US ] = "The current record has been changed.\nDo you want to save the changes?" ; -}; - String STR_QUERY_BRW_DELETE_ROWS { Text[ en-US ] = "Do you want to delete the selected data?" ; diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc index dae43c4310a6..8edf0a4e40c0 100644 --- a/dbaccess/source/ui/inc/dbu_resource.hrc +++ b/dbaccess/source/ui/inc/dbu_resource.hrc @@ -100,7 +100,6 @@ // query boxes -#define QUERY_BRW_SAVEMODIFIED RID_QUERYBOX_START + 1 #define TABLE_DESIGN_SAVEMODIFIED RID_QUERYBOX_START + 5 #define QUERY_SAVE_CURRENT_INDEX RID_QUERYBOX_START + 7 #define RELATION_DESIGN_SAVEMODIFIED RID_QUERYBOX_START + 9 diff --git a/dbaccess/uiconfig/ui/savemodifieddialog.ui b/dbaccess/uiconfig/ui/savemodifieddialog.ui new file mode 100644 index 000000000000..d36843811e35 --- /dev/null +++ b/dbaccess/uiconfig/ui/savemodifieddialog.ui @@ -0,0 +1,83 @@ + + + + + + False + 12 + False + dialog + True + question + Do you want to save the changes? + The current record has been changed. + + + False + vertical + 24 + + + False + end + + + gtk-no + True + True + True + True + + + False + True + 0 + + + + + gtk-yes + True + True + True + True + True + True + + + False + True + 1 + + + + + gtk-cancel + True + True + True + True + + + False + True + 2 + + + + + False + True + end + 0 + + + + + + no + yes + cancel + + + -- cgit