summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMurray Cumming <murrayc@murrayc.com>2009-06-29 13:27:17 +0200
committerMurray Cumming <murrayc@murrayc.com>2009-06-29 13:27:17 +0200
commit984f55ebfc37dc0f989c5e5005f6242930ebe0ac (patch)
tree67edf1b0ff830e6d5fb3eb7cf4157d20a82c2e21
parentbd6a81cc903e7a788bac703354f04df512afdfac (diff)
downloadglibmm-2.21.1-real.tar.gz
Increased versionglibmm-2.21.1-real
-rw-r--r--ChangeLog6
-rw-r--r--NEWS37
-rw-r--r--configure.ac2
-rw-r--r--glib/glibmm/class.cc12
-rw-r--r--glib/glibmm/class.h7
-rw-r--r--tools/m4/class_gobject.m45
-rw-r--r--tools/m4/class_gtkobject.m45
-rw-r--r--tools/m4/class_shared.m452
8 files changed, 122 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index aef93453..110374a1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,5 @@
+2.21.1:
+
2009-06-24 Daniel Elstner <daniel.kitta@gmail.com>
Omit unused parameter names to avoid warning
@@ -205,8 +207,8 @@
2009-06-17 Hubert Figuiere <hub@figuiere.net>
* gio/src/file.hg:
- * gio/src/file.ccg: Gio::File::load_contents() override to allow ignoring the
- etag contents. (Bug #581349)
+ * gio/src/file.ccg: Added Gio::File::load_contents() overload to allow
+ ignoring the etag contents. (Bug #581349)
2009-06-16 José Alburquerque <jaalburqu@svn.gnome.org>
diff --git a/NEWS b/NEWS
index d784d122..88308671 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,40 @@
+2.21.1 (unstable):
+
+Glib:
+* Date: Constructor: Check for invalid dates.
+ (José Alburquerque)
+* Added Glib::ValueArray, for use in gstreamermm.
+ (José Alburquerque)
+* Added Glib::file_set_contents().
+ (Jonathon Jongsma)
+* gmmproc:
+ - Avoid problems with spaces in _DEFS() calls.
+ (Hubert Figuiere) Bug #586785.
+ - Improve guessing of the *_get_type() function names from enum names.
+ (José Alburquerque) Bug #575870.
+
+Gio:
+* Cancellable: Added connect() and disconnect().
+* Added FileIOStream.
+* Added InetAddress.
+* Added Initable.
+* Added IOStream.
+* Added NetworkAddress.
+* Added NetworkService.
+* Added Resolver
+* Added Socket.
+* Added SocketAddress.
+* Added SocketConnectable.
+* Added SrvTarget.
+ (Jonathon Jongsma)
+* File::load_contents() Added overload without the etag_out parameter.
+ (Hubert Figuiere) Bug #581349.
+
+Windows Build:
+* General Windows fixes.
+* Fix the build directly from git.
+(Armin Burgmeier)
+
2.20.0 (stable):
* Documentation fixes (Daniel Elstner)
diff --git a/configure.ac b/configure.ac
index 248fb1e9..a08178ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,7 @@
pushdef([GLIBMM_MAJOR_VERSION], [2])
pushdef([GLIBMM_MINOR_VERSION], [21])
-pushdef([GLIBMM_MICRO_VERSION], [0])
+pushdef([GLIBMM_MICRO_VERSION], [1])
pushdef([GLIBMM_EXTRA_VERSION], [])
pushdef([GLIBMM_VERSION], GLIBMM_MAJOR_VERSION.GLIBMM_MINOR_VERSION.GLIBMM_MICRO_VERSION[]GLIBMM_EXTRA_VERSION)
diff --git a/glib/glibmm/class.cc b/glib/glibmm/class.cc
index 3127c696..af285170 100644
--- a/glib/glibmm/class.cc
+++ b/glib/glibmm/class.cc
@@ -29,6 +29,11 @@ namespace Glib
void Class::register_derived_type(GType base_type)
{
+ return register_derived_type(base_type, 0);
+}
+
+void Class::register_derived_type(GType base_type, GTypeModule* module)
+{
if(gtype_)
return; // already initialized
@@ -62,7 +67,12 @@ void Class::register_derived_type(GType base_type)
}
gchar* derived_name = g_strconcat("gtkmm__", base_query.type_name, NULL);
- gtype_ = g_type_register_static(base_type, derived_name, &derived_info, GTypeFlags(0));
+
+ if(module)
+ gtype_ = g_type_module_register_type(module, base_type, derived_name, &derived_info, GTypeFlags(0));
+ else
+ gtype_ = g_type_register_static(base_type, derived_name, &derived_info, GTypeFlags(0));
+
g_free(derived_name);
}
diff --git a/glib/glibmm/class.h b/glib/glibmm/class.h
index c961a763..2e7345da 100644
--- a/glib/glibmm/class.h
+++ b/glib/glibmm/class.h
@@ -57,8 +57,15 @@ protected:
GType gtype_;
GClassInitFunc class_init_func_;
+ /** Register a GType, derived from the @a base_type.
+ */
void register_derived_type(GType base_type);
+ /** Register a GType, derived from the @a base_type.
+ * @param module If this is not 0 then g_type_module_register_type() will be used. Otherwise g_type_register_static() will be used.
+ */
+ void register_derived_type(GType base_type, GTypeModule* module);
+
private:
static void custom_class_init_function(void* g_class, void* class_data);
};
diff --git a/tools/m4/class_gobject.m4 b/tools/m4/class_gobject.m4
index 50743d99..12cbec6c 100644
--- a/tools/m4/class_gobject.m4
+++ b/tools/m4/class_gobject.m4
@@ -247,6 +247,11 @@ public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
+
+ifdef(`__BOOL_DYNAMIC_GTYPE_REGISTRATION__',`
+ static GType get_type(GTypeModule* module) G_GNUC_CONST;
+',`')
+
static GType get_base_type() G_GNUC_CONST;
#endif
diff --git a/tools/m4/class_gtkobject.m4 b/tools/m4/class_gtkobject.m4
index cbe9529c..9c6e3e14 100644
--- a/tools/m4/class_gtkobject.m4
+++ b/tools/m4/class_gtkobject.m4
@@ -210,6 +210,11 @@ protected:
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
static GType get_type() G_GNUC_CONST;
+
+ifdef(`__BOOL_DYNAMIC_GTYPE_REGISTRATION__',`
+ static GType get_type(GTypeModule* module) G_GNUC_CONST;
+',`')
+
static GType get_base_type() G_GNUC_CONST;
#endif
diff --git a/tools/m4/class_shared.m4 b/tools/m4/class_shared.m4
index 13f718c2..43e24939 100644
--- a/tools/m4/class_shared.m4
+++ b/tools/m4/class_shared.m4
@@ -50,6 +50,17 @@ define(`__BOOL_DO_NOT_DERIVE_GTYPE__',`$1')
_POP()
')
+dnl GVolumeMonitor can be broken/impeded by defining a sub-type.
+define(`_DYNAMIC_GTYPE_REGISTRATION',`dnl
+_PUSH()
+dnl Define this macro to be tested for later.
+define(`__BOOL_DYNAMIC_GTYPE_REGISTRATION__',`$1')
+_POP()
+')
+
+
+
+
dnl
dnl
dnl
@@ -73,6 +84,10 @@ ifdef(`__BOOL_DO_NOT_DERIVE_GTYPE__',`dnl
const Glib::Class& init();
+ifdef(`__BOOL_DYNAMIC_GTYPE_REGISTRATION__',`
+ const Glib::Class& init(GTypeModule* module);
+',`')
+
ifdef(`__BOOL_DO_NOT_DERIVE_GTYPE__',`dnl
',`dnl
static void class_init_function(void* g_class, void* class_data);
@@ -126,6 +141,34 @@ _IMPORT(SECTION_CC_IMPLEMENTS_INTERFACES)
return *this;
}
+
+ifdef(`__BOOL_DYNAMIC_GTYPE_REGISTRATION__',`
+const Glib::Class& __CPPNAME__`'_Class::init(GTypeModule* module)
+{
+ if(!gtype_) // create the GType if necessary
+ {
+ifdef(`__BOOL_DO_NOT_DERIVE_GTYPE__',`dnl
+ // Do not derive a GType, or use a derived klass:
+ gtype_ = CppClassParent::CppObjectType::get_type();
+',`dnl
+ // Glib::Class has to know the class init function to clone custom types.
+ class_init_func_ = &__CPPNAME__`'_Class::class_init_function;
+
+ // This is actually just optimized away, apparently with no harm.
+ // Make sure that the parent type has been created.
+ //CppClassParent::CppObjectType::get_type();
+
+ // Create the wrapper type, with the same class/instance size as the base type.
+ register_derived_type(_LOWER(__CCAST__)_get_type(), module);
+
+ // Add derived versions of interfaces, if the C type implements any interfaces:
+_IMPORT(SECTION_CC_IMPLEMENTS_INTERFACES)
+')
+ }
+
+ return *this;
+',`')
+
ifdef(`__BOOL_DO_NOT_DERIVE_GTYPE__',`dnl
',`dnl
@@ -166,6 +209,15 @@ GType __CPPNAME__::get_type()
return __BASE__`'_class_.init().get_type();
}
+ifdef(`__BOOL_DYNAMIC_GTYPE_REGISTRATION__',`
+GType __CPPNAME__::get_type(GTypeModule* module)
+{
+ return __BASE__`'_class_.init(module).get_type();
+}
+'dnl
+,`'dnl
+)
+
GType __CPPNAME__::get_base_type()
{
return _LOWER(__CCAST__)_get_type();