GtkSourceView default property values
- From: Jeff Franks <jcf tpg com au>
- To: Gnome Devtools list <gnome-devtools gnome org>
- Subject: GtkSourceView default property values
- Date: Mon, 02 Jun 2003 20:56:09 +1000
Hi,
I'm a little confused with GtkSourceView's default property values. When
the properties are installed in gtk_source_view_class_init() the default
values are specified as:
PROP_SHOW_LINE_NUMBERS = FALSE
PROP_SHOW_LINE_MARKERS = FALSE
PROP_TABS_WIDTH = DEFAULT_TAB_WIDTH
PROP_AUTO_INDENT = FALSE
PROP_INSERT_SPACES = FALSE
PROP_SHOW_MARGIN = FALSE
PROP_MARGIN = DEFAULT_MARGIN
PROP_SMART_HOME_END = TRUE
then, in gtk_source_view_init() the following properties are explicitly set:
view->priv->tabs_width = DEFAULT_TAB_WIDTH
view->priv->margin = DEFAULT_MARGIN
view->priv->smart_home_end = TRUE
but the view->priv->show_line_number, view->priv->show_line_markers,
view->priv->auto_indent, view->priv->insert_spaces and,
view->priv->show_margin properties are not. From the property
installation functions you would assume these five properties should all
be disabled by default, but they're not. When you create a new
GtkSourceView and don't call any property 'set' functions the source
view widget is created with line numbers, markers, show margin, auto
indent and insert spaces are all enabled. This means you have to call a
'set' function to explictly disable a property you don't want enabled.
It seems more natural to me to initially call a 'set' function to enable
a property rather than disable it. If this is reasonable should these
five propeties be set to FALSE in gtk_source_view_init().
Regards,
Jeff Franks.
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]