[gtkmm: 4/5] Gtk::Filter: Fix reference counting errors
- From: Kjell Ahlstedt <kjellahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtkmm: 4/5] Gtk::Filter: Fix reference counting errors
- Date: Mon, 10 Aug 2020 11:20:08 +0000 (UTC)
commit 0250b0d6f803111fa0c634e85ff74b325a90f5a8
Author: Andreas Persson <andreasp56 outlook com>
Date: Mon Aug 10 11:57:55 2020 +0200
Gtk::Filter: Fix reference counting errors
Fix reference counting for Filter::match(). Make Filter::changed()
protected. Update doc for SortListModel.
gtk/src/filter.hg | 10 +++++-----
gtk/src/sortlistmodel.hg | 4 ++++
2 files changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/gtk/src/filter.hg b/gtk/src/filter.hg
index a52b365d..cf4624d3 100644
--- a/gtk/src/filter.hg
+++ b/gtk/src/filter.hg
@@ -61,17 +61,17 @@ public:
_WRAP_ENUM(Match, GtkFilterMatch, decl_prefix GTKMM_API)
_WRAP_ENUM(Change, GtkFilterChange, decl_prefix GTKMM_API)
-#m4 _CONVERSION(`const Glib::RefPtr<Glib::ObjectBase>&',`gpointer',`($3)->gobj_copy()')
+#m4 _CONVERSION(`const Glib::RefPtr<Glib::ObjectBase>&',`gpointer',`($3)->gobj()')
_WRAP_METHOD(bool match(const Glib::RefPtr<Glib::ObjectBase>& item), gtk_filter_match)
_WRAP_METHOD(Match get_strictness(), gtk_filter_get_strictness)
- // for filter implementations
- _WRAP_METHOD(void changed(Change change = Change::DIFFERENT), gtk_filter_changed)
-
_WRAP_SIGNAL(void changed(Change change), "changed", no_default_handler)
protected:
-#m4 _CONVERSION(`gpointer',`const Glib::RefPtr<Glib::ObjectBase>&',`Glib::wrap(G_OBJECT($3))')
+ // for filter implementations
+ _WRAP_METHOD(void changed(Change change = Change::DIFFERENT), gtk_filter_changed)
+
+#m4 _CONVERSION(`gpointer',`const Glib::RefPtr<Glib::ObjectBase>&',`Glib::wrap(G_OBJECT($3), true)')
_WRAP_VFUNC(bool match(const Glib::RefPtr<Glib::ObjectBase>& item), match)
_WRAP_VFUNC(Match get_strictness(), get_strictness)
};
diff --git a/gtk/src/sortlistmodel.hg b/gtk/src/sortlistmodel.hg
index 0c6b4187..af12fb3c 100644
--- a/gtk/src/sortlistmodel.hg
+++ b/gtk/src/sortlistmodel.hg
@@ -31,6 +31,10 @@ namespace Gtk
* %Gtk::SortListModel is a list model that takes a list model and
* sorts its elements according to a Gtk::Sorter.
*
+ * The model can be set up to do incremental sorting, so that
+ * sorting long lists doesn't block the UI. See set_incremental()
+ * for details.
+ *
* %Gtk::SortListModel is a generic model and because of that it
* cannot take advantage of any external knowledge when sorting.
* If you run into performance issues with %Gtk::SortListModel, it
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]