summaryrefslogtreecommitdiff
path: root/panels/common/cc-list-row.c
diff options
context:
space:
mode:
Diffstat (limited to 'panels/common/cc-list-row.c')
-rw-r--r--panels/common/cc-list-row.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/panels/common/cc-list-row.c b/panels/common/cc-list-row.c
index 20ee00260..a17aadd02 100644
--- a/panels/common/cc-list-row.c
+++ b/panels/common/cc-list-row.c
@@ -58,6 +58,7 @@ enum {
PROP_ICON_NAME,
PROP_SHOW_SWITCH,
PROP_ACTIVE,
+ PROP_BOLD,
PROP_USE_UNDERLINE,
N_PROPS
};
@@ -141,6 +142,8 @@ cc_list_row_set_property (GObject *object,
GParamSpec *pspec)
{
CcListRow *self = (CcListRow *)object;
+ PangoAttrList *attributes;
+ PangoAttribute *attribute;
gint margin;
switch (prop_id)
@@ -192,6 +195,24 @@ cc_list_row_set_property (GObject *object,
cc_list_row_switch_active_cb, self);
break;
+ case PROP_BOLD:
+ if (g_value_get_boolean (value))
+ attribute = pango_attr_weight_new (PANGO_WEIGHT_BOLD);
+ else
+ attribute = pango_attr_weight_new (PANGO_WEIGHT_NORMAL);
+
+ attributes = gtk_label_get_attributes (self->title);
+
+ if (!attributes)
+ attributes = pango_attr_list_new ();
+ else
+ pango_attr_list_ref (attributes);
+
+ pango_attr_list_change (attributes, attribute);
+ gtk_label_set_attributes (self->title, attributes);
+ pango_attr_list_unref (attributes);
+ break;
+
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
}
@@ -248,6 +269,13 @@ cc_list_row_class_init (CcListRowClass *klass)
FALSE,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ properties[PROP_BOLD] =
+ g_param_spec_boolean ("bold",
+ "Bold",
+ "Whether title is bold or not",
+ FALSE,
+ G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+
properties[PROP_USE_UNDERLINE] =
g_param_spec_boolean ("use-underline",
"Use underline",