[gnumeric] fix access to sheet object widgets [#595627].



commit 39f5596d7f94f8b7a3d054a2058d7344b44e29f4
Author: Jean Brefort <jean brefort normalesup org>
Date:   Sat Sep 19 10:47:58 2009 +0200

    fix access to sheet object widgets [#595627].

 ChangeLog                 |    8 ++++++++
 NEWS                      |    1 +
 src/sheet-object-widget.c |   10 +++++-----
 3 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 301fc0d..4ccff16 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-09-19  Jean Brefort  <jean brefort normalesup org>
+
+	* src/sheet-object-widget.c (sheet_widget_frame_set_label),
+	(sheet_widget_button_set_label), (sheet_widget_button_set_markup),
+	(sheet_widget_checkbox_set_label),
+	(sheet_widget_radio_button_set_label): use child as GocWidget instead of
+	parent. [#595627]
+
 2009-09-18  Morten Welinder  <terra gnome org>
 
 	* src/wbc-gtk-impl.h (struct _WBCGtk): Rename zoom to zoom_haction
diff --git a/NEWS b/NEWS
index 678829c..1bedee3 100644
--- a/NEWS
+++ b/NEWS
@@ -3,6 +3,7 @@ Gnumeric 1.9.13
 Jean:
 	* Fix grab issue after dragging an object. [Debian bug #546559]
 	* Reimplement double-click in item-cursor. [Debian bug #546690]
+	* Fix access to GocWidget in sheet widgets. [#595627]
 
 Morten:
 	* Fixes text export GUI issue.  [#594155]
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index 22a0085..b40b490 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -456,7 +456,7 @@ sheet_widget_frame_set_label (SheetObject *so, char const* str)
 	swf->label = g_strdup (str);
 
 	for (ptr = swf->sow.realized_list; ptr != NULL; ptr = ptr->next) {
-		GocWidget *item = GOC_WIDGET (ptr->data);
+		GocWidget *item = GOC_WIDGET (GOC_GROUP (ptr->data)->children->data);
 		gtk_frame_set_label (GTK_FRAME (item->widget), str);
 	}
 }
@@ -666,7 +666,7 @@ sheet_widget_button_set_label (SheetObject *so, char const *str)
 	swb->label = new_label;
 
 	for (ptr = swb->sow.realized_list; ptr != NULL; ptr = ptr->next) {
-		GocWidget *item = GOC_WIDGET (ptr->data);
+		GocWidget *item = GOC_WIDGET (GOC_GROUP (ptr->data)->children->data);
 		gtk_button_set_label (GTK_BUTTON (item->widget), swb->label);
 	}
 }
@@ -685,7 +685,7 @@ sheet_widget_button_set_markup (SheetObject *so, PangoAttrList *markup)
 	if (markup) pango_attr_list_ref (markup);
 
 	for (ptr = swb->sow.realized_list; ptr != NULL; ptr = ptr->next) {
-		GocWidget *item = GOC_WIDGET (ptr->data);
+		GocWidget *item = GOC_WIDGET (GOC_GROUP (ptr->data)->children->data);
 		gtk_label_set_attributes (GTK_LABEL (GTK_BIN (item->widget)->child),
 					  swb->markup);
 	}
@@ -1964,7 +1964,7 @@ sheet_widget_checkbox_set_label	(SheetObject *so, char const *str)
 
 	list = swc->sow.realized_list;
 	for (; list != NULL; list = list->next) {
-		GocWidget *item = GOC_WIDGET (list->data);
+		GocWidget *item = GOC_WIDGET (GOC_GROUP (list->data)->children->data);
 		gtk_button_set_label (GTK_BUTTON (item->widget), swc->label);
 	}
 }
@@ -2143,7 +2143,7 @@ sheet_widget_radio_button_set_label (SheetObject *so, char const *str)
 
 	list = swrb->sow.realized_list;
 	for (; list != NULL; list = list->next) {
-		GocWidget *item = GOC_WIDGET (list->data);
+		GocWidget *item = GOC_WIDGET (GOC_GROUP (list->data)->children->data);
 		gtk_button_set_label (GTK_BUTTON (item->widget), swrb->label);
 	}
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]