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-selection-model.c | |
parent | e508d293964edda19447e713a2503e3133e84161 (diff) | |
download | gsoc2013-evolution-410f3bc629f38cb76a5d16209a07e2c336ed1f9f.tar.gz 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-selection-model.c')
-rw-r--r-- | widgets/misc/e-selection-model.c | 65 |
1 files changed, 42 insertions, 23 deletions
diff --git a/widgets/misc/e-selection-model.c b/widgets/misc/e-selection-model.c index 3aa78af31d..b7472e99f5 100644 --- a/widgets/misc/e-selection-model.c +++ b/widgets/misc/e-selection-model.c @@ -37,6 +37,7 @@ enum { CURSOR_CHANGED, CURSOR_ACTIVATED, SELECTION_CHANGED, + SELECTION_ROW_CHANGED, LAST_SIGNAL }; @@ -171,27 +172,36 @@ e_selection_model_class_init (ESelectionModelClass *klass) gtk_marshal_NONE__NONE, GTK_TYPE_NONE, 0); - klass->cursor_changed = NULL; - klass->cursor_activated = NULL; - klass->selection_changed = NULL; - - klass->is_row_selected = NULL; - klass->foreach = NULL; - klass->clear = NULL; - klass->selected_count = NULL; - klass->select_all = NULL; - klass->invert_selection = NULL; - klass->row_count = NULL; - - klass->change_one_row = NULL; - klass->change_cursor = NULL; - klass->cursor_row = NULL; - klass->cursor_col = NULL; - - klass->select_single_row = NULL; - klass->toggle_single_row = NULL; - klass->move_selection_end = NULL; - klass->set_selection_end = NULL; + e_selection_model_signals [SELECTION_ROW_CHANGED] = + gtk_signal_new ("selection_row_changed", + GTK_RUN_LAST, + E_OBJECT_CLASS_TYPE (object_class), + GTK_SIGNAL_OFFSET (ESelectionModelClass, selection_row_changed), + gtk_marshal_NONE__INT, + GTK_TYPE_NONE, 1, GTK_TYPE_INT); + + klass->cursor_changed = NULL; + klass->cursor_activated = NULL; + klass->selection_changed = NULL; + klass->selection_row_changed = NULL; + + klass->is_row_selected = NULL; + klass->foreach = NULL; + klass->clear = NULL; + klass->selected_count = NULL; + klass->select_all = NULL; + klass->invert_selection = NULL; + klass->row_count = NULL; + + klass->change_one_row = NULL; + klass->change_cursor = NULL; + klass->cursor_row = NULL; + klass->cursor_col = NULL; + + klass->select_single_row = NULL; + klass->toggle_single_row = NULL; + klass->move_selection_end = NULL; + klass->set_selection_end = NULL; E_OBJECT_CLASS_ADD_SIGNALS (object_class, e_selection_model_signals, LAST_SIGNAL); @@ -495,6 +505,8 @@ e_selection_model_select_as_key_press (ESelectionModel *selection, switch (selection->mode) { case GTK_SELECTION_BROWSE: + case GTK_SELECTION_MULTIPLE: + case GTK_SELECTION_EXTENDED: if (shift_p) { e_selection_model_set_selection_end (selection, row); } else if (!ctrl_p) { @@ -503,8 +515,6 @@ e_selection_model_select_as_key_press (ESelectionModel *selection, cursor_activated = FALSE; break; case GTK_SELECTION_SINGLE: - case GTK_SELECTION_MULTIPLE: - case GTK_SELECTION_EXTENDED: e_selection_model_select_single_row (selection, row); break; } @@ -640,3 +650,12 @@ e_selection_model_selection_changed (ESelectionModel *selection) gtk_signal_emit(GTK_OBJECT(selection), e_selection_model_signals[SELECTION_CHANGED]); } + +void +e_selection_model_selection_row_changed (ESelectionModel *selection, + int row) +{ + gtk_signal_emit(GTK_OBJECT(selection), + e_selection_model_signals[SELECTION_ROW_CHANGED], + row); +} |