summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-25 13:48:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-25 16:45:26 +0100
commitdb83365b3b0f0e50148af30af67e01e985e21295 (patch)
treedd3f9fee5c39828070fcbf6e453ab3f75d36b8ff /dbaccess
parent9b12086313b74b81e9b90a8740b458345c9c0812 (diff)
convert TABLE_DESIGN_ALL_ROWS_DELETED with custom buttons to .ui
Change-Id: Id4b5573cd7e20f841e25ba17f17e98b78fb759cc
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/UIConfig_dbaccess.mk1
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc4
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx3
-rw-r--r--dbaccess/source/ui/tabledesign/table.src7
-rw-r--r--dbaccess/uiconfig/ui/deleteallrowsdialog.ui82
5 files changed, 85 insertions, 12 deletions
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index 5ee75b132ccc..c62fb19ff4be 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -28,6 +28,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/dbwizmysqlnativepage \
dbaccess/uiconfig/ui/dbwizspreadsheetpage \
dbaccess/uiconfig/ui/dbwiztextpage \
+ dbaccess/uiconfig/ui/deleteallrowsdialog \
dbaccess/uiconfig/ui/designsavemodifieddialog \
dbaccess/uiconfig/ui/directsqldialog \
dbaccess/uiconfig/ui/emptypage \
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 115000c2fc46..4bf0d025e1e7 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -98,10 +98,6 @@
// FREE
-// query boxes
-
-#define TABLE_DESIGN_ALL_ROWS_DELETED RID_QUERYBOX_START + 13
-
// images
#define TABLE_TREE_ICON RID_IMAGE_START + 0
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index a929bb15454d..d51d1bc0e2a6 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -580,7 +580,8 @@ sal_Bool SAL_CALL OTableController::suspend(sal_Bool /*_bSuspend*/) throw( Runti
}
else if ( !m_bNew )
{
- QueryBox aQry(getView(), ModuleRes(TABLE_DESIGN_ALL_ROWS_DELETED));
+ MessageDialog aQry(getView(), "DeleteAllRowsDialog",
+ "dbaccess/ui/deleteallrowsdialog.ui");
switch (aQry.Execute())
{
case RET_YES:
diff --git a/dbaccess/source/ui/tabledesign/table.src b/dbaccess/source/ui/tabledesign/table.src
index ce2264269bbc..a191b3435325 100644
--- a/dbaccess/source/ui/tabledesign/table.src
+++ b/dbaccess/source/ui/tabledesign/table.src
@@ -371,13 +371,6 @@ String STR_TABLEDESIGN_COULD_NOT_DROP_COL
Text [ en-US ] = "The column $column$ could not be deleted.";
};
-QueryBox TABLE_DESIGN_ALL_ROWS_DELETED
-{
- Buttons = WB_YES_NO_CANCEL ;
- DefButton = WB_DEF_YES ;
- Message [ en-US ] = "You are trying to delete all the columns in the table. A table cannot exist without columns. Should the table be deleted from the database? If not, the table will remain unchanged.";
-};
-
String STR_AUTOINCREMENT_VALUE
{
Text [ en-US ] = "A~uto-increment statement";
diff --git a/dbaccess/uiconfig/ui/deleteallrowsdialog.ui b/dbaccess/uiconfig/ui/deleteallrowsdialog.ui
new file mode 100644
index 000000000000..5f69c51f49bc
--- /dev/null
+++ b/dbaccess/uiconfig/ui/deleteallrowsdialog.ui
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkMessageDialog" id="DeleteAllRowsDialog">
+ <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">You are trying to delete all the columns in the table. A table cannot exist without columns. Should the table be deleted from the database? If not, the table will remain unchanged.</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>