2008-11-12 [colin] 3.6.1cvs23
[claws.git] / src / prefs_gtk.h
index e65b64ced065cb6d2d025d1f80ef693856ad9f97..5b2e542cffa302275993a88660c8572847c23250 100644 (file)
@@ -1,10 +1,10 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto and the Sylpheed-Claws team
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto and 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/>.
+ * 
  */
 
 #ifndef __PREFS_GTK_H__
 #define __PREFS_GTK_H__
 
 #include <glib.h>
-#include <gtk/gtkwidget.h>
-#include <gtk/gtksignal.h>
-#include <gtk/gtklabel.h>
-#include <gtk/gtknotebook.h>
-#include <gtk/gtkcheckbutton.h>
-#include <gtk/gtkbox.h>
+#include <gtk/gtk.h>
 #include <stdio.h>
 
 typedef struct _PrefParam      PrefParam;
@@ -36,12 +31,13 @@ typedef struct _PrefsDialog PrefsDialog;
 #include "account.h"
 #include "gtk/prefswindow.h"
 
+#define HSPACING_NARROW                4
 #define VSPACING               10
 #define VSPACING_NARROW                4
 #define VSPACING_NARROW_2      2
 #define VBOX_BORDER            8
 #define DEFAULT_ENTRY_WIDTH    80
-#define PREFSBUFSIZE           1024
+#define PREFSBUFSIZE           32768
 
 typedef enum
 {
@@ -97,18 +93,18 @@ struct _PrefsDialog
                 str);\
 }
 
-#define PACK_CHECK_BUTTON(box, chkbtn, label) \
+#define PACK_CHECK_BUTTON(box, checkbtn, label) \
 { \
-       chkbtn = gtk_check_button_new_with_label(label); \
-       gtk_widget_show(chkbtn); \
-       gtk_box_pack_start(GTK_BOX(box), chkbtn, FALSE, TRUE, 0); \
+       checkbtn = gtk_check_button_new_with_label(label); \
+       gtk_widget_show(checkbtn); \
+       gtk_box_pack_start(GTK_BOX(box), checkbtn, FALSE, TRUE, 0); \
 }
 
-#define PACK_END_CHECK_BUTTON(box, chkbtn, label) \
+#define PACK_END_CHECK_BUTTON(box, checkbtn, label) \
 { \
-       chkbtn = gtk_check_button_new_with_label(label); \
-       gtk_widget_show(chkbtn); \
-       gtk_box_pack_end(GTK_BOX(box), chkbtn, FALSE, TRUE, 0); \
+       checkbtn = gtk_check_button_new_with_label(label); \
+       gtk_widget_show(checkbtn); \
+       gtk_box_pack_end(GTK_BOX(box), checkbtn, FALSE, TRUE, 0); \
 }
 
 #define PACK_FRAME(box, frame, label) \
@@ -144,8 +140,6 @@ void prefs_read_config              (PrefParam      *param,
                                 const gchar    *label,
                                 const gchar    *rcfile,
                                 const gchar    *encoding);
-void prefs_config_parse_one_line(PrefParam     *param,
-                                const gchar    *buf);
 void prefs_write_config                (PrefParam      *param,
                                 const gchar    *label,
                                 const gchar    *rcfile);
@@ -159,9 +153,6 @@ gint prefs_write_close_revert       (PrefFile       *pfile);
 void prefs_set_default         (PrefParam      *param);
 void prefs_free                        (PrefParam      *param);
 
-void prefs_dialog_create       (PrefsDialog    *dialog);
-void prefs_dialog_destroy      (PrefsDialog    *dialog);
-
 void prefs_button_toggled      (GtkToggleButton        *toggle_btn,
                                 GtkWidget              *widget);
 void prefs_button_toggled_reverse      (GtkToggleButton        *toggle_btn,
@@ -172,9 +163,13 @@ void prefs_set_data_from_dialog    (PrefParam      *param);
 void prefs_set_dialog_to_default(PrefParam     *param);
 
 void prefs_set_data_from_entry (PrefParam      *pparam);
+void prefs_set_escaped_data_from_entry (PrefParam      *pparam);
 void prefs_set_entry           (PrefParam      *pparam);
+void prefs_set_entry_from_escaped      (PrefParam      *pparam);
 void prefs_set_data_from_text  (PrefParam      *pparam);
+void prefs_set_escaped_data_from_text  (PrefParam      *pparam);
 void prefs_set_text            (PrefParam      *pparam);
+void prefs_set_text_from_escaped(PrefParam *pparam);
 void prefs_set_data_from_toggle        (PrefParam      *pparam);
 void prefs_set_toggle          (PrefParam      *pparam);
 void prefs_set_data_from_spinbtn(PrefParam     *pparam);
@@ -184,4 +179,7 @@ void prefs_gtk_open         (void);
 void prefs_gtk_register_page   (PrefsPage      *page);
 void prefs_gtk_unregister_page (PrefsPage      *page);
 
+void prefs_prepare_cache(void);
+void prefs_destroy_cache(void);
+
 #endif /* __PREFS_H__ */