[glom/gtkapplication] Use G_APPLICATION_NON_UNIQUE.



commit 4a19c57495e3e8182b0d883f1c1c28271f36e7dc
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Feb 10 10:16:29 2012 +0100

    Use G_APPLICATION_NON_UNIQUE.
    
    * glom/application.cc: This is necessary because we use singletons that
    are really per-AppWindow, to simplify our code.

 ChangeLog           |    7 +++++++
 glom/application.cc |    5 ++++-
 2 files changed, 11 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 6612fb9..fd01ddd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2012-02-10  Murray Cumming  <murrayc murrayc com>
 
+	Use G_APPLICATION_NON_UNIQUE.
+
+	* glom/application.cc: This is necessary because we use singletons that
+	are really per-AppWindow, to simplify our code.
+
+2012-02-10  Murray Cumming  <murrayc murrayc com>
+
 	Add a Gtk::Application subclass, used by main().
 
 	* Makefile.am:
diff --git a/glom/application.cc b/glom/application.cc
index 7ae44a7..9eb5108 100644
--- a/glom/application.cc
+++ b/glom/application.cc
@@ -26,8 +26,11 @@
 namespace Glom
 {
 
+// We use Gio::APPLICATION_NON_UNIQUE because we have some singletons and other static data,
+// to simplify our code.
+// We also want to prevent all instances from crashing when one instance crashes.
 Application::Application()
-: Gtk::Application("org.glom.application", Gio::APPLICATION_HANDLES_OPEN)
+: Gtk::Application("org.glom.application", Gio::APPLICATION_HANDLES_OPEN | Gio::APPLICATION_NON_UNIQUE)
 {
 }
 



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