From: John Darrington Date: Tue, 18 Nov 2008 10:04:22 +0000 (+0900) Subject: Added event handler for the Delete key X-Git-Tag: v0.7.1~145 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0ab438f96c6a22fed99b56682c0f57acd0f1aced;p=pspp-builds.git Added event handler for the Delete key --- diff --git a/lib/gtksheet/gtksheet.c b/lib/gtksheet/gtksheet.c index 79ba35dc..3152f894 100644 --- a/lib/gtksheet/gtksheet.c +++ b/lib/gtksheet/gtksheet.c @@ -99,8 +99,6 @@ static void gtk_sheet_set_row_height (GtkSheet *sheet, gint row, guint height); -static gboolean gtk_sheet_cell_empty (const GtkSheet *, gint, gint); - static void destroy_hover_window (GtkSheetHoverTitle *); static GtkSheetHoverTitle *create_hover_window (void); @@ -554,7 +552,6 @@ static void init_attributes (const GtkSheet *sheet, GtkSheetCellAttr *attributes); -/* Memory allocation routines */ static void gtk_sheet_real_cell_clear (GtkSheet *sheet, gint row, gint column); @@ -2503,21 +2500,6 @@ gtk_sheet_real_cell_clear (GtkSheet *sheet, gint row, gint column) dispose_string (sheet, old_text); } - - -static gboolean -gtk_sheet_cell_empty (const GtkSheet *sheet, gint row, gint col) -{ - gboolean empty; - char *text = gtk_sheet_cell_get_text (sheet, row, col); - empty = (text == NULL ); - - dispose_string (sheet, text); - - return empty; -} - - gchar * gtk_sheet_cell_get_text (const GtkSheet *sheet, gint row, gint col) { @@ -4578,7 +4560,9 @@ gtk_sheet_key_press (GtkWidget *widget, g_sheet_row_get_row_count (sheet->row_geometry) - 1, sheet->active_cell.col); */ - + break; + case GDK_Delete: + gtk_sheet_real_cell_clear (sheet, sheet->active_cell.row, sheet->active_cell.col); break; default: return FALSE;