summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-08-25 13:36:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2014-08-25 16:45:25 +0100
commit35376f92eac8bf0aca872f04d8cc46cec273d687 (patch)
tree8fd3cea5aadb611607d230ee599d69e8b5252198 /dbaccess
parent58a7a9bf0463c87b8e4bb483da558d9b62b032f9 (diff)
convert QUERY_BRW_SAVEMODIFIED with custom buttons to .ui
Change-Id: I248e7b14fdd89c3efca60dfce0b9b8dfd2693fa8
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/UIConfig_dbaccess.mk1
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.cxx4
-rw-r--r--dbaccess/source/ui/dlg/indexdialog.src10
-rw-r--r--dbaccess/source/ui/inc/dbu_resource.hrc1
-rw-r--r--dbaccess/uiconfig/ui/saveindexdialog.ui83
5 files changed, 86 insertions, 13 deletions
diff --git a/dbaccess/UIConfig_dbaccess.mk b/dbaccess/UIConfig_dbaccess.mk
index e6365fa9a0dd..78b7ef5bf434 100644
--- a/dbaccess/UIConfig_dbaccess.mk
+++ b/dbaccess/UIConfig_dbaccess.mk
@@ -54,6 +54,7 @@ $(eval $(call gb_UIConfig_add_uifiles,dbaccess, \
dbaccess/uiconfig/ui/relationdialog \
dbaccess/uiconfig/ui/rowheightdialog \
dbaccess/uiconfig/ui/rtfcopytabledialog \
+ dbaccess/uiconfig/ui/saveindexdialog \
dbaccess/uiconfig/ui/savedialog \
dbaccess/uiconfig/ui/savemodifieddialog \
dbaccess/uiconfig/ui/specialjdbcconnectionpage \
diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx
index 8c19cd8bde66..278af5a99388 100644
--- a/dbaccess/source/ui/dlg/indexdialog.cxx
+++ b/dbaccess/source/ui/dlg/indexdialog.cxx
@@ -27,7 +27,6 @@
#include "indexfieldscontrol.hxx"
#include "indexcollection.hxx"
#include <vcl/layout.hxx>
-#include <vcl/msgbox.hxx>
#include <vcl/settings.hxx>
#include <com/sun/star/sdb/SQLContext.hpp>
#include "UITools.hxx"
@@ -573,7 +572,8 @@ namespace dbaui
if (aSelected->isModified() || aSelected->isNew())
{
- QueryBox aQuestion(this, ModuleRes(QUERY_SAVE_CURRENT_INDEX));
+ MessageDialog aQuestion(this, "SaveIndexDialog",
+ "dbaccess/ui/saveindexdialog.ui");
nResponse = aQuestion.Execute();
}
}
diff --git a/dbaccess/source/ui/dlg/indexdialog.src b/dbaccess/source/ui/dlg/indexdialog.src
index 2ee7a377dcaf..12ea5d0e494f 100644
--- a/dbaccess/source/ui/dlg/indexdialog.src
+++ b/dbaccess/source/ui/dlg/indexdialog.src
@@ -63,16 +63,6 @@ String STR_NEED_INDEX_FIELDS
Text [ en-US ] = "The index must contain at least one field.";
};
-QueryBox QUERY_SAVE_CURRENT_INDEX
-{
- Title [ en-US ] = "Exit Index Design";
-
- Message [ en-US ] = "Do you want to save the changes made to the current index?";
-
- Buttons = WB_YES_NO_CANCEL;
- DefButton = WB_DEF_YES;
-};
-
String STR_INDEX_NAME_ALREADY_USED
{
Text [ en-US ] = "There is already another index named \"$name$\".";
diff --git a/dbaccess/source/ui/inc/dbu_resource.hrc b/dbaccess/source/ui/inc/dbu_resource.hrc
index 8edf0a4e40c0..1851aaab999f 100644
--- a/dbaccess/source/ui/inc/dbu_resource.hrc
+++ b/dbaccess/source/ui/inc/dbu_resource.hrc
@@ -101,7 +101,6 @@
// query boxes
#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
#define TABLE_DESIGN_ALL_ROWS_DELETED RID_QUERYBOX_START + 13
diff --git a/dbaccess/uiconfig/ui/saveindexdialog.ui b/dbaccess/uiconfig/ui/saveindexdialog.ui
new file mode 100644
index 000000000000..4d9bbbca8a4a
--- /dev/null
+++ b/dbaccess/uiconfig/ui/saveindexdialog.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="SaveIndexDialog">
+ <property name="can_focus">False</property>
+ <property name="border_width">12</property>
+ <property name="title" translatable="yes">Exit Index Design</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 made to the current index?</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>