aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/text/e-text.c36
-rw-r--r--widgets/text/e-text.h2
2 files changed, 34 insertions, 4 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index eb4e1d02bb..0de86fbec2 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -73,6 +73,7 @@ enum {
ARG_FONT_GDK,
ARG_FONT_E,
ARG_BOLD,
+ ARG_STRIKEOUT,
ARG_ANCHOR,
ARG_JUSTIFICATION,
ARG_CLIP_WIDTH,
@@ -271,6 +272,8 @@ e_text_class_init (ETextClass *klass)
GTK_TYPE_POINTER, GTK_ARG_READWRITE, ARG_FONT_E);
gtk_object_add_arg_type ("EText::bold",
GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_BOLD);
+ gtk_object_add_arg_type ("EText::strikeout",
+ GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_STRIKEOUT);
gtk_object_add_arg_type ("EText::anchor",
GTK_TYPE_ANCHOR_TYPE, GTK_ARG_READWRITE, ARG_ANCHOR);
gtk_object_add_arg_type ("EText::justification",
@@ -425,6 +428,7 @@ e_text_init (EText *text)
text->draw_background = FALSE;
text->bold = FALSE;
+ text->strikeout = FALSE;
text->style = E_FONT_PLAIN;
@@ -832,8 +836,7 @@ calc_line_widths (EText *text)
text->font, text->style,
lines->text, lines->ellipsis_length) +
text->ellipsis_width;
- }
- else
+ } else
lines->ellipsis_length = lines->length;
if (lines->width > text->max_width)
@@ -1297,6 +1300,20 @@ e_text_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
case ARG_BOLD:
text->bold = GTK_VALUE_BOOL (*arg);
text->style = text->bold ? E_FONT_BOLD : E_FONT_PLAIN;
+
+ text->needs_redraw = 1;
+ text->needs_recalc_bounds = 1;
+ if ( text->line_wrap )
+ text->needs_split_into_lines = 1;
+ else
+ text->needs_calc_line_widths = 1;
+ needs_update = 1;
+ needs_reflow = 1;
+ break;
+ case ARG_STRIKEOUT:
+ text->strikeout = GTK_VALUE_BOOL (*arg);
+ text->needs_redraw = 1;
+ needs_update = 1;
break;
case ARG_ANCHOR:
text->anchor = GTK_VALUE_ENUM (*arg);
@@ -1536,6 +1553,10 @@ e_text_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
GTK_VALUE_BOOL (*arg) = text->bold;
break;
+ case ARG_STRIKEOUT:
+ GTK_VALUE_BOOL (*arg) = text->strikeout;
+ break;
+
case ARG_ANCHOR:
GTK_VALUE_ENUM (*arg) = text->anchor;
break;
@@ -2159,7 +2180,7 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
ypos - y,
text->ellipsis ? text->ellipsis : "...",
text->ellipsis ? strlen (text->ellipsis) : 3);
- } else
+ } else {
text_draw_with_objects (text->model,
drawable,
text->font, text->style,
@@ -2168,8 +2189,16 @@ e_text_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
ypos - y,
lines->text,
lines->length);
+ }
}
+ if (text->strikeout)
+ gdk_draw_rectangle (drawable,
+ text->gc,
+ TRUE,
+ xpos - x,
+ ypos - y - e_font_ascent (text->font) / 2,
+ lines->width, 1);
ypos += e_font_height (text->font);
lines++;
}
@@ -2766,6 +2795,7 @@ _do_tooltip (gpointer data)
e_text_get_type (),
"anchor", GTK_ANCHOR_NW,
"bold", text->bold,
+ "strikeout", text->strikeout,
"font_e", text->font,
"text", text->text,
"editable", FALSE,
diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h
index e769818e74..dfb25d21b5 100644
--- a/widgets/text/e-text.h
+++ b/widgets/text/e-text.h
@@ -204,6 +204,7 @@ struct _EText {
guint needs_split_into_lines : 1; /* Needs split_into_lines */
guint bold : 1;
+ guint strikeout : 1;
EFontStyle style;
@@ -215,7 +216,6 @@ struct _EText {
GdkCursor *i_cursor; /* I beam cursor */
gint tooltip_timeout; /* Timeout for the tooltip */
- GtkWidget *tooltip_window; /* GtkWindow for displaying the tooltip */
gint tooltip_count; /* GDK_ENTER_NOTIFY count. */
gint dbl_timeout; /* Double click timeout */
* - Switch textproc/gdome2 to USES=libtool, drop .la filesamdmi32014-06-061-1/+1 * - Switch to USES=libtool, drop .la filesamdmi32014-06-062-4/+2 * - Stagifyamdmi32014-06-052-14/+7 * - Convert gmake,bzip2 to USESmiwi2014-05-291-1/+1 * The FreeBSD x11@ and graphics team proudly presentszeising2014-04-171-0/+1 * Python cleanup:rene2014-01-141-1/+1 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * - Remove MAKE_JOBS_SAFE variableak2013-08-151-1/+0 * - Update to 5.0.1sylvio2013-01-105-126/+169 * Move the rc.d scripts of the form *.sh.in to *.indougb2012-08-062-1/+1 * - update png to 1.5.10dinoex2012-06-011-1/+1 * - Chase rrdtool shlib version bump.sylvio2012-05-081-1/+1 * - Adds knob for py-mako so OP can include py-mako dependencysylvio2012-01-181-1/+7 * - Fix RUN_DEPENDS (:=), mostly for portlintsylvio2012-01-154-14/+35 * In the rc.d scripts, change assignments to rcvar to use thedougb2012-01-141-1/+1 * PR: 16041scheidell2011-11-212-12/+19 * - Add LDFLAGS to CONFIGURE_ENV and MAKE_ENV (as it was done with LDFLAGS)amdmi32011-09-241-2/+2 * - Track dependencies after databases/gdbm updategabor2011-09-121-1/+2 * - Update to 4.1.0sylvio2011-08-193-5/+10 * - Fix to RUN_DEPENDS, added dependencies rrdtool and GeoIPsylvio2011-02-221-1/+5 * - Update to 4.0.1sylvio2011-02-117-332/+169 * Sync to new bsd.autotools.mkade2010-12-041-1/+1 * Punt autoconf267->autoconf268ade2010-10-161-1/+1 * Round one migration of ports from automake{19,110} to automake111ade2010-10-061-1/+1 * Autotools update. Read ports/UPDATING 20100915 for details.ade2010-09-161-2/+2 * Update libevent to 1.4.14bmm2010-07-251-1/+1 * Bounce PORTREVISION for gettext-related ports. Have fun, ya'll.ade2010-05-311-1/+1 * - Mark BROKEN on 6.X: does not configurepav2010-05-261-0/+4 * - update to 1.4.1dinoex2010-03-281-1/+1 * Begin the process of deprecating sysutils/rc_subr bydougb2010-03-271-1/+1 * - Removed line BROKEN, the port now fetch files in Makefile and no more durin...sylvio2010-03-021-2/+0 * - update to jpeg-8dinoex2010-02-051-1/+1 * - Removed dependencies of wgetsylvio2010-02-034-10/+111 * Mark BROKEN: fetches files during build stage.erwin2010-01-311-0/+2 * - Fix to install file etter.finger.ossylvio2010-01-203-0/+109 * - Update my mail address to FreeBSDsylvio2009-11-281-1/+1 * - Update to 3.3.10miwi2009-09-207-52/+65 * - Reassign maintainer to ports@wxs2009-09-101-1/+1 * - Switch SourceForge ports to the new File Release System: categories startin...amdmi32009-08-221-2/+1 * -Repocopy devel/libtool15 -> libtool22 and libltdl15 -> libltdl22.mezz2009-08-032-9/+1 * - Turn off a debug knob which was left on.wxs2009-06-232-1/+12 * - Remove ASDATA knob as it is no longer applicable.wxs2009-06-092-10/+1 * - Update to 3.3.9.wxs2009-06-086-24/+101 * - Mark my ports as MAKE_JOBS_SAFE (with the exception of nethack34-gnome whichwxs2009-05-091-0/+1 * Update to 3.3.8wxs2008-10-184-35/+33 * Update CONFIGURE_ARGS for how we pass CONFIGURE_TARGET to configure script.rafan2008-08-211-1/+0 * Conversion from (now defunct) autoconf-2.61 to autoconf-2.62ade2008-08-201-1/+1 * Require rrdtool-1.2 or higher. rrdtool10 results in a build error.wxs2008-06-141-2/+2 * Bump portrevision due to upgrade of devel/gettext.edwin2008-06-061-1/+1 * Explicitly disable SNMP which breaks the build when net-mgmt/net-snmp is inst...wxs2008-03-031-2/+3 * Update my address.wxs2008-02-041-1/+1 * Switch autoconf dependencies from 2.53 or 2.59 to 2.61.linimon2007-09-301-1/+2 * [MAINTAINER]: Fix net/ntopedwin2007-09-121-1/+1 * - Update to 3.3pav2007-07-229-144/+115 * - Fix build with qt4.miwi2007-05-262-5/+14 * - Welcome X.org 7.2 \o/.flz2007-05-201-1/+1 * Use libtool15 port instead of included version to avoid objformat a.out botchkris2007-02-101-0/+1 * This port depends on urwfonts, not urwfonfs.cperciva2006-09-211-1/+1 * - Fix run-time dependenciesjohans2006-09-211-1/+4 * - updated maintainer's email addressclsung2006-08-311-1/+1 * - Add libxml2 dependency [1]mnag2006-03-236-54/+65 * Conversion to a single libtool environment.ade2006-02-231-1/+1 * - Install rc.d script with USE_RC_SUBR (PORTREVISION bumped).lawrance2005-12-126-90/+67 * - Add SHA256pav2005-11-261-0/+1 * Mass-conversion to the USE_AUTOTOOLS New World Order. The code presentade2005-11-151-1/+1 * Revert to old method to be installed without execution permissionandreas2005-11-041-1/+1 * ntop start/stop script installed without execute persmissionsandreas2005-11-021-1/+1 * - Update to 3.2clement2005-11-014-23/+8 * - Fix build if rrdtool 1.2 is intalledclement2005-08-012-0/+12 * At Kris's request, back out the MACHINE_ARCH spelling correction untilobrien2005-04-121-1/+1 * Assist getting more ports working on AMD64 by obeying theobrien2005-04-111-1/+1 * - Bump PORTREVISION (I forget to commit this file)clement2005-02-041-0/+1 * - Fix plistclement2005-02-041-0/+2 * - Update to 3.1clement2005-01-167-67/+51 * Fix a potential segmentation faul when loading certain pages in the webmarcus2004-11-172-0/+13 * Apply a big libtool patch to allow porters to use the libtool installed bymarcus2004-07-101-1/+1 * - Fix ntop startup scriptclement2004-04-071-1/+1 * - Update to 3.0clement2004-03-233-12/+10 * Whoa there, boy, that's a mighty big commit y'all have there...ade2004-03-141-1/+1 * - Update to 3.0-pre2clement2004-03-137-191/+148 * - Use OPTIONSclement2004-02-082-4/+13 * Add USE_GETTEXT and bump PORTREVISION.marcus2004-02-041-2/+2 * Now gettext 0.12.1 is gettext-old.trevor2004-01-241-1/+1 * - fix typo in pkg-message [1]clement2003-12-222-2/+2 * - Fix Makefile syntax if WITH_RRD is definedpav2003-12-161-1/+1 * - Fix graphs by: use bundled gdchart and use gd1 instead of gd2pav2003-12-134-138/+182 * - Give maintainership to volunteerpav2003-12-121-1/+1 * - Fix build on 5.xpav2003-12-061-0/+11 * Chase the libintl.so shared lib version.marcus2003-08-251-1/+1 * Fix ntop @filenamearved2003-07-221-0/+13 * update net/ntop: add identification to net/ntop configuration dialogdaichi2003-07-171-1/+1 * get rid of libgnugetopt dependency for -CURRENT,sf2003-07-141-4/+4 * Add a missed dependency to gdbmoliver2003-06-191-1/+2 * update ntop to 2.2oliver2003-06-166-430/+490 * Move inclusion of bsd.port.pre.mk later in the file for conditional BROKENkris2003-06-051-6/+5 * BROKEN on 5.1: does not compilekris2003-05-181-1/+6 * De-pkg-comment.knu2003-02-212-1/+1 * - Relinquish maintainership. I don't use ntop anymore, and I've beenwjv2003-02-171-1/+1 * chase gdbm lib versionijliao2003-01-031-1/+1 * Chase the gdchart update and bump PORTREVISION.knu2002-09-152-6/+6 * - Fix an error I introduced into rc.d startup script during previous commit.wjv2002-06-262-3/+4 * - Update to version 2.0.99.r2 which is only a release candidate, but therewjv2002-06-248-64/+110 * Chase openssl shlib version increase.sobomax2002-05-071-1/+1 * - Mark FORBIDDEN. Remote exploit has been published on Bugtraq, and therewjv2002-03-051-0/+2 * - Enable suport for libwrap.wjv2002-01-253-7/+14 * - Add a patch which should allow this port to build on a machine with awjv2002-01-242-5/+45