[gtkmm] Window: Added get/set_application().
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Window: Added get/set_application().
- Date: Fri, 17 Dec 2010 11:20:23 +0000 (UTC)
commit 3e704034a59219559af1902bc45b5475e1885c38
Author: Murray Cumming <murrayc murrayc com>
Date: Fri Dec 17 12:20:16 2010 +0100
Window: Added get/set_application().
* gtk/src/window.hg: Wrapped gtk_window_get_application() and
gtk_window_set_application() and property. Include appliation.h.
* gtk/src/application.[hg|ccg]: Pre-declare Window instead of including
window.h, to avoid the circular include.
* tools/m4/convert_gtk.m4: Added necessary conversions.
This fixes bug #637441 (Yannick Guesnet)
ChangeLog | 12 ++++++++++++
gtk/src/application.ccg | 1 +
gtk/src/application.hg | 3 ++-
gtk/src/window.hg | 7 +++++++
tools/m4/convert_gtk.m4 | 2 ++
5 files changed, 24 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 58b3a70..1569c57 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2010-12-17 Murray Cumming <murrayc murrayc com>
+
+ Window: Added get/set_application().
+
+ * gtk/src/window.hg: Wrapped gtk_window_get_application() and
+ gtk_window_set_application() and property. Include appliation.h.
+ * gtk/src/application.[hg|ccg]: Pre-declare Window instead of including
+ window.h, to avoid the circular include.
+ * tools/m4/convert_gtk.m4: Added necessary conversions.
+
+ This fixes bug #637441 (Yannick Guesnet)
+
2010-12-16 Murray Cumming <murrayc murrayc com>
Pixbuf: Derive from (and implement) Gio::Icon.
diff --git a/gtk/src/application.ccg b/gtk/src/application.ccg
index 0dc329f..00066c3 100644
--- a/gtk/src/application.ccg
+++ b/gtk/src/application.ccg
@@ -19,6 +19,7 @@
*/
#include <gtk/gtk.h>
+#include <gtkmm/window.h>
namespace Gtk
{
diff --git a/gtk/src/application.hg b/gtk/src/application.hg
index 6c73c2a..f4eb16e 100644
--- a/gtk/src/application.hg
+++ b/gtk/src/application.hg
@@ -18,7 +18,6 @@
_CONFIGINCLUDE(gtkmmconfig.h)
#include <giomm/application.h>
-#include <gtkmm/window.h>
#include <gtkmm/actiongroup.h>
_DEFS(gtkmm,gtk)
@@ -27,6 +26,8 @@ _PINCLUDE(giomm/private/application_p.h)
namespace Gtk
{
+class Window;
+
/** TODO
*/
class Application
diff --git a/gtk/src/window.hg b/gtk/src/window.hg
index 63eb264..b2b176a 100644
--- a/gtk/src/window.hg
+++ b/gtk/src/window.hg
@@ -22,6 +22,7 @@
#include <glibmm/object.h>
#include <glibmm/listhandle.h>
#include <gtkmm/bin.h>
+#include <gtkmm/application.h>
_DEFS(gtkmm,gtk)
_PINCLUDE(gtkmm/private/bin_p.h)
@@ -97,6 +98,7 @@ public:
_WRAP_PROPERTY("accept-focus", bool)
_WRAP_PROPERTY("focus-on-map", bool)
_WRAP_PROPERTY("deletable", bool)
+ _WRAP_PROPERTY("application", Glib::RefPtr<Application>)
_WRAP_SIGNAL(void set_focus(Widget* focus), "set_focus")
_WRAP_SIGNAL(bool frame_event(GdkEvent* event), "frame_event")
@@ -336,6 +338,11 @@ dnl
_WRAP_METHOD(void reshow_with_initial_size(),
gtk_window_reshow_with_initial_size)
+ _WRAP_METHOD(Glib::RefPtr<Application> get_application(), gtk_window_get_application, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Application> get_application() const, gtk_window_get_application, refreturn)
+
+ _WRAP_METHOD(void set_application(const Glib::RefPtr<Application>& application), gtk_window_set_application)
+
_WRAP_METHOD(void set_has_resize_grip(bool setting = true), gtk_window_set_has_resize_grip)
_WRAP_METHOD(bool get_has_resize_grip() const, gtk_window_get_has_resize_grip)
diff --git a/tools/m4/convert_gtk.m4 b/tools/m4/convert_gtk.m4
index ba853b9..62e17ee 100644
--- a/tools/m4/convert_gtk.m4
+++ b/tools/m4/convert_gtk.m4
@@ -494,6 +494,8 @@ _CONVERSION(`GtkActionGroup*',`Glib::RefPtr<ActionGroup>',`Glib::wrap($3)')
_CONVERSION(`const Glib::RefPtr<ActionGroup>&',`GtkActionGroup*',__CONVERT_REFPTR_TO_P($3))
_CONVERSION(`GtkApplication*',`Glib::RefPtr<Application>',`Glib::wrap($3)')
+_CONVERSION(`GtkApplication*',`Glib::RefPtr<const Application>',`Glib::wrap($3)')
+_CONVERSION(`const Glib::RefPtr<Application>&',`GtkApplication*',__CONVERT_REFPTR_TO_P($3))
_CONVERSION(`GtkEntryCompletion*',`Glib::RefPtr<EntryCompletion>',`Glib::wrap($3)')
_CONVERSION(`GtkEntryCompletion*',`Glib::RefPtr<const EntryCompletion>',`Glib::wrap($3)')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]