Commit Diff


commit - f4fa939c1d17b04ae803f6b535005ba88f46071c
commit + 94256ab3acb0cd7270b6545b89d7bf4970d440ff
blob - 3b7adf31cb214e02482597e04d5ef23df757b77c
blob + 57d28a214023cd945808a702be7315f85138db13
--- src/account.c
+++ src/account.c
@@ -889,8 +889,6 @@ static void account_delete(GtkWidget *widget, gpointer
 		folderview_set_all();
 	}
 
-	inc_account_autocheck_timer_remove(ac_prefs);
-
 	account_destroy(ac_prefs);
 	account_list_view_set();
 
blob - 43578579c6e9a9065c3e9f0d94a9251b368682ff
blob + 4538e93863d7c9b8dada123e9d486b2a19fa9380
--- src/addressbook.c
+++ src/addressbook.c
@@ -2327,18 +2327,14 @@ static gboolean addressbook_list_button_pressed(GtkWid
 		gtk_menu_popup_at_pointer(GTK_MENU(addrbook.list_popup), NULL);
 	} else if (event->button == 1) {
 		if (event->type == GDK_2BUTTON_PRESS) {
-			if (prefs_common.add_address_by_click &&
-			    addrbook.target_compose)
-				addressbook_to_clicked(NULL, GINT_TO_POINTER(COMPOSE_TO));
-			else
-				if (prefs_common.addressbook_use_editaddress_dialog)
+			if (prefs_common.addressbook_use_editaddress_dialog)
+				addressbook_edit_address_cb(NULL, NULL);
+			else {
+				GtkCMCTree *clist = GTK_CMCTREE(addrbook.clist);
+				AddressObject *obj = gtk_cmctree_node_get_row_data( clist, addrbook.listSelected );
+				if( obj && obj->type == ADDR_ITEM_GROUP )
 					addressbook_edit_address_cb(NULL, NULL);
-				else {
-					GtkCMCTree *clist = GTK_CMCTREE(addrbook.clist);
-					AddressObject *obj = gtk_cmctree_node_get_row_data( clist, addrbook.listSelected );
-					if( obj && obj->type == ADDR_ITEM_GROUP )
-						addressbook_edit_address_cb(NULL, NULL);
-				}
+			}
 		}
 	}
 
blob - 1c67a8e79638308787577f809c37d190b72d2371
blob + 77b262c5dd23bf30dd08293dd7caa37851906776
--- src/inc.c
+++ src/inc.c
@@ -379,8 +379,7 @@ void inc_all_account_mail(MainWindow *mainwin, gboolea
 		 * this account, based on whether we're doing global autocheck
 		 * or a check at startup or a manual 'Get all' check. */
 		if (autocheck)
-			condition = prefs_common_get_prefs()->autochk_newmail
-				&& account->autochk_use_default;
+			condition = prefs_common_get_prefs()->autochk_newmail;
 		else if (check_at_startup || (!check_at_startup && !autocheck))
 			condition = account->recv_at_getall;
 
@@ -1426,55 +1425,6 @@ static gint inc_autocheck_func(gpointer data)
 	return FALSE;
 }
 
-static gboolean inc_account_autocheck_func(gpointer data)
-{
-	PrefsAccount *account = (PrefsAccount *)data;
-	GList *list = NULL;
-
-	cm_return_val_if_fail(account != NULL, FALSE);
-
-	debug_print("account %d: inc_account_autocheck_func\n",
-			account->account_id);
-
-	list = g_list_append(list, account);
-	inc_account_list_mail(mainwindow_get_mainwindow(),
-			list, TRUE, prefs_common.newmail_notify_auto);
-	g_list_free(list);
-
-	inc_account_autocheck_timer_set_interval(account);
-
-	return FALSE;
-}
-
-void inc_account_autocheck_timer_remove(PrefsAccount *account)
-{
-	cm_return_if_fail(account != NULL);
-
-	if (account->autocheck_timer != 0) {
-		g_source_remove(account->autocheck_timer);
-		debug_print("INC: account %d: removed inc timer %d\n", account->account_id,
-				account->autocheck_timer);
-		account->autocheck_timer = 0;
-	}
-}
-
-void inc_account_autocheck_timer_set_interval(PrefsAccount *account)
-{
-	cm_return_if_fail(account != NULL);
-
-	inc_account_autocheck_timer_remove(account);
-
-	if (account->autochk_use_default
-			|| !account->autochk_use_custom
-			|| account->autochk_itv == 0)
-		return;
-
-	account->autocheck_timer = g_timeout_add_seconds(
-			account->autochk_itv, inc_account_autocheck_func, account);
-	debug_print("INC: account %d: added inc timer %d at %u seconds\n",
-			account->account_id, account->autocheck_timer, account->autochk_itv);
-}
-
 gboolean inc_offline_should_override(gboolean force_ask, const gchar *msg)
 {
 	gint length = 10; /* seconds */
blob - be3f7314ca4eef338e1b11f2fb49ec9b90175ffe
blob + e42b91949ee4c28747de64da07fe079fa2d7e56a
--- src/main.c
+++ src/main.c
@@ -1490,13 +1490,9 @@ static void lock_socket_input_cb(gpointer data,
 		const gchar *mbox_file = buf + 7;
 		mainwindow_import_mbox(mbox_file);
 	} else if (!STRNCMP(buf, "exit")) {
-		if (prefs_common.clean_on_exit && !prefs_common.ask_on_clean) {
-			procmsg_empty_all_trash();
-                }
 		app_will_exit(NULL, mainwin);
 	}
 	close(sock);
-
 }
 
 static void open_compose_new(const gchar *address, GList *attach_files)
