[devhelp/wip/book-manager-singleton] BookTree: more precise return type for new()
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp/wip/book-manager-singleton] BookTree: more precise return type for new()
- Date: Mon, 1 May 2017 15:31:25 +0000 (UTC)
commit 0c1d65b2a5b818c000c28f777caf8a64bc18d11d
Author: Sébastien Wilmet <swilmet gnome org>
Date: Mon May 1 17:03:20 2017 +0200
BookTree: more precise return type for new()
The DhBookManager parameter has anyway been removed, so there has
already been an API break for this function.
src/dh-book-tree.c | 8 ++++----
src/dh-book-tree.h | 2 +-
src/dh-sidebar.c | 2 +-
3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/dh-book-tree.c b/src/dh-book-tree.c
index 7b81d7f..26c4f78 100644
--- a/src/dh-book-tree.c
+++ b/src/dh-book-tree.c
@@ -703,12 +703,12 @@ dh_book_tree_init (DhBookTree *tree)
*
* Returns: (transfer floating): a new #DhBookTree widget.
*/
-GtkWidget *
+DhBookTree *
dh_book_tree_new (void)
{
- return GTK_WIDGET (g_object_new (DH_TYPE_BOOK_TREE,
- "enable-search", FALSE,
- NULL));
+ return g_object_new (DH_TYPE_BOOK_TREE,
+ "enable-search", FALSE,
+ NULL);
}
static gboolean
diff --git a/src/dh-book-tree.h b/src/dh-book-tree.h
index 6369e40..cdfaf45 100644
--- a/src/dh-book-tree.h
+++ b/src/dh-book-tree.h
@@ -42,7 +42,7 @@ struct _DhBookTreeClass {
};
GType dh_book_tree_get_type (void) G_GNUC_CONST;
-GtkWidget * dh_book_tree_new (void);
+DhBookTree * dh_book_tree_new (void);
void dh_book_tree_select_uri (DhBookTree *tree,
const gchar *uri);
DhLink *dh_book_tree_get_selected_book (DhBookTree *tree);
diff --git a/src/dh-sidebar.c b/src/dh-sidebar.c
index 095f7d3..2c279df 100644
--- a/src/dh-sidebar.c
+++ b/src/dh-sidebar.c
@@ -659,7 +659,7 @@ dh_sidebar_constructed (GObject *object)
sidebar,
0);
- priv->book_tree = DH_BOOK_TREE (dh_book_tree_new ());
+ priv->book_tree = dh_book_tree_new ();
gtk_widget_show (GTK_WIDGET (priv->book_tree));
g_signal_connect (priv->book_tree,
"link-selected",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]