Added popup menu for common preferences and account preferences
[claws.git] / src / prefs.h
index 3a7ed5a9226b06bd716b0bd7ff20c1ba4577c5e6..f680ecef9c1886577192b726dbc6df825d03f7a0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2001 Hiroyuki Yamamoto
  *
  * 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
@@ -35,6 +35,13 @@ typedef struct _PrefsDialog  PrefsDialog;
 
 #include "account.h"
 
+#define VSPACING               10
+#define VSPACING_NARROW                4
+#define VSPACING_NARROW_2      2
+#define VBOX_BORDER            16
+#define DEFAULT_ENTRY_WIDTH    80
+#define PREFSBUFSIZE           1024
+
 typedef enum
 {
        P_STRING,
@@ -76,14 +83,20 @@ struct _PrefsDialog
 #define SET_NOTEBOOK_LABEL(notebook, str, page_num) \
 { \
        GtkWidget *label; \
- \
+       gint i = page_num;      \
+  \
        label = gtk_label_new (str); \
        gtk_widget_show (label); \
        gtk_notebook_set_tab_label \
                (GTK_NOTEBOOK (notebook), \
                 gtk_notebook_get_nth_page \
-                       (GTK_NOTEBOOK (notebook), page_num), \
+                       (GTK_NOTEBOOK (notebook), i), \
                 label); \
+       gtk_notebook_set_menu_label_text \
+               (GTK_NOTEBOOK (notebook), \
+                gtk_notebook_get_nth_page \
+                       (GTK_NOTEBOOK (notebook), i), \
+                str);\
 }
 
 #define PACK_CHECK_BUTTON(box, chkbtn, label) \
@@ -108,6 +121,13 @@ struct _PrefsDialog
        gtk_frame_set_label_align(GTK_FRAME(frame), 0.01, 0.5); \
 }
 
+#define PACK_VSPACER(box, vbox, spacing) \
+{ \
+       vbox = gtk_vbox_new(FALSE, 0); \
+       gtk_widget_show(vbox); \
+       gtk_box_pack_start(GTK_BOX(box), vbox, FALSE, TRUE, spacing); \
+}
+
 #define SET_TOGGLE_SENSITIVITY(togglewid, targetwid) \
 { \
        gtk_widget_set_sensitive(targetwid, FALSE); \
@@ -150,5 +170,7 @@ void prefs_set_data_from_toggle     (PrefParam      *pparam);
 void prefs_set_toggle          (PrefParam      *pparam);
 void prefs_set_data_from_spinbtn(PrefParam     *pparam);
 void prefs_set_spinbtn         (PrefParam      *pparam);
+gboolean prefs_is_readonly(const gchar * path);
+gboolean prefs_rc_is_readonly(const gchar * rcfile);
 
 #endif /* __PREFS_H__ */