[devhelp] BookTree: improve a little code of select_uri()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] BookTree: improve a little code of select_uri()
- Date: Tue, 15 May 2018 15:44:01 +0000 (UTC)
commit e4e9801fc4f0e2e5be125b1877815ab046f4bbfa
Author: Sébastien Wilmet <swilmet gnome org>
Date: Tue May 15 15:49:05 2018 +0200
BookTree: improve a little code of select_uri()
Avoid function pointer cast, to get a warning if GtkTreeModelForeachFunc
has changed.
devhelp/dh-book-tree.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
---
diff --git a/devhelp/dh-book-tree.c b/devhelp/dh-book-tree.c
index b204340..a23d55a 100644
--- a/devhelp/dh-book-tree.c
+++ b/devhelp/dh-book-tree.c
@@ -925,11 +925,12 @@ dh_book_tree_get_profile (DhBookTree *tree)
}
static gboolean
-book_tree_find_uri_foreach (GtkTreeModel *model,
- GtkTreePath *path,
- GtkTreeIter *iter,
- FindURIData *data)
+book_tree_find_uri_foreach_func (GtkTreeModel *model,
+ GtkTreePath *path,
+ GtkTreeIter *iter,
+ gpointer _data)
{
+ FindURIData *data = _data;
DhLink *link;
gtk_tree_model_get (model, iter,
@@ -980,7 +981,7 @@ dh_book_tree_select_uri (DhBookTree *tree,
data.uri = uri;
gtk_tree_model_foreach (GTK_TREE_MODEL (priv->store),
- (GtkTreeModelForeachFunc) book_tree_find_uri_foreach,
+ book_tree_find_uri_foreach_func,
&data);
if (!data.found)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]