/*
* Claws Mail -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004-2007 the Claws Mail team
+ * Copyright (C) 2004-2011 the Claws Mail team
*
* 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
#include <glib/gi18n.h>
#include "defs.h"
-#include "utils.h"
#include "gtk/gtkutils.h"
+#include "utils.h"
#include "prefs.h"
#include "prefs_gtk.h"
#include "prefs_gpg.h"
GtkWidget *hbox1;
GtkWidget *vbox1, *vbox2;
GtkWidget *label_expire1;
- GtkObject *spinbtn_store_passphrase_adj;
+ GtkAdjustment *spinbtn_store_passphrase_adj;
GtkWidget *spinbtn_store_passphrase;
GtkWidget *label_expire2;
GtkWidget *frame_passphrase;
- GtkTooltips *tooltips;
-
- tooltips = gtk_tooltips_new();
+ CLAWS_TIP_DECL();
vbox1 = gtk_vbox_new (FALSE, VSPACING);
gtk_widget_show (vbox1);
gtk_box_pack_start (GTK_BOX (hbox1), label_expire1, FALSE, FALSE, 0);
spinbtn_store_passphrase_adj =
- gtk_adjustment_new(1, 0, 1440, 1, 10, 10);
+ gtk_adjustment_new(1, 0, 1440, 1, 10, 0);
spinbtn_store_passphrase =
gtk_spin_button_new(GTK_ADJUSTMENT
(spinbtn_store_passphrase_adj), 1, 0);
gtk_box_pack_start(GTK_BOX(hbox1), spinbtn_store_passphrase, FALSE,
FALSE, 0);
gtk_widget_set_size_request(spinbtn_store_passphrase, 64, -1);
- gtk_tooltips_set_tip(tooltips, spinbtn_store_passphrase,
+ CLAWS_SET_TIP(spinbtn_store_passphrase,
_
- ("Setting to '0' will store the passphrase for the whole session"),
- NULL);
+ ("Setting to '0' will store the passphrase for the whole session"));
gtk_spin_button_set_numeric(GTK_SPIN_BUTTON
(spinbtn_store_passphrase), TRUE);
prefs_file_close_revert(pfile);
return;
}
- fprintf(pfile->fp, "\n");
-
- prefs_file_close(pfile);
+ if (fprintf(pfile->fp, "\n") < 0) {
+ FILE_OP_ERROR(rcpath, "fprintf");
+ prefs_file_close_revert(pfile);
+ } else
+ prefs_file_close(pfile);
}
struct GPGAccountConfig *prefs_gpg_account_get_config(PrefsAccount *account)
systems = g_strsplit(prefs_gpg_get_config()->skip_encryption_warning,
",", -1);
while (systems && systems[i]) {
- printf(" cmp %s %s\n", systems[i], systemid);
+ debug_print(" cmp %s %s\n", systems[i], systemid);
if (!strcmp(systems[i],systemid)) {
g_strfreev(systems);
return TRUE;