[glibmm] gmmproc: Include <glibmm.h> in .cc files for convenience.



commit c53fafb304af78c34baef856e056519933d32432
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Oct 25 11:35:39 2011 +0200

    gmmproc: Include <glibmm.h> in .cc files for convenience.
    
    * tools/m4/base.m4: Add an include <glibmm.h> line to the .cc files.
    * glib/src/optioncontext.ccg: Rename a namespace to avoid a clash.
    
    It is more useful to keep the general glibmm.h include out of headers.

 ChangeLog                  |    9 +++++++++
 glib/src/optioncontext.ccg |    8 ++++----
 tools/m4/base.m4           |    2 ++
 3 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c4d2b6b..a88d2f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2011-10-25  Murray Cumming  <murrayc murrayc com>
+
+	gmmproc: Include <glibmm.h> in .cc files for convenience.
+	
+	* tools/m4/base.m4: Add an include <glibmm.h> line to the .cc files.
+	* glib/src/optioncontext.ccg: Rename a namespace to avoid a clash.
+	
+	It is more useful to keep the general glibmm.h include out of headers.
+
 2011-10-24  Josà Alburquerque  <jaalburqu svn gnome org>
 
 	gmmproc: Don't include <glibmm.h> by default in generated files.
diff --git a/glib/src/optioncontext.ccg b/glib/src/optioncontext.ccg
index 2e8b4c2..61fe1c4 100644
--- a/glib/src/optioncontext.ccg
+++ b/glib/src/optioncontext.ccg
@@ -25,7 +25,7 @@
 namespace Glib
 {
 
-  namespace Private
+  namespace OptionContextPrivate
   {
     static const gchar* SignalProxy_translate_gtk_callback (const gchar* str, gpointer data)
     {
@@ -49,7 +49,7 @@ namespace Glib
       delete static_cast<Glib::OptionContext::SlotTranslate*>(data);
     }
 
-  } //namespace Private
+  } //namespace OptionContextPrivate
 
 OptionContext::OptionContext(const Glib::ustring& parameter_string)
 : gobject_( g_option_context_new(parameter_string.c_str()) ),
@@ -101,8 +101,8 @@ void OptionContext::set_translate_func (const SlotTranslate& slot)
   SlotTranslate* slot_copy = new SlotTranslate(slot);
 
   g_option_context_set_translate_func(
-      gobj(), &Private::SignalProxy_translate_gtk_callback, slot_copy,
-      &Private::SignalProxy_translate_gtk_callback_destroy);
+      gobj(), &OptionContextPrivate::SignalProxy_translate_gtk_callback, slot_copy,
+      &OptionContextPrivate::SignalProxy_translate_gtk_callback_destroy);
 }
 
 Glib::ustring OptionContext::get_help(bool main_help) const
diff --git a/tools/m4/base.m4 b/tools/m4/base.m4
index 228bbf5..6594aa2 100644
--- a/tools/m4/base.m4
+++ b/tools/m4/base.m4
@@ -315,6 +315,8 @@ _DEPRECATE_IFDEF_CLASS_START
 #include <__MODULE__/private/__FILE__`'_p.h>
 
 _IMPORT(SECTION_CC_INCLUDES)
+#include <glibmm.h>
+
 _IMPORT(SECTION_SRC_CUSTOM)
 
 namespace



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