sync with sylpheed 0.6.5cvs20
[claws.git] / src / prefs_common.c
index 2d56f64263a3aa88516331b27065abb75aadb230..63df94483d418762fa3c278b19b0a93cd42479b4 100644 (file)
@@ -116,9 +116,10 @@ static struct Compose {
        GtkWidget *checkbtn_wrapatsend;
 
        GtkWidget *checkbtn_quote;
-       GtkWidget * checkbtn_forward_as_attachment;
-       GtkWidget * checkbtn_smart_wrapping;
-       GtkWidget * checkbtn_block_cursor;
+       GtkWidget *checkbtn_forward_as_attachment;
+       GtkWidget *checkbtn_smart_wrapping;
+       GtkWidget *checkbtn_block_cursor;
+       GtkWidget *checkbtn_reply_with_quote;
 
        /* spelling */
 #if USE_PSPELL
@@ -350,8 +351,7 @@ static PrefParam param[] = {
         prefs_dictionary_set_data_from_optmenu, prefs_dictionary_set_optmenu },
 #endif
        {"reply_with_quote", "TRUE", &prefs_common.reply_with_quote, P_BOOL,
-        &compose.checkbtn_quote,
-        prefs_set_data_from_toggle, prefs_set_toggle},
+        &compose.checkbtn_reply_with_quote, prefs_set_data_from_toggle, prefs_set_toggle},
 
        /* Account autoselection */
        {"reply_account_autoselect", "TRUE",
@@ -377,13 +377,13 @@ static PrefParam param[] = {
         &prefs_common.quotefmt, P_STRING, &quote.text_quotefmt,
         prefs_set_data_from_text, prefs_set_text},
 
-       {"fw_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING,
+       {"forward_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING,
         &quote.entry_fw_quotemark,
         prefs_set_data_from_entry, prefs_set_entry},
-       {"fw_quote_format",
+       {"forward_quote_format",
         "\\n\\nBegin forwarded message:\\n\\n"
-        "?d(Date: %d\\n)?f(From: %f\\n)?t(To: %t\\n)?c(Cc: %c\\n)"
-        "?n(Newsgroups: %n\\n)?s(Subject: %s\\n)\\n\\n%M",
+        "?d{Date: %d\\n}?f{From: %f\\n}?t{To: %t\\n}?c{Cc: %c\\n}"
+        "?n{Newsgroups: %n\\n}?s{Subject: %s\\n}\\n\\n%M",
         &prefs_common.fw_quotefmt, P_STRING, &quote.text_fw_quotefmt,
         prefs_set_data_from_text, prefs_set_text},
 
@@ -463,6 +463,8 @@ static PrefParam param[] = {
         &prefs_common.summary_col_visible[S_COL_NUMBER], P_BOOL, NULL, NULL, NULL},
        {"summary_col_show_score", "FALSE",
         &prefs_common.summary_col_visible[S_COL_SCORE], P_BOOL, NULL, NULL, NULL},
+       {"summary_col_show_locked", "FALSE",
+        &prefs_common.summary_col_visible[S_COL_LOCKED], P_BOOL, NULL, NULL, NULL},
 
        {"summary_col_pos_mark", "0",
          &prefs_common.summary_col_pos[S_COL_MARK], P_INT, NULL, NULL, NULL},
@@ -482,6 +484,8 @@ static PrefParam param[] = {
          &prefs_common.summary_col_pos[S_COL_NUMBER], P_INT, NULL, NULL, NULL},
        {"summary_col_pos_score", "8",
         &prefs_common.summary_col_pos[S_COL_SCORE], P_INT, NULL, NULL, NULL},
+       {"summary_col_pos_locked", "9",
+        &prefs_common.summary_col_pos[S_COL_LOCKED], P_INT, NULL, NULL, NULL},
 
        {"summary_col_size_mark", "10",
         &prefs_common.summary_col_size[S_COL_MARK], P_INT, NULL, NULL, NULL},
@@ -501,6 +505,8 @@ static PrefParam param[] = {
         &prefs_common.summary_col_size[S_COL_NUMBER], P_INT, NULL, NULL, NULL},
        {"summary_col_size_score", "40",
         &prefs_common.summary_col_size[S_COL_SCORE], P_INT, NULL, NULL, NULL},
+       {"summary_col_size_locked", "13",
+        &prefs_common.summary_col_size[S_COL_LOCKED], P_INT, NULL, NULL, NULL},
 
        /* Widget size */
        {"folderview_width", "179", &prefs_common.folderview_width, P_INT,
@@ -1599,6 +1605,8 @@ static void prefs_quote_create(void)
 
        GtkWidget *btn_quotedesc;
 
+       GtkWidget *checkbtn_reply_with_quote;
+
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
        gtk_widget_show (vbox1);
        gtk_container_add (GTK_CONTAINER (dialog.notebook), vbox1);
@@ -1606,6 +1614,8 @@ static void prefs_quote_create(void)
 
        /* reply */
 
+       PACK_CHECK_BUTTON (vbox1, checkbtn_reply_with_quote, _("Reply will quote by default"));
+
        PACK_FRAME (vbox1, frame_quote, _("Reply format"));
 
        vbox_quote = gtk_vbox_new (FALSE, VSPACING_NARROW);
@@ -1695,6 +1705,7 @@ static void prefs_quote_create(void)
        gtk_signal_connect(GTK_OBJECT(btn_quotedesc), "clicked",
                           GTK_SIGNAL_FUNC(prefs_quote_description), NULL);
 
+       compose.checkbtn_reply_with_quote= checkbtn_reply_with_quote;
        quote.entry_quotemark    = entry_quotemark;
        quote.text_quotefmt      = text_quotefmt;
        quote.entry_fw_quotemark = entry_fw_quotemark;
@@ -3087,8 +3098,9 @@ static void prefs_quote_description_create(void)
 {
        GtkWidget *vbox;
        GtkWidget *hbox;
-       GtkWidget *hbbox;
+       GtkWidget *vbox2;
        GtkWidget *label;
+       GtkWidget *hbbox;
        GtkWidget *ok_btn;
 
        quote_desc_win = gtk_window_new(GTK_WINDOW_DIALOG);
@@ -3097,17 +3109,24 @@ static void prefs_quote_description_create(void)
        gtk_container_set_border_width(GTK_CONTAINER(quote_desc_win), 8);
        gtk_window_set_position(GTK_WINDOW(quote_desc_win), GTK_WIN_POS_CENTER);
        gtk_window_set_modal(GTK_WINDOW(quote_desc_win), TRUE);
-       gtk_window_set_policy(GTK_WINDOW(quote_desc_win), FALSE, TRUE, FALSE);
+       gtk_window_set_policy(GTK_WINDOW(quote_desc_win), FALSE, FALSE, FALSE);
 
        vbox = gtk_vbox_new(FALSE, 8);
        gtk_container_add(GTK_CONTAINER(quote_desc_win), vbox);
 
-       hbox = gtk_hbox_new(FALSE, 4);
+       hbox = gtk_hbox_new(FALSE, 8);
        gtk_box_pack_start(GTK_BOX(vbox), hbox, TRUE, TRUE, 0);
 
+       vbox2 = gtk_vbox_new(FALSE, 8);
+       gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 0);
+
+#define PACK_LABEL() \
+       gtk_box_pack_start(GTK_BOX(vbox2), label, TRUE, TRUE, 0); \
+       gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT); \
+       gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
+
        label = gtk_label_new
-               ("SYMBOL\n\n"
-                 "%d\n"                /* date */
+               ("%d\n"         /* date */
                 "%f\n"         /* from */
                 "%N\n"         /* full name of sender */
                 "%F\n"         /* first name of sender */
@@ -3116,24 +3135,34 @@ static void prefs_quote_description_create(void)
                 "%t\n"         /* to */
                 "%c\n"         /* cc */
                 "%n\n"         /* newsgroups */
-                "%i\n"         /* message id */
                 "%r\n"         /* references */
-                "\n"
-                "%x\n"
-                "?x(expr)\n"   /* condition */
-                "\n"
-                "%M\n"         /* message body */
+                "%i");         /* message id */
+       PACK_LABEL();
+
+       label = gtk_label_new
+               ("?x{expr}");   /* condition */
+       PACK_LABEL();
+
+       label = gtk_label_new
+               ("%M\n"         /* message body */
                 "%Q\n"         /* quoted message body */
                 "%m\n"         /* message body without signature */
                 "%q\n"         /* quoted message body without signature */
                 "%%");         /* literal percent */
+       PACK_LABEL();
 
-       gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
-       gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
+       label = gtk_label_new
+               ("\\\\\n"       /* literal backslash */
+                "\\?\n"        /* literal question mark */
+                "\\{\n"        /* literal opening curly brace */
+                "\\}");        /* literal closing curly brace */
+       PACK_LABEL();
+
+       vbox2 = gtk_vbox_new(FALSE, 8);
+       gtk_box_pack_start(GTK_BOX(hbox), vbox2, TRUE, TRUE, 0);
 
        label = gtk_label_new
-               (_("DESCRIPTION\n\n"
-                   "Date\n"
+               (_("Date\n"
                   "From\n"
                   "Full Name of Sender\n"
                   "First Name of Sender\n"
@@ -3142,20 +3171,30 @@ static void prefs_quote_description_create(void)
                   "To\n"
                   "Cc\n"
                   "Newsgroups\n"
-                  "Message-ID\n"
                   "References\n"
-                  "\n"
-                  "Display the information\n"
-                  "If the information x is set, displays expr\n"
-                  "\n"
-                  "Message body\n"
+                  "Message-ID"));
+       PACK_LABEL();
+
+       label = gtk_label_new
+               (_("If x is set, displays expr"));
+       PACK_LABEL();
+
+       label = gtk_label_new
+               (_("Message body\n"
                   "Quoted message body\n"
                   "Message body without signature\n"
                   "Quoted message body without signature\n"
                   "Literal %"));
+       PACK_LABEL();
+
+       label = gtk_label_new
+               (_("Literal backslash\n"
+                  "Literal question mark\n"
+                  "Literal opening curly brace\n"
+                  "Literal closing curly brace"));
+       PACK_LABEL();
 
-       gtk_box_pack_start(GTK_BOX(hbox), label, TRUE, TRUE, 0);
-       gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
+#undef PACK_LABEL
 
        gtkut_button_set_create(&hbbox, &ok_btn, _("OK"),
                                NULL, NULL, NULL, NULL);