diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-02-10 20:05:01 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-02-10 20:05:01 +0800 |
commit | 11a8bba27ea6fd7dc37b478be03831ddc561f28a (patch) | |
tree | 2bb67fa483ea10ee89cc1f658c623800d1d8d19e /widgets/table/e-cell-text.c | |
parent | 4a2a09a7bae99778d6e11df7da7d0a166815030f (diff) | |
download | gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar.gz gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar.bz2 gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar.lz gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar.xz gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.tar.zst gsoc2013-evolution-11a8bba27ea6fd7dc37b478be03831ddc561f28a.zip |
Handle button releases properly.
2000-02-10 Christopher James Lahey <clahey@helixcode.com>
* e-cell-text.c: Handle button releases properly.
* e-table-header-item.c (ethi_start_drag): Added a drag icon.
svn path=/trunk/; revision=1724
Diffstat (limited to 'widgets/table/e-cell-text.c')
-rw-r--r-- | widgets/table/e-cell-text.c | 31 |
1 files changed, 28 insertions, 3 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 6fe8e2ddfb..5cec90a536 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -817,6 +817,34 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, break; case GDK_BUTTON_PRESS: /* Fall Through */ case GDK_BUTTON_RELEASE: + if (!edit_display && event->type == GDK_BUTTON_RELEASE && event->button.button == 1) { + GdkEventButton button = event->button; + + e_table_item_enter_edit (text_view->cell_view.e_table_item_view, view_col, row); + edit = text_view->edit; + cellptr = CURRENT_CELL(edit); + edit_display = TRUE; + + e_tep_event.button.type = GDK_BUTTON_PRESS; + e_tep_event.button.time = button.time; + e_tep_event.button.state = button.state; + e_tep_event.button.button = button.button; + e_tep_event.button.position = _get_position_from_xy(cellptr, button.x, button.y); + _get_tep(edit); + return_val = e_text_event_processor_handle_event (edit->tep, + &e_tep_event); + if (event->button.button == 1) { + if (event->type == GDK_BUTTON_PRESS) + edit->button_down = TRUE; + else + edit->button_down = FALSE; + } + edit->lastx = button.x; + edit->lasty = button.y; + edit->last_state = button.state; + + e_tep_event.button.type = GDK_BUTTON_RELEASE; + } if (edit_display) { GdkEventButton button = event->button; e_tep_event.button.time = button.time; @@ -835,9 +863,6 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, edit->lastx = button.x; edit->lasty = button.y; edit->last_state = button.state; - } else if (ect->editable && event->type == GDK_BUTTON_RELEASE && event->button.button == 1) { - e_table_item_enter_edit (text_view->cell_view.e_table_item_view, view_col, row); - return 1; } break; case GDK_MOTION_NOTIFY: |