blob - 932b49942c546097d05379acf122f62b1237b1bf
blob + 5639443688ea8df5dd15caa6a711c86f8ee0ac30
--- src/mainwindow.c
+++ src/mainwindow.c
@@ -3004,20 +3004,6 @@ static void save_as_cb(GtkAction *action, gpointer dat
 static void app_exit_cb(GtkAction *action, gpointer data)
 {
 	MainWindow *mainwin = (MainWindow *)data;
-	if (prefs_common.clean_on_exit) {
-		if (!main_window_empty_trash(mainwin, prefs_common.ask_on_clean, TRUE))
-			return;
-	}
-
-	if (prefs_common.confirm_on_exit) {
-		if (alertpanel(_("Exit"), _("Exit Claws Mail?"),
-			       NULL, _("_Cancel"), NULL, _("_Quit"),
-			       NULL, NULL, ALERTFOCUS_FIRST)
-		    != G_ALERTALTERNATE)
-			return;
-		manage_window_focus_in(mainwin->window, NULL, NULL);
-	}
-
 	app_will_exit(NULL, mainwin);
 }
 
blob - c0d7cb489c996eda2ca8dc3c92cf2c18b424ff0a
blob + bb8a4f7520a1328a62843150357ab6ac44bd66a5
--- src/mimeview.c
+++ src/mimeview.c
@@ -1352,12 +1352,6 @@ static gint mimeview_write_part(const gchar *filename,
 				 g_strerror(-err));
 		return 0;
 	}
-
-	if (prefs_common.attach_save_chmod) {
-		if (chmod(filename, prefs_common.attach_save_chmod) < 0)
-			FILE_OP_ERROR(filename, "chmod");
-	}
-
 	return 1;
 }
 
blob - 8514434eef77319399e56820bc6bc860ec0aabd0
blob + 2c449acb282f331a646f5544b34041fd89e85d49
--- src/prefs_account.c
+++ src/prefs_account.c
@@ -77,12 +77,6 @@ static GtkWidget *entry_out_cert_file;
 static GtkWidget *in_ssl_cert_browse_button;
 static GtkWidget *out_ssl_cert_browse_button;
 
-struct AutocheckWidgets {
-	GtkWidget *autochk_hour_spinbtn;
-	GtkWidget *autochk_min_spinbtn;
-	GtkWidget *autochk_sec_spinbtn;
-};
-
 static GSList *prefs_pages = NULL;
 
 typedef struct BasicPage
@@ -135,8 +129,6 @@ typedef struct ReceivePage
 	GtkWidget *inbox_entry;
 	GtkWidget *inbox_btn;
 
-	GtkWidget *autochk_frame;
-
 	GtkWidget *local_frame;
 	GtkWidget *local_inbox_label;
 	GtkWidget *local_inbox_entry;
@@ -150,10 +142,6 @@ typedef struct ReceivePage
 	GtkWidget *imapdir_entry;
 	GtkWidget *subsonly_checkbtn;
 	GtkWidget *imap_batch_size_spinbtn;
-
-	GtkWidget *autochk_checkbtn;
-	GtkWidget *autochk_use_default_checkbtn;
-	struct AutocheckWidgets *autochk_widgets;
 } ReceivePage;
 
 typedef struct SendPage
