static void psppire_sheet_size_allocate (GtkWidget *widget,
GtkAllocation *allocation);
+static gboolean psppire_sheet_focus_in (GtkWidget *widget,
+ GdkEventFocus *event,
+ gpointer user_data);
+
+
/* Sheet queries */
static gboolean psppire_sheet_range_isvisible (const PsppireSheet *sheet,
widget_class->expose_event = psppire_sheet_expose;
widget_class->size_request = psppire_sheet_size_request;
widget_class->size_allocate = psppire_sheet_size_allocate;
- widget_class->focus_in_event = NULL;
+ widget_class->focus_in_event = psppire_sheet_focus_in;
widget_class->focus_out_event = NULL;
klass->set_scroll_adjustments = psppire_sheet_set_scroll_adjustments;
return TRUE;
}
+
+static gboolean
+psppire_sheet_focus_in (GtkWidget *w,
+ GdkEventFocus *event,
+ gpointer user_data)
+{
+ PsppireSheet *sheet = PSPPIRE_SHEET (w);
+
+ gtk_widget_grab_focus (sheet->entry_widget);
+
+ return TRUE;
+}
+
+
static void
psppire_sheet_extend_selection (PsppireSheet *sheet, gint row, gint column)
{
gtk_widget_modify_style (sheet->entry_widget, style);
}
-
-
static void
create_sheet_entry (PsppireSheet *sheet)
{
object_class->set_property = psppire_data_editor_set_property;
object_class->get_property = psppire_data_editor_get_property;
+
+
data_store_spec =
g_param_spec_pointer ("data-store",
"Data Store",
G_CALLBACK (on_switch_page),
NULL);
+ g_object_set (de, "can-focus", FALSE, NULL);
g_signal_connect (de, "map", G_CALLBACK (on_map), NULL);
-
// psppire_sheet_hide_column_titles (de->var_sheet);
// psppire_sheet_hide_row_titles (de->data_sheet);
g_signal_emit (de, data_editor_signals[DATA_AVAILABLE_CHANGED], 0,
compatible_target);
}
-
-