Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Housekeeping by default #182

Merged
merged 1 commit into from
Jun 25, 2020

Conversation

meisenzahl
Copy link
Member

Closes #178

@meisenzahl
Copy link
Member Author

...
construct {
        var settings = new GLib.Settings ("org.gnome.desktop.privacy");

        description = _("Old files can be automatically deleted after %u days to save space and help protect your privacy.").printf (settings.get_uint ("old-files-age"));

        var header_label = new Granite.HeaderLabel (_("Automatically Delete:"));

        var temp_switch = new Gtk.CheckButton.with_label (_("Temporary files"));
        temp_switch.margin_start = 12;

        var trash_switch = new Gtk.CheckButton.with_label (_("Trashed files"));
        trash_switch.margin_start = 12;

        custom_bin.attach (header_label, 0, 0);
        custom_bin.attach (temp_switch, 0, 1);
        custom_bin.attach (trash_switch, 0, 2);

        settings.bind ("remove-old-temp-files", temp_switch, "active", GLib.SettingsBindFlags.DEFAULT);
        settings.bind ("remove-old-trash-files", trash_switch, "active", GLib.SettingsBindFlags.DEFAULT);
    }
...

Reference: https://github.com/elementary/onboarding/blob/master/src/Views/HouseKeepingView.vala#L28

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@danirabbit danirabbit merged commit 4a1fc68 into elementary:master Jun 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Housekeeping by default
2 participants