Make ld_canvas_new() return a GtkWidget reference.
For consistency with GTK+.
This commit is contained in:
parent
5d766cba77
commit
b782dae4b2
|
@ -560,7 +560,7 @@ update_adjustments (LdCanvas *self)
|
||||||
*
|
*
|
||||||
* Create an instance.
|
* Create an instance.
|
||||||
*/
|
*/
|
||||||
LdCanvas *
|
GtkWidget *
|
||||||
ld_canvas_new (void)
|
ld_canvas_new (void)
|
||||||
{
|
{
|
||||||
return g_object_new (LD_TYPE_CANVAS, NULL);
|
return g_object_new (LD_TYPE_CANVAS, NULL);
|
||||||
|
|
|
@ -66,7 +66,7 @@ struct _LdCanvasClass
|
||||||
|
|
||||||
GType ld_canvas_get_type (void) G_GNUC_CONST;
|
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);
|
void ld_canvas_set_diagram (LdCanvas *self, LdDiagram *diagram);
|
||||||
LdDiagram *ld_canvas_get_diagram (LdCanvas *self);
|
LdDiagram *ld_canvas_get_diagram (LdCanvas *self);
|
||||||
|
|
|
@ -227,7 +227,7 @@ ld_window_main_init (LdWindowMain *self)
|
||||||
gtk_toolbar_set_orientation (GTK_TOOLBAR (priv->library_toolbar),
|
gtk_toolbar_set_orientation (GTK_TOOLBAR (priv->library_toolbar),
|
||||||
GTK_ORIENTATION_VERTICAL);
|
GTK_ORIENTATION_VERTICAL);
|
||||||
|
|
||||||
priv->canvas = ld_canvas_new ();
|
priv->canvas = LD_CANVAS (ld_canvas_new ());
|
||||||
priv->canvas_window = gtk_scrolled_window_new (NULL, NULL);
|
priv->canvas_window = gtk_scrolled_window_new (NULL, NULL);
|
||||||
gtk_container_add (GTK_CONTAINER (priv->canvas_window),
|
gtk_container_add (GTK_CONTAINER (priv->canvas_window),
|
||||||
GTK_WIDGET (priv->canvas));
|
GTK_WIDGET (priv->canvas));
|
||||||
|
|
Loading…
Reference in New Issue