summaryrefslogtreecommitdiffstats
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-25 13:45:15 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-25 16:45:25 +0100
commit9b12086313b74b81e9b90a8740b458345c9c0812 (patch)
tree5858fce568e6ac4904787fa64dfd0ee45623c4f8 /dbaccess
parentconvert RELATION_DESIGN_SAVEMODIFIED with custom buttons to .ui (diff)
downloadcore-9b12086313b74b81e9b90a8740b458345c9c0812.tar.gz
core-9b12086313b74b81e9b90a8740b458345c9c0812.zip
convert TABLE_DESIGN_SAVEMODIFIED with custom buttons to .ui
Change-Id: Id0ea1a0a8de1cdd363ee462003406c5625b0e4af
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/UIConfig_dbaccess.mk1
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc1
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx3
-rw-r--r--dbaccess/source/ui/tabledesign/table.src7
-rw-r--r--dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui83
5 files changed, 86 insertions, 9 deletions
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index a2b879fea49d..5ee75b132ccc 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -63,6 +63,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/sortdialog \
dbaccess/uiconfig/ui/sqlexception \
dbaccess/uiconfig/ui/summarypage \
+ dbaccess/uiconfig/ui/tabledesignsavemodifieddialog \
dbaccess/uiconfig/ui/tablesfilterdialog \
dbaccess/uiconfig/ui/tablesfilterpage \
dbaccess/uiconfig/ui/tablesjoindialog \
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index c7efd79ec25d..115000c2fc46 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -100,7 +100,6 @@
// query boxes
-#define TABLE_DESIGN_SAVEMODIFIED RID_QUERYBOX_START + 5
#define TABLE_DESIGN_ALL_ROWS_DELETED RID_QUERYBOX_START + 13
// images
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index b2565c92f65a..a929bb15454d 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -563,7 +563,8 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
::boost::mem_fn(&OTableRow::isValid));
if ( aIter != m_vRowList.end() )
{
- QueryBox aQry(getView(), ModuleRes(TABLE_DESIGN_SAVEMODIFIED));
+ MessageDialog aQry(getView(), "TableDesignSaveModifiedDialog",
+ "dbaccess/ui/tabledesignsavemodifieddialog.ui");
switch (aQry.Execute())
{
case RET_YES:
diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src
index dcc6d5179017..ce2264269bbc 100644
--- a/dbaccess/source/ui/tabledesign/table.src
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -326,13 +326,6 @@ String STR_STAT_WARNING
Text [ en-US ] = "Warning!" ;
};
-QueryBox TABLE_DESIGN_SAVEMODIFIED
-{
- Buttons = WB_YES_NO_CANCEL ;
- DefButton = WB_DEF_YES ;
- Message [ en-US ] = "The table has been changed.\nDo you want to save the changes?" ;
-};
-
String STR_TABLEDESIGN_CONNECTION_MISSING
{
Text [ en-US ] = "The table could not be saved due to problems connecting to the database.";
diff --git a/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui b/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.ui
new file mode 100644
index 000000000000..52f8937bd95f
--- /dev/null
+++ b/dbaccess/uiconfig/ui/tabledesignsavemodifieddialog.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="TableDesignSaveModifiedDialog">
+ <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 table 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>