@@ -290,9 +278,6 @@ static void prefs_account_smtp_auth_type_set_optmenu	(
 static void prefs_account_pop_auth_type_set_data_from_optmenu (PrefParam *pparam);
 static void prefs_account_pop_auth_type_set_optmenu	(PrefParam *pparam);
 
-static void prefs_account_set_autochk_interval_from_widgets(PrefParam *pparam);
-static void prefs_account_set_autochk_interval_to_widgets(PrefParam *pparam);
-
 static void prefs_account_enum_set_data_from_radiobtn	(PrefParam *pparam);
 static void prefs_account_enum_set_radiobtn		(PrefParam *pparam);
 
@@ -395,22 +380,6 @@ static PrefParam receive_param[] = {
 	 &receive_page.imap_batch_size_spinbtn,
 	 prefs_set_data_from_spinbtn, prefs_set_spinbtn},
 
-	{"autochk_use_default", "TRUE", &tmp_ac_prefs.autochk_use_default, P_BOOL,
-		&receive_page.autochk_use_default_checkbtn,
-		prefs_set_data_from_toggle, prefs_set_toggle},
-
-	{"autochk_use_custom", "FALSE", &tmp_ac_prefs.autochk_use_custom, P_BOOL,
-		&receive_page.autochk_checkbtn,
-		prefs_set_data_from_toggle, prefs_set_toggle},
-
-	/* Here we lie a bit, passing a pointer to our custom struct,
-	 * disguised as a GtkWidget pointer, to get around the
-	 * inflexibility of PrefParam system. */
-	{"autochk_interval", "600", &tmp_ac_prefs.autochk_itv, P_INT,
-		(GtkWidget **)&receive_page.autochk_widgets,
-		prefs_account_set_autochk_interval_from_widgets,
-		prefs_account_set_autochk_interval_to_widgets},
-
 	{NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };
 
@@ -621,8 +590,6 @@ static void auto_configure_cb			(GtkWidget	*widget, gp
 
 static void prefs_account_edit_custom_header	(void);
 
-static void prefs_account_receive_itv_spinbutton_value_changed_cb(GtkWidget *w, gpointer data);
-
 #define COMBOBOX_PRIVACY_PLUGIN_ID 3
 
 #define TABLE_YPAD 2
@@ -952,7 +919,7 @@ static void receive_create_widget_func(PrefsPage * _pa
 	ReceivePage *page = (ReceivePage *) _page;
 	PrefsAccount *ac_prefs = (PrefsAccount *) data;
 
-	GtkWidget *vbox1, *vbox2, *vbox3, *vbox4, *vbox5;
+	GtkWidget *vbox1, *vbox2, *vbox3, *vbox5;
 	GtkWidget *hbox1, *hbox2, *hbox3;
 	GtkWidget *frame1;
 	GtkWidget *pop_auth_checkbtn;
@@ -977,13 +944,7 @@ static void receive_create_widget_func(PrefsPage * _pa
 	GtkWidget *local_inbox_label;
 	GtkWidget *local_inbox_entry;
 	GtkWidget *local_inbox_btn;
-	GtkWidget *autochk_checkbtn;
-	GtkWidget *autochk_hour_spinbtn, *autochk_hour_label;
-	GtkWidget *autochk_min_spinbtn, *autochk_min_label;
-	GtkWidget *autochk_sec_spinbtn, *autochk_sec_label;
-	GtkWidget *autochk_use_default_checkbtn;
 	GtkAdjustment *adj;
-	struct AutocheckWidgets *autochk_widgets;
 
 	GtkWidget *optmenu, *optmenu2;
 	GtkListStore *menu, *menu2;
@@ -1193,64 +1154,6 @@ static void receive_create_widget_func(PrefsPage * _pa
 	gtk_widget_show (hbox1);
 	gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 4);
 
-	/* Auto-checking */
-	vbox4 = gtkut_get_options_frame(vbox1, &frame, _("Automatic checking"));
-
-	PACK_CHECK_BUTTON(vbox4, autochk_use_default_checkbtn,
-			_("Use global settings"));
-
-	hbox2 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
-	gtk_box_pack_start(GTK_BOX(vbox4), hbox2, FALSE, FALSE, 0);
-
-	PACK_CHECK_BUTTON(hbox2, autochk_checkbtn,
-			_("Check for new mail every"));
-
-	adj = gtk_adjustment_new(5, 0, 99, 1, 10, 0);
-	autochk_hour_spinbtn = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1, 0);
-	gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(autochk_hour_spinbtn), TRUE);
-	gtk_box_pack_start(GTK_BOX(hbox2), autochk_hour_spinbtn, FALSE, FALSE, 0);
-	autochk_hour_label = gtk_label_new(_("hours"));
-	gtk_box_pack_start(GTK_BOX(hbox2), autochk_hour_label, FALSE, FALSE, 0);
-
-	adj = gtk_adjustment_new(5, 0, 99, 1, 10, 0);
-	autochk_min_spinbtn = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1, 0);
-	gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(autochk_min_spinbtn), TRUE);
-	gtk_box_pack_start(GTK_BOX(hbox2), autochk_min_spinbtn, FALSE, FALSE, 0);
-	autochk_min_label = gtk_label_new(_("minutes"));
-	gtk_box_pack_start(GTK_BOX(hbox2), autochk_min_label, FALSE, FALSE, 0);
-
-	adj = gtk_adjustment_new(5, 0, 99, 1, 10, 0);
-	autochk_sec_spinbtn = gtk_spin_button_new(GTK_ADJUSTMENT(adj), 1, 0);
-	gtk_spin_button_set_numeric(GTK_SPIN_BUTTON(autochk_sec_spinbtn), TRUE);
-	gtk_box_pack_start(GTK_BOX(hbox2), autochk_sec_spinbtn, FALSE, FALSE, 0);
-	autochk_sec_label = gtk_label_new(_("seconds"));
-	gtk_box_pack_start(GTK_BOX(hbox2), autochk_sec_label, FALSE, FALSE, 0);
-
-	autochk_widgets = g_new0(struct AutocheckWidgets, 1);
-	autochk_widgets->autochk_hour_spinbtn = autochk_hour_spinbtn;
-	autochk_widgets->autochk_min_spinbtn = autochk_min_spinbtn;
-	autochk_widgets->autochk_sec_spinbtn = autochk_sec_spinbtn;
-
-	gtk_widget_show_all(vbox4);
-
-	SET_TOGGLE_SENSITIVITY_REVERSE(autochk_use_default_checkbtn, hbox2);
-	SET_TOGGLE_SENSITIVITY(autochk_checkbtn, autochk_hour_spinbtn);
-	SET_TOGGLE_SENSITIVITY(autochk_checkbtn, autochk_min_spinbtn);
-	SET_TOGGLE_SENSITIVITY(autochk_checkbtn, autochk_sec_spinbtn);
-	SET_TOGGLE_SENSITIVITY(autochk_checkbtn, autochk_hour_label);
-	SET_TOGGLE_SENSITIVITY(autochk_checkbtn, autochk_min_label);
-	SET_TOGGLE_SENSITIVITY(autochk_checkbtn, autochk_sec_label);
-
-	g_signal_connect(G_OBJECT(autochk_hour_spinbtn), "value-changed",
-		G_CALLBACK(prefs_account_receive_itv_spinbutton_value_changed_cb),
-		(gpointer) page);
-	g_signal_connect(G_OBJECT(autochk_min_spinbtn), "value-changed",
-		G_CALLBACK(prefs_account_receive_itv_spinbutton_value_changed_cb),
-		(gpointer) page);
-	g_signal_connect(G_OBJECT(autochk_sec_spinbtn), "value-changed",
-		G_CALLBACK(prefs_account_receive_itv_spinbutton_value_changed_cb),
-		(gpointer) page);
-
 	PACK_CHECK_BUTTON
 		(vbox1, recvatgetall_checkbtn,
 		 _("'Get Mail' checks for new messages on this account"));
