aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table')
-rw-r--r--widgets/table/e-table-search.c9
-rw-r--r--widgets/table/e-table-search.h2
-rw-r--r--widgets/table/e-table.c5
-rw-r--r--widgets/table/e-tree.c5
4 files changed, 12 insertions, 9 deletions
diff --git a/widgets/table/e-table-search.c b/widgets/table/e-table-search.c
index d9465bf580..ec27d9769e 100644
--- a/widgets/table/e-table-search.c
+++ b/widgets/table/e-table-search.c
@@ -221,21 +221,22 @@ e_table_search_input_character (ETableSearch *ets, gunichar character)
}
}
-void
+gboolean
e_table_search_backspace (ETableSearch *ets)
{
char *end;
- g_return_if_fail (ets != NULL);
- g_return_if_fail (E_IS_TABLE_SEARCH (ets));
+ g_return_val_if_fail (ets != NULL, FALSE);
+ g_return_val_if_fail (E_IS_TABLE_SEARCH (ets), FALSE);
if (!ets->priv->search_string ||
!*ets->priv->search_string)
- return;
+ return FALSE;
end = ets->priv->search_string + strlen (ets->priv->search_string);
end = g_utf8_prev_char (end);
*end = 0;
ets->priv->last_character = 0;
add_timeout (ets);
+ return TRUE;
}
diff --git a/widgets/table/e-table-search.h b/widgets/table/e-table-search.h
index 8cda0e7d94..bd614206a0 100644
--- a/widgets/table/e-table-search.h
+++ b/widgets/table/e-table-search.h
@@ -64,7 +64,7 @@ ETableSearch *e_table_search_new (void);
/**/
void e_table_search_input_character (ETableSearch *e_table_search,
gunichar character);
-void e_table_search_backspace (ETableSearch *e_table_search);
+gboolean e_table_search_backspace (ETableSearch *e_table_search);
void e_table_search_cancel (ETableSearch *e_table_search);
END_GNOME_DECLS
diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c
index 50d0d12e3b..7e101b2363 100644
--- a/widgets/table/e-table.c
+++ b/widgets/table/e-table.c
@@ -754,8 +754,9 @@ group_key_press (ETableGroup *etg, int row, int col, GdkEvent *event, ETable *et
return_val = 1;
break;
case GDK_BackSpace:
- e_table_search_backspace (et->search);
- break;
+ if (e_table_search_backspace (et->search))
+ return TRUE;
+ /* Fall through */
default:
if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK)) == 0
&& ((key->keyval >= GDK_a && key->keyval <= GDK_z) ||
diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c
index 38133b7e56..c78342ef88 100644
--- a/widgets/table/e-tree.c
+++ b/widgets/table/e-tree.c
@@ -858,8 +858,9 @@ item_key_press (ETableItem *eti, int row, int col, GdkEvent *event, ETree *et)
return_val = 1;
break;
case GDK_BackSpace:
- e_table_search_backspace (et->priv->search);
- break;
+ if (e_table_search_backspace (et->priv->search))
+ return TRUE;
+ /* Fallthrough */
default:
if ((key->state & ~(GDK_SHIFT_MASK | GDK_LOCK_MASK)) == 0
&& (key->keyval >= GDK_a && key->keyval <= GDK_z) ||