GtkWidget *spinbtn_iotimeout;
GtkWidget *checkbtn_gtk_can_change_accels;
GtkWidget *checkbtn_askonfilter;
+ GtkWidget *checkbtn_use_shred;
GtkWidget *checkbtn_real_time_sync;
} OtherPage;
window = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "prefs_other");
gtk_container_set_border_width (GTK_CONTAINER (window), 8);
- gtk_window_set_title (GTK_WINDOW (window), _("Select key bindings"));
+ gtk_window_set_title (GTK_WINDOW (window),
+ _("Choose preset keyboard shortcuts"));
gtk_window_set_position (GTK_WINDOW (window), GTK_WIN_POS_CENTER);
gtk_window_set_modal (GTK_WINDOW (window), TRUE);
gtk_window_set_resizable(GTK_WINDOW (window), FALSE);
static void prefs_keybind_apply_clicked(GtkWidget *widget)
{
- const gchar *text;
+ gchar *text;
struct KeyBind *menurc;
gint n_menurc;
GtkWidget *frame_keys;
GtkWidget *vbox_keys;
GtkWidget *checkbtn_gtk_can_change_accels;
- GtkTooltips *gtk_can_change_accels_tooltip;
GtkWidget *button_keybind;
GtkWidget *label_iotimeout;
GtkWidget *vbox2;
GtkWidget *checkbtn_askonclean;
GtkWidget *checkbtn_askonfilter;
+ GtkWidget *checkbtn_use_shred;
GtkWidget *checkbtn_real_time_sync;
+
+ gchar *shred_binary = NULL;
+ CLAWS_TIP_DECL();
+
vbox1 = gtk_vbox_new (FALSE, VSPACING);
gtk_widget_show (vbox1);
gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
vbox_keys = gtkut_get_options_frame(vbox1, &frame_keys, _("Keyboard shortcuts"));
PACK_CHECK_BUTTON(vbox_keys, checkbtn_gtk_can_change_accels,
- _("Enable customisable menu shortcuts"));
- gtk_can_change_accels_tooltip = gtk_tooltips_new();
- gtk_tooltips_set_tip(GTK_TOOLTIPS(gtk_can_change_accels_tooltip),
- checkbtn_gtk_can_change_accels,
+ _("Enable customisable keyboard shortcuts"));
+
+ CLAWS_SET_TIP(checkbtn_gtk_can_change_accels,
_("If checked, you can change the keyboard shortcuts of "
"most of the menu items by focusing on the menu "
"item and pressing a key combination.\n"
"Uncheck this option if you want to lock all "
- "existing menu shortcuts."),
- NULL);
+ "existing keyboard shortcuts."));
- button_keybind = gtk_button_new_with_label (_(" Set key bindings... "));
+ button_keybind = gtk_button_new_with_label(
+ _(" Choose preset keyboard shortcuts... "));
gtk_widget_show (button_keybind);
hbox1 = gtk_hbox_new (FALSE, 8);
gtk_widget_show (hbox1);
PACK_CHECK_BUTTON (vbox2, checkbtn_askonfilter,
_("Ask about account specific filtering rules when "
"filtering manually"));
+ shred_binary = g_find_program_in_path("shred");
+ if (shred_binary) {
+ PACK_CHECK_BUTTON (vbox2, checkbtn_use_shred,
+ _("Use secure file deletion if possible"));
+ g_free(shred_binary);
+ } else {
+ PACK_CHECK_BUTTON (vbox2, checkbtn_use_shred,
+ _("Use secure file deletion if possible\n"
+ "(the 'shred' program is not available)"));
+ gtk_widget_set_sensitive(checkbtn_use_shred, FALSE);
+ }
+ CLAWS_SET_TIP(checkbtn_use_shred,
+ _("Use the 'shred' program to overwrite files with random data before "
+ "deleting them. This slows down deletion. Be sure to "
+ "read shred's man page for caveats."));
PACK_CHECK_BUTTON (vbox2, checkbtn_real_time_sync,
_("Synchronise offline folders as soon as possible"));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_askonfilter),
prefs_common.ask_apply_per_account_filtering_rules);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_use_shred),
+ prefs_common.use_shred);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_real_time_sync),
prefs_common.real_time_sync);
prefs_other->spinbtn_iotimeout = spinbtn_iotimeout;
prefs_other->checkbtn_gtk_can_change_accels = checkbtn_gtk_can_change_accels;
prefs_other->checkbtn_askonfilter = checkbtn_askonfilter;
+ prefs_other->checkbtn_use_shred = checkbtn_use_shred;
prefs_other->checkbtn_real_time_sync = checkbtn_real_time_sync;
prefs_other->page.widget = vbox1;
{
OtherPage *page = (OtherPage *) _page;
gboolean gtk_can_change_accels;
+ GList * list = NULL;
prefs_common.add_address_by_click = gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->checkbtn_addaddrbyclick));
prefs_common.ask_apply_per_account_filtering_rules =
gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->checkbtn_askonfilter));
+ prefs_common.use_shred =
+ gtk_toggle_button_get_active(
+ GTK_TOGGLE_BUTTON(page->checkbtn_use_shred));
prefs_common.real_time_sync =
gtk_toggle_button_get_active(
GTK_TOGGLE_BUTTON(page->checkbtn_real_time_sync));