aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-text.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-12-10 06:20:52 +0800
committerChris Lahey <clahey@src.gnome.org>2000-12-10 06:20:52 +0800
commit3018f79188018eb590be1412a95b830a0d842fbc (patch)
tree50882bfcef5fcb05bbf4d07637be2da0b0bb0601 /widgets/table/e-cell-text.c
parent9cf73d61eb344bbbbf50d6932bff5ce23f2971e6 (diff)
downloadgsoc2013-evolution-3018f79188018eb590be1412a95b830a0d842fbc.tar
gsoc2013-evolution-3018f79188018eb590be1412a95b830a0d842fbc.tar.gz
gsoc2013-evolution-3018f79188018eb590be1412a95b830a0d842fbc.tar.bz2
gsoc2013-evolution-3018f79188018eb590be1412a95b830a0d842fbc.tar.lz
gsoc2013-evolution-3018f79188018eb590be1412a95b830a0d842fbc.tar.xz
gsoc2013-evolution-3018f79188018eb590be1412a95b830a0d842fbc.tar.zst
gsoc2013-evolution-3018f79188018eb590be1412a95b830a0d842fbc.zip
Added the actions parameter to ect_event. Added an actions field to
2000-12-09 Christopher James Lahey <clahey@helixcode.com> * e-cell-text.c: Added the actions parameter to ect_event. Added an actions field to CellEdit. Handle CellEdit properly in the ect_event function to do grabbing and ungrabbing when appropriate. Set the actions field in CellEdit when appropriate in e_cell_text_view_command. * e-cell-toggle.c, e-cell-tree.c, e-cell.c, e-cell.h: Added a ECellActions enum, a ECellActions actions parameter to e_cell_event and added the actions parameter to all the handlers of the event method including having ECellTree pass it on to its child cell. * e-table-header-item.c: Use the NULL cursor instead of the E_CURSORS_ARROW cursor. * e-table-item.c, e-table-item.h: Added grabbed_row and grabbed_col fields to ETableItem (-1 on either means ungrabbed.) Pay attention to them in the find_cell function. Handle the actions parameter of e_cell_event and grab or ungrab the pointer to a given cell if requested. This is done using the new function eti_e_cell_event (which is internal to e-table-item.c,) instead of the old e_cell_event function call. Fake an ungrabbed table when calling find_cell from within the compute_location method. svn path=/trunk/; revision=6889
Diffstat (limited to 'widgets/table/e-cell-text.c')
-rw-r--r--widgets/table/e-cell-text.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 5a1251cf01..153501fa63 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -168,6 +168,8 @@ struct _CellEdit {
guint pointer_in : 1;
guint default_cursor_shown : 1;
+
+ ECellActions actions;
};
static void e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *command, gpointer data);
@@ -871,7 +873,7 @@ ect_edit_select_all (ECellTextView *text_view)
* ECell::event method
*/
static gint
-ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags)
+ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, int row, ECellFlags flags, ECellActions *actions)
{
ECellTextView *text_view = (ECellTextView *) ecell_view;
ETextEventProcessorEvent e_tep_event;
@@ -943,6 +945,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
_get_tep (edit);
return_val = e_text_event_processor_handle_event (edit->tep, &e_tep_event);
+ *actions = edit->actions;
if (e_tep_event.key.string) g_free (e_tep_event.key.string);
break;
}
@@ -974,6 +977,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
_get_tep (edit);
return_val = e_text_event_processor_handle_event (edit->tep,
&e_tep_event);
+ *actions = edit->actions;
if (event->button.button == 1) {
if (event->type == GDK_BUTTON_PRESS)
edit->button_down = TRUE;
@@ -995,6 +999,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
_get_tep (edit);
return_val = e_text_event_processor_handle_event (edit->tep,
&e_tep_event);
+ *actions = edit->actions;
if (event->button.button == 1) {
if (event->type == GDK_BUTTON_PRESS)
edit->button_down = TRUE;
@@ -1017,6 +1022,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
_get_tep (edit);
return_val = e_text_event_processor_handle_event (edit->tep,
&e_tep_event);
+ *actions = edit->actions;
edit->lastx = motion.x;
edit->lasty = motion.y;
edit->last_state = motion.state;
@@ -2141,17 +2147,11 @@ e_cell_text_view_command (ETextEventProcessor *tep, ETextEventProcessorCommand *
edit->select_by_word = command->value;
break;
case E_TEP_GRAB:
- case E_TEP_UNGRAB:
-#if 0
- case E_TEP_GRAB:
- gnome_canvas_item_grab (GNOME_CANVAS_ITEM(text),
- GDK_BUTTON_RELEASE_MASK | GDK_POINTER_MOTION_MASK,
- text_view->i_cursor,
- command->time);
+ edit->actions = E_CELL_GRAB;
break;
- gnome_canvas_item_ungrab (GNOME_CANVAS_ITEM(text), command->time);
+ case E_TEP_UNGRAB:
+ edit->actions = E_CELL_UNGRAB;
break;
-#endif
case E_TEP_NOP:
break;
}