[gtkmm] Fix the reference counting of Adjustment.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm] Fix the reference counting of Adjustment.
- Date: Mon, 27 Dec 2010 20:05:08 +0000 (UTC)
commit ca687843c3295d7da6022beeebbfdaab6d9c69c9
Author: Kjell Ahlstedt <kjell ahlstedt bredband net>
Date: Mon Dec 27 15:51:50 2010 +0100
Fix the reference counting of Adjustment.
* gtk/src/adjustment.ccg: Use the _INITIALLY_UNOWNED_SINK macro in the
hand-coded constructor.
* gtk/src/container.hg: get_focus_vadjustment() and get_focus_hadjustment():
Use refreturn.
* gtk/src/range.hg:
* gtk/src/scalebutton.hg:
* gtk/src/spinbutton.hg: get_adjustment(): Use refreturn.
Bug #637891.
ChangeLog | 13 +++++++++++++
gtk/src/adjustment.ccg | 1 +
gtk/src/container.hg | 8 ++++----
gtk/src/range.hg | 4 ++--
gtk/src/scalebutton.hg | 4 ++--
gtk/src/spinbutton.hg | 4 ++--
6 files changed, 24 insertions(+), 10 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 84da193..be46bd4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-12-27 Kjell Ahlstedt <kjell ahlstedt bredband net>
+
+ Fix the reference counting of Adjustment.
+
+ * gtk/src/adjustment.ccg: Use the _INITIALLY_UNOWNED_SINK macro in the
+ hand-coded constructor.
+ * gtk/src/container.hg: get_focus_vadjustment() and get_focus_hadjustment():
+ Use refreturn.
+ * gtk/src/range.hg:
+ * gtk/src/scalebutton.hg:
+ * gtk/src/spinbutton.hg: get_adjustment(): Use refreturn.
+ Bug #637891.
+
2010-12-24 Murray Cumming <murrayc murrayc com>
Window: Remove frame API to fix the build with GTK+ from git master.
diff --git a/gtk/src/adjustment.ccg b/gtk/src/adjustment.ccg
index 3976465..a04b2e2 100644
--- a/gtk/src/adjustment.ccg
+++ b/gtk/src/adjustment.ccg
@@ -30,6 +30,7 @@ Adjustment::Adjustment(double value, double lower, double upper, double step_inc
:
_CONSTRUCT("lower", lower, "upper", upper, "step_increment", step_increment, "page_increment", page_increment, "page_size", page_size, "value", value)
{
+ _INITIALLY_UNOWNED_SINK
}
diff --git a/gtk/src/container.hg b/gtk/src/container.hg
index 2a0d9db..feb8a04 100644
--- a/gtk/src/container.hg
+++ b/gtk/src/container.hg
@@ -138,17 +138,17 @@ public:
gtk_container_set_focus_vadjustment)
_WRAP_METHOD(Glib::RefPtr<Adjustment> get_focus_vadjustment(),
- gtk_container_get_focus_vadjustment)
+ gtk_container_get_focus_vadjustment, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Adjustment> get_focus_vadjustment() const,
- gtk_container_get_focus_vadjustment, constversion)
+ gtk_container_get_focus_vadjustment, refreturn, constversion)
_WRAP_METHOD(void set_focus_hadjustment(const Glib::RefPtr<Adjustment>& adjustment),
gtk_container_set_focus_hadjustment)
_WRAP_METHOD(Glib::RefPtr<Adjustment> get_focus_hadjustment(),
- gtk_container_get_focus_hadjustment)
+ gtk_container_get_focus_hadjustment, refreturn)
_WRAP_METHOD(Glib::RefPtr<const Adjustment> get_focus_hadjustment() const,
- gtk_container_get_focus_hadjustment, constversion)
+ gtk_container_get_focus_hadjustment, refreturn, constversion)
_WRAP_METHOD(void resize_children(), gtk_container_resize_children)
diff --git a/gtk/src/range.hg b/gtk/src/range.hg
index 9c77bb6..89ed02b 100644
--- a/gtk/src/range.hg
+++ b/gtk/src/range.hg
@@ -46,8 +46,8 @@ public:
_WRAP_METHOD(void set_adjustment(const Glib::RefPtr<Adjustment>& adjustment), gtk_range_set_adjustment)
void unset_adjustment();
- _WRAP_METHOD(Glib::RefPtr<Adjustment> get_adjustment(), gtk_range_get_adjustment)
- _WRAP_METHOD(Glib::RefPtr<const Adjustment> get_adjustment() const, gtk_range_get_adjustment, constversion)
+ _WRAP_METHOD(Glib::RefPtr<Adjustment> get_adjustment(), gtk_range_get_adjustment, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Adjustment> get_adjustment() const, gtk_range_get_adjustment, refreturn, constversion)
_WRAP_METHOD(void set_inverted(bool setting = true), gtk_range_set_inverted)
_WRAP_METHOD(bool get_inverted() const, gtk_range_get_inverted)
_WRAP_METHOD(void set_flippable(bool flippable = true), gtk_range_set_flippable)
diff --git a/gtk/src/scalebutton.hg b/gtk/src/scalebutton.hg
index 71ac774..8de1a4e 100644
--- a/gtk/src/scalebutton.hg
+++ b/gtk/src/scalebutton.hg
@@ -51,8 +51,8 @@ public:
_WRAP_METHOD(double get_value() const, gtk_scale_button_get_value)
_WRAP_METHOD(void set_value(double value), gtk_scale_button_set_value)
- _WRAP_METHOD(Glib::RefPtr<Adjustment> get_adjustment(), gtk_scale_button_get_adjustment)
- _WRAP_METHOD(Glib::RefPtr<const Adjustment> get_adjustment() const, gtk_scale_button_get_adjustment, constversion)
+ _WRAP_METHOD(Glib::RefPtr<Adjustment> get_adjustment(), gtk_scale_button_get_adjustment, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Adjustment> get_adjustment() const, gtk_scale_button_get_adjustment, refreturn, constversion)
_WRAP_METHOD(void set_adjustment(const Glib::RefPtr<Adjustment>& adjustment), gtk_scale_button_set_adjustment)
diff --git a/gtk/src/spinbutton.hg b/gtk/src/spinbutton.hg
index bdacebd..0412957 100644
--- a/gtk/src/spinbutton.hg
+++ b/gtk/src/spinbutton.hg
@@ -62,8 +62,8 @@ public:
_WRAP_METHOD(void set_adjustment(const Glib::RefPtr<Adjustment>& adjustment), gtk_spin_button_set_adjustment)
void unset_adjustment();
- _WRAP_METHOD(Glib::RefPtr<Adjustment> get_adjustment(), gtk_spin_button_get_adjustment)
- _WRAP_METHOD(Glib::RefPtr<const Adjustment> get_adjustment() const, gtk_spin_button_get_adjustment, constversion)
+ _WRAP_METHOD(Glib::RefPtr<Adjustment> get_adjustment(), gtk_spin_button_get_adjustment, refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Adjustment> get_adjustment() const, gtk_spin_button_get_adjustment, refreturn, constversion)
_WRAP_METHOD(void set_digits(guint digits), gtk_spin_button_set_digits)
_WRAP_METHOD(guint get_digits() const, gtk_spin_button_get_digits)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]