diff options
author | Ettore Perazzoli <ettore@src.gnome.org> | 2001-09-26 05:24:22 +0800 |
---|---|---|
committer | Ettore Perazzoli <ettore@src.gnome.org> | 2001-09-26 05:24:22 +0800 |
commit | 650c4690b2040f83c032b67a271b996f876fdc50 (patch) | |
tree | 0261f48453ee539fca02031f81d67943d4608960 /widgets/table | |
parent | a413337c28972fc703e73b90dd23b076f4857560 (diff) | |
download | gsoc2013-evolution-650c4690b2040f83c032b67a271b996f876fdc50.tar.gz gsoc2013-evolution-650c4690b2040f83c032b67a271b996f876fdc50.tar.zst gsoc2013-evolution-650c4690b2040f83c032b67a271b996f876fdc50.zip |
Commit patch from Chris to implement e_tree_right_click_up() for
correct right-click behavior in single selection mode.
svn path=/trunk/; revision=13123
Diffstat (limited to 'widgets/table')
-rw-r--r-- | widgets/table/e-table-item.c | 7 | ||||
-rw-r--r-- | widgets/table/e-table.c | 6 | ||||
-rw-r--r-- | widgets/table/e-table.h | 3 | ||||
-rw-r--r-- | widgets/table/e-tree.c | 6 | ||||
-rw-r--r-- | widgets/table/e-tree.h | 3 |
5 files changed, 24 insertions, 1 deletions
diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 869254b703..a69db6f84d 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -1823,10 +1823,12 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) if (!find_cell (eti, e->button.x, e->button.y, &col, &row, &x1, &y1)) return TRUE; - e_selection_model_maybe_do_something(E_SELECTION_MODEL (eti->selection), view_to_model_row(eti, row), view_to_model_col(eti, col), 0); + e_selection_model_right_click_down(E_SELECTION_MODEL (eti->selection), view_to_model_row(eti, row), view_to_model_col(eti, col), 0); gtk_signal_emit (GTK_OBJECT (eti), eti_signals [RIGHT_CLICK], row, view_to_model_col(eti, col), e, &return_val); + if (!return_val) + e_selection_model_right_click_up(E_SELECTION_MODEL (eti->selection)); break; case 4: case 5: @@ -1893,6 +1895,9 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) d(g_print ("Release\n")); break; case 3: + e_selection_model_right_click_up(E_SELECTION_MODEL (eti->selection)); + return_val = TRUE; + break; case 4: case 5: return FALSE; diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 3751bae479..3aba1105ec 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -1406,6 +1406,12 @@ e_table_get_printable (ETable *e_table) return e_table_group_get_printable(e_table->group); } +void +e_table_right_click_up (ETable *table) +{ + e_selection_model_right_click_up(E_SELECTION_MODEL(table->selection)); +} + static void et_get_arg (GtkObject *o, GtkArg *arg, guint arg_id) { diff --git a/widgets/table/e-table.h b/widgets/table/e-table.h index e2550d1392..be2942a751 100644 --- a/widgets/table/e-table.h +++ b/widgets/table/e-table.h @@ -295,6 +295,9 @@ GdkDragContext *e_table_drag_begin (ETable *table, void e_table_select_all (ETable *table); void e_table_invert_selection (ETable *table); +/* This function is only needed in single_selection_mode. */ +void e_table_right_click_up (ETable *table); + END_GNOME_DECLS #endif /* _E_TABLE_H_ */ diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index 35cb532e6c..5efebec1fd 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -1528,6 +1528,12 @@ e_tree_get_tooltip (ETree *et) return E_CANVAS(et->priv->table_canvas)->tooltip_window; } +void +e_tree_right_click_up (ETree *et) +{ + e_selection_model_right_click_up(et->priv->selection); +} + /** * e_tree_get_model: * @et: the ETree diff --git a/widgets/table/e-tree.h b/widgets/table/e-tree.h index 4b73ff9dcb..b34c9d1a8f 100644 --- a/widgets/table/e-tree.h +++ b/widgets/table/e-tree.h @@ -259,6 +259,9 @@ void e_tree_load_expanded_state (ETree *et, int e_tree_row_count (ETree *et); GtkWidget *e_tree_get_tooltip (ETree *et); +/* This function is only needed in single_selection_mode. */ +void e_tree_right_click_up (ETree *et); + END_GNOME_DECLS #endif /* _E_TREE_H_ */ |