Compare commits

...

8 Commits

Author SHA1 Message Date
Matthias Clasen
4ce4217445 privacy: Implement recent files
This relies on patches that turn the recent-files-max-age gtk
setting into an X setting which is backed by a gsetting.
2012-11-25 16:52:12 -05:00
Matthias Clasen
6d12d681c3 Fixup
Fix focus handling in the screen lock dialog - focus got stuck
in the combo box.
2012-11-25 16:16:01 -05:00
Matthias Clasen
ad3616d3c6 Fixup
Adapt to the privacy schema key name: 'stealth-mode' ended up
as 'hide-identity'.
2012-11-25 16:14:30 -05:00
Matthias Clasen
d015dd85ea privay: implement trash & temp purging
This relies on new settings and D-Bus API in the g-s-d
housekeeping plugin.
2012-11-25 13:52:54 -05:00
Matthias Clasen
66ad0a99c7 Some more padding in the dialogs 2012-11-18 00:51:18 -05:00
Matthias Clasen
ca1c4f411b privacy: implement name & visibility
Control whether the users full name is shown permanently on screen.
2012-11-18 00:44:35 -05:00
Matthias Clasen
c42584a3f9 privacy: Add screen lock
These controls duplicate what we currently have in the screen
panel - it will have to be removed there.
2012-11-17 11:23:11 -05:00
Matthias Clasen
d3c400bc08 Add a privacy panel
This adds a panel where we present information and controls
affecting the users privacy. This initial commit just puts
the framework in place, the panel itself is empty.
2012-11-17 10:51:47 -05:00
8 changed files with 1744 additions and 1 deletions

View File

