diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-08-25 13:29:33 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-08-25 16:45:24 +0100 |
commit | 58a7a9bf0463c87b8e4bb483da558d9b62b032f9 (patch) | |
tree | 52fa58431d54aa39f9922e9420783230730cbc66 | |
parent | b6d25be2d7ab81fb5343b742542b79bad2121024 (diff) |
convert QUERY_BRW_SAVEMODIFIED with custom buttons to .ui
Change-Id: I184ffcda39b3e38ae4e4c4729f8dae62158afdae
-rw-r--r-- | dbaccess/UIConfig_dbaccess.mk | 1 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbabrw.src | 7 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbu_resource.hrc | 1 | ||||
-rw-r--r-- | dbaccess/uiconfig/ui/savemodifieddialog.ui | 83 |
5 files changed, 87 insertions, 10 deletions
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 <tools/diagnose_ex.h> #include <osl/diagnose.h> #include <vcl/layout.hxx> -#include <vcl/msgbox.hxx> #include <vcl/waitobj.hxx> 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 <svx/globlmn.hrc> #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 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> +<interface> + <requires lib="gtk+" version="3.0"/> + <object class="GtkMessageDialog" id="SaveModifiedDialog"> + <property name="can_focus">False</property> + <property name="border_width">12</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="text" translatable="yes">Do you want to save the changes?</property> + <property name="secondary_text" translatable="yes">The current record has been changed.</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="no"> + <property name="label">gtk-no</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">0</property> + </packing> + </child> + <child> + <object class="GtkButton" id="yes"> + <property name="label">gtk-yes</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="can_default">True</property> + <property name="has_default">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">1</property> + </packing> + </child> + <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="3">no</action-widget> + <action-widget response="2">yes</action-widget> + <action-widget response="0">cancel</action-widget> + </action-widgets> + </object> +</interface> |