Commit 811543ce authored by Alexander Larsson's avatar Alexander Larsson Committed by Alexander Larsson

Added properties. Based on patch by Lee Mallabone.

2001-05-21  Alexander Larsson  <alexl@redhat.com>

	* gtk/gtkfontsel.c:
	Added properties. Based on patch by Lee Mallabone.

	* gtk/gtkruler.c:
	* gtk/gtkhruler.c:
	* gtk/gtkvruler.c:
	* gtk/gtktext.c:
	* gtk/gtktextview.c:
	Converted GtkArg to GParam. Based on patches by John Margaglione.

	* tests/Makefile.am:
	* tests/testtext.c:
	Add a property editor to testtext.
parent 479810ca
2001-05-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfontsel.c:
Added properties. Based on patch by Lee Mallabone.
* gtk/gtkruler.c:
* gtk/gtkhruler.c:
* gtk/gtkvruler.c:
* gtk/gtktext.c:
* gtk/gtktextview.c:
Converted GtkArg to GParam. Based on patches by John Margaglione.
* tests/Makefile.am:
* tests/testtext.c:
Add a property editor to testtext.
Mon May 21 11:29:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtk{h,v,}paned.c: Only show the separator if
......
2001-05-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfontsel.c:
Added properties. Based on patch by Lee Mallabone.
* gtk/gtkruler.c:
* gtk/gtkhruler.c:
* gtk/gtkvruler.c:
* gtk/gtktext.c:
* gtk/gtktextview.c:
Converted GtkArg to GParam. Based on patches by John Margaglione.
* tests/Makefile.am:
* tests/testtext.c:
Add a property editor to testtext.
Mon May 21 11:29:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtk{h,v,}paned.c: Only show the separator if
......
2001-05-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfontsel.c:
Added properties. Based on patch by Lee Mallabone.
* gtk/gtkruler.c:
* gtk/gtkhruler.c:
* gtk/gtkvruler.c:
* gtk/gtktext.c:
* gtk/gtktextview.c:
Converted GtkArg to GParam. Based on patches by John Margaglione.
* tests/Makefile.am:
* tests/testtext.c:
Add a property editor to testtext.
Mon May 21 11:29:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtk{h,v,}paned.c: Only show the separator if
......
2001-05-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfontsel.c:
Added properties. Based on patch by Lee Mallabone.
* gtk/gtkruler.c:
* gtk/gtkhruler.c:
* gtk/gtkvruler.c:
* gtk/gtktext.c:
* gtk/gtktextview.c:
Converted GtkArg to GParam. Based on patches by John Margaglione.
* tests/Makefile.am:
* tests/testtext.c:
Add a property editor to testtext.
Mon May 21 11:29:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtk{h,v,}paned.c: Only show the separator if
......
2001-05-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfontsel.c:
Added properties. Based on patch by Lee Mallabone.
* gtk/gtkruler.c:
* gtk/gtkhruler.c:
* gtk/gtkvruler.c:
* gtk/gtktext.c:
* gtk/gtktextview.c:
Converted GtkArg to GParam. Based on patches by John Margaglione.
* tests/Makefile.am:
* tests/testtext.c:
Add a property editor to testtext.
Mon May 21 11:29:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtk{h,v,}paned.c: Only show the separator if
......
2001-05-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfontsel.c:
Added properties. Based on patch by Lee Mallabone.
* gtk/gtkruler.c:
* gtk/gtkhruler.c:
* gtk/gtkvruler.c:
* gtk/gtktext.c:
* gtk/gtktextview.c:
Converted GtkArg to GParam. Based on patches by John Margaglione.
* tests/Makefile.am:
* tests/testtext.c:
Add a property editor to testtext.
Mon May 21 11:29:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtk{h,v,}paned.c: Only show the separator if
......
2001-05-21 Alexander Larsson <alexl@redhat.com>
* gtk/gtkfontsel.c:
Added properties. Based on patch by Lee Mallabone.
* gtk/gtkruler.c:
* gtk/gtkhruler.c:
* gtk/gtkvruler.c:
* gtk/gtktext.c:
* gtk/gtktextview.c:
Converted GtkArg to GParam. Based on patches by John Margaglione.
* tests/Makefile.am:
* tests/testtext.c:
Add a property editor to testtext.
Mon May 21 11:29:21 2001 Owen Taylor <otaylor@redhat.com>
* gtk/gtk{h,v,}paned.c: Only show the separator if
......
......@@ -76,7 +76,22 @@ static const guint16 font_sizes[] = {
32, 36, 40, 48, 56, 64, 72
};
enum {
PROP_0,
PROP_FONT_NAME,
PROP_FONT,
PROP_PREVIEW_TEXT
};
static void gtk_font_selection_class_init (GtkFontSelectionClass *klass);
static void gtk_font_selection_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_font_selection_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_font_selection_init (GtkFontSelection *fontsel);
static void gtk_font_selection_finalize (GObject *object);
......@@ -111,6 +126,8 @@ static void gtk_font_selection_expose_list (GtkWidget *w,
GdkEventExpose *event,
gpointer data);
static void gtk_font_selection_preview_changed (GtkWidget *entry,
GtkFontSelection *fontsel);
/* Misc. utility functions. */
static void gtk_font_selection_load_font (GtkFontSelection *fs);
......@@ -160,9 +177,84 @@ gtk_font_selection_class_init(GtkFontSelectionClass *klass)
font_selection_parent_class = gtk_type_class (GTK_TYPE_VBOX);
gobject_class->set_property = gtk_font_selection_set_property;
gobject_class->get_property = gtk_font_selection_get_property;
g_object_class_install_property (gobject_class,
PROP_FONT_NAME,
g_param_spec_string ("font_name",
_("Font name"),
_("The X string that represents this font."),
NULL,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_FONT,
g_param_spec_boxed ("font",
_("Font"),
_("The GdkFont that is currently selected."),
GDK_TYPE_FONT,
G_PARAM_READABLE));
g_object_class_install_property (gobject_class,
PROP_PREVIEW_TEXT,
g_param_spec_string ("preview_text",
_("Preview text"),
_("The text to display in order to demonstrate the selected font."),
PREVIEW_TEXT,
G_PARAM_READWRITE));
gobject_class->finalize = gtk_font_selection_finalize;
}
static void
gtk_font_selection_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkFontSelection *fontsel;
fontsel = GTK_FONT_SELECTION (object);
switch (prop_id)
{
case PROP_FONT_NAME:
gtk_font_selection_set_font_name (fontsel, g_value_get_string (value));
break;
case PROP_PREVIEW_TEXT:
gtk_font_selection_set_preview_text (fontsel, g_value_get_string (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void gtk_font_selection_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkFontSelection *fontsel;
fontsel = GTK_FONT_SELECTION (object);
switch (prop_id)
{
case PROP_FONT_NAME:
g_value_set_string (value, gtk_font_selection_get_font_name (fontsel));
break;
case PROP_FONT:
g_value_set_object (value, G_OBJECT (gtk_font_selection_get_font (fontsel)));
break;
case PROP_PREVIEW_TEXT:
g_value_set_string (value, gtk_font_selection_get_preview_text (fontsel));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_font_selection_init(GtkFontSelection *fontsel)
{
......@@ -311,6 +403,9 @@ gtk_font_selection_init(GtkFontSelection *fontsel)
fontsel->preview_entry = gtk_entry_new ();
gtk_widget_show (fontsel->preview_entry);
gtk_signal_connect (GTK_OBJECT (fontsel->preview_entry), "changed",
(GtkSignalFunc) gtk_font_selection_preview_changed,
fontsel);
gtk_widget_set_usize (fontsel->preview_entry, -1, INITIAL_PREVIEW_HEIGHT);
gtk_box_pack_start (GTK_BOX (text_box), fontsel->preview_entry,
TRUE, TRUE, 0);
......@@ -347,6 +442,12 @@ gtk_font_selection_finalize (GObject *object)
(* G_OBJECT_CLASS (font_selection_parent_class)->finalize) (object);
}
static void
gtk_font_selection_preview_changed (GtkWidget *entry,
GtkFontSelection *fontsel)
{
g_object_notify (G_OBJECT (fontsel), "preview_text");
}
/* This is called when the clist is exposed. Here we scroll to the current
font if necessary. */
......@@ -793,6 +894,8 @@ gtk_font_selection_set_font_name (GtkFontSelection *fontsel,
pango_font_description_free (fontsel->font_desc);
fontsel->font_desc = new_desc;
g_object_notify (G_OBJECT (fontsel), "font_name");
g_object_notify (G_OBJECT (fontsel), "font");
return TRUE;
}
......
......@@ -122,6 +122,7 @@ gtk_hruler_motion_notify (GtkWidget *widget,
x = event->x;
ruler->position = ruler->lower + ((ruler->upper - ruler->lower) * x) / widget->allocation.width;
g_object_notify (G_OBJECT (ruler), "position");
/* Make sure the ruler has been allocated already */
if (ruler->backing_store != NULL)
......
......@@ -25,13 +25,14 @@
*/
#include "gtkruler.h"
#include "gtkintl.h"
enum {
ARG_0,
ARG_LOWER,
ARG_UPPER,
ARG_POSITION,
ARG_MAX_SIZE
PROP_0,
PROP_LOWER,
PROP_UPPER,
PROP_POSITION,
PROP_MAX_SIZE
};
static void gtk_ruler_class_init (GtkRulerClass *klass);
......@@ -43,12 +44,14 @@ static void gtk_ruler_size_allocate (GtkWidget *widget,
static gint gtk_ruler_expose (GtkWidget *widget,
GdkEventExpose *event);
static void gtk_ruler_make_pixmap (GtkRuler *ruler);
static void gtk_ruler_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_ruler_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_ruler_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_ruler_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static GtkWidgetClass *parent_class;
......@@ -88,16 +91,18 @@ gtk_ruler_get_type (void)
static void
gtk_ruler_class_init (GtkRulerClass *class)
{
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
gobject_class = G_OBJECT_CLASS (class);
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
parent_class = gtk_type_class (GTK_TYPE_WIDGET);
object_class->set_arg = gtk_ruler_set_arg;
object_class->get_arg = gtk_ruler_get_arg;
gobject_class->set_property = gtk_ruler_set_property;
gobject_class->get_property = gtk_ruler_get_property;
widget_class->realize = gtk_ruler_realize;
widget_class->unrealize = gtk_ruler_unrealize;
......@@ -107,14 +112,45 @@ gtk_ruler_class_init (GtkRulerClass *class)
class->draw_ticks = NULL;
class->draw_pos = NULL;
gtk_object_add_arg_type ("GtkRuler::lower", GTK_TYPE_DOUBLE,
GTK_ARG_READWRITE, ARG_LOWER);
gtk_object_add_arg_type ("GtkRuler::upper", GTK_TYPE_DOUBLE,
GTK_ARG_READWRITE, ARG_UPPER);
gtk_object_add_arg_type ("GtkRuler::position", GTK_TYPE_DOUBLE,
GTK_ARG_READWRITE, ARG_POSITION);
gtk_object_add_arg_type ("GtkRuler::max_size", GTK_TYPE_DOUBLE,
GTK_ARG_READWRITE, ARG_MAX_SIZE);
g_object_class_install_property (gobject_class,
PROP_LOWER,
g_param_spec_double ("lower",
_("Lower"),
_("Lower limit of ruler"),
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_UPPER,
g_param_spec_double ("upper",
_("Upper"),
_("Upper limit of ruler"),
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_POSITION,
g_param_spec_double ("position",
_("Position"),
_("Position of mark on the ruler"),
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_MAX_SIZE,
g_param_spec_double ("max_size",
_("Max Size"),
_("Maximum size of the ruler"),
-G_MAXDOUBLE,
G_MAXDOUBLE,
0.0,
G_PARAM_READWRITE));
}
static void
......@@ -134,56 +170,58 @@ gtk_ruler_init (GtkRuler *ruler)
}
static void
gtk_ruler_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
gtk_ruler_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkRuler *ruler = GTK_RULER (object);
switch (arg_id)
switch (prop_id)
{
case ARG_LOWER:
gtk_ruler_set_range (ruler, GTK_VALUE_DOUBLE (*arg), ruler->upper,
case PROP_LOWER:
gtk_ruler_set_range (ruler, g_value_get_double (value), ruler->upper,
ruler->position, ruler->max_size);
break;
case ARG_UPPER:
gtk_ruler_set_range (ruler, ruler->lower, GTK_VALUE_DOUBLE (*arg),
case PROP_UPPER:
gtk_ruler_set_range (ruler, ruler->lower, g_value_get_double (value),
ruler->position, ruler->max_size);
break;
case ARG_POSITION:
case PROP_POSITION:
gtk_ruler_set_range (ruler, ruler->lower, ruler->upper,
GTK_VALUE_DOUBLE (*arg), ruler->max_size);
g_value_get_double (value), ruler->max_size);
break;
case ARG_MAX_SIZE:
case PROP_MAX_SIZE:
gtk_ruler_set_range (ruler, ruler->lower, ruler->upper,
ruler->position, GTK_VALUE_DOUBLE (*arg));
ruler->position, g_value_get_double (value));
break;
}
}
static void
gtk_ruler_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
gtk_ruler_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkRuler *ruler = GTK_RULER (object);
switch (arg_id)
switch (prop_id)
{
case ARG_LOWER:
GTK_VALUE_DOUBLE (*arg) = ruler->lower;
case PROP_LOWER:
g_value_set_double (value, ruler->lower);
break;
case ARG_UPPER:
GTK_VALUE_DOUBLE (*arg) = ruler->upper;
case PROP_UPPER:
g_value_set_double (value, ruler->upper);
break;
case ARG_POSITION:
GTK_VALUE_DOUBLE (*arg) = ruler->position;
case PROP_POSITION:
g_value_set_double (value, ruler->position);
break;
case ARG_MAX_SIZE:
GTK_VALUE_DOUBLE (*arg) = ruler->max_size;
case PROP_MAX_SIZE:
g_value_set_double (value, ruler->max_size);
break;
default:
arg->type = GTK_TYPE_INVALID;
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
......@@ -211,10 +249,26 @@ gtk_ruler_set_range (GtkRuler *ruler,
g_return_if_fail (ruler != NULL);
g_return_if_fail (GTK_IS_RULER (ruler));
ruler->lower = lower;
ruler->upper = upper;
ruler->position = position;
ruler->max_size = max_size;
if (ruler->lower != lower)
{
ruler->lower = lower;
g_object_notify (G_OBJECT (ruler), "lower");
}
if (ruler->upper != upper)
{
ruler->upper = upper;
g_object_notify (G_OBJECT (ruler), "upper");
}
if (ruler->position != position)
{
ruler->position = position;
g_object_notify (G_OBJECT (ruler), "position");
}
if (ruler->max_size != max_size)
{
ruler->max_size = max_size;
g_object_notify (G_OBJECT (ruler), "max_size");
}
if (GTK_WIDGET_DRAWABLE (ruler))
gtk_widget_queue_draw (GTK_WIDGET (ruler));
......
......@@ -35,6 +35,7 @@
#include "gtktext.h"
#include "line-wrap.xbm"
#include "line-arrow.xbm"
#include "gtkintl.h"
#define INITIAL_BUFFER_SIZE 1024
......@@ -95,11 +96,11 @@
#define CACHE_DATA(c) (*(LineParams*)(c)->data)
enum {
ARG_0,
ARG_HADJUSTMENT,
ARG_VADJUSTMENT,
ARG_LINE_WRAP,
ARG_WORD_WRAP
PROP_0,
PROP_HADJUSTMENT,
PROP_VADJUSTMENT,
PROP_LINE_WRAP,
PROP_WORD_WRAP
};
typedef struct _TextProperty TextProperty;
......@@ -195,12 +196,14 @@ struct _LineParams
static void gtk_text_class_init (GtkTextClass *klass);
static void gtk_text_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_text_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id);
static void gtk_text_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec);
static void gtk_text_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec);
static void gtk_text_init (GtkText *text);
static void gtk_text_destroy (GtkObject *object);
static void gtk_text_finalize (GObject *object);
......@@ -533,20 +536,21 @@ gtk_text_get_type (void)
static void
gtk_text_class_init (GtkTextClass *class)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (class);
GObjectClass *gobject_class;
GtkObjectClass *object_class;
GtkWidgetClass *widget_class;
GtkOldEditableClass *old_editable_class;
gobject_class = G_OBJECT_CLASS (class);
object_class = (GtkObjectClass*) class;
widget_class = (GtkWidgetClass*) class;
old_editable_class = (GtkOldEditableClass*) class;
parent_class = gtk_type_class (GTK_TYPE_OLD_EDITABLE);
gobject_class->finalize = gtk_text_finalize;
object_class->set_arg = gtk_text_set_arg;
object_class->get_arg = gtk_text_get_arg;
gobject_class->set_property = gtk_text_set_property;
gobject_class->get_property = gtk_text_get_property;
object_class->destroy = gtk_text_destroy;
widget_class->realize = gtk_text_realize;
......@@ -584,23 +588,38 @@ gtk_text_class_init (GtkTextClass *class)
class->set_scroll_adjustments = gtk_text_set_adjustments;
gtk_object_add_arg_type ("GtkText::hadjustment",
GTK_TYPE_ADJUSTMENT,
GTK_ARG_READWRITE,
ARG_HADJUSTMENT);
gtk_object_add_arg_type ("GtkText::vadjustment",
GTK_TYPE_ADJUSTMENT,
GTK_ARG_READWRITE,
ARG_VADJUSTMENT);
gtk_object_add_arg_type ("GtkText::line_wrap",
GTK_TYPE_BOOL,
GTK_ARG_READWRITE,
ARG_LINE_WRAP);
gtk_object_add_arg_type ("GtkText::word_wrap",
GTK_TYPE_BOOL,
GTK_ARG_READWRITE,
ARG_WORD_WRAP);
g_object_class_install_property (gobject_class,
PROP_HADJUSTMENT,
g_param_spec_object ("hadjustment",
_("Horizontal Adjustment"),
_("Horizontal adjustment for the text widget"),
GTK_TYPE_ADJUSTMENT,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_VADJUSTMENT,
g_param_spec_object ("vadjustment",
_("Vertical Adjustment"),
_("Vertical adjustment for the text widget"),
GTK_TYPE_ADJUSTMENT,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_LINE_WRAP,
g_param_spec_boolean ("line_wrap",
_("Line Wrap"),
_("Whether lines are wrapped at widget edges"),
TRUE,
G_PARAM_READWRITE));
g_object_class_install_property (gobject_class,
PROP_WORD_WRAP,
g_param_spec_boolean ("word_wrap",
_("Word Wrap"),
_("Whether words are wrapped at widget edges"),
FALSE,
G_PARAM_READWRITE));
widget_class->set_scroll_adjustments_signal =
gtk_signal_new ("set_scroll_adjustments",
GTK_RUN_LAST,
......@@ -611,62 +630,65 @@ gtk_text_class_init (GtkTextClass *class)
}
static void
gtk_text_set_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
gtk_text_set_property (GObject *object,
guint prop_id,
const GValue *value,
GParamSpec *pspec)
{
GtkText *text;
text = GTK_TEXT (object);
switch (arg_id)
switch (prop_id)
{
case ARG_HADJUSTMENT:
case PROP_HADJUSTMENT:
gtk_text_set_adjustments (text,
GTK_VALUE_POINTER (*arg),
g_value_get_object (value),
text->vadj);
break;
case ARG_VADJUSTMENT:
case PROP_VADJUSTMENT:
gtk_text_set_adjustments (text,
text->hadj,
GTK_VALUE_POINTER (*arg));
g_value_get_object (value));
break;
case ARG_LINE_WRAP:
gtk_text_set_line_wrap (text, GTK_VALUE_BOOL (*arg));
case PROP_LINE_WRAP:
gtk_text_set_line_wrap (text, g_value_get_boolean (value));
break;
case ARG_WORD_WRAP:
gtk_text_set_word_wrap (text, GTK_VALUE_BOOL (*arg));
case PROP_WORD_WRAP:
gtk_text_set_word_wrap (text, g_value_get_boolean (value));
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
static void
gtk_text_get_arg (GtkObject *object,
GtkArg *arg,
guint arg_id)
gtk_text_get_property (GObject *object,
guint prop_id,
GValue *value,
GParamSpec *pspec)
{
GtkText *text;
text = GTK_TEXT (object);
switch (arg_id)
switch (prop_id)
{
case ARG_HADJUSTMENT:
GTK_VALUE_POINTER (*arg) = text->hadj;
case PROP_HADJUSTMENT:
g_value_set_object (value, text->hadj);
break;
case ARG_VADJUSTMENT:
GTK_VALUE_POINTER (*arg) = text->vadj;
case PROP_VADJUSTMENT:
g_value_set_object (value, text->vadj);
break;
case ARG_LINE_WRAP:
GTK_VALUE_BOOL (*arg) = text->line_wrap;
case PROP_LINE_WRAP:
g_value_set_boolean (value, text->line_wrap);
break;
case ARG_WORD_WRAP:
GTK_VALUE_BOOL (*arg) = text->word_wrap;
case PROP_WORD_WRAP:
g_value_set_boolean (value, text->word_wrap);
break;
default:
arg->type = GTK_TYPE_INVALID;
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
break;
}
}
......@@ -757,6 +779,8 @@ gtk_text_set_word_wrap (GtkText *text,
recompute_geometry (text);
gtk_widget_queue_draw (GTK_WIDGET (text));
}
g_object_notify (G_OBJECT (text), "word_wrap");
}