[dia] [warningectomy] assignment from incompatible pointer type
- From: Hans Breuer <hans src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [dia] [warningectomy] assignment from incompatible pointer type
- Date: Sat, 4 May 2013 18:59:05 +0000 (UTC)
commit 83cb0ecade1a6b6e4dca7c32271dc6e80f25232e
Author: Hans Breuer <hans breuer org>
Date: Fri May 3 20:53:52 2013 +0200
[warningectomy] assignment from incompatible pointer type
sprinkle GTK_WIDGET() casting
lib/prop_matrix.c | 13 ++++++-------
lib/prop_sdarray_widget.c | 6 +++---
2 files changed, 9 insertions(+), 10 deletions(-)
---
diff --git a/lib/prop_matrix.c b/lib/prop_matrix.c
index 1570d15..691d597 100644
--- a/lib/prop_matrix.c
+++ b/lib/prop_matrix.c
@@ -171,7 +171,7 @@ matrixprop_get_widget (MatrixProperty *prop, PropDialog *dialog)
ret = gtk_hbox_new (FALSE,0);
/* angle */
- adj = gtk_adjustment_new(0.0, -180.0, 180.0, 1.0, 15.0, 0);
+ adj = GTK_WIDGET(gtk_adjustment_new(0.0, -180.0, 180.0, 1.0, 15.0, 0));
sb = gtk_spin_button_new(GTK_ADJUSTMENT (adj), 1.0, 2);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(sb),TRUE);
prophandler_connect(&prop->common, G_OBJECT(sb), "changed");
@@ -179,7 +179,7 @@ matrixprop_get_widget (MatrixProperty *prop, PropDialog *dialog)
gtk_box_pack_start(GTK_BOX(ret), sb, TRUE, TRUE, 0);
/* sx, sy */
for (i = 0; i < 2; ++i) {
- adj = gtk_adjustment_new(0.0, 0.01, 100.0, 0.01, 1.0, 0);
+ adj = GTK_WIDGET(gtk_adjustment_new(0.0, 0.01, 100.0, 0.01, 1.0, 0));
sb = gtk_spin_button_new(GTK_ADJUSTMENT (adj), 1.0, 2);
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(sb),TRUE);
prophandler_connect(&prop->common, G_OBJECT(sb), "changed");
@@ -194,8 +194,7 @@ static void
matrixprop_reset_widget(MatrixProperty *prop, GtkWidget *widget)
{
GList *children, *child;
- GtkWidget *sb;
- GtkAdjustment *adj;
+ GtkWidget *sb, *adj;
real angle, sx, sy;
int i = 0;
@@ -215,11 +214,11 @@ matrixprop_reset_widget(MatrixProperty *prop, GtkWidget *widget)
for (child = children; child != NULL; child = g_list_next (child)) {
sb = child->data;
if (i == 0)
- adj = gtk_adjustment_new(angle, -180.0, 180.0, 1.0, 15.0, 0);
+ adj = GTK_WIDGET(gtk_adjustment_new(angle, -180.0, 180.0, 1.0, 15.0, 0));
else if (i == 1)
- adj = gtk_adjustment_new(sx, 0.01, 100.0, 0.1, 1.0, 0);
+ adj = GTK_WIDGET(gtk_adjustment_new(sx, 0.01, 100.0, 0.1, 1.0, 0));
else if (i == 2)
- adj = gtk_adjustment_new(sy, 0.01, 100.0, 0.1, 1.0, 0);
+ adj = GTK_WIDGET(gtk_adjustment_new(sy, 0.01, 100.0, 0.1, 1.0, 0));
else
g_assert_not_reached ();
gtk_spin_button_set_adjustment(GTK_SPIN_BUTTON(sb), GTK_ADJUSTMENT (adj));
diff --git a/lib/prop_sdarray_widget.c b/lib/prop_sdarray_widget.c
index f3496e9..bb6db7a 100644
--- a/lib/prop_sdarray_widget.c
+++ b/lib/prop_sdarray_widget.c
@@ -78,13 +78,13 @@ _cell_renderer_real_new (const Property *p)
const RealProperty *prop = (RealProperty *)p;
GtkCellRenderer *cren = gtk_cell_renderer_spin_new ();
PropNumData *numdata = prop->common.descr->extra_data;
- GtkAdjustment *adj;
+ GtkWidget *adj;
/* must be non NULL to make it editable */
- adj = gtk_adjustment_new (prop->real_data,
+ adj = GTK_WIDGET (gtk_adjustment_new (prop->real_data,
numdata->min, numdata->max,
numdata->step,
- 10.0 * numdata->step, 0);
+ 10.0 * numdata->step, 0));
g_object_set (G_OBJECT (cren), "adjustment", adj, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]