@@ -132,6 +132,7 @@ PKG_CHECK_MODULES(POWER_PANEL, $COMMON_MODULES upower-glib >= 0.9.1
PKG_CHECK_MODULES(COLOR_PANEL, $COMMON_MODULES colord >= 0.1.8)
PKG_CHECK_MODULES(PRINTERS_PANEL, $COMMON_MODULES
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION)
PKG_CHECK_MODULES(PRIVACY_PANEL, $COMMON_MODULES egg-list-box)
PKG_CHECK_MODULES(REGION_PANEL, $COMMON_MODULES
polkit-gobject-1 >= $POLKIT_REQUIRED_VERSION
gnome-desktop-3.0 >= $GNOME_DESKTOP_REQUIRED_VERSION
@@ -469,6 +470,8 @@ panels/color/icons/256x256/Makefile
panels/color/icons/scalable/Makefile
panels/printers/Makefile
panels/printers/gnome-printers-panel.desktop.in
panels/privacy/Makefile
panels/privacy/gnome-privacy-panel.desktop.in
panels/network/Makefile
panels/network/gnome-network-panel.desktop.in
panels/universal-access/Makefile

View File

@@ -13,7 +13,8 @@ SUBDIRS= \
keyboard \
universal-access \
user-accounts \
datetime
datetime \
privacy
if BUILD_WACOM
SUBDIRS += wacom

View File

@@ -0,0 +1,36 @@
cappletname = privacy
INCLUDES = \
$(PANEL_CFLAGS) \
$(PRIVACY_PANEL_CFLAGS) \
-DGNOMECC_UI_DIR="\"$(uidir)\"" \
-DGNOMELOCALEDIR="\"$(datadir)/locale\"" \
-DGNOMECC_DATA_DIR="\"$(pkgdatadir)\"" \
-DDATADIR="\"$(datadir)\"" \
-I$(top_srcdir)/panels/common/ \
$(NULL)
ccpanelsdir = $(PANELS_DIR)
ccpanels_LTLIBRARIES = libprivacy.la
libprivacy_la_SOURCES = \
privacy-module.c \
cc-privacy-panel.c \
cc-privacy-panel.h
libprivacy_la_LIBADD = $(PANEL_LIBS) $(PRIVACY_PANEL_LIBS)
libprivacy_la_LDFLAGS = $(PANEL_LDFLAGS)
uidir = $(pkgdatadir)/ui
dist_ui_DATA = \
privacy.ui
@INTLTOOL_DESKTOP_RULE@
desktopdir = $(datadir)/applications
desktop_in_files = gnome-privacy-panel.desktop.in
desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
CLEANFILES = $(desktop_in_files) $(desktop_DATA)
-include $(top_srcdir)/git.mk

View File

@@ -0,0 +1,709 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2012 Red Hat, Inc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Author: Matthias Clasen <mclasen@redhat.com>
*/
#include "cc-privacy-panel.h"
#include <egg-list-box/egg-list-box.h>
#include <gio/gdesktopappinfo.h>
#include <glib/gi18n.h>
CC_PANEL_REGISTER (CcPrivacyPanel, cc_privacy_panel)
#define WID(s) GTK_WIDGET (gtk_builder_get_object (self->priv->builder, s))
struct _CcPrivacyPanelPrivate
{
GtkBuilder *builder;
GtkWidget *list_box;
GSettings *lockdown_settings;
GSettings *lock_settings;
GSettings *shell_settings;
GSettings *housekeeping_settings;
GSettings *privacy_settings;
};
static void
update_lock_screen_sensitivity (CcPrivacyPanel *self)
{
GtkWidget *widget;
gboolean locked;
locked = g_settings_get_boolean (self->priv->lockdown_settings, "disable-lock-screen");
widget = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "screen_lock_dialog_grid"));
gtk_widget_set_sensitive (widget, !locked);
}
static void
on_lockdown_settings_changed (GSettings *settings,
const char *key,
CcPrivacyPanel *panel)
{
if (g_str_equal (key, "disable-lock-screen") == FALSE)
return;
update_lock_screen_sensitivity (panel);
}
static gboolean
on_off_label_mapping_get (GValue *value,
GVariant *variant,
gpointer user_data)
{
g_value_set_string (value, g_variant_get_boolean (variant) ? _("On") : _("Off"));
return TRUE;
}
static GtkWidget *
get_on_off_label (GSettings *settings,
const gchar *key)
{
GtkWidget *w;
w = gtk_label_new ("");
g_settings_bind_with_mapping (settings, key,
w, "label",
G_SETTINGS_BIND_GET,
on_off_label_mapping_get,
NULL,
NULL,
NULL);
return w;
}
static gboolean
visible_label_mapping_get (GValue *value,
GVariant *variant,
gpointer user_data)
{
g_value_set_string (value, g_variant_get_boolean (variant) ? _("Hidden") : _("Visible"));
return TRUE;
}
static GtkWidget *
get_visible_label (GSettings *settings,
const gchar *key)
{
GtkWidget *w;
w = gtk_label_new ("");
g_settings_bind_with_mapping (settings, key,
w, "label",
G_SETTINGS_BIND_GET,
visible_label_mapping_get,
NULL,
NULL,
NULL);
return w;
}
typedef struct
{
GtkWidget *label;
const gchar *key1;
const gchar *key2;
} Label2Data;
static void
set_on_off_label2 (GSettings *settings,
const gchar *key,
gpointer user_data)
{
Label2Data *data = user_data;
gboolean v1, v2;
v1 = g_settings_get_boolean (settings, data->key1);
v2 = g_settings_get_boolean (settings, data->key2);
gtk_label_set_label (GTK_LABEL (data->label), (v1 || v2) ? _("On") : _("Off"));
}
static GtkWidget *
get_on_off_label2 (GSettings *settings,
const gchar *key1,
const gchar *key2)
{
Label2Data *data;
data = g_new (Label2Data, 1);
data->label = gtk_label_new ("");
data->key1 = g_strdup (key1);
data->key2 = g_strdup (key2);
g_signal_connect (settings, "changed",
G_CALLBACK (set_on_off_label2), data);
set_on_off_label2 (settings, key1, data);
return data->label;
}
static void
add_row (CcPrivacyPanel *self,
const gchar *label,
const gchar *dialog_id,
GtkWidget *status)
{
GtkWidget *box, *w;
gtk_widget_set_valign (self->priv->list_box, GTK_ALIGN_FILL);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
g_object_set_data (G_OBJECT (box), "dialog-id", (gpointer)dialog_id);
gtk_widget_set_hexpand (box, TRUE);
gtk_container_set_border_width (GTK_CONTAINER (box), 6);
gtk_container_add (GTK_CONTAINER (self->priv->list_box), box);
w = gtk_label_new (label);
gtk_container_add (GTK_CONTAINER (box), w);
gtk_box_pack_end (GTK_BOX (box), status, FALSE, FALSE, 0);
gtk_widget_show_all (box);
}
static void
lock_combo_changed_cb (GtkWidget *widget,
CcPrivacyPanel *self)
{
GtkTreeIter iter;
GtkTreeModel *model;
guint delay;
gboolean ret;
/* no selection */
ret = gtk_combo_box_get_active_iter (GTK_COMBO_BOX(widget), &iter);
if (!ret)
return;
/* get entry */
model = gtk_combo_box_get_model (GTK_COMBO_BOX(widget));
gtk_tree_model_get (model, &iter,
1, &delay,
-1);
g_settings_set (self->priv->lock_settings, "lock-delay", "u", delay);
}
static void
set_lock_value_for_combo (GtkComboBox *combo_box,
CcPrivacyPanel *self)
{
GtkTreeIter iter;
GtkTreeModel *model;
guint value;
gint value_tmp, value_prev;
gboolean ret;
guint i;
/* get entry */
model = gtk_combo_box_get_model (combo_box);
ret = gtk_tree_model_get_iter_first (model, &iter);
if (!ret)
return;
value_prev = 0;
i = 0;
/* try to make the UI match the lock setting */
g_settings_get (self->priv->lock_settings, "lock-delay", "u", &value);
do
{
gtk_tree_model_get (model, &iter,
1, &value_tmp,
-1);
if (value == value_tmp ||
(value_tmp > value_prev && value < value_tmp))
{
gtk_combo_box_set_active_iter (combo_box, &iter);
return;
}
value_prev = value_tmp;
i++;
} while (gtk_tree_model_iter_next (model, &iter));
/* If we didn't find the setting in the list */
gtk_combo_box_set_active (combo_box, i - 1);
}
static void
add_screen_lock (CcPrivacyPanel *self)
{
GtkWidget *w;
GtkWidget *dialog;
GtkWidget *label;
w = get_on_off_label (self->priv->lock_settings, "lock-enabled");
add_row (self, _("Screen Lock"), "screen_lock_dialog", w);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "screen_lock_done"));
dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "screen_lock_dialog"));
g_signal_connect_swapped (w, "clicked",
G_CALLBACK (gtk_widget_hide), dialog);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "automatic_screen_lock"));
g_settings_bind (self->priv->lock_settings, "lock-enabled",
w, "active",
G_SETTINGS_BIND_DEFAULT);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "lock_after_combo"));
g_settings_bind (self->priv->lock_settings, "lock-enabled",
w, "sensitive",
G_SETTINGS_BIND_GET);
label = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "lock_after_label"));
g_object_bind_property (w, "sensitive", label, "sensitive", G_BINDING_DEFAULT);
set_lock_value_for_combo (GTK_COMBO_BOX (w), self);
g_signal_connect (w, "changed",
G_CALLBACK (lock_combo_changed_cb), self);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "show_notifications"));
g_settings_bind (self->priv->lock_settings, "show-notifications",
w, "active",
G_SETTINGS_BIND_DEFAULT);
}
static void
stealth_mode_changed (GSettings *settings,
const gchar *key,
gpointer data)
{
CcPrivacyPanel *self = data;
gboolean stealth_mode;
GtkWidget *w;
stealth_mode = g_settings_get_boolean (settings, "hide-identity");
if (stealth_mode)
{
g_settings_set_boolean (self->priv->lock_settings, "show-full-name", FALSE);
g_settings_set_boolean (self->priv->shell_settings, "show-full-name", FALSE);
}
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "full_name_top_bar"));
gtk_widget_set_sensitive (w, !stealth_mode);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "full_name_lock_screen"));
gtk_widget_set_sensitive (w, !stealth_mode);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "full_name_top_bar_label"));
gtk_widget_set_sensitive (w, !stealth_mode);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "full_name_lock_screen_label"));
gtk_widget_set_sensitive (w, !stealth_mode);
}
static void
add_name_visibility (CcPrivacyPanel *self)
{
GtkWidget *w;
GtkWidget *dialog;
w = get_visible_label (self->priv->privacy_settings, "hide-identity");
add_row (self, _("Name & Visibility"), "name_dialog", w);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "name_done"));
dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "name_dialog"));
g_signal_connect_swapped (w, "clicked",
G_CALLBACK (gtk_widget_hide), dialog);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "stealth_mode"));
g_settings_bind (self->priv->privacy_settings, "hide-identity",
w, "active",
G_SETTINGS_BIND_DEFAULT);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "full_name_top_bar"));
g_settings_bind (self->priv->shell_settings, "show-full-name",
w, "active",
G_SETTINGS_BIND_DEFAULT);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "full_name_lock_screen"));
g_settings_bind (self->priv->lock_settings, "show-full-name",
w, "active",
G_SETTINGS_BIND_DEFAULT);
g_signal_connect (self->priv->privacy_settings, "changed::hide-identity",
G_CALLBACK (stealth_mode_changed), self);
}
static void
retain_history_combo_changed_cb (GtkWidget *widget,
CcPrivacyPanel *self)
{
GtkTreeIter iter;
GtkTreeModel *model;
gint value;
gboolean ret;
/* no selection */
ret = gtk_combo_box_get_active_iter (GTK_COMBO_BOX(widget), &iter);
if (!ret)
return;
/* get entry */
model = gtk_combo_box_get_model (GTK_COMBO_BOX(widget));
gtk_tree_model_get (model, &iter,
1, &value,
-1);
g_settings_set (self->priv->privacy_settings, "retain-recent-files-for", "i", value);
}
static void
set_retain_history_value_for_combo (GtkComboBox *combo_box,
CcPrivacyPanel *self)
{
GtkTreeIter iter;
GtkTreeModel *model;
gint value;
gint value_tmp, value_prev;
gboolean ret;
guint i;
/* get entry */
model = gtk_combo_box_get_model (combo_box);
ret = gtk_tree_model_get_iter_first (model, &iter);
if (!ret)
return;
value_prev = 0;
i = 0;
/* try to make the UI match the setting */
g_settings_get (self->priv->privacy_settings, "retain-recent-files-for", "i", &value);
do
{
gtk_tree_model_get (model, &iter,
1, &value_tmp,
-1);
if (value == value_tmp ||
(value_tmp > value_prev && value < value_tmp))
{
gtk_combo_box_set_active_iter (combo_box, &iter);
return;
}
value_prev = value_tmp;
i++;
} while (gtk_tree_model_iter_next (model, &iter));
/* If we didn't find the setting in the list */
gtk_combo_box_set_active (combo_box, i - 1);
}
static void
clear_recent (CcPrivacyPanel *self)
{
GtkRecentManager *m;
m = gtk_recent_manager_get_default ();
gtk_recent_manager_purge_items (m, NULL);
}
static void
add_usage_history (CcPrivacyPanel *self)
{
GtkWidget *w;
GtkWidget *dialog;
GtkWidget *label;
w = get_on_off_label (self->priv->privacy_settings, "keep-recent-files");
add_row (self, _("Usage & History"), "recent_dialog", w);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "recent_done"));
dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "recent_dialog"));
g_signal_connect_swapped (w, "clicked",
G_CALLBACK (gtk_widget_hide), dialog);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "recently_used_switch"));
g_settings_bind (self->priv->privacy_settings, "keep-recent-files",
w, "active",
G_SETTINGS_BIND_DEFAULT);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "retain_history_combo"));
set_retain_history_value_for_combo (GTK_COMBO_BOX (w), self);
g_signal_connect (w, "changed",
G_CALLBACK (retain_history_combo_changed_cb), self);
g_settings_bind (self->priv->privacy_settings, "keep-recent-files",
w, "sensitive",
G_SETTINGS_BIND_GET);
label = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "retain_history_label"));
g_object_bind_property (w, "sensitive", label, "sensitive", G_BINDING_DEFAULT);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "clear_recent_button"));
g_signal_connect_swapped (w, "clicked",
G_CALLBACK (clear_recent), self);
}
static void
purge_after_combo_changed_cb (GtkWidget *widget,
CcPrivacyPanel *self)
{
GtkTreeIter iter;
GtkTreeModel *model;
guint value;
gboolean ret;
/* no selection */
ret = gtk_combo_box_get_active_iter (GTK_COMBO_BOX(widget), &iter);
if (!ret)
return;
/* get entry */
model = gtk_combo_box_get_model (GTK_COMBO_BOX(widget));
gtk_tree_model_get (model, &iter,
1, &value,
-1);
g_settings_set (self->priv->housekeeping_settings, "purge-after", "u", value);
}
static void
set_purge_after_value_for_combo (GtkComboBox *combo_box,
CcPrivacyPanel *self)
{
GtkTreeIter iter;
GtkTreeModel *model;
guint value;
gint value_tmp, value_prev;
gboolean ret;
guint i;
/* get entry */
model = gtk_combo_box_get_model (combo_box);
ret = gtk_tree_model_get_iter_first (model, &iter);
if (!ret)
return;
value_prev = 0;
i = 0;
/* try to make the UI match the purge setting */
g_settings_get (self->priv->housekeeping_settings, "purge-after", "u", &value);
do
{
gtk_tree_model_get (model, &iter,
1, &value_tmp,
-1);
if (value == value_tmp ||
(value_tmp > value_prev && value < value_tmp))
{
gtk_combo_box_set_active_iter (combo_box, &iter);
return;
}
value_prev = value_tmp;
i++;
} while (gtk_tree_model_iter_next (model, &iter));
/* If we didn't find the setting in the list */
gtk_combo_box_set_active (combo_box, i - 1);
}
static void
empty_trash (CcPrivacyPanel *self)
{
GDBusConnection *bus;
bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
g_dbus_connection_call (bus,
"org.gnome.SettingsDaemon",
"/org/gnome/SettingsDaemon/Housekeeping",
"org.gnome.SettingsDaemon.Housekeeping",
"EmptyTrash",
NULL, NULL, 0, -1, NULL, NULL, NULL);
g_object_unref (bus);
}
static void
purge_temp (CcPrivacyPanel *self)
{
GDBusConnection *bus;
bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
g_dbus_connection_call (bus,
"org.gnome.SettingsDaemon",
"/org/gnome/SettingsDaemon/Housekeeping",
"org.gnome.SettingsDaemon.Housekeeping",
"RemoveTempFiles",
NULL, NULL, 0, -1, NULL, NULL, NULL);
g_object_unref (bus);
}
static void
add_trash_temp (CcPrivacyPanel *self)
{
GtkWidget *w;
GtkWidget *dialog;
w = get_on_off_label2 (self->priv->housekeeping_settings, "purge-trash", "purge-temp-files");
add_row (self, _("Purge Trash & Temporary Files"), "trash_dialog", w);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "trash_done"));
dialog = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "trash_dialog"));
g_signal_connect_swapped (w, "clicked",
G_CALLBACK (gtk_widget_hide), dialog);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "purge_trash_switch"));
g_settings_bind (self->priv->housekeeping_settings, "purge-trash",
w, "active",
G_SETTINGS_BIND_DEFAULT);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "purge_temp_switch"));
g_settings_bind (self->priv->housekeeping_settings, "purge-temp-files",
w, "active",
G_SETTINGS_BIND_DEFAULT);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "purge_after_combo"));
set_purge_after_value_for_combo (GTK_COMBO_BOX (w), self);
g_signal_connect (w, "changed",
G_CALLBACK (purge_after_combo_changed_cb), self);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "empty_trash_button"));
g_signal_connect_swapped (w, "clicked", G_CALLBACK (empty_trash), self);
w = GTK_WIDGET (gtk_builder_get_object (self->priv->builder, "purge_temp_button"));
g_signal_connect_swapped (w, "clicked", G_CALLBACK (purge_temp), self);
}
static void
cc_privacy_panel_finalize (GObject *object)
{
CcPrivacyPanelPrivate *priv = CC_PRIVACY_PANEL (object)->priv;
g_clear_object (&priv->builder);
g_clear_object (&priv->lockdown_settings);
g_clear_object (&priv->lock_settings);
g_clear_object (&priv->shell_settings);
g_clear_object (&priv->housekeeping_settings);
g_clear_object (&priv->privacy_settings);
G_OBJECT_CLASS (cc_privacy_panel_parent_class)->finalize (object);
}
static void
update_separator_func (GtkWidget **separator,
GtkWidget *child,
GtkWidget *before,
gpointer user_data)
{
if (*separator == NULL)
{
*separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
gtk_widget_show (*separator);
}
}
static void
activate_child (CcPrivacyPanel *self,
GtkWidget *child)
{
GObject *w;
const gchar *dialog_id;
GtkWidget *toplevel;
dialog_id = g_object_get_data (G_OBJECT (child), "dialog-id");
w = gtk_builder_get_object (self->priv->builder, dialog_id);
if (w == NULL)
{
g_warning ("No such dialog: %s", dialog_id);
return;
}
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (self));
gtk_window_set_transient_for (GTK_WINDOW (w), GTK_WINDOW (toplevel));
gtk_window_set_modal (GTK_WINDOW (w), TRUE);
gtk_window_present (GTK_WINDOW (w));
}
static void
cc_privacy_panel_init (CcPrivacyPanel *self)
{
GError *error;
GtkWidget *widget;
GtkWidget *scrolled_window;
guint res;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self, CC_TYPE_PRIVACY_PANEL, CcPrivacyPanelPrivate);
self->priv->builder = gtk_builder_new ();
error = NULL;
res = gtk_builder_add_from_file (self->priv->builder,
GNOMECC_UI_DIR "/privacy.ui",
&error);
if (res == 0)
{
g_warning ("Could not load interface file: %s",
(error != NULL) ? error->message : "unknown error");
g_clear_error (&error);
return;
}
scrolled_window = WID ("scrolled_window");
widget = GTK_WIDGET (egg_list_box_new ());
egg_list_box_add_to_scrolled (EGG_LIST_BOX (widget), GTK_SCROLLED_WINDOW (scrolled_window));
self->priv->list_box = widget;
gtk_widget_show (widget);
g_signal_connect_swapped (widget, "child-activated",
G_CALLBACK (activate_child), self);
egg_list_box_set_separator_funcs (EGG_LIST_BOX (widget),
update_separator_func,
NULL, NULL);
self->priv->lockdown_settings = g_settings_new ("org.gnome.desktop.lockdown");
self->priv->lock_settings = g_settings_new ("org.gnome.desktop.screensaver");
self->priv->shell_settings = g_settings_new ("org.gnome.shell");
self->priv->housekeeping_settings = g_settings_new ("org.gnome.settings-daemon.plugins.housekeeping");
self->priv->privacy_settings = g_settings_new ("org.gnome.desktop.privacy");
add_screen_lock (self);
add_name_visibility (self);
add_usage_history (self);
add_trash_temp (self);
g_signal_connect (self->priv->lockdown_settings, "changed",
G_CALLBACK (on_lockdown_settings_changed), self);
update_lock_screen_sensitivity (self);
widget = WID ("privacy_vbox");
gtk_widget_reparent (widget, (GtkWidget *) self);
}
static void
cc_privacy_panel_class_init (CcPrivacyPanelClass *klass)
{
GObjectClass *oclass = G_OBJECT_CLASS (klass);
oclass->finalize = cc_privacy_panel_finalize;
g_type_class_add_private (klass, sizeof (CcPrivacyPanelPrivate));
}
void
cc_privacy_panel_register (GIOModule *module)
{
cc_privacy_panel_register_type (G_TYPE_MODULE (module));
g_io_extension_point_implement (CC_SHELL_PANEL_EXTENSION_POINT,
CC_TYPE_PRIVACY_PANEL,
"privacy", 0);
}

