[gnumeric] SheetObjectListBase: add new accessor.



commit ee5d3a133ee199ec7b583b69dc799cb1076aedf5
Author: Morten Welinder <terra gnome org>
Date:   Tue Oct 13 16:16:16 2009 -0400

    SheetObjectListBase: add new accessor.

 ChangeLog                 |    1 +
 src/sheet-object-widget.c |   18 ++++++++++++++++++
 src/sheet-object-widget.h |    1 +
 3 files changed, 20 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 80654f8..f7a1c4b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,7 @@
 	(sheet_widget_list_base_get_result_link): Rename from
 	sheet_widget_list_base_get_result_dep.  Return ref'd GnmExprTop.
 	All callers changed.
+	(sheet_widget_list_base_get_adjustment): New function.
 
 2009-10-11  Andreas J. Guelzow <aguelzow pyrshep ca>
 
diff --git a/src/sheet-object-widget.c b/src/sheet-object-widget.c
index 1faee9f..49ccce9 100644
--- a/src/sheet-object-widget.c
+++ b/src/sheet-object-widget.c
@@ -3077,6 +3077,24 @@ sheet_widget_list_base_get_content_link (SheetObject const *so)
  	return texpr;
 }
 
+/* Note: allocates a new adjustment.  */
+GtkAdjustment *
+sheet_widget_list_base_get_adjustment (SheetObject *so)
+{
+	SheetWidgetListBase *swl = SHEET_WIDGET_LIST_BASE (so);
+
+	GtkAdjustment *adj = (GtkAdjustment*)gtk_adjustment_new
+		(swl->selection,
+		 1,
+		 1 + gtk_tree_model_iter_n_children (swl->model, NULL),
+		 1,
+		 5,
+		 5);
+	g_object_ref_sink (adj);
+
+	return adj;
+}
+
 /****************************************************************************/
 
 #define SHEET_WIDGET_LIST_TYPE	(sheet_widget_list_get_type ())
diff --git a/src/sheet-object-widget.h b/src/sheet-object-widget.h
index 2ab9b59..3ee3909 100644
--- a/src/sheet-object-widget.h
+++ b/src/sheet-object-widget.h
@@ -88,6 +88,7 @@ void  sheet_widget_list_base_set_links	 (SheetObject *so,
 					  GnmExprTop const *content);
 GnmExprTop const *sheet_widget_list_base_get_result_link (SheetObject const *so);
 GnmExprTop const *sheet_widget_list_base_get_content_link (SheetObject const *so);
+GtkAdjustment *sheet_widget_list_base_get_adjustment (SheetObject *so);
 
 G_END_DECLS
 



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