@@ -1265,8 +1168,6 @@ static void receive_create_widget_func(PrefsPage * _pa
 	page->inbox_entry              = inbox_entry;
 	page->inbox_btn                = inbox_btn;
 
-	page->autochk_frame            = frame;
-
 	page->imap_frame               = imap_frame;
 	page->imap_auth_type_optmenu   = optmenu;
 
@@ -1281,10 +1182,6 @@ static void receive_create_widget_func(PrefsPage * _pa
 
 	page->recvatgetall_checkbtn      = recvatgetall_checkbtn;
 
-	page->autochk_checkbtn = autochk_checkbtn;
-	page->autochk_widgets = autochk_widgets;
-	page->autochk_use_default_checkbtn = autochk_use_default_checkbtn;
-
 	tmp_ac_prefs = *ac_prefs;
 
 	if (new_account) {
@@ -2736,12 +2633,6 @@ PrefsAccount *prefs_account_new_from_config(const gcha
 
 	prefs_custom_header_read_config(ac_prefs);
 
-	/* Start the auto-check interval, if needed. */
-	if (!ac_prefs->autochk_use_default && ac_prefs->autochk_use_custom
-			&& ac_prefs->autochk_itv > PREFS_RECV_AUTOCHECK_MIN_INTERVAL) {
-		inc_account_autocheck_timer_set_interval(ac_prefs);
-	}
-
 	return ac_prefs;
 }
 
@@ -2840,9 +2731,6 @@ static void destroy_dialog(gpointer data)
 		*ac_prefs = tmp_ac_prefs;
 		if (update_fld_list)
 			folderview_rescan_tree(ac_prefs->folder, FALSE);
-
-		inc_account_autocheck_timer_set_interval(ac_prefs);
-
 	} else /* the customhdr_list may have changed, update it anyway */
 		ac_prefs->customhdr_list = (&tmp_ac_prefs)->customhdr_list;
 
@@ -3215,20 +3103,6 @@ static void prefs_account_smtp_auth_type_set_optmenu(P
 	combobox_select_by_data(optmenu, type);
 }
 
-static void prefs_account_set_autochk_interval_from_widgets(PrefParam *pparam)
-{
-	struct AutocheckWidgets *autochk_widgets =
-		(struct AutocheckWidgets *)*pparam->widget;
-
-	*(gint *)pparam->data =
-		(3600 * gtk_spin_button_get_value_as_int(
-			GTK_SPIN_BUTTON(autochk_widgets->autochk_hour_spinbtn)))
-		+ (60 * gtk_spin_button_get_value_as_int(
-			GTK_SPIN_BUTTON(autochk_widgets->autochk_min_spinbtn)))
-		+ gtk_spin_button_get_value_as_int(
-			GTK_SPIN_BUTTON(autochk_widgets->autochk_sec_spinbtn));
-}
-
 static void prefs_account_pop_auth_type_set_data_from_optmenu(PrefParam *pparam)
 {
 	*((RecvProtocol *)pparam->data) =
@@ -3243,23 +3117,6 @@ static void prefs_account_pop_auth_type_set_optmenu(Pr
 	combobox_select_by_data(optmenu, type);
 }
 
-static void prefs_account_set_autochk_interval_to_widgets(PrefParam *pparam)
-{
-	gint val = *((gint *)pparam->data);
-	struct AutocheckWidgets *autochk_widgets =
-		(struct AutocheckWidgets *)*pparam->widget;
-
-	gtk_spin_button_set_value(
-			GTK_SPIN_BUTTON(autochk_widgets->autochk_hour_spinbtn),
-			val / 3600);
-	gtk_spin_button_set_value(
-			GTK_SPIN_BUTTON(autochk_widgets->autochk_min_spinbtn),
-			(val % 3600) / 60);
-	gtk_spin_button_set_value(
-			GTK_SPIN_BUTTON(autochk_widgets->autochk_sec_spinbtn),
-			(val % 3600) % 60);
-}
-
 static void prefs_account_set_string_from_combobox(PrefParam *pparam)
 {
 	GtkWidget *combobox;
@@ -3320,7 +3177,7 @@ static void prefs_account_protocol_changed(GtkComboBox
 		gtk_widget_hide(receive_page.pop3_frame);
 		gtk_widget_hide(receive_page.imap_frame);
 		gtk_widget_show(receive_page.local_frame);
-		gtk_widget_show(receive_page.autochk_frame);
+
 		gtk_widget_set_sensitive(receive_page.recvatgetall_checkbtn, TRUE);
 		prefs_account_mailcmd_toggled
 			(GTK_TOGGLE_BUTTON(basic_page.mailcmd_checkbtn), NULL);
@@ -3381,7 +3238,6 @@ static void prefs_account_protocol_changed(GtkComboBox
 		gtk_widget_hide(receive_page.pop3_frame);
 		gtk_widget_show(receive_page.imap_frame);
 		gtk_widget_hide(receive_page.local_frame);
-		gtk_widget_show(receive_page.autochk_frame);
 		gtk_widget_set_sensitive(receive_page.recvatgetall_checkbtn, TRUE);
 		gtk_widget_set_sensitive(basic_page.smtpserv_entry, TRUE);
 		gtk_widget_set_sensitive(basic_page.smtpserv_label, TRUE);
@@ -3441,7 +3297,6 @@ static void prefs_account_protocol_changed(GtkComboBox
 		gtk_widget_hide(receive_page.pop3_frame);
 		gtk_widget_hide(receive_page.imap_frame);
 		gtk_widget_hide(receive_page.local_frame);
-		gtk_widget_hide(receive_page.autochk_frame);
 		gtk_widget_set_sensitive(receive_page.recvatgetall_checkbtn, FALSE);
 
 		gtk_widget_set_sensitive(basic_page.smtpserv_entry, TRUE);
@@ -3499,7 +3354,6 @@ static void prefs_account_protocol_changed(GtkComboBox
 		gtk_widget_show(receive_page.pop3_frame);
 		gtk_widget_hide(receive_page.imap_frame);
 		gtk_widget_hide(receive_page.local_frame);
-		gtk_widget_show(receive_page.autochk_frame);
 		gtk_widget_set_sensitive(receive_page.recvatgetall_checkbtn, TRUE);
 
 		gtk_widget_set_sensitive(basic_page.smtpserv_entry, TRUE);
@@ -3638,19 +3492,3 @@ char *prefs_account_cache_dir(const char *server, cons
 	strlcat(dir, userid, sizeof(dir));
 	return strdup(dir);
 }
-
-static void prefs_account_receive_itv_spinbutton_value_changed_cb(GtkWidget *w, gpointer data)
-{
-	ReceivePage *page = (ReceivePage *)data;
-	gint seconds = gtk_spin_button_get_value_as_int (
-		GTK_SPIN_BUTTON (page->autochk_widgets->autochk_sec_spinbtn));
-	gint minutes = gtk_spin_button_get_value_as_int (
-		GTK_SPIN_BUTTON (page->autochk_widgets->autochk_min_spinbtn));
-	gint hours = gtk_spin_button_get_value_as_int (
-		GTK_SPIN_BUTTON(page->autochk_widgets->autochk_hour_spinbtn));
-	if (seconds < PREFS_RECV_AUTOCHECK_MIN_INTERVAL && minutes == 0 && hours == 0) {
-		gtk_spin_button_set_value (
-			GTK_SPIN_BUTTON (page->autochk_widgets->autochk_sec_spinbtn),
-				PREFS_RECV_AUTOCHECK_MIN_INTERVAL);
-	}
-}
blob - 21cb54adddefcf4e188a735904313a9cf26d50e5
blob + c80726d9346cffbc22be9100f822a69cc2d7d6f7
--- src/prefs_account.h
+++ src/prefs_account.h
@@ -88,10 +88,6 @@ struct _PrefsAccount
 	gchar *inbox;
 	gchar *local_inbox;
 	gint max_articles;
-	gboolean autochk_use_default;
-	gboolean autochk_use_custom;
-	gint autochk_itv;
-	guint autocheck_timer;
 
 	gint imap_auth_type;
 	guint imap_batch_size;
blob - 0f0c423db68172110af8c6c1710caaee89a4b6a3
blob + d108fc31c16f4d0f6b4f5f3cd499dab022936acc
--- src/prefs_common.c
+++ src/prefs_common.c
@@ -498,8 +498,6 @@ static PrefParam param[] = {
 	 NULL, NULL, NULL},
 	{"attach_save_directory", NULL,
 	 &prefs_common.attach_save_dir, P_STRING, NULL, NULL, NULL},
-	{"attach_save_chmod", "",
-	 &prefs_common.attach_save_chmod, P_INT, NULL, NULL, NULL},
 	{"attach_load_directory", NULL,
 	 &prefs_common.attach_load_dir, P_STRING, NULL, NULL, NULL},
 
@@ -596,14 +594,8 @@ static PrefParam param[] = {
 	 &prefs_common.ext_editor_cmd, P_STRING, NULL, NULL, NULL},
 	{"cmds_use_system_default", "TRUE",
 	 &prefs_common.cmds_use_system_default, P_BOOL, NULL, NULL, NULL},
-	{"add_address_by_click", "FALSE", &prefs_common.add_address_by_click,
-	 P_BOOL, NULL, NULL, NULL},
 	{"session_passwords", "FALSE", &prefs_common.session_passwords,
 	 P_BOOL, NULL, NULL, NULL},
-	{"confirm_on_exit", "FALSE", &prefs_common.confirm_on_exit, P_BOOL,
-	 NULL, NULL, NULL},
-	{"clean_trash_on_exit", "FALSE", &prefs_common.clean_on_exit, P_BOOL,
-	 NULL, NULL, NULL},
 	{"ask_on_cleaning", "TRUE", &prefs_common.ask_on_clean, P_BOOL,
 	 NULL, NULL, NULL},
 	{"warn_queued_on_exit", "TRUE", &prefs_common.warn_queued_on_exit,
blob - 79e793702dbb795c6cc47162f773635f687cf8bb
blob + 592f1c65dab88235402d0f6d8bfe163ead5f5ab6
--- src/prefs_common.h
+++ src/prefs_common.h
@@ -328,7 +328,6 @@ struct _PrefsCommon
 	gchar *mime_textviewer;
 	gchar *mime_open_cmd;
 	gchar *attach_save_dir;
-	gint attach_save_chmod;
 	gchar *attach_load_dir;
 
 	GList *mime_open_cmd_history;
@@ -362,7 +361,6 @@ struct _PrefsCommon
 
 	NextUnreadMsgDialogShow next_unread_msg_dialog;
 	SummaryFromShow summary_from_show;
-	gboolean add_address_by_click;
 	gchar *pixmap_theme_path;
 
 	int hover_timeout; /* msecs mouse hover timeout */
@@ -376,9 +374,7 @@ struct _PrefsCommon
     	gboolean cliplog;
     	guint loglength;
 
-	gboolean confirm_on_exit;
 	gboolean session_passwords;
-	gboolean clean_on_exit;
 	gboolean ask_on_clean;
 	gboolean warn_queued_on_exit;
 
blob - 66dfbd400f5e25aebdbb4bd74cb8d17498b392f1
blob + 5974b8f57a1b16df42c0b131ce680159fd32d572
--- src/prefs_other.c
+++ src/prefs_other.c
@@ -46,15 +46,11 @@ typedef struct _OtherPage
 
 	GtkWidget *keys_preset_combo;
 	GtkWidget *keys_preset_hbox;
-	GtkWidget *checkbtn_addaddrbyclick;
-	GtkWidget *checkbtn_confonexit;
-	GtkWidget *checkbtn_cleanonexit;
 	GtkWidget *checkbtn_askonclean;
 	GtkWidget *checkbtn_warnqueued;
 	GtkWidget *spinbtn_iotimeout;
 	GtkWidget *checkbtn_gtk_enable_accels;
 	GtkWidget *checkbtn_real_time_sync;
-	GtkWidget *entry_attach_save_chmod;
 } OtherPage;
 
 struct KeyBind {
@@ -316,14 +312,8 @@ static void prefs_other_create_widget(PrefsPage *_page
 	GtkWidget *vbox1;
 	GtkWidget *hbox1;
 
-	GtkWidget *frame_addr;
-	GtkWidget *vbox_addr;
-	GtkWidget *checkbtn_addaddrbyclick;
-
 	GtkWidget *frame_exit;
 	GtkWidget *vbox_exit;
-	GtkWidget *checkbtn_confonexit;
-	GtkWidget *checkbtn_cleanonexit;
 	GtkWidget *checkbtn_warnqueued;
 
 	GtkWidget *frame_keys;
@@ -340,40 +330,19 @@ static void prefs_other_create_widget(PrefsPage *_page
 	GtkWidget *vbox2;
 	GtkWidget *checkbtn_askonclean;
 	GtkWidget *checkbtn_real_time_sync;
-	GtkWidget *label_attach_save_chmod;
-	GtkWidget *entry_attach_save_chmod;
 
 	vbox1 = gtk_box_new(GTK_ORIENTATION_VERTICAL, VSPACING);
 	gtk_widget_show (vbox1);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox1), VBOX_BORDER);
 
-	vbox_addr = gtkut_get_options_frame(vbox1, &frame_addr, _("Address book"));
-
-	PACK_CHECK_BUTTON
-		(vbox_addr, checkbtn_addaddrbyclick,
-		 _("Add address to destination when double-clicked"));
-
 	/* On Exit */
 	vbox_exit = gtkut_get_options_frame(vbox1, &frame_exit, _("On exit"));
-
-	PACK_CHECK_BUTTON (vbox_exit, checkbtn_confonexit,
-			   _("Confirm on exit"));
-
-	hbox1 = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 32);
-	gtk_widget_show (hbox1);
-	gtk_box_pack_start (GTK_BOX (vbox_exit), hbox1, FALSE, FALSE, 0);
-
-	PACK_CHECK_BUTTON (hbox1, checkbtn_cleanonexit,
-			   _("Empty trash on exit"));
-
 	PACK_CHECK_BUTTON (vbox_exit, checkbtn_warnqueued,
 			   _("Warn if there are queued messages"));
 
 	vbox_keys = gtkut_get_options_frame(vbox1, &frame_keys, _("Keyboard shortcuts"));
-
 	PACK_CHECK_BUTTON(vbox_keys, checkbtn_gtk_enable_accels,
 			_("Enable keyboard shortcuts"));
-
 	keys_preset_hbox = gtk_box_new(GTK_ORIENTATION_HORIZONTAL, 8);
 	gtk_widget_show (keys_preset_hbox);
 	gtk_box_pack_start (GTK_BOX (vbox_keys), keys_preset_hbox, FALSE, FALSE, 0);
@@ -426,33 +395,6 @@ static void prefs_other_create_widget(PrefsPage *_page
 	gtk_widget_show(hbox1);
 	gtk_box_pack_start(GTK_BOX (vbox1), hbox1, FALSE, FALSE, 0);
 
-	label_attach_save_chmod = gtk_label_new (_("Save attachments with chmod"));
-	gtk_widget_show(label_attach_save_chmod);
-	gtk_box_pack_start(GTK_BOX (hbox1), label_attach_save_chmod, FALSE, FALSE, 0);
-
-	entry_attach_save_chmod = gtk_entry_new();
-	gtk_entry_set_width_chars(GTK_ENTRY(entry_attach_save_chmod), 5);
-	gtk_widget_set_tooltip_text(entry_attach_save_chmod,
-			_("By default attachments are saved with chmod value 600: "
-			  "readable and writeable by the user only. If this is too "
-			  "restrictive for you, set a chmod value here, otherwise leave "
-			  "blank to use the default"));
-	gtk_widget_show(entry_attach_save_chmod);
-	gtk_box_pack_start(GTK_BOX(hbox1), entry_attach_save_chmod, FALSE, FALSE, 0);
-	if (prefs_common.attach_save_chmod) {
-		gchar *buf;
-
-		buf = g_strdup_printf("%o", prefs_common.attach_save_chmod);
-		gtk_entry_set_text(GTK_ENTRY(entry_attach_save_chmod), buf);
-		g_free(buf);
-	}
-
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_addaddrbyclick),
-		prefs_common.add_address_by_click);
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_confonexit),
-		prefs_common.confirm_on_exit);
-	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_cleanonexit),
-		prefs_common.clean_on_exit);
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_askonclean),
 		prefs_common.ask_on_clean);
 	gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_warnqueued),
