aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/e-table/e-cell-text.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-02-12 07:53:07 +0800
committerChris Lahey <clahey@src.gnome.org>2000-02-12 07:53:07 +0800
commit07d9ddab8e2b6759bbe1b2364371bf5c7b6fe6de (patch)
tree9aef6228256888d44b8466e1b98c24296147fa2c /widgets/e-table/e-cell-text.c
parente8fbeb4881f1920446adc9a2e6a8cb0b914aa737 (diff)
downloadgsoc2013-evolution-07d9ddab8e2b6759bbe1b2364371bf5c7b6fe6de.tar
gsoc2013-evolution-07d9ddab8e2b6759bbe1b2364371bf5c7b6fe6de.tar.gz
gsoc2013-evolution-07d9ddab8e2b6759bbe1b2364371bf5c7b6fe6de.tar.bz2
gsoc2013-evolution-07d9ddab8e2b6759bbe1b2364371bf5c7b6fe6de.tar.lz
gsoc2013-evolution-07d9ddab8e2b6759bbe1b2364371bf5c7b6fe6de.tar.xz
gsoc2013-evolution-07d9ddab8e2b6759bbe1b2364371bf5c7b6fe6de.tar.zst
gsoc2013-evolution-07d9ddab8e2b6759bbe1b2364371bf5c7b6fe6de.zip
Add an editable argument to e_cell_text_new.
2000-02-11 Christopher James Lahey <clahey@helixcode.com> * e-cell-text.h, e-cell-text.c: Add an editable argument to e_cell_text_new. * test-table.c, test-cols.c, test-check.c: Set the editable argument to e_cell_text_new. svn path=/trunk/; revision=1738
Diffstat (limited to 'widgets/e-table/e-cell-text.c')
-rw-r--r--widgets/e-table/e-cell-text.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/widgets/e-table/e-cell-text.c b/widgets/e-table/e-cell-text.c
index f0a8d082cb..8131d16384 100644
--- a/widgets/e-table/e-cell-text.c
+++ b/widgets/e-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;