aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2012-06-14 12:52:21 +0800
committerCosimo Cecchi <cosimoc@gnome.org>2012-06-18 22:27:01 +0800
commit81b6d4b96386b91ff73090142efe8ad53291944d (patch)
tree08f7c42719b746e03c50061d67dfa4eaa9d18442 /widgets
parent7cbdc483cca593970d4bd09ee0dee2a18a38cd63 (diff)
downloadgsoc2013-evolution-81b6d4b96386b91ff73090142efe8ad53291944d.tar.gz
gsoc2013-evolution-81b6d4b96386b91ff73090142efe8ad53291944d.tar.zst
gsoc2013-evolution-81b6d4b96386b91ff73090142efe8ad53291944d.zip
e-text: remove unused draw_background property
It's always FALSE.
Diffstat (limited to 'widgets')
-rw-r--r--widgets/text/e-text.c44
-rw-r--r--widgets/text/e-text.h2
2 files changed, 1 insertions, 45 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 8c312ddc71..9ccd50ab74 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -102,7 +102,6 @@ enum {
PROP_WIDTH,
PROP_HEIGHT,
PROP_ALLOW_NEWLINES,
- PROP_DRAW_BACKGROUND,
PROP_CURSOR_POS,
PROP_IM_CONTEXT,
PROP_HANDLE_POPUP
@@ -824,13 +823,6 @@ e_text_set_property (GObject *object,
needs_reflow = 1;
break;
- case PROP_DRAW_BACKGROUND:
- if (text->draw_background != g_value_get_boolean (value)) {
- text->draw_background = g_value_get_boolean (value);
- text->needs_redraw = 1;
- }
- break;
-
case PROP_ALLOW_NEWLINES:
text->allow_newlines = g_value_get_boolean (value);
_get_tep (text);
@@ -985,10 +977,6 @@ e_text_get_property (GObject *object,
text->clip_height : text->height);
break;
- case PROP_DRAW_BACKGROUND:
- g_value_set_boolean (value, text->draw_background);
- break;
-
case PROP_ALLOW_NEWLINES:
g_value_set_boolean (value, text->allow_newlines);
break;
@@ -1227,7 +1215,7 @@ e_text_draw (GnomeCanvasItem *item,
cairo_save (cr);
- if (text->draw_background || !text->rgba_set) {
+ if (!text->rgba_set) {
gdk_cairo_set_source_color (cr, &style->fg[state]);
} else {
cairo_set_source_rgba (cr,
@@ -1237,27 +1225,6 @@ e_text_draw (GnomeCanvasItem *item,
( text->rgba & 0xff) / 255.0);
}
- if (text->draw_background) {
- gdouble thisx = item->x1 - x;
- gdouble thisy = item->y1 - y;
- gdouble thiswidth, thisheight;
- widget = GTK_WIDGET (item->canvas);
-
- g_object_get (text,
- "width", &thiswidth,
- "height", &thisheight,
- NULL);
-
- if (text->draw_background) {
- gtk_paint_flat_box (style, cr,
- state, GTK_SHADOW_NONE,
- widget, "entry_bg",
- thisx + style->xthickness,
- thisy + style->ythickness,
- thiswidth - style->xthickness * 2,
- thisheight - style->ythickness * 2);
- }
- }
/* Insert preedit text only when im_context signals are connected &
* text->preedit_len is not zero */
if (text->im_context_signals_registered && text->preedit_len)
@@ -3150,13 +3117,6 @@ e_text_class_init (ETextClass *class)
FALSE,
G_PARAM_READWRITE));
- g_object_class_install_property (gobject_class, PROP_DRAW_BACKGROUND,
- g_param_spec_boolean ("draw_background",
- "Draw background",
- "Draw background",
- FALSE,
- G_PARAM_READWRITE));
-
g_object_class_install_property (gobject_class, PROP_CURSOR_POS,
g_param_spec_int ("cursor_pos",
"Cursor position",
@@ -3245,8 +3205,6 @@ e_text_init (EText *text)
text->dbl_timeout = 0;
text->tpl_timeout = 0;
- text->draw_background = FALSE;
-
text->bold = FALSE;
text->strikeout = FALSE;
diff --git a/widgets/text/e-text.h b/widgets/text/e-text.h
index 68753f683b..17e51eb9b3 100644
--- a/widgets/text/e-text.h
+++ b/widgets/text/e-text.h
@@ -83,7 +83,6 @@ G_BEGIN_DECLS
* line_wrap boolean RW Line wrap when not editing.
* break_characters string RW List of characters to optionally break on.
* max_lines gint RW Number of lines possible when doing line wrap.
- * draw_background boolean RW Whether to draw the background.
*/
#define E_TYPE_TEXT (e_text_get_type ())
@@ -160,7 +159,6 @@ struct _EText {
guint pointer_in : 1; /* Is the pointer currently over us? */
guint default_cursor_shown : 1; /* Is the default cursor currently shown? */
- guint draw_background : 1; /* Draw background? */
guint line_wrap : 1; /* Do line wrap */