aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/table/e-cell-text.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/table/e-cell-text.c')
-rw-r--r--widgets/table/e-cell-text.c44
1 files changed, 38 insertions, 6 deletions
diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c
index 6e5b28b8a1..6fe8e2ddfb 100644
--- a/widgets/table/e-cell-text.c
+++ b/widgets/table/e-cell-text.c
@@ -86,7 +86,7 @@ static GdkAtom clipboard_atom = GDK_NONE;
#define PARENT_TYPE e_cell_get_type()
-#define TEXT_PAD 2
+#define TEXT_PAD 5
typedef struct {
gpointer lines; /* Text split into lines (private field) */
@@ -260,8 +260,8 @@ ect_stop_editing (ECellTextView *text_view)
static void
ect_cancel_edit (ECellTextView *text_view)
{
- ect_stop_editing (text_view);
ect_queue_redraw (text_view, text_view->edit->cell.view_col, text_view->edit->cell.row);
+ ect_stop_editing (text_view);
}
/*
@@ -398,6 +398,25 @@ ect_draw (ECellView *ecell_view, GdkDrawable *drawable,
gdk_gc_set_clip_rectangle (fg_gc, &rect);
clip_rect = ▭
+ gdk_gc_set_foreground (text_view->gc, &canvas->style->base [GTK_STATE_NORMAL]);
+ gdk_draw_rectangle (drawable, text_view->gc, TRUE,
+ rect.x, rect.y, rect.width, rect.height);
+ gdk_gc_set_foreground (text_view->gc, &canvas->style->text [GTK_STATE_NORMAL]);
+
+ x1 += 1;
+ y1 += 1;
+ x2 -= 1;
+ y2 -= 1;
+
+ rect.x = x1;
+ rect.y = y1;
+ rect.width = x2 - x1;
+ rect.height = y2 - y1;
+
+ gdk_gc_set_clip_rectangle (text_view->gc, &rect);
+ gdk_gc_set_clip_rectangle (fg_gc, &rect);
+ clip_rect = ▭
+
if ( edit_display ) {
CellEdit *edit = text_view->edit;
CurrentCell *cell = CURRENT_CELL(edit);
@@ -769,6 +788,18 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
break;
case GDK_KEY_PRESS: /* Fall Through */
case GDK_KEY_RELEASE:
+ if (event->key.keyval == GDK_Escape){
+ ect_cancel_edit (text_view);
+ return TRUE;
+ }
+
+ if (!edit_display) {
+ 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;
+ cellptr = CURRENT_CELL(edit);
+ edit_display = TRUE;
+ }
if (edit_display) {
GdkEventKey key = event->key;
e_tep_event.key.time = key.time;
@@ -780,6 +811,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, int model_col, int view_col,
return e_text_event_processor_handle_event (edit->tep,
&e_tep_event);
}
+
else
return 0;
break;
@@ -1033,7 +1065,7 @@ e_cell_text_new (ETableModel *etm, const char *fontname, GtkJustification justif
ECellText *ect = gtk_type_new (e_cell_text_get_type ());
ect->ellipsis = NULL;
- ect->use_ellipsis = FALSE;
+ ect->use_ellipsis = TRUE;
ect->editable = TRUE;
@@ -1052,7 +1084,7 @@ get_line_xpos (CurrentCell *cell, struct line *line)
ECellTextView *text_view = cell->text_view;
ECellText *ect = E_CELL_TEXT (((ECellView *)cell->text_view)->ecell);
- x = text_view->xofs + ect->x;
+ x = text_view->xofs + ect->x + 1;
switch (ect->justify) {
case GTK_JUSTIFY_RIGHT:
@@ -1085,7 +1117,7 @@ get_line_ypos (CurrentCell *cell, struct line *line)
struct line *lines = linebreaks->lines;
- y = text_view->yofs + ect->y;
+ y = text_view->yofs + ect->y + 1;
y += (line - lines) * (text_view->font->ascent + text_view->font->descent);
return y;
@@ -1839,5 +1871,5 @@ build_current_cell (CurrentCell *cell, ECellTextView *text_view, int model_col,
cell->row = row;
cell->breaks = NULL;
cell->text = e_table_model_value_at (ecell_view->e_table_model, model_col, row);
- cell->width = e_table_header_get_column(((ETableItem *)ecell_view->e_table_item_view)->header, view_col)->width;
+ cell->width = e_table_header_get_column(((ETableItem *)ecell_view->e_table_item_view)->header, view_col)->width - 2;
}
d>asami2000-01-201-1/+12 * Update to version 2.0.18bcpiazza2000-01-155-16/+57 * - Support CC/CFLAGS/CXXFLAGS properlyimura2000-01-158-106/+247 * Fix testing/timing failures due to the last update.jmz2000-01-138-55/+117 * Change MAINTAINER to ade@FreeBSD.org .nakai2000-01-072-2/+2 * Remove info/dir from PLISTreg2000-01-063-3/+0 * Update to version 0.47ade2000-01-064-6/+6 * Upgrade to 0.46vanilla2000-01-028-56/+76 * Work around division by zero coredumpscpiazza2000-01-021-0/+16 * Update to version 2.0.14.steve1999-12-298-66/+426 * These ports now need 'LIB_DEPENDS=gd.0:...'.steve1999-12-282-4/+4 * (1) Rearrange the MASTER_SITES, if the http service of a machine is downbillf1999-12-272-5/+5 * Use -O.green1999-12-261-0/+11 * Bugfix for something noticed by jmz: $PAGER usage was broken due togreen1999-12-261-0/+11 * Remove empty directory (owned by this port) on deinstall.steve1999-12-261-0/+1 * Update to calc-2.11.1t3.0. Merry Christmas!green1999-12-263-31/+332 * Update to 0.45nakai1999-12-246-6/+16 * Update port to 3.3.7jedgar1999-12-244-9/+9 * Update to version 3.52.9.steve1999-12-244-36/+74 * * Update to version 2.2.1.steve1999-12-243-37/+11 * * Update to version 2.0.steve1999-12-247-52/+55 * * Added secondary sites to MASTER_SITESsteve1999-12-242-13/+19 * * Fixed MASTER_SITESsteve1999-12-243-15/+43 * * Fixed MASTER_SITESjedgar1999-12-242-5/+7 * Update to 3.7.1imura1999-12-112-15/+13 * Fixup MASTER_SITES, one diff per patch, and install example data.steve1999-12-117-3/+89 * Fix MASTER_SITES, change MAINTAINER.tg1999-12-101-4/+2 * Files have been updated in master site (a few bug fixes)jmz1999-12-103-19/+6 * New location on MASTER_SITE.steve1999-12-052-2/+2 * Update to 0.44nakai1999-12-018-52/+138 * Move dependencies to Tcl/Tk version 8.2. This port is *still* brokensteve1999-11-291-4/+4 * Guile shared lib version changedjseger1999-11-291-1/+1 * Update to version 2.4.1.steve1999-11-2774-9668/+17502 * Update to version 6.3.06. NOTE: you will need Motif version 2.x ifsteve1999-11-275-24/+56 * Activate the grpn port.steve1999-11-271-0/+1 * Initial import of grpn version 1.1.0.steve1999-11-276-0/+73 * Update to version 2.1.3.steve1999-11-274-4/+4 * gtkgraph is in graphics, not math. :)asami1999-11-171-1/+0 * Activate the gtkgraph port.steve1999-11-141-0/+1 * New MASTER_SITE.steve1999-11-141-1/+1 * Update maintainer's email address.jim1999-11-131-2/+2 * Add some master sites.tg1999-11-081-2/+5 * Activate the rcalc and topaz ports.steve1999-11-011-0/+2 * Initial import of topaz version 3.22.steve1999-11-017-0/+180 * Initial import of rcalc version 0.1.steve1999-11-015-0/+49 * Update to version 1.0.1.steve1999-11-013-9/+11 * Set 'FETCH_BEFORE_ARGS=-t' and update the checksum after we've gotten all ofsteve1999-11-012-1/+3 * Update to 0.41nakai1999-10-278-22/+32 * PR: ports/14303nakai1999-10-148-44/+230 * Files I forgot to add in the previous commit.jmz1999-10-1414-0/+544 * Honor FC and FFLAGS so that the user can easily override them.jmz1999-10-144-47/+140 * Add another URL of interest (http://stat.ethz.ch/R/manual/).hoek1999-10-123-0/+3 * Rewrite to match pkg/COMMENT rules.hoek1999-10-123-3/+3 * Add WWW:hoek1999-10-123-0/+6 * Add WWW:.hoek1999-10-121-0/+2 * Update to 3.3.5 and fixes unfetchable distfileflathill1999-10-122-4/+4 * Update to version 3.1.1c.steve1999-10-117-21/+138 * Back out my last commit because I had just reversed the already-committeddan1999-10-101-1/+1 * Fix small typo in Makefile.dan1999-10-091-1/+1 * A typo in Makefile creats wrong symbolic link to BLAS shared libraryjmz1999-10-061-1/+1 * Fix checksum.chuckr1999-10-052-2/+2 * changed maintainer's mail address.sumikawa1999-10-032-4/+4 * Fixup MASTER_SITE. Also moved (Satoshi repo-copied it) Makefile.libsteve1999-09-261-4/+2 * Checksums for version 3.0jmz1999-09-231-2/+2 * Upgrade from version 2.0 to version 3.0jmz1999-09-238-457/+410 * Update to 1.99.5taoka1999-09-207-1053/+60 * Play the 'MANCOMPRESSED=maybe' trick and compress the manpages ourselvessteve1999-09-201-0/+6 * Update to KDE-1.1.2se1999-09-183-3/+50 * The version number of libgif.so has changed to 5.steve1999-09-181-1/+1 * xbae shlib is now at version 7.asami1999-09-111-1/+1 * Switch back dependency to gnuplot, now that chuckr has fixed it.asami1999-09-114-6/+6 * Break gnuplot of bad (gif-ish) habits, it builds now.chuckr1999-09-112-48/+20 * $Id$ -> $FreeBSD$ (spammed by dirk)peter1999-09-111-1/+1 * Upgrade to 5.0.3gamma.dirk1999-09-119-115/+116 * Justified pkg/PLIST .sada1999-09-101-4/+0 * Rollback gd dependency change.chuckr1999-09-101-1/+1 * Change dependency from gnuplot to gnuplot+ (which has already been fixedasami1999-09-104-6/+6 * Updated to 1.1.9taoka1999-09-103-14/+34 * ${GUNZIP} -> ${GUNZIP_CMD}. (mharo somehow misspelt these two.... ;)asami1999-09-092-2/+2 * USE_X_PREFIX has to be before bsd.port.pre.mk.asami1999-09-091-1/+2 * Add ngraphtaoka1999-09-091-0/+1 * A XY plotting tool for students, scientists and engineerstaoka1999-09-096-0/+137 * Never try creating a postscript file with #!PostScript at the top.fenner1999-09-091-0/+12 * Remove one of MASTER_SITES.sada1999-09-092-6/+5 * xspin333.tcl should be in the PLIST, not 300cpiazza1999-09-091-1/+1 * Update WWW: entry.tg1999-09-083-3/+3 * Upgrade to 3.5b2.tg1999-09-082-4/+4 * The WWW site has gone AWOL (or at least 403), so remove mention ofmph1999-09-081-2/+0 * The tiff port now lives in ports/graphics/tiff.steve1999-09-071-4/+6 * changed this to make us of the gd-old library (and include files)chuckr1999-09-062-4/+42 * gzip -> ${GZIP_CMD}mharo1999-09-052-2/+2 * FreeBSD.ORG -> FreeBSD.orgmharo1999-08-3117-28/+28 * $Id$ -> $FreeBSD$peter1999-08-306-6/+6 * Mark broken, needs to catch up with gd.asami1999-08-301-0/+2 * expr -> ${EXPR}mharo1999-08-281-3/+3 * sed -> ${SED}mharo1999-08-282-3/+3 * ln -> ${LN}mharo1999-08-282-2/+2 * echo -> ${ECHO} or ${ECHO_MSG} and in some cases, move echo stuffmharo1999-08-284-14/+18 * Update to version 0.64.2cpiazza1999-08-2710-4891/+6706 * Change Id->FreeBSD.obrien1999-08-2561-61/+61 * Id->FreeBSD.obrien1999-08-257-7/+7 * Change Id->FreeBSD.obrien1999-08-251-1/+1 * grep -> ${GREP}mharo1999-08-231-2/+2 * awk -> ${AWK}mharo1999-08-234-11/+11 * chmod -> ${CHMOD}mharo1999-08-236-18/+18 * Update to version 2.0.16b.steve1999-08-224-37/+44 * Update to version 0.31.steve1999-08-2210-98/+104 * Updated to version 3.33taoka1999-08-124-13/+12 * Test if HAVE_G2C is defined rather than if it's value is non-zero.steve1999-08-071-2/+2 * Re-enforce caps, no period. An "exceptions" file has been createdhoek1999-08-032-2/+2 * Activate netcdf and py-scientific.tg1999-07-301-1/+3 * New port py-scientific. This is Konrad Hinsen's collection of Python modulestg1999-07-306-0/+253 * New port netcdf. The NetCDF (network Common Data Form) is a librarytg1999-07-305-0/+63 * Make port depend on linux_base instead of linux_lib.marcel1999-07-212-4/+4 * Set Dominik Brettnacher <domi@saargate.de> as the maintainercpiazza1999-07-181-2/+2 * install supermatrix.hmharo1999-07-122-1/+3 * time(3)'s first and only arg is a time_t* which is not necessarily equalsteve1999-07-061-0/+20 * Sprinkle in some '#if !defined(__FreeBSD__)' incantations so we don't getsteve1999-07-062-0/+40 * Mark this port only for i386.steve1999-07-051-1/+3 * Mark this port only for i386.steve1999-07-051-1/+3 * Call ldconfig correctly so this has a fighting chance of working forsteve1999-07-053-6/+6 * BROKEN='only siag-3.1.19.tar.gz available'obrien1999-07-041-1/+3 * Fix to use new master site.cpiazza1999-07-031-2/+2 * Update MASTER_SITE.mph1999-07-021-2/+2 * Allow "x,y" in addition to "x y" formatted data points.obrien1999-06-281-0/+28 * Remove trailing spaces, and any periods that were hidden by them.hoek1999-06-282-2/+2 * #4/4 enforcing Caps, no periodhoek1999-06-2734-34/+34 * Add MASTER_SITE.hoek1999-06-262-4/+6 * Update master website.hoek1999-06-262-2/+2 * *sigh* fix whitespace introduced in last commit.cpiazza1999-06-261-2/+2 * Mikhail Teterin <mi@aldan.algebra.com> volunteered to maintain this port.cpiazza1999-06-261-2/+2 * Update to 3.1.18 and un-BROKEN it.cpiazza1999-06-268-207/+348 * Update spin to 3.30.cpiazza1999-06-257-19/+35 * Compensate for not having a generic.h on -current boxes.steve1999-06-233-6/+29 * Remove current maintainer and replace with ports@FreeBSD.orgcpiazza1999-06-191-2/+2 * Fixup PLIST to include all installed files.steve1999-06-101-0/+6 * Install gnuplot.info and adjust patch-aa to use libVFlib2.so. Alsosteve1999-06-102-3/+25 * Add the gnuplot+ and parmetis ports.steve1999-06-091-1/+3 * Initial import of gnuplot37+ version 1.1.8.steve1999-06-096-0/+101 * Initial import of ParMetis version 2.0.steve1999-06-097-0/+77 * The xforms ports is no longer an i386-only port.steve1999-06-092-8/+2 * Fixup version required comment after upgrade.steve1999-06-092-4/+4 * Bandage fennerage by hosting distfile on freefall. There is nomph1999-06-081-3/+2 * Upgrade to 2.1.2.mph1999-06-074-6/+6 * Remove the test to create ${PREFIX}/share/info/dir as it is nowmharo1999-06-062-2/+0 * vtk is now in "math".tg1999-06-011-1/+2 * Re-import vtk into "math", this is where all the othertg1999-06-0121-0/+570 * Update to version 0.26.steve1999-05-308-72/+66 * Update to version 5.0.2b.steve1999-05-293-54/+47 * Update to use gtk version 1.2.3.steve1999-05-291-3/+2 * Forget about ${PREFIX}/include/giflib.tg1999-05-271-3/+2 * Make this at least build on the Alpha and mark it broken since it failssteve1999-05-242-1/+17 * Misc. build fix.asami1999-05-138-348/+406 * Another REQUIRE_MOTIF -> REQUIRES_MOTIF....asami1999-05-121-2/+2 * Um, it's REQUIRE*S*_MOTIF, not REQUIRE_MOTIF.... ;)asami1999-05-121-2/+2 * Update to version 0.25.steve1999-05-1010-24/+86 * Fix checksumflathill1999-05-10