- GtkWidgetClass *widget_class = GTK_WIDGET_CLASS(caption_class);
- GObjectClass *gobject_class = G_OBJECT_CLASS(caption_class);
- GtkContainerClass *container_class = GTK_CONTAINER_CLASS(caption_class);
-
- parent_class = g_type_class_peek_parent( caption_class );
-
- g_type_class_add_private( caption_class, sizeof(HildonCaptionPrivate) );
-
- /* Override virtual functions */
- gobject_class->get_property = hildon_caption_get_property;
- gobject_class->set_property = hildon_caption_set_property;
-
- caption_class->activate = (gpointer) hildon_caption_activate;
-
- GTK_OBJECT_CLASS(caption_class)->destroy = hildon_caption_destroy;
-
- container_class->forall = hildon_caption_forall;
- container_class->set_child_property = hildon_caption_set_child_property;
- container_class->get_child_property = hildon_caption_get_child_property;
-
- widget_class->expose_event = hildon_caption_expose;
- widget_class->hierarchy_changed = hildon_caption_hierarchy_changed;
- widget_class->size_request = hildon_caption_size_request;
- widget_class->size_allocate = hildon_caption_size_allocate;
- widget_class->button_press_event = hildon_caption_button_press;
-
- /* Create new signals and properties */
- widget_class->activate_signal = g_signal_new( "activate",
- G_OBJECT_CLASS_TYPE(
- gobject_class),
- G_SIGNAL_RUN_FIRST |
- G_SIGNAL_ACTION,
- G_STRUCT_OFFSET( HildonCaptionClass,
- activate), NULL, NULL,
- gtk_marshal_VOID__VOID,
- G_TYPE_NONE, 0);
-
- /**
- * HildonCaption:label:
- *
- * Caption label.
- */
- g_object_class_install_property( gobject_class, PROP_LABEL,
- g_param_spec_string("label",
- "Current label", "Caption label",
- NULL, G_PARAM_READABLE | G_PARAM_WRITABLE) );
-
- /**
- * HildonCaption:icon:
- *
- * The icon shown on the caption area.
- */
- g_object_class_install_property( gobject_class, PROP_ICON,
- g_param_spec_object("icon",
- "Current icon",
- "The icon shown on the caption area",
- GTK_TYPE_WIDGET, G_PARAM_READABLE |
- G_PARAM_WRITABLE) );
- /**
- * HildonCaption:status:
- *
- * Mandatory or optional status.
- */
- g_object_class_install_property( gobject_class, PROP_STATUS,
- g_param_spec_enum("status",
- "Current status",
- "Mandatory or optional status",
- HILDON_TYPE_CAPTION_STATUS,
- HILDON_CAPTION_OPTIONAL,
- G_PARAM_READABLE | G_PARAM_WRITABLE) );
- /**
- * HildonCaption:icon-position:
- *
- * If the icon is positioned on the left or right side.
- *
- * Since: 0.14.5
- */
- g_object_class_install_property( gobject_class, PROP_ICON_POSITION,
- g_param_spec_enum("icon-position",
- "Icon position",
- "If the icon is on the left or right side",
- HILDON_TYPE_CAPTION_ICON_POSITION,
- HILDON_CAPTION_POSITION_RIGHT,
- G_PARAM_READABLE | G_PARAM_WRITABLE) );
-
- /**
- * HildonCaption:size_group:
- *
- * Current size group the caption is in.
- */
- g_object_class_install_property( gobject_class, PROP_SIZE_GROUP,
- g_param_spec_object("size_group",
- "Current size group",
- "Current size group the caption is in",
- GTK_TYPE_SIZE_GROUP, G_PARAM_READABLE |
- G_PARAM_WRITABLE) );
-
- /**
- * HildonCaption:separator:
- *
- * The current separator.
- */
- g_object_class_install_property( gobject_class, PROP_SEPARATOR,
- g_param_spec_string("separator",
- "Current separator", "Current separator",
- _("ecdg_ti_caption_separator"),
- G_PARAM_READABLE | G_PARAM_WRITABLE) );
-
- /* Create child properties. These are related to
- child <-> parent relationship, not to either of objects itself */
- gtk_container_class_install_child_property (container_class,
- CHILD_PROP_EXPAND,
- g_param_spec_boolean ("expand",
- "Same as GtkBox expand.",
- "Same as GtkBox expand. Wheter the child should be expanded or not.",
- FALSE,
- G_PARAM_READWRITE));
+ GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (caption_class);
+ GObjectClass *gobject_class = G_OBJECT_CLASS (caption_class);
+ GtkContainerClass *container_class = GTK_CONTAINER_CLASS (caption_class);
+
+ parent_class = g_type_class_peek_parent (caption_class);
+
+ g_type_class_add_private (caption_class, sizeof (HildonCaptionPrivate));
+
+ /* Override virtual functions */
+ gobject_class->get_property = hildon_caption_get_property;
+ gobject_class->set_property = hildon_caption_set_property;
+ caption_class->activate = (gpointer) hildon_caption_activate;
+ GTK_OBJECT_CLASS(caption_class)->destroy = hildon_caption_destroy;
+
+ container_class->forall = hildon_caption_forall;
+ container_class->set_child_property = hildon_caption_set_child_property;
+ container_class->get_child_property = hildon_caption_get_child_property;
+
+ widget_class->expose_event = hildon_caption_expose;
+ widget_class->hierarchy_changed = hildon_caption_hierarchy_changed;
+ widget_class->size_request = hildon_caption_size_request;
+ widget_class->size_allocate = hildon_caption_size_allocate;
+ widget_class->button_press_event = hildon_caption_button_press;
+ widget_class->grab_focus = hildon_caption_grab_focus;
+
+ /* Create new signals and properties */
+ widget_class->activate_signal = g_signal_new ("activate",
+ G_OBJECT_CLASS_TYPE (
+ gobject_class),
+ G_SIGNAL_RUN_FIRST |
+ G_SIGNAL_ACTION,
+ G_STRUCT_OFFSET (HildonCaptionClass,
+ activate), NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+
+ /**
+ * HildonCaption:label:
+ *
+ * Caption label.
+ */
+ g_object_class_install_property (gobject_class, PROP_LABEL,
+ g_param_spec_string ("label",
+ "Current label", "Caption label",
+ NULL, G_PARAM_READABLE | G_PARAM_WRITABLE) );
+
+ /**
+ * HildonCaption:markup:
+ *
+ * Caption markup. Mutually exclusive with label.
+ */
+ g_object_class_install_property (gobject_class, PROP_MARKUP,
+ g_param_spec_string ("markup",
+ "Current markup", "Caption markup",
+ NULL, G_PARAM_WRITABLE) );
+
+ /**
+ * HildonCaption:icon:
+ *
+ * The icon shown on the caption area.
+ */
+ g_object_class_install_property (gobject_class, PROP_ICON,
+ g_param_spec_object ("icon",
+ "Current icon",
+ "The icon shown on the caption area",
+ GTK_TYPE_WIDGET, G_PARAM_READABLE |
+ G_PARAM_WRITABLE) );
+ /**
+ * HildonCaption:status:
+ *
+ * Mandatory or optional status.
+ */
+ g_object_class_install_property (gobject_class, PROP_STATUS,
+ g_param_spec_enum ("status",
+ "Current status",
+ "Mandatory or optional status",
+ HILDON_TYPE_CAPTION_STATUS,
+ HILDON_CAPTION_OPTIONAL,
+ G_PARAM_READABLE | G_PARAM_WRITABLE) );
+ /**
+ * HildonCaption:icon-position:
+ *
+ * If the icon is positioned on the left or right side.
+ */
+ g_object_class_install_property (gobject_class, PROP_ICON_POSITION,
+ g_param_spec_enum ("icon-position",
+ "Icon position",
+ "If the icon is on the left or right side",
+ HILDON_TYPE_CAPTION_ICON_POSITION,
+ HILDON_CAPTION_POSITION_RIGHT,
+ G_PARAM_READABLE | G_PARAM_WRITABLE) );
+
+ /**
+ * HildonCaption:size_group:
+ *
+ * Current size group the caption is in.
+ */
+ g_object_class_install_property (gobject_class, PROP_SIZE_GROUP,
+ g_param_spec_object ("size_group",
+ "Current size group",
+ "Current size group the caption is in",
+ GTK_TYPE_SIZE_GROUP, G_PARAM_READABLE |
+ G_PARAM_WRITABLE) );
+
+ /**
+ * HildonCaption:separator:
+ *
+ * The current separator.
+ */
+ g_object_class_install_property (gobject_class, PROP_SEPARATOR,
+ g_param_spec_string ("separator",
+ "Current separator", "Current separator",
+ _("ecdg_ti_caption_separator"),
+ G_PARAM_READABLE | G_PARAM_WRITABLE) );
+
+ /* Create child properties. These are related to
+ child <-> parent relationship, not to either of objects itself */
+ gtk_container_class_install_child_property (container_class,
+ CHILD_PROP_EXPAND,
+ g_param_spec_boolean ("expand",
+ "Same as GtkBox expand.",
+ "Same as GtkBox expand. Wheter the child should be expanded or not.",
+ FALSE,
+ G_PARAM_READWRITE));