[glom/glom-1-22] Startup: Show check errors on stderr
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-22] Startup: Show check errors on stderr
- Date: Fri, 20 Sep 2013 19:16:49 +0000 (UTC)
commit 6234b4e0c774ddba7b97de227d78e2cf606bb5a3
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Sep 20 12:35:11 2013 +0200
Startup: Show check errors on stderr
In case the UI is crashing at first use somehow, as it currently seems to
be on Fedora.
glom/main.cc | 28 +++++++++++++++++++++++++---
1 files changed, 25 insertions(+), 3 deletions(-)
---
diff --git a/glom/main.cc b/glom/main.cc
index 18c40b2..f80c480 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -57,6 +57,8 @@
#include <evince-view.h>
+#include <gtkmm/main.h>
+
#include <glibmm/i18n.h>
#ifdef G_OS_WIN32
@@ -206,6 +208,9 @@ bool check_user_is_not_root_with_warning()
if(!message.empty())
{
+ //Make sure this is on stderr too, in case something goes wrong with the UI:
+ std::cerr << message << std::endl;
+
Gtk::MessageDialog dialog(Utils::bold_message(_("Running As Root")), true /* use_markup */,
Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
dialog.set_secondary_text(message);
dialog.run();
@@ -262,8 +267,13 @@ bool check_postgres_is_available_with_warning()
#else //DISTRO_SPECIFIC_POSTGRES_INSTALL_IMPLEMENTED
//Show message to the user about the broken installation:
+ const Glib::ustring message = _("Your installation of Glom is not complete, because PostgreSQL is not
available on your system. PostgreSQL is needed for self-hosting of Glom databases.\n\nPlease report this bug
to your vendor, or your system administrator so it can be corrected.");
+
+ //Make sure this is on stderr too, in case something goes wrong with the UI:
+ std::cerr << message << std::endl;
+
Gtk::MessageDialog dialog(Utils::bold_message(_("Incomplete Glom Installation")), true /* use_markup */,
Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
- dialog.set_secondary_text(_("Your installation of Glom is not complete, because PostgreSQL is not
available on your system. PostgreSQL is needed for self-hosting of Glom databases.\n\nPlease report this bug
to your vendor, or your system administrator so it can be corrected."));
+ dialog.set_secondary_text(message);
dialog.run();
return false;
@@ -278,8 +288,11 @@ bool check_pyglom_is_available_with_warning()
if(glom_python_module_is_available())
return true;
- /* The python module could not be imported by Glom, so warn the user: */
- const Glib::ustring message = _("Your installation of Glom is not complete, because the Glom Python
module is not available on your system.\n\nPlease report this bug to your vendor, or your system
administrator so it can be corrected.");
+ /* The python module could not be imported by Glom, so warn the user: */
+ const Glib::ustring message = _("Your installation of Glom is not complete, because the Glom Python module
is not available on your system.\n\nPlease report this bug to your vendor, or your system administrator so it
can be corrected.");
+
+ //Make sure this is on stderr too, in case something goes wrong with the UI:
+ std::cerr << message << std::endl;
Gtk::MessageDialog dialog(Utils::bold_message(_("Glom Python Module Not Installed")), true /* use_markup
*/, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
dialog.set_secondary_text(message);
@@ -296,6 +309,9 @@ bool check_gir_is_available_with_warning()
/* The python module could not be imported by Glom, so warn the user: */
const Glib::ustring message = _("Your installation of Glom is not complete, because the gi.repository
Python module is not available on your system.\n\nPlease report this bug to your vendor, or your system
administrator so it can be corrected.");
+ //Make sure this is on stderr too, in case something goes wrong with the UI:
+ std::cerr << message << std::endl;
+
Gtk::MessageDialog dialog(Utils::bold_message(_("gi.repository Python Module Not Installed")), true /*
use_markup */, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
dialog.set_secondary_text(message);
dialog.run();
@@ -311,6 +327,9 @@ bool check_pygda_is_available_with_warning()
/* The python module could not be imported by Glom, so warn the user: */
const Glib::ustring message = _("Your installation of Glom is not complete, because the gi.repository.Gda
python module is not available on your system.\n\nPlease report this bug to your vendor, or your system
administrator so it can be corrected.");
+ //Make sure this is on stderr too, in case something goes wrong with the UI:
+ std::cerr << message << std::endl;
+
Gtk::MessageDialog dialog(Utils::bold_message(_("gi.repository.Gda Python Module Not Installed")), true /*
use_markup */, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
dialog.set_secondary_text(message);
dialog.run();
@@ -423,6 +442,9 @@ main(int argc, char* argv[])
/* The Postgres provider was not found, so warn the user: */
const Glib::ustring message = _("Your installation of Glom is not complete, because the PostgreSQL
libgda provider is not available on your system. This provider is needed to access Postgres database
servers.\n\nPlease report this bug to your vendor, or your system administrator so it can be corrected.");
+ //Make sure this is on stderr too, in case something goes wrong with the UI:
+ std::cerr << message << std::endl;
+
Gtk::MessageDialog dialog(Glom::Utils::bold_message(_("Incomplete Glom Installation")), true /*
use_markup */, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true /* modal */);
dialog.set_secondary_text(message);
dialog.run();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]