diff options
Diffstat (limited to 'widgets/table/e-cell-text.c')
-rw-r--r-- | widgets/table/e-cell-text.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index f0a8d082cb..8131d16384 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -752,7 +752,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, return TRUE; } - if (!edit_display) { + if ((!edit_display) && ect->editable) { e_table_item_enter_edit (text_view->cell_view.e_table_item_view, view_col, row); ect_edit_select_all (text_view); edit = text_view->edit; @@ -776,7 +776,10 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, break; case GDK_BUTTON_PRESS: /* Fall Through */ case GDK_BUTTON_RELEASE: - if (!edit_display && event->type == GDK_BUTTON_RELEASE && event->button.button == 1) { + if ((!edit_display) + && ect->editable + && event->type == GDK_BUTTON_RELEASE + && event->button.button == 1) { GdkEventButton button = event->button; e_table_item_enter_edit (text_view->cell_view.e_table_item_view, view_col, row); @@ -1069,14 +1072,14 @@ e_cell_text_class_init (GtkObjectClass *object_class) E_MAKE_TYPE(e_cell_text, "ECellText", ECellText, e_cell_text_class_init, NULL, PARENT_TYPE); ECell * -e_cell_text_new (ETableModel *etm, const char *fontname, GtkJustification justify) +e_cell_text_new (ETableModel *etm, const char *fontname, GtkJustification justify, gboolean editable) { ECellText *ect = gtk_type_new (e_cell_text_get_type ()); ect->ellipsis = NULL; ect->use_ellipsis = TRUE; - ect->editable = TRUE; + ect->editable = editable; ect->font_name = g_strdup (fontname); ect->justify = justify; |