diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-12-05 05:03:28 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-12-05 05:03:28 +0800 |
commit | 410f3bc629f38cb76a5d16209a07e2c336ed1f9f (patch) | |
tree | 8ca2b834f5c5bff158d6e76ea2e27ef4826bf71c /widgets/misc/e-reflow.c | |
parent | e508d293964edda19447e713a2503e3133e84161 (diff) | |
download | gsoc2013-evolution-410f3bc629f38cb76a5d16209a07e2c336ed1f9f.tar gsoc2013-evolution-410f3bc629f38cb76a5d16209a07e2c336ed1f9f.tar.gz gsoc2013-evolution-410f3bc629f38cb76a5d16209a07e2c336ed1f9f.tar.bz2 gsoc2013-evolution-410f3bc629f38cb76a5d16209a07e2c336ed1f9f.tar.lz gsoc2013-evolution-410f3bc629f38cb76a5d16209a07e2c336ed1f9f.tar.xz gsoc2013-evolution-410f3bc629f38cb76a5d16209a07e2c336ed1f9f.tar.zst gsoc2013-evolution-410f3bc629f38cb76a5d16209a07e2c336ed1f9f.zip |
Merging changes:
2001-12-04 Christopher James Lahey <clahey@ximian.com>
* configure.in (GAL_CURRENT): Bumped version number to 0.18.99.0
and CURRENT to 19.
2001-11-21 Christopher James Lahey <clahey@ximian.com>
* gal/widgets/e-reflow.c, gal/widgets/e-reflow.h: Handle
selection_row_changed signal.
* gal/widgets/e-selection-model-array.c,
gal/widgets/e-selection-model-array.h: Properly send
selection_row_changed signals if changing from a single row
selected to a single other row selected or if moving the
selection_end by a single row.
* gal/widgets/e-selection-model.c,
gal/widgets/e-selection-model.h: Added selection_row_changed
signal.
(e_selection_model_select_as_key_press): Fixed the case statement
here to make MULTIPLE and EXTENDED the same as BROWSE instead of
as SINGLE.
From gal/e-table/ChangeLog:
2001-11-21 Christopher James Lahey <clahey@ximian.com>
* e-table-item.c, e-table-item.h: Handle selection_row_changed
signal. Keep track of the old cursor row so that we only redraw
two rows when the cursor changes.
* e-table.c, e-tree.c: Handle selection_row_changed signal.
* e-tree-selection-model.c: Properly send selection_row_changed
signals if changing from a single row selected to a single other
row selected or if moving the selection_end by a single row.
svn path=/trunk/; revision=14870
Diffstat (limited to 'widgets/misc/e-reflow.c')
-rw-r--r-- | widgets/misc/e-reflow.c | 40 |
1 files changed, 29 insertions, 11 deletions
diff --git a/widgets/misc/e-reflow.c b/widgets/misc/e-reflow.c index 6287ce45ad..ed83956232 100644 --- a/widgets/misc/e-reflow.c +++ b/widgets/misc/e-reflow.c @@ -117,6 +117,22 @@ e_reflow_resize_children (GnomeCanvasItem *item) } } +static inline void +e_reflow_update_selection_row (EReflow *reflow, int row) +{ + if (reflow->items[row]) { + gtk_object_set(GTK_OBJECT(reflow->items[row]), + "selected", e_selection_model_is_row_selected(E_SELECTION_MODEL(reflow->selection), row), + NULL); + } else if (e_selection_model_is_row_selected (E_SELECTION_MODEL (reflow->selection), row)) { + reflow->items[row] = e_reflow_model_incarnate (reflow->model, row, GNOME_CANVAS_GROUP (reflow)); + gtk_object_set (GTK_OBJECT (reflow->items[row]), + "selected", e_selection_model_is_row_selected(E_SELECTION_MODEL(reflow->selection), row), + "width", (double) reflow->column_width, + NULL); + } +} + static void e_reflow_update_selection (EReflow *reflow) { @@ -125,17 +141,7 @@ e_reflow_update_selection (EReflow *reflow) count = reflow->count; for (i = 0; i < count; i++) { - if (reflow->items[i]) { - gtk_object_set(GTK_OBJECT(reflow->items[i]), - "selected", e_selection_model_is_row_selected(E_SELECTION_MODEL(reflow->selection), i), - NULL); - } else if (e_selection_model_is_row_selected (E_SELECTION_MODEL (reflow->selection), i)) { - reflow->items[i] = e_reflow_model_incarnate (reflow->model, i, GNOME_CANVAS_GROUP (reflow)); - gtk_object_set (GTK_OBJECT (reflow->items[i]), - "selected", e_selection_model_is_row_selected(E_SELECTION_MODEL(reflow->selection), i), - "width", (double) reflow->column_width, - NULL); - } + e_reflow_update_selection_row (reflow, i); } } @@ -146,6 +152,12 @@ selection_changed (ESelectionModel *selection, EReflow *reflow) } static void +selection_row_changed (ESelectionModel *selection, int row, EReflow *reflow) +{ + e_reflow_update_selection_row (reflow, row); +} + +static void cursor_changed (ESelectionModel *selection, int row, int col, EReflow *reflow) { int count = reflow->count; @@ -453,10 +465,13 @@ disconnect_selection (EReflow *reflow) gtk_signal_disconnect (GTK_OBJECT (reflow->selection), reflow->selection_changed_id); gtk_signal_disconnect (GTK_OBJECT (reflow->selection), + reflow->selection_row_changed_id); + gtk_signal_disconnect (GTK_OBJECT (reflow->selection), reflow->cursor_changed_id); gtk_object_unref (GTK_OBJECT (reflow->selection)); reflow->selection_changed_id = 0; + reflow->selection_row_changed_id = 0; reflow->cursor_changed_id = 0; reflow->selection = NULL; } @@ -1308,6 +1323,9 @@ e_reflow_init (EReflow *reflow) reflow->selection_changed_id = gtk_signal_connect(GTK_OBJECT(reflow->selection), "selection_changed", GTK_SIGNAL_FUNC(selection_changed), reflow); + reflow->selection_row_changed_id = + gtk_signal_connect(GTK_OBJECT(reflow->selection), "selection_row_changed", + GTK_SIGNAL_FUNC(selection_row_changed), reflow); reflow->cursor_changed_id = gtk_signal_connect(GTK_OBJECT(reflow->selection), "cursor_changed", GTK_SIGNAL_FUNC(cursor_changed), reflow); |