[evolution/gtk3] Avoid deprecated set-scroll-adjustments signal



commit ec872c8f0ab86ee141b2bec0578bb1eb17ecc436
Author: Vibha Yadav <yvibha novell com>
Date:   Tue Dec 14 16:39:33 2010 +0530

    Avoid deprecated set-scroll-adjustments signal
    
    The ::set-scroll-adjustments signal on GtkWidget has been replaced by
    the GtkScrollable interface which needs to be implemented.

 widgets/table/e-table.c |   31 ++++++-------------------------
 widgets/table/e-table.h |    4 ----
 widgets/table/e-tree.c  |   32 +++++---------------------------
 widgets/table/e-tree.h  |    4 ----
 4 files changed, 11 insertions(+), 60 deletions(-)
---
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 43dbec8..f611718 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -2326,29 +2326,6 @@ et_set_property (GObject *object,
 	}
 }
 
-static void
-set_scroll_adjustments   (ETable *table,
-			  GtkAdjustment *hadjustment,
-			  GtkAdjustment *vadjustment)
-{
-	if (vadjustment != NULL)
-		gtk_adjustment_set_step_increment (vadjustment, 20);
-
-	if (hadjustment != NULL)
-		gtk_adjustment_set_step_increment (hadjustment, 20);
-
-	if (table->table_canvas != NULL) {
-		gtk_layout_set_hadjustment (
-			GTK_LAYOUT (table->table_canvas), hadjustment);
-		gtk_layout_set_vadjustment (
-			GTK_LAYOUT (table->table_canvas), vadjustment);
-	}
-
-	if (table->header_canvas != NULL)
-		gtk_layout_set_hadjustment (
-			GTK_LAYOUT (table->header_canvas), hadjustment);
-}
-
 /**
  * e_table_get_next_row:
  * @e_table: The #ETable to query
@@ -3472,7 +3449,11 @@ e_table_class_init (ETableClass *class)
 			      G_TYPE_UINT,
 			      G_TYPE_UINT);
 
-	class->set_scroll_adjustments = set_scroll_adjustments;
+	/*FIXME:
+	 * Implement the GtkScrollable interface as 
+	 * ::set-scroll-adjustments signal on GtkWidget 
+	 * has been deprecated from gtk3
+	 * class->set_scroll_adjustments = set_scroll_adjustments;
 
 	widget_class->set_scroll_adjustments_signal =
 	 	g_signal_new ("set_scroll_adjustments",
@@ -3481,7 +3462,7 @@ e_table_class_init (ETableClass *class)
 	 		      G_STRUCT_OFFSET (ETableClass, set_scroll_adjustments),
 	 		      NULL, NULL,
 	 		      e_marshal_NONE__OBJECT_OBJECT,
-	 		      G_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);
+	 		      G_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT, GTK_TYPE_ADJUSTMENT);*/
 
 	g_object_class_install_property (object_class, PROP_LENGTH_THRESHOLD,
 					 g_param_spec_int ("length_threshold",
diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h
index 1da89f9..f722950 100644
--- a/widgets/table/e-table.h
+++ b/widgets/table/e-table.h
@@ -170,10 +170,6 @@ typedef struct {
 	void        (*state_change)       (ETable *et);
 	gboolean    (*white_space_event)  (ETable *et, GdkEvent *event);
 
-	void  (*set_scroll_adjustments)   (ETable	 *table,
-					   GtkAdjustment *hadjustment,
-					   GtkAdjustment *vadjustment);
-
 	/* Source side drag signals */
 	void (* table_drag_begin)		   (ETable	       *table,
 						    gint                 row,
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 4025293..c12f358 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -2024,32 +2024,6 @@ et_set_property (GObject *object,
 	}
 }
 
-static void
-set_scroll_adjustments   (ETree *tree,
-			  GtkAdjustment *hadjustment,
-			  GtkAdjustment *vadjustment)
-{
-	if (vadjustment != NULL)
-		gtk_adjustment_set_step_increment (vadjustment, 20);
-
-	if (hadjustment != NULL)
-		gtk_adjustment_set_step_increment (hadjustment, 20);
-
-	if (tree->priv) {
-		GtkLayout *layout;
-
-		layout = GTK_LAYOUT (tree->priv->table_canvas);
-
-		gtk_layout_set_hadjustment (layout, hadjustment);
-		gtk_layout_set_vadjustment (layout, vadjustment);
-
-		if (tree->priv->header_canvas != NULL)
-			gtk_layout_set_hadjustment (
-				GTK_LAYOUT (tree->priv->header_canvas),
-				hadjustment);
-	}
-}
-
 gint
 e_tree_get_next_row      (ETree *e_tree,
 			   gint    model_row)
@@ -3514,6 +3488,10 @@ e_tree_class_init (ETreeClass *class)
 			      G_TYPE_UINT,
 			      G_TYPE_UINT);
 
+	/*FIXME:
+	 * Implement the GtkScrollable interface as 
+	 * ::set-scroll-adjustments signal on GtkWidget 
+	 * has been deprecated from gtk3
 	class->set_scroll_adjustments = set_scroll_adjustments;
 
 	widget_class->set_scroll_adjustments_signal =
@@ -3524,7 +3502,7 @@ e_tree_class_init (ETreeClass *class)
 			      NULL, NULL,
 			      e_marshal_NONE__OBJECT_OBJECT,
 			      G_TYPE_NONE, 2, GTK_TYPE_ADJUSTMENT,
-			      GTK_TYPE_ADJUSTMENT);
+			      GTK_TYPE_ADJUSTMENT);*/
 
 	g_object_class_install_property (object_class, PROP_LENGTH_THRESHOLD,
 					 g_param_spec_int ("length_threshold",
diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h
index 345aa34..4a13fb4 100644
--- a/widgets/table/e-tree.h
+++ b/widgets/table/e-tree.h
@@ -71,10 +71,6 @@ typedef struct {
 	void        (*state_change)       (ETree *et);
 	gboolean    (*white_space_event)  (ETree *et, GdkEvent *event);
 
-	void  (*set_scroll_adjustments)   (ETree	 *tree,
-					   GtkAdjustment *hadjustment,
-					   GtkAdjustment *vadjustment);
-
 	/* Source side drag signals */
 	void (* tree_drag_begin)		   (ETree	       *tree,
 						    gint                 row,



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