[glibmm] Revert "Gio::Application: Initialize glibmm and giomm."



commit 1390cf3d0c8a05ba6d3b2f4e6b03ac9b87d7c71c
Author: Murray Cumming <murrayc murrayc com>
Date:   Wed Jan 19 10:26:10 2011 +0100

    Revert "Gio::Application: Initialize glibmm and giomm."
    
    This reverts commit 590000d08fa94a72d042ac1143fa042c90cf9705.
    Initializing glibmm in ObjectBase is not actually necessary.

 ChangeLog                 |   11 -----------
 gio/src/application.ccg   |   10 ----------
 gio/src/application.hg    |    6 ++----
 glib/glibmm/objectbase.cc |   23 ++++-------------------
 4 files changed, 6 insertions(+), 44 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index beebcdb..a9b0ab4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,14 +1,3 @@
-2011-01-18  Murray Cumming  <murrayc murrayc com>
-
-	Gio::Application: Initialize glibmm and giomm.
-
-	* glib/glibmm/objectbase.cc: Constructors: Call Glib::init(), making it 
-	unnecessary to call this explicitly before instantiating a Glib::Object.
-	* gio/src/application.ccg: Make sure that giomm can be used as soon as a 
-	Gio::Application has been instantiated.
-	This should let use just instantiate a Gtk::Application 
-	instead of using Gtk::Main.
-
 2011-01-17  Murray Cumming  <murrayc murrayc com>
 
 	Fix the make check build.
diff --git a/gio/src/application.ccg b/gio/src/application.ccg
index bff3c81..3cecd49 100644
--- a/gio/src/application.ccg
+++ b/gio/src/application.ccg
@@ -20,7 +20,6 @@
 #include <gio/gio.h>
 #include <giomm/file.h>
 #include <giomm/actiongroup.h>
-#include <giomm/init.h>
 
 namespace
 {
@@ -103,15 +102,6 @@ static const Glib::SignalProxyInfo Application_signal_open_info =
 namespace Gio
 {
 
-Application::Application(const Glib::ustring& application_id,  ApplicationFlags flags)
-:
-  _CONSTRUCT("application_id", application_id.c_str(), "flags", GApplicationFlags(flags))
-{
-  //Object::Object() has already called Glib::init().
-  //Here we initialize giomm too, which is likely to be needed:
-  Gio::init();
-}
-
 void Application_Class::open_callback(GApplication* self, GFile** files, 
   gint n_files, const gchar *hint)
 {
diff --git a/gio/src/application.hg b/gio/src/application.hg
index 749e31d..dc942c4 100644
--- a/gio/src/application.hg
+++ b/gio/src/application.hg
@@ -83,12 +83,10 @@ class Application : public Glib::Object
   _CLASS_GOBJECT(Application, GApplication, G_APPLICATION, Glib::Object, GObject)
 
 protected:
-  //TODO: Documentation
-  explicit Application(const Glib::ustring& application_id, ApplicationFlags flags = APPLICATION_FLAGS_NONE);
-  _IGNORE(g_application_new)
+  _WRAP_CTOR(Application(const Glib::ustring& application_id, ApplicationFlags flags=APPLICATION_FLAGS_NONE), g_application_new)
 
 public:
-  _WRAP_CREATE(const Glib::ustring& application_id, ApplicationFlags flags = APPLICATION_FLAGS_NONE)
+  _WRAP_CREATE(const Glib::ustring& application_id, ApplicationFlags flags=APPLICATION_FLAGS_NONE)
 
   _WRAP_METHOD(static bool id_is_valid(const Glib::ustring& application_id), g_application_id_is_valid)
 
diff --git a/glib/glibmm/objectbase.cc b/glib/glibmm/objectbase.cc
index 3350918..4798c1f 100644
--- a/glib/glibmm/objectbase.cc
+++ b/glib/glibmm/objectbase.cc
@@ -23,7 +23,7 @@
 #include <glibmm/quark.h>
 #include <glibmm/objectbase.h>
 #include <glibmm/propertyproxy_base.h> //For PropertyProxyConnectionNode
-#include <glibmm/init.h>
+
 
 namespace
 {
@@ -47,36 +47,21 @@ ObjectBase::ObjectBase()
   gobject_                      (0),
   custom_type_name_             (anonymous_custom_type_name),
   cpp_destruction_in_progress_  (false)
-{
-  //Check that glibmm is initialized,
-  //so that no explicit initialization is needed before instantiating Gio::Application,
-  //whose constructor uses the GType system.
-  Glib::init();
-}
+{}
 
 ObjectBase::ObjectBase(const char* custom_type_name)
 :
   gobject_                      (0),
   custom_type_name_             (custom_type_name),
   cpp_destruction_in_progress_  (false)
-{
-  //Check that glibmm is initialized,
-  //so that no explicit initialization is needed before instantiating Gio::Application,
-  //whose constructor uses the GType system.
-  Glib::init();
-}
+{}
 
 ObjectBase::ObjectBase(const std::type_info& custom_type_info)
 :
   gobject_                      (0),
   custom_type_name_             (custom_type_info.name()),
   cpp_destruction_in_progress_  (false)
-{
-  //Check that glibmm is initialized,
-  //so that no explicit initialization is needed before instantiating Gio::Application,
-  //whose constructor uses the GType system.
-  Glib::init();
-}
+{}
 
 // initialize() actually initializes the wrapper.  Glib::ObjectBase is used
 // as virtual base class, which means the most-derived class' ctor invokes



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