pidgin/pidgin

83e6692c76a3
Parents 82d458ea7c87
Children 6032b86cb76b
Change the credential provider row active indicator to a CheckButton

Because I noticed that Adw has a style that is for this sort of thing.

Testing Done:
Opened Credential prefs, and changed selected provider. Also checked that clicking the check button didn't accidentally change its state without changing the row, and that it could not be selected by keyboard separately from the row.

Reviewed at https://reviews.imfreedom.org/r/1775/
--- a/pidgin/prefs/pidgincredentialproviderrow.c Fri Sep 16 01:19:04 2022 -0500
+++ b/pidgin/prefs/pidgincredentialproviderrow.c Fri Sep 16 01:54:11 2022 -0500
@@ -203,7 +203,7 @@
pidgin_credential_provider_row_get_active(PidginCredentialProviderRow *row) {
g_return_val_if_fail(PIDGIN_IS_CREDENTIAL_PROVIDER_ROW(row), FALSE);
- return gtk_widget_get_visible(row->active);
+ return gtk_check_button_get_active(GTK_CHECK_BUTTON(row->active));
}
void
@@ -212,7 +212,7 @@
{
g_return_if_fail(PIDGIN_IS_CREDENTIAL_PROVIDER_ROW(row));
- gtk_widget_set_visible(row->active, active);
+ gtk_check_button_set_active(GTK_CHECK_BUTTON(row->active), active);
g_object_notify_by_pspec(G_OBJECT(row), properties[PROP_ACTIVE]);
}
--- a/pidgin/resources/Prefs/credentialprovider.ui Fri Sep 16 01:19:04 2022 -0500
+++ b/pidgin/resources/Prefs/credentialprovider.ui Fri Sep 16 01:54:11 2022 -0500
@@ -47,13 +47,11 @@
</object>
</child>
<child>
- <object class="GtkImage" id="active">
+ <object class="GtkCheckButton" id="active">
+ <property name="can-target">0</property>
+ <property name="css-classes">selection-mode</property>
+ <property name="focusable">0</property>
<property name="valign">center</property>
- <property name="margin-start">6</property>
- <property name="margin-end">6</property>
- <property name="margin-top">6</property>
- <property name="margin-bottom">6</property>
- <property name="icon-name">emblem-default-symbolic</property>
</object>
</child>
</template>