/*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004-2006 Hiroyuki Yamamoto & The Sylpheed-Claws Team
+ * Copyright (C) 2004-2011 Hiroyuki Yamamoto & 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
- * the Free Software Foundation; either version 2 of the License, or
+ * the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
*/
#ifdef HAVE_CONFIG_H
GtkWidget *checkbtn_wrapquote;
GtkWidget *checkbtn_wrappastes;
GtkWidget *checkbtn_autowrap;
+ GtkWidget *checkbtn_autoindent;
} WrappingPage;
-void prefs_wrapping_create_widget(PrefsPage *_page, GtkWindow *window,
+static void prefs_wrapping_create_widget(PrefsPage *_page, GtkWindow *window,
gpointer data)
{
WrappingPage *prefs_wrapping = (WrappingPage *) _page;
GtkWidget *vbox1;
GtkWidget *vbox2;
GtkWidget *label_linewrap;
- GtkObject *spinbtn_linewrap_adj;
+ GtkAdjustment *spinbtn_linewrap_adj;
GtkWidget *spinbtn_linewrap;
GtkWidget *checkbtn_wrapquote;
GtkWidget *checkbtn_wrappastes;
GtkWidget *checkbtn_autowrap;
+ GtkWidget *checkbtn_autoindent;
GtkWidget *hbox1;
vbox1 = gtk_vbox_new (FALSE, VSPACING);
PACK_CHECK_BUTTON (vbox2, checkbtn_autowrap, _("Auto wrapping"));
PACK_CHECK_BUTTON (vbox2, checkbtn_wrapquote, _("Wrap quotation"));
PACK_CHECK_BUTTON (vbox2, checkbtn_wrappastes, _("Wrap pasted text"));
+ PACK_CHECK_BUTTON (vbox2, checkbtn_autoindent, _("Auto indent"));
hbox1 = gtk_hbox_new (FALSE, 8);
gtk_widget_show (hbox1);
gtk_box_pack_start (GTK_BOX (vbox2), hbox1, FALSE, FALSE, 0);
- label_linewrap = gtk_label_new (_("Wrap messages at"));
+ label_linewrap = gtk_label_new (_("Wrap text at"));
gtk_widget_show (label_linewrap);
gtk_box_pack_start (GTK_BOX (hbox1), label_linewrap, FALSE, FALSE, 4);
- spinbtn_linewrap_adj = gtk_adjustment_new (72, 20, 1024, 1, 10, 10);
+ spinbtn_linewrap_adj = gtk_adjustment_new (72, 20, 1024, 1, 10, 0);
spinbtn_linewrap = gtk_spin_button_new
(GTK_ADJUSTMENT (spinbtn_linewrap_adj), 1, 0);
gtk_widget_set_size_request (spinbtn_linewrap, 64, -1);
prefs_common.linewrap_quote);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_wrappastes),
prefs_common.linewrap_pastes);
+ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_autoindent),
+ prefs_common.auto_indent);
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbtn_linewrap),
prefs_common.linewrap_len);
prefs_wrapping->checkbtn_wrapquote = checkbtn_wrapquote;
prefs_wrapping->checkbtn_wrappastes = checkbtn_wrappastes;
prefs_wrapping->checkbtn_autowrap = checkbtn_autowrap;
+ prefs_wrapping->checkbtn_autoindent = checkbtn_autoindent;
prefs_wrapping->page.widget = vbox1;
}
-void prefs_wrapping_save(PrefsPage *_page)
+static void prefs_wrapping_save(PrefsPage *_page)
{
WrappingPage *page = (WrappingPage *) _page;
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_wrappastes));
prefs_common.autowrap =
gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_autowrap));
+ prefs_common.auto_indent =
+ gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_autoindent));
}
static void prefs_wrapping_destroy_widget(PrefsPage *_page)