diff options
Diffstat (limited to 'widgets/table')
-rw-r--r-- | widgets/table/e-cell-text.c | 11 | ||||
-rw-r--r-- | widgets/table/e-cell-text.h | 2 | ||||
-rw-r--r-- | widgets/table/test-check.c | 2 | ||||
-rw-r--r-- | widgets/table/test-cols.c | 2 | ||||
-rw-r--r-- | widgets/table/test-table.c | 4 |
5 files changed, 12 insertions, 9 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; diff --git a/widgets/table/e-cell-text.h b/widgets/table/e-cell-text.h index 379ccf30a8..80afdf46ac 100644 --- a/widgets/table/e-cell-text.h +++ b/widgets/table/e-cell-text.h @@ -56,7 +56,7 @@ typedef struct { } ECellTextClass; GtkType e_cell_text_get_type (void); -ECell *e_cell_text_new (ETableModel *model, const char *fontname, GtkJustification justify); +ECell *e_cell_text_new (ETableModel *model, const char *fontname, GtkJustification justify, gboolean editable); #endif /* _E_CELL_TEXT_H_ */ diff --git a/widgets/table/test-check.c b/widgets/table/test-check.c index 8cc5f6834e..61fe161ca1 100644 --- a/widgets/table/test-check.c +++ b/widgets/table/test-check.c @@ -105,7 +105,7 @@ check_test (void) */ e_table_header = e_table_header_new (); - cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT); + cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT, TRUE); cell_image_check = e_cell_checkbox_new (); col_0 = e_table_col_new (0, "", 18, 18, cell_image_check, g_int_equal, TRUE); diff --git a/widgets/table/test-cols.c b/widgets/table/test-cols.c index 288e2bd408..3fe17ae555 100644 --- a/widgets/table/test-cols.c +++ b/widgets/table/test-cols.c @@ -105,7 +105,7 @@ multi_cols_test (void) */ e_table_header = e_table_header_new (); - cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT); + cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT, TRUE); { GdkPixbuf **images = g_new (GdkPixbuf *, 3); diff --git a/widgets/table/test-table.c b/widgets/table/test-table.c index 428bb52c52..27e1ac59f1 100644 --- a/widgets/table/test-table.c +++ b/widgets/table/test-table.c @@ -202,7 +202,7 @@ table_browser_test (void) * Header */ e_table_header = e_table_header_new (); - cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT); + cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT, TRUE); for (i = 0; i < cols; i++){ ETableCol *ecol = e_table_col_new ( @@ -269,7 +269,7 @@ do_e_table_demo (const char *col_spec, const char *group_spec) set_value_at, is_cell_editable, NULL); full_header = e_table_header_new (); - cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT); + cell_left_just = e_cell_text_new (e_table_model, NULL, GTK_JUSTIFY_LEFT, TRUE); for (i = 0; i < cols; i++){ ETableCol *ecol = e_table_col_new ( |