diff options
author | Christopher James Lahey <clahey@ximian.com> | 2001-09-14 02:33:21 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2001-09-14 02:33:21 +0800 |
commit | b59ff6e2f0e09ca24c6f9a08590cc4be9ccb2cef (patch) | |
tree | 367b3665c880ee29319a72c761efbe30a88930cb /widgets | |
parent | 0c548743f1acee346ecc95c1cbb3a9bac4047de6 (diff) | |
download | gsoc2013-evolution-b59ff6e2f0e09ca24c6f9a08590cc4be9ccb2cef.tar gsoc2013-evolution-b59ff6e2f0e09ca24c6f9a08590cc4be9ccb2cef.tar.gz gsoc2013-evolution-b59ff6e2f0e09ca24c6f9a08590cc4be9ccb2cef.tar.bz2 gsoc2013-evolution-b59ff6e2f0e09ca24c6f9a08590cc4be9ccb2cef.tar.lz gsoc2013-evolution-b59ff6e2f0e09ca24c6f9a08590cc4be9ccb2cef.tar.xz gsoc2013-evolution-b59ff6e2f0e09ca24c6f9a08590cc4be9ccb2cef.tar.zst gsoc2013-evolution-b59ff6e2f0e09ca24c6f9a08590cc4be9ccb2cef.zip |
Changed this to change state on button down, even if we aren't editing.
2001-09-13 Christopher James Lahey <clahey@ximian.com>
* e-cell-toggle.c (etog_event): Changed this to change state on
button down, even if we aren't editing.
svn path=/trunk/; revision=12803
Diffstat (limited to 'widgets')
-rw-r--r-- | widgets/table/e-cell-toggle.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c index e85418e593..b4938ea55c 100644 --- a/widgets/table/e-cell-toggle.c +++ b/widgets/table/e-cell-toggle.c @@ -1,3 +1,4 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */ /* * e-cell-toggle.c: Multi-state image toggle cell object. * @@ -188,27 +189,23 @@ etog_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, void *_value = e_table_model_value_at (ecell_view->e_table_model, model_col, row); const int value = GPOINTER_TO_INT (_value); - if (flags & !E_CELL_EDITING) - return 0; - +#if 0 + if (!(flags & E_CELL_EDITING)) + return FALSE; +#endif + switch (event->type){ - case GDK_BUTTON_RELEASE: + case GDK_KEY_PRESS: + if (event->key.keyval != GDK_space) + return FALSE; + /* Fall through */ + case GDK_BUTTON_PRESS: if (!e_table_model_is_cell_editable(ecell_view->e_table_model, model_col, row)) return FALSE; etog_set_value (toggle_view, model_col, view_col, row, value + 1); return TRUE; - case GDK_KEY_PRESS: - if (!e_table_model_is_cell_editable(ecell_view->e_table_model, model_col, row)) - return FALSE; - - if (event->key.keyval == GDK_space){ - etog_set_value (toggle_view, model_col, view_col, row, value + 1); - return TRUE; - } - return FALSE; - default: return FALSE; } |