@@ -469,15 +411,11 @@ static void prefs_other_create_widget(PrefsPage *_page
 
 	prefs_other->keys_preset_hbox = keys_preset_hbox;
 	prefs_other->keys_preset_combo = keys_preset_combo;
-	prefs_other->checkbtn_addaddrbyclick = checkbtn_addaddrbyclick;
-	prefs_other->checkbtn_confonexit = checkbtn_confonexit;
-	prefs_other->checkbtn_cleanonexit = checkbtn_cleanonexit;
 	prefs_other->checkbtn_askonclean = checkbtn_askonclean;
 	prefs_other->checkbtn_warnqueued = checkbtn_warnqueued;
 	prefs_other->spinbtn_iotimeout = spinbtn_iotimeout;
 	prefs_other->checkbtn_gtk_enable_accels = checkbtn_gtk_enable_accels;
 	prefs_other->checkbtn_real_time_sync = checkbtn_real_time_sync;
-	prefs_other->entry_attach_save_chmod = entry_attach_save_chmod;
 	prefs_other->page.widget = vbox1;
 }
 
@@ -486,14 +424,7 @@ static void prefs_other_save(PrefsPage *_page)
 	OtherPage *page = (OtherPage *) _page;
 	GtkSettings *settings = gtk_settings_get_default();
 	gboolean gtk_enable_accels;
