aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Janouch <p.janouch@gmail.com>2011-01-24 17:22:37 +0100
committerPřemysl Janouch <p.janouch@gmail.com>2011-01-24 17:22:37 +0100
commitb782dae4b2d4a05eef882c4e157c2ebf1497d61c (patch)
treea3e9648632ad604f3179ffc9b9888bc8fbae8bdb
parent5d766cba770fbb78fce9ef6cb5e8397af213d650 (diff)
downloadlogdiag-b782dae4b2d4a05eef882c4e157c2ebf1497d61c.tar.gz
logdiag-b782dae4b2d4a05eef882c4e157c2ebf1497d61c.tar.xz
logdiag-b782dae4b2d4a05eef882c4e157c2ebf1497d61c.zip
Make ld_canvas_new() return a GtkWidget reference.
For consistency with GTK+.
-rw-r--r--liblogdiag/ld-canvas.c2
-rw-r--r--liblogdiag/ld-canvas.h2
-rw-r--r--src/ld-window-main.c2
3 files changed, 3 insertions, 3 deletions
diff --git a/liblogdiag/ld-canvas.c b/liblogdiag/ld-canvas.c
index 0e1a508..3e7e8ed 100644
--- a/liblogdiag/ld-canvas.c
+++ b/liblogdiag/ld-canvas.c
@@ -560,7 +560,7 @@ update_adjustments (LdCanvas *self)
*
* Create an instance.
*/
-LdCanvas *
+GtkWidget *
ld_canvas_new (void)
{
return g_object_new (LD_TYPE_CANVAS, NULL);
diff --git a/liblogdiag/ld-canvas.h b/liblogdiag/ld-canvas.h
index 702f2fe..a5b952b 100644
--- a/liblogdiag/ld-canvas.h
+++ b/liblogdiag/ld-canvas.h
@@ -66,7 +66,7 @@ struct _LdCanvasClass
GType ld_canvas_get_type (void) G_GNUC_CONST;
-LdCanvas *ld_canvas_new (void);
+GtkWidget *ld_canvas_new (void);
void ld_canvas_set_diagram (LdCanvas *self, LdDiagram *diagram);
LdDiagram *ld_canvas_get_diagram (LdCanvas *self);
diff --git a/src/ld-window-main.c b/src/ld-window-main.c
index df0e5fb..d59d2fd 100644
--- a/src/ld-window-main.c
+++ b/src/ld-window-main.c
@@ -227,7 +227,7 @@ ld_window_main_init (LdWindowMain *self)
gtk_toolbar_set_orientation (GTK_TOOLBAR (priv->library_toolbar),
GTK_ORIENTATION_VERTICAL);
- priv->canvas = ld_canvas_new ();
+ priv->canvas = LD_CANVAS (ld_canvas_new ());
priv->canvas_window = gtk_scrolled_window_new (NULL, NULL);
gtk_container_add (GTK_CONTAINER (priv->canvas_window),
GTK_WIDGET (priv->canvas));