aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-table.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-08-05 20:38:24 +0800
committerChris Lahey <clahey@src.gnome.org>2000-08-05 20:38:24 +0800
commit78adc934b0946d1f4f4f6dacb393b4a119d68bec (patch)
treee8c026a1e6fc854e2e11c0f620adb6f548b4824e /widgets/e-table/e-table.c
parenta223be493907708471d2fe3c1ecc9c658a98995d (diff)
downloadgsoc2013-evolution-78adc934b0946d1f4f4f6dacb393b4a119d68bec.tar
gsoc2013-evolution-78adc934b0946d1f4f4f6dacb393b4a119d68bec.tar.gz
gsoc2013-evolution-78adc934b0946d1f4f4f6dacb393b4a119d68bec.tar.bz2
gsoc2013-evolution-78adc934b0946d1f4f4f6dacb393b4a119d68bec.tar.lz
gsoc2013-evolution-78adc934b0946d1f4f4f6dacb393b4a119d68bec.tar.xz
gsoc2013-evolution-78adc934b0946d1f4f4f6dacb393b4a119d68bec.tar.zst
gsoc2013-evolution-78adc934b0946d1f4f4f6dacb393b4a119d68bec.zip
Made selection ranges work even if the table is sorted.
2000-08-05 Christopher James Lahey <clahey@helixcode.com> * Makefile.am, e-table-selection-model.c, e-table-selection-model.h, e-table.c, e-table.h: Made selection ranges work even if the table is sorted. * e-table-sorter.c, e-table-sorter.h: New files to help with making selection ranges work even if sorted. svn path=/trunk/; revision=4546
Diffstat (limited to 'widgets/e-table/e-table.c')
-rw-r--r--widgets/e-table/e-table.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/widgets/e-table/e-table.c b/widgets/e-table/e-table.c
index 4daddc3985..c6fffffd3d 100644
--- a/widgets/e-table/e-table.c
+++ b/widgets/e-table/e-table.c
@@ -144,6 +144,7 @@ et_destroy (GtkObject *object)
gtk_object_unref (GTK_OBJECT (et->full_header));
gtk_object_unref (GTK_OBJECT (et->header));
gtk_object_unref (GTK_OBJECT (et->sort_info));
+ gtk_object_unref (GTK_OBJECT (et->sorter));
gtk_widget_destroy (GTK_WIDGET (et->header_canvas));
gtk_widget_destroy (GTK_WIDGET (et->table_canvas));
@@ -187,6 +188,7 @@ e_table_init (GtkObject *object)
e_table->drag_source_button_press_event_id = 0;
e_table->drag_source_motion_notify_event_id = 0;
+ e_table->sorter = NULL;
e_table->selection = e_table_selection_model_new();
e_table->cursor_loc = E_TABLE_CURSOR_LOC_NONE;
}
@@ -603,9 +605,6 @@ et_real_construct (ETable *e_table, ETableHeader *full_header, ETableModel *etm,
e_table->model = etm;
gtk_object_ref (GTK_OBJECT (etm));
- gtk_object_set (GTK_OBJECT (e_table->selection),
- "model", etm,
- NULL);
gtk_widget_push_visual (gdk_rgb_get_visual ());
gtk_widget_push_colormap (gdk_rgb_get_cmap ());
@@ -617,6 +616,13 @@ et_real_construct (ETable *e_table, ETableHeader *full_header, ETableModel *etm,
"sort_info", e_table->sort_info,
NULL);
+ e_table->sorter = e_table_sorter_new(etm, e_table->full_header, e_table->sort_info);
+
+ gtk_object_set (GTK_OBJECT (e_table->selection),
+ "model", etm,
+ "sorter", e_table->sorter,
+ NULL);
+
if (!no_header) {
e_table_setup_header (e_table);
}