summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-25 14:10:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-25 16:45:27 +0100
commit9a11491731541232d8e184b0b25442cdb790cf9f (patch)
tree76093ad7ac2257b33d73201affb0a0008951152a
parent65597c9907a895a773fd9f9c991870416bd33335 (diff)
convert RID_QRY_SAVEMODIFIED with custom buttons to .ui
Change-Id: I782ca0f7e60f92e65e1a93bb8d1d38eded941cbb
-rw-r--r--include/svx/fmresids.hrc1
-rw-r--r--svx/UIConfig_svx.mk1
-rw-r--r--svx/source/form/fmshell.cxx5
-rw-r--r--svx/source/form/fmstring.src6
-rw-r--r--svx/uiconfig/ui/savemodifieddialog.ui85
5 files changed, 89 insertions, 9 deletions
diff --git a/include/svx/fmresids.hrc b/include/svx/fmresids.hrc
index 3282bf06aaa8..1257e32aeb87 100644
--- a/include/svx/fmresids.hrc
+++ b/include/svx/fmresids.hrc
@@ -85,7 +85,6 @@
#define RID_MENU_DATANAVIGATOR (RID_FORMS_START + 10)
// QueryBox-Id's -----------------------------------------------------------
-#define RID_QRY_SAVEMODIFIED (RID_FORMS_START + 1)
#define RID_QRY_LINK_WARNING (RID_FORMS_START + 6)
// String-Id's -----------------------------------------------------------
diff --git a/svx/UIConfig_svx.mk b/svx/UIConfig_svx.mk
index 76e7f12d2646..c1f856a68b51 100644
--- a/svx/UIConfig_svx.mk
+++ b/svx/UIConfig_svx.mk
@@ -49,6 +49,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/redlinecontrol \
svx/uiconfig/ui/redlinefilterpage \
svx/uiconfig/ui/redlineviewpage \
+ svx/uiconfig/ui/savemodifieddialog \
svx/uiconfig/ui/sidebararea \
svx/uiconfig/ui/sidebargraphic \
svx/uiconfig/ui/sidebarinsert \
diff --git a/svx/source/form/fmshell.cxx b/svx/source/form/fmshell.cxx
index 08c06341a83c..80fc7441674e 100644
--- a/svx/source/form/fmshell.cxx
+++ b/svx/source/form/fmshell.cxx
@@ -37,8 +37,8 @@
#include <com/sun/star/container/XNameContainer.hpp>
#include <com/sun/star/awt/XTabControllerModel.hpp>
#include <sfx2/viewfrm.hxx>
+#include <vcl/layout.hxx>
#include <vcl/wrkwin.hxx>
-#include <vcl/msgbox.hxx>
#include <svl/whiter.hxx>
#include <sfx2/app.hxx>
#include <svl/intitem.hxx>
@@ -272,7 +272,8 @@ bool FmFormShell::PrepareClose(bool bUI)
if ( bModified && bUI )
{
- QueryBox aQry(NULL, SVX_RES(RID_QRY_SAVEMODIFIED));
+ MessageDialog aQry(NULL, "SaveModifiedDialog",
+ "svx/ui/savemodifieddialog.ui");
switch (aQry.Execute())
{
case RET_NO:
diff --git a/svx/source/form/fmstring.src b/svx/source/form/fmstring.src
index e9dcdd36a18a..bf0fdd0fc832 100644
--- a/svx/source/form/fmstring.src
+++ b/svx/source/form/fmstring.src
@@ -301,12 +301,6 @@ String RID_STR_AUTOFIELD
Text [ en-US ] = "<AutoField>";
};
-QueryBox RID_QRY_SAVEMODIFIED
-{
- Buttons = WB_YES_NO_CANCEL ;
- DefButton = WB_DEF_YES ;
- Message [ en-US ] = "The content of the current form has been modified.\nDo you want to save your changes?";
-};
Resource RID_RSC_SQL_INTERNATIONAL
{
String 1
diff --git a/svx/uiconfig/ui/savemodifieddialog.ui b/svx/uiconfig/ui/savemodifieddialog.ui
new file mode 100644
index 000000000000..c5018e2f1a72
--- /dev/null
+++ b/svx/uiconfig/ui/savemodifieddialog.ui
@@ -0,0 +1,85 @@
+<?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 your changes?</property>
+ <property name="secondary_text" translatable="yes">The content of the current form has been modified.</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_underline">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_underline">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>