[gtk/checkbutton-fixes: 2/3] checkbutton: Simplify some code
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/checkbutton-fixes: 2/3] checkbutton: Simplify some code
- Date: Tue, 1 Sep 2020 19:27:02 +0000 (UTC)
commit 47ee249cce835ea156c4ea01544edbb52712c73a
Author: Matthias Clasen <mclasen redhat com>
Date: Tue Sep 1 15:24:55 2020 -0400
checkbutton: Simplify some code
We always have an indicator now, so no need
to check if it exists.
gtk/gtkcheckbutton.c | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkcheckbutton.c b/gtk/gtkcheckbutton.c
index d7ba59c63e..8da36398d2 100644
--- a/gtk/gtkcheckbutton.c
+++ b/gtk/gtkcheckbutton.c
@@ -805,9 +805,8 @@ gtk_check_button_set_group (GtkCheckButton *self,
priv->group_prev = NULL;
g_object_notify_by_pspec (G_OBJECT (self), props[PROP_GROUP]);
- if (priv->indicator_widget)
- gtk_css_node_set_name (gtk_widget_get_css_node (priv->indicator_widget),
- g_quark_from_static_string("check"));
+ gtk_css_node_set_name (gtk_widget_get_css_node (priv->indicator_widget),
+ g_quark_from_static_string("check"));
return;
}
@@ -827,10 +826,6 @@ gtk_check_button_set_group (GtkCheckButton *self,
group_priv->group_prev = self;
priv->group_next = group;
- if (priv->indicator_widget)
- gtk_css_node_set_name (gtk_widget_get_css_node (priv->indicator_widget),
- g_quark_from_static_string("radio"));
-
gtk_css_node_set_name (gtk_widget_get_css_node (group_priv->indicator_widget),
g_quark_from_static_string("radio"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]