diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-02-24 14:51:23 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-02-24 14:51:23 +0800 |
commit | 7699b8996aa2d9ae3fea0e94981637c98e89a273 (patch) | |
tree | f4321790cd8c8619babfac9e2d4f38ca621d7e2d /widgets/e-table/e-cell-text.c | |
parent | 6b338ae8ecd1332f574e33620e0765a16aab03a3 (diff) | |
download | gsoc2013-evolution-7699b8996aa2d9ae3fea0e94981637c98e89a273.tar gsoc2013-evolution-7699b8996aa2d9ae3fea0e94981637c98e89a273.tar.gz gsoc2013-evolution-7699b8996aa2d9ae3fea0e94981637c98e89a273.tar.bz2 gsoc2013-evolution-7699b8996aa2d9ae3fea0e94981637c98e89a273.tar.lz gsoc2013-evolution-7699b8996aa2d9ae3fea0e94981637c98e89a273.tar.xz gsoc2013-evolution-7699b8996aa2d9ae3fea0e94981637c98e89a273.tar.zst gsoc2013-evolution-7699b8996aa2d9ae3fea0e94981637c98e89a273.zip |
This were moved to widgets/e-text/ a while ago but never removed. They
2000-02-24 Christopher James Lahey <clahey@helixcode.com>
* widgets/e-text.c, widgets/e-text.h, e-text-event-processor.c,
e-text-event-processor.h, e-text-event-processor-emacs-like.c,
e-text-event-processor-emacs-like.h,
e-text-event-processor-types.h: This were moved to widgets/e-text/
a while ago but never removed. They have now been removed.
* widgets/e-text/e-text.c, widgets/e-text/e-text.h: Removed some
warnings from this file. Made tooltips disappear when you're
finished with them.
* widgets/e-minicard/test-reflow.c,
widgets/e-minicard/test-minicard.c,
widgets/e-minicard/test-minicard-label.c: Commented out unused
about_callback functions.
* widgets/e-minicard/e-reflow.c: Made e-reflow pass an EFocus to
its e-minicard children.
* widgets/e-minicard/e-minicard.c: Made e-minicard take and return
an EFocus for its "has_focus" argument. This makes shift-tab work properly.
* widgets/e-minicard/e-minicard-label.c: Made e-minicard-label take and return
an EFocus for its "has_focus" argument. Made the font that
e-minicard-label uses only be allocated once.
* e-util/e-canvas-utils.h: Fixed the comment at the top and added
#ifndef __E_CANVAS_UTILS__.
* e-util/Makefile.am: Added e-xml-utils.c and
e-xml-utils.h.
* e-util/e-xml-utils.h, e-util/e-xml-utils.c: Added files for some
xml utilities.
* e-util/e-util.h: Added type EFocus which describes which
direction the focus will be coming from.
in mail:
2000-02-24 Christopher James Lahey <clahey@helixcode.com>
* message-list.c: Changed this to not use the "x" and "y"
arguments to e-table-item.
in widgets/e-table:
2000-02-24 Christopher James Lahey <clahey@helixcode.com>
* e-table-subset-variable.c, e-table-subset-variable.h: A new
model which is a subset, but you can add and remove rows.
* test-table.c: Added a thaw method for use with the
e-table-subset (emits model_changed.) Adapted to the changes to
e_table_item. Properly parse headers. Adapted to the changes to
e_table, including creating example xml spec data.
* test-cols.c, test-check.c: Added a thaw method for use with the
e-table-subset (emits model_changed.) Adapted to the changes to
e_table_item.
* e-table.c, e-table.h: Reworked e-table to use the ETable
grouping system. The only difference for the interface is that
instead of passing in a column_spec and a grouping_spec, you pass
in a single string that is an xml format that includes both pieces
of information.
* e-table-subset.h: Added rules for emacs to do correct
indentation.
* e-table-subset.c: Implemented freezing. No signals are emitted
while frozen and "model_changed" is emitted when thawed.
* e-table-sorted.h: ETableSortedClass has ETableSubset as its
parent object instead of ETableSubsetClass. Fixed this.
* e-table-simple.c, e-table-simple.h: Implemented the thaw method.
Use of simple now requires an extra argument (the thaw method.)
* e-table-model.h, e-table-model.c: Added e_table_model_freeze and
e_table_model_thaw.
* e-table-item.h, e-table-item.c: Reworked this a bit to make it
provide some things the new group system needed and to make
inter-item keyboard focus work. Changed the external interface
only in the list of arguments it recognizes and signals it emits.
Instead of "x" and "y", you have to use
e_canvas_item_move_absolute and instead of emitting a
"height_changed" signal, it emits a "resize" signal. There's new
"has_focus", "width", and "height" arguments and a function to get
the currently focused column.
* e-table-header-item.c: Got rid of some warnings here. Changed
the
* e-table-group-leaf.h, e-table-group-leaf.c,
e-table-group-container.h, e-table-group-container.c: New types to
make e_table_group work properly.
* e-table-group.h, e-table-group.c: Completely reworked e-table
grouping. e-table-group now uses a hierarchical structure.
* e-cell.h: Added e_cell_print. This doesn't work yet.
* e-cell.c: Made e_cell_realize exist. (It was improperly named
e_cell_view_realize in the .c.)
* e-cell-text.c: Made the blinking cursor disappear properly.
* check-filled.xpm, check-empty.xpm: Made these const char *[]
instead of char *[] to avoid compiler warnings.
* Makefile.am: Added e-table-group-container.c,
e-table-group-container.h, e-table-group-leaf.c,
e-table-group-leaf.h, e-table-subset-variable.c,
e-table-subset-variable.h.
svn path=/trunk/; revision=1915
Diffstat (limited to 'widgets/e-table/e-cell-text.c')
-rw-r--r-- | widgets/e-table/e-cell-text.c | 61 |
1 files changed, 29 insertions, 32 deletions
diff --git a/widgets/e-table/e-cell-text.c b/widgets/e-table/e-cell-text.c index 8131d16384..fb33f10537 100644 --- a/widgets/e-table/e-cell-text.c +++ b/widgets/e-table/e-cell-text.c @@ -120,7 +120,6 @@ typedef struct { } ECellTextView; typedef struct _CurrentCell{ - ECellTextView *text_view; int width; gchar *text; @@ -233,6 +232,10 @@ static void ect_stop_editing (ECellTextView *text_view) { CellEdit *edit = text_view->edit; + int row, view_col; + + row = edit->cell.row; + view_col = edit->cell.view_col; g_free (edit->old_text); edit->old_text = NULL; @@ -246,12 +249,24 @@ ect_stop_editing (ECellTextView *text_view) g_free(edit->primary_selection); if (edit->clipboard_selection) g_free(edit->clipboard_selection); + if ( ! edit->default_cursor_shown ) { + gdk_window_set_cursor(GTK_WIDGET(text_view->canvas)->window, NULL); + edit->default_cursor_shown = TRUE; + } + if (edit->timeout_id) { + g_source_remove(edit->timeout_id); + edit->timeout_id = 0; + } + if (edit->timer) { + g_timer_stop(edit->timer); + g_timer_destroy(edit->timer); + edit->timer = NULL; + } g_free (edit); text_view->edit = NULL; - - e_table_item_leave_edit (text_view->cell_view.e_table_item_view); + ect_queue_redraw (text_view, view_col, row); } /* @@ -260,7 +275,6 @@ ect_stop_editing (ECellTextView *text_view) static void ect_cancel_edit (ECellTextView *text_view) { - ect_queue_redraw (text_view, text_view->edit->cell.view_col, text_view->edit->cell.row); ect_stop_editing (text_view); } @@ -379,9 +393,11 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable, if (edit){ - if ((edit->cell.view_col == view_col) && (edit->cell.row == row)) + if ((edit->cell.view_col == view_col) && (edit->cell.row == row)) { edit_display = TRUE; - fg_gc = canvas->style->fg_gc[edit->has_selection ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE]; + fg_gc = canvas->style->fg_gc[edit->has_selection ? GTK_STATE_SELECTED : GTK_STATE_ACTIVE]; + } else + fg_gc = canvas->style->fg_gc[GTK_STATE_ACTIVE]; } else { fg_gc = canvas->style->fg_gc[GTK_STATE_ACTIVE]; } @@ -776,6 +792,8 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, break; case GDK_BUTTON_PRESS: /* Fall Through */ case GDK_BUTTON_RELEASE: + event->button.x -= 4; + event->button.y -= 1; if ((!edit_display) && ect->editable && event->type == GDK_BUTTON_RELEASE @@ -828,6 +846,8 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col, } break; case GDK_MOTION_NOTIFY: + event->motion.x -= 4; + event->motion.y -= 1; if (edit_display) { GdkEventMotion motion = event->motion; e_tep_event.motion.time = motion.time; @@ -928,15 +948,6 @@ ect_height (ECellView *ecell_view, int model_col, int view_col, int row) } /* - * Callback: invoked when the user pressed "enter" on the GtkEntry - */ -static void -ect_entry_activate (GtkEntry *entry, ECellTextView *text_view) -{ - e_table_item_leave_edit (text_view->cell_view.e_table_item_view); -} - -/* * ECellView::enter_edit method */ static void * @@ -1011,19 +1022,6 @@ ect_leave_edit (ECellView *ecell_view, int model_col, int view_col, int row, voi CellEdit *edit = text_view->edit; if (edit){ - if ( ! edit->default_cursor_shown ) { - gdk_window_set_cursor(GTK_WIDGET(text_view->canvas)->window, NULL); - edit->default_cursor_shown = TRUE; - } - if (edit->timeout_id) { - g_source_remove(edit->timeout_id); - edit->timeout_id = 0; - } - if (edit->timer) { - g_timer_stop(edit->timer); - g_timer_destroy(edit->timer); - edit->timer = NULL; - } ect_accept_edits (text_view); ect_stop_editing (text_view); } else { @@ -1508,9 +1506,6 @@ e_cell_text_view_command(ETextEventProcessor *tep, ETextEventProcessorCommand *c break; case E_TEP_ACTIVATE: e_table_item_leave_edit (text_view->cell_view.e_table_item_view); - if (edit->timer) { - g_timer_reset(edit->timer); - } break; case E_TEP_SET_SELECT_BY_WORD: edit->select_by_word = command->value; @@ -1842,7 +1837,9 @@ calc_line_widths (CurrentCell *cell) } if (ect->use_ellipsis && - ! text_view->edit && + (!(text_view->edit && + cell->row == text_view->edit->cell.row && + cell->view_col == text_view->edit->cell.view_col)) && lines->width > cell->width) { if (font) { lines->ellipsis_length = 0; |