From 9b39843403caa33c2dc12a5a1140cbc39deb25c0 Mon Sep 17 00:00:00 2001 From: Christopher James Lahey Date: Sun, 28 Oct 2001 04:14:33 +0000 Subject: Commented out connecting to the scroll adjustments here since it's not 2001-10-27 Christopher James Lahey * gal/widgets/e-reflow.c (connect_set_adjustment): Commented out connecting to the scroll adjustments here since it's not necessary for how we use e-reflow. Fixes Ximian bug #13306. svn path=/trunk/; revision=14271 --- widgets/misc/e-reflow.c | 67 +++++++++++++++++++++++++++---------------------- 1 file changed, 37 insertions(+), 30 deletions(-) (limited to 'widgets/misc') diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c index ef4f1e05a7..a401e03087 100644 --- a/widgets/misc/e-reflow.c +++ b/widgets/misc/e-reflow.c @@ -526,20 +526,13 @@ connect_adjustment (EReflow *reflow, GtkAdjustment *adjustment) gtk_object_ref (GTK_OBJECT (adjustment)); } +#if 0 static void set_scroll_adjustments (GtkLayout *layout, GtkAdjustment *hadj, GtkAdjustment *vadj, EReflow *reflow) { connect_adjustment (reflow, hadj); } -static void -disconnect_set_adjustment (EReflow *reflow) -{ - gtk_signal_disconnect (GTK_OBJECT (GNOME_CANVAS_ITEM (reflow)->canvas), - reflow->set_scroll_adjustments_id); - reflow->set_scroll_adjustments_id = 0; -} - static void connect_set_adjustment (EReflow *reflow) { @@ -548,6 +541,17 @@ connect_set_adjustment (EReflow *reflow) "set_scroll_adjustments", GTK_SIGNAL_FUNC (set_scroll_adjustments), reflow); } +#endif + +static void +disconnect_set_adjustment (EReflow *reflow) +{ + if (reflow->set_scroll_adjustments_id != 0) { + gtk_signal_disconnect (GTK_OBJECT (GNOME_CANVAS_ITEM (reflow)->canvas), + reflow->set_scroll_adjustments_id); + reflow->set_scroll_adjustments_id = 0; + } +} @@ -674,7 +678,9 @@ e_reflow_realize (GnomeCanvasItem *item) adjustment = gtk_layout_get_hadjustment(GTK_LAYOUT(item->canvas)); +#if 0 connect_set_adjustment (reflow); +#endif connect_adjustment (reflow, adjustment); adjustment->step_increment = (reflow->column_width + E_REFLOW_FULL_GUTTER) / 2; @@ -1240,38 +1246,39 @@ e_reflow_class_init (EReflowClass *klass) static void e_reflow_init (EReflow *reflow) { - reflow->model = NULL; - reflow->items = NULL; - reflow->heights = NULL; - reflow->count = 0; + reflow->model = NULL; + reflow->items = NULL; + reflow->heights = NULL; + reflow->count = 0; - reflow->columns = NULL; - reflow->column_count = 0; + reflow->columns = NULL; + reflow->column_count = 0; - reflow->empty_text = NULL; - reflow->empty_message = NULL; + reflow->empty_text = NULL; + reflow->empty_message = NULL; - reflow->minimum_width = 10; - reflow->width = 10; - reflow->height = 10; + reflow->minimum_width = 10; + reflow->width = 10; + reflow->height = 10; - reflow->column_width = 150; + reflow->column_width = 150; - reflow->column_drag = FALSE; + reflow->column_drag = FALSE; - reflow->need_height_update = FALSE; - reflow->need_column_resize = FALSE; + reflow->need_height_update = FALSE; + reflow->need_column_resize = FALSE; - reflow->default_cursor_shown = TRUE; - reflow->arrow_cursor = NULL; - reflow->default_cursor = NULL; + reflow->default_cursor_shown = TRUE; + reflow->arrow_cursor = NULL; + reflow->default_cursor = NULL; - reflow->cursor_row = -1; + reflow->cursor_row = -1; - reflow->incarnate_idle_id = 0; + reflow->incarnate_idle_id = 0; + reflow->set_scroll_adjustments_id = 0; - reflow->selection = E_SELECTION_MODEL (e_selection_model_simple_new()); - reflow->sorter = e_sorter_array_new (er_compare, reflow); + reflow->selection = E_SELECTION_MODEL (e_selection_model_simple_new()); + reflow->sorter = e_sorter_array_new (er_compare, reflow); gtk_object_set (GTK_OBJECT (reflow->selection), "sorter", reflow->sorter, -- cgit v1.2.3