diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-08-10 03:40:04 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-08-10 03:40:04 +0800 |
commit | 62ca9f5fd718312c9ce4af70c9ecd0f2ab2b5fcd (patch) | |
tree | 30c82ef33f58f86b26d70fb43299d423be2348b2 /widgets/e-table | |
parent | 4bbaf023cbc4e7b4b8da21de2bc13234ff54d236 (diff) | |
download | gsoc2013-evolution-62ca9f5fd718312c9ce4af70c9ecd0f2ab2b5fcd.tar.gz gsoc2013-evolution-62ca9f5fd718312c9ce4af70c9ecd0f2ab2b5fcd.tar.zst gsoc2013-evolution-62ca9f5fd718312c9ce4af70c9ecd0f2ab2b5fcd.zip |
Make right click select if the current row is not selected.
2000-08-09 Christopher James Lahey <clahey@helixcode.com>
* e-table-item.c, e-table-selection-model.c,
e-table-selection-model.h: Make right click select if the current
row is not selected.
svn path=/trunk/; revision=4658
Diffstat (limited to 'widgets/e-table')
-rw-r--r-- | widgets/e-table/ChangeLog | 6 | ||||
-rw-r--r-- | widgets/e-table/e-table-item.c | 2 | ||||
-rw-r--r-- | widgets/e-table/e-table-selection-model.c | 13 | ||||
-rw-r--r-- | widgets/e-table/e-table-selection-model.h | 4 |
4 files changed, 25 insertions, 0 deletions
diff --git a/widgets/e-table/ChangeLog b/widgets/e-table/ChangeLog index b420e86ddb..316e470c83 100644 --- a/widgets/e-table/ChangeLog +++ b/widgets/e-table/ChangeLog @@ -1,3 +1,9 @@ +2000-08-09 Christopher James Lahey <clahey@helixcode.com> + + * e-table-item.c, e-table-selection-model.c, + e-table-selection-model.h: Make right click select if the current + row is not selected. + 2000-08-08 Miguel de Icaza <miguel@helixcode.com> * e-table-header-item.c: Tag some strings for translation. diff --git a/widgets/e-table/e-table-item.c b/widgets/e-table/e-table-item.c index baee6586f7..19a146de25 100644 --- a/widgets/e-table/e-table-item.c +++ b/widgets/e-table/e-table-item.c @@ -1417,6 +1417,8 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) gnome_canvas_item_w2i (item, &e->button.x, &e->button.y); if (!find_cell (eti, e->button.x, e->button.y, &col, &row, &x1, &y1)) return TRUE; + + e_table_selection_model_maybe_do_something(eti->selection, row, col, 0); gtk_signal_emit (GTK_OBJECT (eti), eti_signals [RIGHT_CLICK], row, col, e, &return_val); diff --git a/widgets/e-table/e-table-selection-model.c b/widgets/e-table/e-table-selection-model.c index a40298c992..09b1d6bf93 100644 --- a/widgets/e-table/e-table-selection-model.c +++ b/widgets/e-table/e-table-selection-model.c @@ -446,6 +446,19 @@ void e_table_selection_model_do_something (ETableSelectionModel } } +void e_table_selection_model_maybe_do_something (ETableSelectionModel *selection, + guint row, + guint col, + GdkModifierType state) +{ + if (e_table_selection_model_is_row_selected(selection, row)) { + selection->cursor_row = row; + selection->cursor_col = col; + } else { + e_table_selection_model_do_something(selection, row, col, state); + } +} + void e_table_selection_model_clear(ETableSelectionModel *selection) { diff --git a/widgets/e-table/e-table-selection-model.h b/widgets/e-table/e-table-selection-model.h index df2e377d14..6b57ab56f0 100644 --- a/widgets/e-table/e-table-selection-model.h +++ b/widgets/e-table/e-table-selection-model.h @@ -58,6 +58,10 @@ void e_table_selection_model_do_something (ETableSelectionModel * guint row, guint col, GdkModifierType state); +void e_table_selection_model_maybe_do_something (ETableSelectionModel *selection, + guint row, + guint col, + GdkModifierType state); void e_table_selection_model_clear (ETableSelectionModel *selection); ETableSelectionModel *e_table_selection_model_new (void); |