[glom] Replace an error dialog in Glade with code that uses MessageDialog.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Replace an error dialog in Glade with code that uses MessageDialog.
- Date: Fri, 25 Oct 2013 09:20:51 +0000 (UTC)
commit c81503056fd959d4e1156d403018f87d9599df10
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Oct 25 10:28:46 2013 +0200
Replace an error dialog in Glade with code that uses MessageDialog.
Makefile.am | 1 -
data/glom.gresource.xml | 1 -
.../developer/dialog_error_create_database.glade | 121 --------------------
glom/appwindow.cc | 13 +-
po/POTFILES.in | 1 -
5 files changed, 7 insertions(+), 130 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index cd71408..750689b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -122,7 +122,6 @@ EXTRA_DIST += \
data/ui/developer/dialog_choose_relationship.glade \
data/ui/developer/dialog_choose_user.glade \
data/ui/developer/dialog_database_preferences.glade \
- data/ui/developer/dialog_error_create_database.glade \
data/ui/developer/dialog_fieldslist.glade \
data/ui/developer/dialog_field_summary.glade \
data/ui/developer/dialog_flowtable.glade \
diff --git a/data/glom.gresource.xml b/data/glom.gresource.xml
index 9680c8c..051e1da 100644
--- a/data/glom.gresource.xml
+++ b/data/glom.gresource.xml
@@ -10,7 +10,6 @@
<file preprocess="xml-stripblanks">data/ui/developer/dialog_choose_relationship.glade</file>
<file preprocess="xml-stripblanks">data/ui/developer/dialog_choose_user.glade</file>
<file preprocess="xml-stripblanks">data/ui/developer/dialog_database_preferences.glade</file>
- <file preprocess="xml-stripblanks">data/ui/developer/dialog_error_create_database.glade</file>
<file preprocess="xml-stripblanks">data/ui/developer/dialog_fieldslist.glade</file>
<file preprocess="xml-stripblanks">data/ui/developer/dialog_field_summary.glade</file>
<file preprocess="xml-stripblanks">data/ui/developer/dialog_flowtable.glade</file>
diff --git a/glom/appwindow.cc b/glom/appwindow.cc
index 56316a4..d2ac41b 100644
--- a/glom/appwindow.cc
+++ b/glom/appwindow.cc
@@ -1747,12 +1747,13 @@ bool AppWindow::recreate_database_from_backup(const Glib::ustring& backup_uri, b
{
std::cerr << G_STRFUNC << ": Gnome::Gda::Connection::create_database(" << db_name << ") failed: " <<
ex.what() << std::endl;
- //Tell the user:
- Gtk::Dialog* dialog = 0;
- Utils::get_glade_widget_with_warning("glom_developer.glade", "dialog_error_create_database", dialog);
- dialog->set_transient_for(*this);
- Glom::Utils::dialog_run_with_help(dialog, "dialog_error_create_database");
- delete dialog;
+
+ const Glib::ustring message = _("Glom could not create the new database. Maybe you do not have the
necessary access rights. Please contact your system administrator.");
+ Gtk::MessageDialog dialog(Utils::bold_message(_("Database Creation Failed")), true, Gtk::MESSAGE_ERROR );
+ dialog.set_secondary_text(message);
+ dialog.set_transient_for(*this);
+
+ dialog.run();
return false;
}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 605fc00..89a29b4 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -166,7 +166,6 @@ data/ui/developer/dialog_choose_field.glade
data/ui/developer/dialog_choose_relationship.glade
data/ui/developer/dialog_choose_user.glade
data/ui/developer/dialog_database_preferences.glade
-data/ui/developer/dialog_error_create_database.glade
data/ui/developer/dialog_fieldslist.glade
data/ui/developer/dialog_field_summary.glade
data/ui/developer/dialog_flowtable.glade
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]