Skip to content

Commit

Permalink
AppSettingsView: fix row activation (#227)
Browse files Browse the repository at this point in the history
  • Loading branch information
danirabbit authored Apr 13, 2024
1 parent 09bdbf5 commit c026a44
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
12 changes: 12 additions & 0 deletions src/Permissions/Widgets/AppSettingsView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,18 @@ public class Permissions.Widgets.AppSettingsView : Switchboard.SettingsPage {

update_view ();

permission_box.row_activated.connect ((row) => {
if (row is PermissionSettingsWidget) {
row.active = !row.active;
}
});

sandbox_box.row_activated.connect ((row) => {
if (row is PermissionSettingsWidget) {
row.active = !row.active;
}
});

reset_button.clicked.connect (() => {
if (selected_app != null) {
selected_app.reset_settings_to_standard ();
Expand Down
4 changes: 0 additions & 4 deletions src/Permissions/Widgets/PermissionSettingsWidget.vala
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,5 @@ public class Permissions.Widgets.PermissionSettingsWidget : Gtk.ListBoxRow {
child = grid;

bind_property ("active", allow_switch, "active", BIDIRECTIONAL);

activate.connect (() => {
allow_switch.activate ();
});
}
}

0 comments on commit c026a44

Please sign in to comment.