summaryrefslogtreecommitdiff
path: root/panels/common
diff options
context:
space:
mode:
authorMohammed Sadiq <sadiq@sadiqpk.org>2022-11-17 18:14:14 +0530
committerMohammed Sadiq <sadiq@sadiqpk.org>2022-11-18 04:08:22 +0000
commitc917fa73c3ed68b815ac1bac3e1be6f5256e5b08 (patch)
treee7509e83e1c4e62094263f7bf344a3f2a9611acb /panels/common
parent57405b83d24027ce5f387093fc5c1b9970582e5e (diff)
downloadgnome-control-center-c917fa73c3ed68b815ac1bac3e1be6f5256e5b08.tar.gz
common: Don't Handle list-row switch state manually
This was a hack added for libhandy-0, which is no longer required. Also, this hack results in the switch not working when gtk animations are turned off.
Diffstat (limited to 'panels/common')
-rw-r--r--panels/common/cc-list-row.c45
-rw-r--r--panels/common/cc-list-row.h1
2 files changed, 0 insertions, 46 deletions
diff --git a/panels/common/cc-list-row.c b/panels/common/cc-list-row.c
index e27d30919..6dc438837 100644
--- a/panels/common/cc-list-row.c
+++ b/panels/common/cc-list-row.c
@@ -62,36 +62,6 @@ enum {
static GParamSpec *properties[N_PROPS];
static void
-cc_list_row_activated_cb (CcListRow *self,
- GtkListBoxRow *row)
-{
- g_assert (CC_IS_LIST_ROW (self));
-
- if (!self->show_switch || row != GTK_LIST_BOX_ROW (self))
- return;
-
- cc_list_row_activate (self);
-}
-
-static void
-cc_list_row_parent_changed_cb (CcListRow *self)
-{
- GtkWidget *parent;
-
- g_assert (CC_IS_LIST_ROW (self));
-
- parent = gtk_widget_get_parent (GTK_WIDGET (self));
-
- if (!parent)
- return;
-
- g_return_if_fail (GTK_IS_LIST_BOX (parent));
- g_signal_connect_object (parent, "row-activated",
- G_CALLBACK (cc_list_row_activated_cb),
- self, G_CONNECT_SWAPPED);
-}
-
-static void
cc_list_row_switch_active_cb (CcListRow *self)
{
gboolean switch_active;
@@ -228,9 +198,6 @@ cc_list_row_init (CcListRow *self)
g_resources_register (cc_common_get_resource ());
gtk_widget_init_template (GTK_WIDGET (self));
- g_signal_connect_object (self, "notify::parent",
- G_CALLBACK (cc_list_row_parent_changed_cb),
- self, G_CONNECT_SWAPPED);
}
void
@@ -273,18 +240,6 @@ cc_list_row_get_active (CcListRow *self)
}
void
-cc_list_row_activate (CcListRow *self)
-{
- g_return_if_fail (CC_IS_LIST_ROW (self));
- g_return_if_fail (self->show_switch);
-
- self->switch_active = !self->switch_active;
- g_object_notify_by_pspec (G_OBJECT (self), properties[PROP_ACTIVE]);
-
- gtk_widget_activate (GTK_WIDGET (self->enable_switch));
-}
-
-void
cc_list_row_set_secondary_label (CcListRow *self,
const gchar *label)
{
diff --git a/panels/common/cc-list-row.h b/panels/common/cc-list-row.h
index b83582400..6e4c62e74 100644
--- a/panels/common/cc-list-row.h
+++ b/panels/common/cc-list-row.h
@@ -37,7 +37,6 @@ void cc_list_row_set_show_arrow (CcListRow *self,
void cc_list_row_set_show_switch (CcListRow *self,
gboolean show_switch);
gboolean cc_list_row_get_active (CcListRow *self);
-void cc_list_row_activate (CcListRow *self);
void cc_list_row_set_secondary_label (CcListRow *self,
const gchar *label);
void cc_list_row_set_secondary_markup (CcListRow *self,