[glom/glom-1-22] Startup: Do not crash when reporting check problems.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/glom-1-22] Startup: Do not crash when reporting check problems.
- Date: Fri, 20 Sep 2013 19:16:54 +0000 (UTC)
commit 744af95da93334746098455b84689861d41f96cd
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Sep 20 13:21:57 2013 +0200
Startup: Do not crash when reporting check problems.
* glom/main.c: Instantiate the Application earlier, to ensure
that GTK+ is ready for use.
Also call gtk_init() explicitly because Gtk::Application needs
a fix for this anyway, and it would be nice to use this fix
in Glom versions that do not need a newer gtkmm.
Bug #680411 (Bjørn Lie, Dominique Leuenberger)
glom/main.cc | 13 +++++++++++--
1 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/glom/main.cc b/glom/main.cc
index f80c480..e34acc8 100644
--- a/glom/main.cc
+++ b/glom/main.cc
@@ -426,6 +426,17 @@ main(int argc, char* argv[])
try
{
+ //Create the app here,
+ //so we can use UI, for instance with Gtk::MessageDialog,
+ //even before calling run().
+ Glib::RefPtr<Glom::Application> application =
+ Glom::Application::create();
+
+ //Call gtk_init() too, because earlier (< 3.9.17) versions
+ //of gtkmm do not do this in the default Gtk::Application constructor.
+ //TODO: Remove this when we can depend on a newer gtkmm:
+ gtk_init(0, 0);
+
#ifndef GLOM_ENABLE_CLIENT_ONLY
Gsv::init();
Goocanvas::init();
@@ -474,8 +485,6 @@ main(int argc, char* argv[])
return EXIT_FAILURE;
- Glib::RefPtr<Glom::Application> application =
- Glom::Application::create();
const int status = application->run(argc, argv);
if(status != EXIT_SUCCESS) //TODO: Is this right?
return status;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]