list-row: Add API to set sensitivity of switch
This commit is contained in:
parent
08defd6ec5
commit
ca7002b0ae
2 changed files with 11 additions and 0 deletions
|
@ -388,3 +388,12 @@ cc_list_row_set_secondary_markup (CcListRow *self,
|
|||
gtk_label_set_markup (self->secondary_label, markup);
|
||||
g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_SECONDARY_LABEL]);
|
||||
}
|
||||
|
||||
void
|
||||
cc_list_row_set_switch_sensitive (CcListRow *self,
|
||||
gboolean sensitive)
|
||||
{
|
||||
g_return_if_fail (CC_IS_LIST_ROW (self));
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (self->enable_switch), sensitive);
|
||||
}
|
||||
|
|
|
@ -41,5 +41,7 @@ void cc_list_row_set_secondary_label (CcListRow *self,
|
|||
const gchar *label);
|
||||
void cc_list_row_set_secondary_markup (CcListRow *self,
|
||||
const gchar *markup);
|
||||
void cc_list_row_set_switch_sensitive (CcListRow *self,
|
||||
gboolean sensitive);
|
||||
|
||||
G_END_DECLS
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue