aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/text/e-text.c
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@helixcode.com>2000-10-27 22:48:20 +0800
committerChris Lahey <clahey@src.gnome.org>2000-10-27 22:48:20 +0800
commitdfdfa72ec5b7d56e9b6894b491e3b00d9bd21be2 (patch)
tree959b75aac9c36dc36b3c953e90727b0e8de691ed /widgets/text/e-text.c
parent0e9dae0eb6c2f22aeb8904c7d161d68133a385b7 (diff)
downloadgsoc2013-evolution-dfdfa72ec5b7d56e9b6894b491e3b00d9bd21be2.tar.gz
gsoc2013-evolution-dfdfa72ec5b7d56e9b6894b491e3b00d9bd21be2.tar.zst
gsoc2013-evolution-dfdfa72ec5b7d56e9b6894b491e3b00d9bd21be2.zip
Added an "allow_newlines" argument.
2000-10-27 Christopher James Lahey <clahey@helixcode.com> * gal/e-text/e-entry.c, gal/e-text/e-text-event-processor-emacs-like.c, gal/e-text/e-text-event-processor-emacs-like.h, gal/e-text/e-text-event-processor.c, gal/e-text/e-text-event-processor.h, gal/e-text/e-text.c: Added an "allow_newlines" argument. svn path=/trunk/; revision=6226
Diffstat (limited to 'widgets/text/e-text.c')
-rw-r--r--widgets/text/e-text.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index 0abef82bd5..314198248b 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -85,6 +85,7 @@ enum {
ARG_WIDTH,
ARG_HEIGHT,
ARG_DRAW_BORDERS,
+ ARG_ALLOW_NEWLINES,
};
@@ -280,6 +281,8 @@ e_text_class_init (ETextClass *klass)
GTK_TYPE_DOUBLE, GTK_ARG_READABLE, ARG_HEIGHT);
gtk_object_add_arg_type ("EText::draw_borders",
GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_DRAW_BORDERS);
+ gtk_object_add_arg_type ("EText::allow_newlines",
+ GTK_TYPE_BOOL, GTK_ARG_READWRITE, ARG_ALLOW_NEWLINES);
if (!clipboard_atom)
clipboard_atom = gdk_atom_intern ("CLIPBOARD", FALSE);
@@ -1016,8 +1019,9 @@ e_text_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
if ( text->tep && text->tep_command_id )
gtk_signal_disconnect(GTK_OBJECT(text->tep),
text->tep_command_id);
- if ( text->tep )
+ if ( text->tep ) {
gtk_object_unref(GTK_OBJECT(text->tep));
+ }
text->tep = E_TEXT_EVENT_PROCESSOR(GTK_VALUE_OBJECT (*arg));
gtk_object_ref(GTK_OBJECT(text->tep));
text->tep_command_id =
@@ -1278,6 +1282,13 @@ e_text_set_arg (GtkObject *object, GtkArg *arg, guint arg_id)
}
break;
+ case ARG_ALLOW_NEWLINES:
+ _get_tep(text);
+ gtk_object_set (GTK_OBJECT (text->tep),
+ "allow_newlines", GTK_VALUE_BOOL (*arg),
+ NULL);
+ break;
+
default:
return;
}
@@ -1417,6 +1428,17 @@ e_text_get_arg (GtkObject *object, GtkArg *arg, guint arg_id)
GTK_VALUE_BOOL (*arg) = text->draw_borders;
break;
+ case ARG_ALLOW_NEWLINES:
+ {
+ gboolean allow_newlines;
+ _get_tep(text);
+ gtk_object_get (GTK_OBJECT (text->tep),
+ "allow_newlines", &allow_newlines,
+ NULL);
+ GTK_VALUE_BOOL (*arg) = allow_newlines;
+ }
+ break;
+
default:
arg->type = GTK_TYPE_INVALID;
break;