View File

@@ -0,0 +1,73 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2012 Red Hat, Inc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Author: Matthias Clasen <mclasen@redhat.com>
*/
#ifndef _CC_PRIVACY_PANEL_H
#define _CC_PRIVACY_PANEL_H
#include <shell/cc-panel.h>
G_BEGIN_DECLS
#define CC_TYPE_PRIVACY_PANEL cc_privacy_panel_get_type()
#define CC_PRIVACY_PANEL(obj) \
(G_TYPE_CHECK_INSTANCE_CAST ((obj), \
CC_TYPE_PRIVACY_PANEL, CcPrivacyPanel))
#define CC_PRIVACY_PANEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_CAST ((klass), \
CC_TYPE_PRIVACY_PANEL, CcPrivacyPanelClass))
#define CC_IS_PRIVACY_PANEL(obj) \
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
CC_TYPE_PRIVACY_PANEL))
#define CC_IS_PRIVACY_PANEL_CLASS(klass) \
(G_TYPE_CHECK_CLASS_TYPE ((klass), \
CC_TYPE_PRIVACY_PANEL))
#define CC_PRIVACY_PANEL_GET_CLASS(obj) \
(G_TYPE_INSTANCE_GET_CLASS ((obj), \
CC_TYPE_PRIVACY_PANEL, CcPrivacyPanelClass))
typedef struct _CcPrivacyPanel CcPrivacyPanel;
typedef struct _CcPrivacyPanelClass CcPrivacyPanelClass;
typedef struct _CcPrivacyPanelPrivate CcPrivacyPanelPrivate;
struct _CcPrivacyPanel
{
CcPanel parent;
CcPrivacyPanelPrivate *priv;
};
struct _CcPrivacyPanelClass
{
CcPanelClass parent_class;
};
GType cc_privacy_panel_get_type (void) G_GNUC_CONST;
void cc_privacy_panel_register (GIOModule *module);
G_END_DECLS
#endif /* _CC_PRIVACY_PANEL_H */

