[glom/glom-1-28] Box_Tables: Table deletion: Actually let the user cancel the dialog.



commit ac04de954554a9321c078661fd0eea0ee53c2a6b
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 |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/glom/navigation/box_tables.cc b/glom/navigation/box_tables.cc
index 9063380..0ee8b9d 100644
--- a/glom/navigation/box_tables.cc
+++ b/glom/navigation/box_tables.cc
@@ -301,14 +301,17 @@ void Box_Tables::on_adddel_Delete(const Gtk::TreeModel::iterator& rowStart, cons
         {
           //Ask the user to confirm:
           const Glib::ustring 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 int iButtonClicked = dialog.run();
           
           //Get a list of autoincrementing fields in the table:
           const Glom::Document::type_vec_fields fields = document->get_table_fields(table_name);
-   
 
           //Delete the table:
           if(iButtonClicked == Gtk::RESPONSE_OK)


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