-	gchar *buf;
 
-	prefs_common.add_address_by_click = gtk_toggle_button_get_active(
-		GTK_TOGGLE_BUTTON(page->checkbtn_addaddrbyclick));
-	prefs_common.confirm_on_exit = gtk_toggle_button_get_active(
-		GTK_TOGGLE_BUTTON(page->checkbtn_confonexit));
-	prefs_common.clean_on_exit = gtk_toggle_button_get_active(
-		GTK_TOGGLE_BUTTON(page->checkbtn_cleanonexit));
 	prefs_common.ask_on_clean = gtk_toggle_button_get_active(
 		GTK_TOGGLE_BUTTON(page->checkbtn_askonclean));
 	prefs_common.warn_queued_on_exit = gtk_toggle_button_get_active(
@@ -506,10 +437,6 @@ static void prefs_other_save(PrefsPage *_page)
 		gtk_toggle_button_get_active(
 			GTK_TOGGLE_BUTTON(page->checkbtn_real_time_sync));
 
-	buf = gtk_editable_get_chars(GTK_EDITABLE(page->entry_attach_save_chmod), 0, -1);
-	prefs_common.attach_save_chmod = prefs_chmod_mode(buf);
-	g_free(buf);
-
 	prefs_keybind_preset_changed(GTK_COMBO_BOX(page->keys_preset_combo));
 
 	gtk_enable_accels = gtk_toggle_button_get_active(