View File

@@ -0,0 +1,18 @@
[Desktop Entry]
_Name=Privacy
_Comment=Privacy settings
Exec=gnome-control-center privacy
# FIXME
Icon=changes-prevent
Terminal=false
Type=Application
StartupNotify=true
Categories=GNOME;GTK;Settings;DesktopSettings;X-GNOME-Settings-Panel;X-GNOME-PersonalSettings
OnlyShowIn=GNOME;Unity;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Product=gnome-control-center
X-GNOME-Bugzilla-Component=privacy
X-GNOME-Bugzilla-Version=@VERSION@
X-GNOME-Settings-Panel=privacy
# Translators: those are keywords for the search control-center panel
_Keywords=screen lock;diagnostics;crash;

View File

@@ -0,0 +1,41 @@
/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*-
*
* Copyright (C) 2012 Red Hat, Inc
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*
* Author: Matthias Clasen <mclasen@redhat.com>
*/
#include <config.h>
#include "cc-privacy-panel.h"
#include <glib/gi18n-lib.h>
void
g_io_module_load (GIOModule *module)
{
bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
/* register the panel */
cc_privacy_panel_register (module);
}
void
g_io_module_unload (GIOModule *module)
{
}

862
panels/privacy/privacy.ui Normal file
View File

@@ -0,0 +1,862 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.0 -->
<object class="GtkListStore" id="lock_after_model">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name value -->
<column type="gint"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Screen Turns Off</col>
<col id="1">0</col>
</row>
<row>
<col id="0" translatable="yes">30 seconds</col>
<col id="1">30</col>
</row>
<row>
<col id="0" translatable="yes">1 minute</col>
<col id="1">60</col>
</row>
<row>
<col id="0" translatable="yes">2 minutes</col>
<col id="1">120</col>
</row>
<row>
<col id="0" translatable="yes">3 minutes</col>
<col id="1">180</col>
</row>
<row>
<col id="0" translatable="yes">5 minutes</col>
<col id="1">300</col>
</row>
<row>
<col id="0" translatable="yes">30 minutes</col>
<col id="1">1800</col>
</row>
<row>
<col id="0" translatable="yes">1 hour</col>
<col id="1">3600</col>
</row>
</data>
</object>
<object class="GtkDialog" id="name_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Name &amp; Visibility</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox2">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area2">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="name_done">
<property name="label" translatable="yes">_Done</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="label" translatable="yes">Control how you appear on the screen and the network.</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="border_width">6</property>
<property name="row_spacing">12</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="full_name_top_bar_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Display _full name in top bar</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">full_name_top_bar</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="full_name_top_bar">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="full_name_lock_screen_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Display full name in _lock screen</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">full_name_lock_screen</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="full_name_lock_screen">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label7">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Stealth mode</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">stealth_mode</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="stealth_mode">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">name_done</action-widget>
</action-widgets>
</object>
<object class="GtkListStore" id="purge_after_model">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name value -->
<column type="guint"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Immediately</col>
<col id="1">0</col>
</row>
<row>
<col id="0" translatable="yes">1 day</col>
<col id="1">1</col>
</row>
<row>
<col id="0" translatable="yes">2 days</col>
<col id="1">2</col>
</row>
<row>
<col id="0" translatable="yes">3 days</col>
<col id="1">3</col>
</row>
<row>
<col id="0" translatable="yes">4 days</col>
<col id="1">4</col>
</row>
<row>
<col id="0" translatable="yes">5 days</col>
<col id="1">5</col>
</row>
<row>
<col id="0" translatable="yes">6 days</col>
<col id="1">6</col>
</row>
<row>
<col id="0" translatable="yes">7 days</col>
<col id="1">7</col>
</row>
<row>
<col id="0" translatable="yes">14 days</col>
<col id="1">14</col>
</row>
<row>
<col id="0" translatable="yes">30 days</col>
<col id="1">30</col>
</row>
</data>
</object>
<object class="GtkListStore" id="retain_history_model">
<columns>
<!-- column-name name -->
<column type="gchararray"/>
<!-- column-name value -->
<column type="gint"/>
</columns>
<data>
<row>
<col id="0" translatable="yes">Don't retain history</col>
<col id="1">0</col>
</row>
<row>
<col id="0" translatable="yes">1 day</col>
<col id="1">1</col>
</row>
<row>
<col id="0" translatable="yes">7 days</col>
<col id="1">7</col>
</row>
<row>
<col id="0" translatable="yes">30 days</col>
<col id="1">30</col>
</row>
<row>
<col id="0" translatable="yes">Forever</col>
<col id="1">-1</col>
</row>
</data>
</object>
<object class="GtkDialog" id="recent_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="type_hint">dialog</property>
<property name="title" translatable="yes">Usage &amp; History</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox5">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child>
<object class="GtkLabel" id="label6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">6</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Remembering your history makes things easier to find again. These items are never shared over the network.</property>
<property name="wrap">True</property>
<property name="max_width_chars">50</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area5">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="clear_recent_button">
<property name="label" translatable="yes">_Clear Recent History</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="recent_done">
<property name="label" translatable="yes">_Done</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid3">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">6</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="row_spacing">12</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="recently_used_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">_Recently Used</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">recently_used_switch</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="recently_used_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="retain_history_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Retain _History</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">retain_history_combo</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="retain_history_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="entry_text_column">0</property>
<property name="model">retain_history_model</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">clear_recent_button</action-widget>
<action-widget response="0">recent_done</action-widget>
</action-widgets>
</object>
<object class="GtkDialog" id="screen_lock_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Screen Lock</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="screen_lock_done">
<property name="label" translatable="yes">_Done</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="label" translatable="yes">The Screen Lock protects your privacy when you are away.</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="screen_lock_dialog_grid">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">12</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="border_width">6</property>
<property name="row_spacing">12</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Automatic Screen _Lock</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">automatic_screen_lock</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="automatic_screen_lock">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="lock_after_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Lock Screen _After</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">lock_after_combo</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="lock_after_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">center</property>
<property name="model">lock_after_model</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Show _Notifications</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">show_notifications</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="show_notifications">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="-1">screen_lock_done</action-widget>
</action-widgets>
</object>
<object class="GtkDialog" id="trash_dialog">
<property name="can_focus">False</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Purge Trash &amp; Temporary Files</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox4">
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">2</property>
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area4">
<property name="can_focus">False</property>
<property name="layout_style">end</property>
<child>
<object class="GtkButton" id="empty_trash_button">
<property name="label" translatable="yes">_Empty Trash</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="purge_temp_button">
<property name="label" translatable="yes">_Purge Temporary Files</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">True</property>
<property name="halign">center</property>
<property name="valign">center</property>
<property name="hexpand">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkButton" id="trash_done">
<property name="label" translatable="yes">_Done</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="can_default">True</property>
<property name="has_default">True</property>
<property name="receives_default">True</property>
<property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label5">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">6</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Automatically purge the Trash and temporary files to help keep your computer free of unnecessary sensitive information.</property>
<property name="wrap">True</property>
<property name="max_width_chars">50</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkGrid" id="grid2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">12</property>
<property name="margin_right">6</property>
<property name="margin_top">12</property>
<property name="margin_bottom">12</property>
<property name="hexpand">True</property>
<property name="row_spacing">12</property>
<property name="column_spacing">6</property>
<child>
<object class="GtkLabel" id="purge_trash_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Automatically Empty _Trash</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">purge_trash_switch</property>
<property name="track_visited_links">False</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="purge_trash_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="purge_temp_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Automatically Purge Temporary _Files</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">purge_temp_switch</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkSwitch" id="purge_temp_switch">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="halign">end</property>
<property name="valign">center</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">1</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="purge_after_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Purge _After</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">purge_after_combo</property>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
<child>
<object class="GtkComboBoxText" id="purge_after_combo">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="model">purge_after_model</property>
</object>
<packing>
<property name="left_attach">1</property>
<property name="top_attach">2</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
</child>
<action-widgets>
<action-widget response="0">empty_trash_button</action-widget>
<action-widget response="0">purge_temp_button</action-widget>
<action-widget response="0">trash_done</action-widget>
</action-widgets>
</object>
<object class="GtkWindow" id="window1">
<property name="can_focus">False</property>
<child>
<object class="GtkBox" id="privacy_vbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin_left">128</property>
<property name="margin_right">128</property>
<property name="margin_top">16</property>
<property name="margin_bottom">16</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkScrolledWindow" id="scrolled_window">
<property name="width_request">400</property>
<property name="height_request">350</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="vexpand">True</property>
<property name="shadow_type">in</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
</object>
</child>
</object>
</interface>