[gtkmm] Application: Use _WRAP_CTOR() and _WRAP_CREATE() instead of _WRAP_METHOD().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Application: Use _WRAP_CTOR() and _WRAP_CREATE() instead of _WRAP_METHOD().
- Date: Fri, 17 Dec 2010 12:18:02 +0000 (UTC)
commit d8ac3a7bb88b8a0d33e79fbb1154e3d9c8e8d508
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Dec 17 13:15:59 2010 +0100
Application: Use _WRAP_CTOR() and _WRAP_CREATE() instead of _WRAP_METHOD().
* gtk/src/application.hg: This adds a protected constructor and makes the
create() method just call that, which is the normal ways to do things.
Maybe we had wrapped gtk_application_new() directly before because it maybe
once did more than call g_object_new(), but that is fine now.
Now people can derive from this class.
This fixes bug #637445 (Yannick Guesnet)
ChangeLog | 12 ++++++++++++
gtk/src/application.hg | 8 +++++---
2 files changed, 17 insertions(+), 3 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 1569c57..232c585 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,17 @@
2010-12-17 Murray Cumming <murrayc murrayc com>
+ Application: Use _WRAP_CTOR() and _WRAP_CREATE() instead of _WRAP_METHOD().
+
+ * gtk/src/application.hg: This adds a protected constructor and makes the
+ create() method just call that, which is the normal ways to do things.
+ Maybe we had wrapped gtk_application_new() directly before because it maybe
+ once did more than call g_object_new(), but that is fine now.
+ Now people can derive from this class.
+
+ This fixes bug #637445 (Yannick Guesnet)
+
+2010-12-17 Murray Cumming <murrayc murrayc com>
+
Window: Added get/set_application().
* gtk/src/window.hg: Wrapped gtk_window_get_application() and
diff --git a/gtk/src/application.hg b/gtk/src/application.hg
index f4eb16e..b63679b 100644
--- a/gtk/src/application.hg
+++ b/gtk/src/application.hg
@@ -36,11 +36,13 @@ class Application
protected:
_CLASS_GOBJECT(Application, GtkApplication, GTK_APPLICATION, Gio::Application, GApplication)
- //TODO: Constructor?
+protected:
+#m4 _CONVERSION(`Gio::ApplicationFlags',`GApplicationFlags',`(GApplicationFlags)($3)')
+ _WRAP_CTOR(Application(const Glib::ustring& application_id, Gio::ApplicationFlags flags = Gio::APPLICATION_FLAGS_NONE), gtk_application_new)
+
public:
-#m4 _CONVERSION(`Gio::ApplicationFlags',`GApplicationFlags',`(GApplicationFlags)($3)')
- _WRAP_METHOD(static Glib::RefPtr<Application> create(const Glib::ustring& appid, Gio::ApplicationFlags flags = Gio::APPLICATION_FLAGS_NONE), gtk_application_new)
+ _WRAP_CREATE(const Glib::ustring& application_id, Gio::ApplicationFlags flags = Gio::APPLICATION_FLAGS_NONE)
#m4 _CONVERSION(`GList*',`Glib::ListHandle<Window*>',`$2($3, Glib::OWNERSHIP_NONE)')
_WRAP_METHOD(Glib::ListHandle<Window*> get_windows(), gtk_application_get_windows)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]