[glom] Box_Tables: Table deletion: Actually let the user cancel the dialog.



commit b928a26d3b72c5fe471ef3b2f87187bd1a16e170
Author: Murray Cumming <murrayc murrayc com>
Date:   Sun Feb 7 17:26:17 2016 +0100

    Box_Tables: Table deletion: Actually let the user cancel the dialog.

 glom/navigation/box_tables.cc |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/glom/navigation/box_tables.cc b/glom/navigation/box_tables.cc
index 76d0c9d..b4799c2 100644
--- a/glom/navigation/box_tables.cc
+++ b/glom/navigation/box_tables.cc
@@ -295,9 +295,13 @@ void Box_Tables::on_adddel_Delete(const Gtk::TreeModel::iterator& rowStart, cons
         {
           //Ask the user to confirm:
           const auto strMsg = Glib::ustring::compose(_("Are you sure that you want to delete this 
table?\nTable name: %1"), table_name);
-          Gtk::MessageDialog dialog(UiUtils::bold_message(_("Delete Table")), true);
+          Gtk::MessageDialog dialog(UiUtils::bold_message(_("Delete Table")),
+            true, Gtk::MESSAGE_QUESTION, Gtk::BUTTONS_NONE,
+            true /* modal */);
           dialog.set_secondary_text(strMsg);
           dialog.set_transient_for(*AppWindow::get_appwindow());
+          dialog.add_button(_("_Cancel"), Gtk::RESPONSE_CANCEL);
+          dialog.add_button(_("Delete Table"), Gtk::RESPONSE_OK);
           const auto iButtonClicked = dialog.run();
           
           //Get a list of autoincrementing fields in the table:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]