talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit 14b243655db5f329306c6e764a05f2ff69c284d5
parent 9dc4849397b93df3ab24b6a141185988979ff075
Author: Paul <paul@claws-mail.org>
Date:   Mon,  4 Nov 2019 14:30:56 +0000

move diff colour prefs into 'Message view' frame, and react to 'enable coloration...' checkbox

Diffstat:
Msrc/prefs_msg_colors.c | 63+++++++++++++++++++++++++++++++++------------------------------
1 file changed, 33 insertions(+), 30 deletions(-)

diff --git a/src/prefs_msg_colors.c b/src/prefs_msg_colors.c @@ -1,6 +1,6 @@ /* * Claws Mail -- a GTK+ based, lightweight, and fast e-mail client - * Copyright (C) 2004-2017 Hiroyuki Yamamoto & The Claws Mail Team + * Copyright (C) 2004-2019 The Claws Mail Team & 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 @@ -126,6 +126,8 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window, GtkWidget *hbox_quote; GtkWidget *vbox_quotefg; GtkWidget *vbox_quotebg; + GtkWidget *frame_diff; + GtkWidget *vbox4; /* custom colors */ GtkWidget *hbox_custom_colors; GtkWidget *vbox_custom_colors; @@ -306,36 +308,12 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window, COLOR_LABEL_PACK_START(hbox, COL_SIGNATURE, _("Signatures")); SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, label[COL_SIGNATURE]); - vbox2 = gtkut_get_options_frame(vbox1, &frame_folder, _("Folder list")); - - hbox = gtk_hbox_new(FALSE, VBOX_BORDER); - gtk_widget_show (hbox); - gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0); - - COLOR_BUTTON_PACK_START(hbox, COL_TGT_FOLDER, - C_("Tooltip", "Pick color for Target folder. " - "Target folder is used when the option " - "'Execute immediately when moving or " - "deleting messages' is turned off")); - - COLOR_LABEL_PACK_START(hbox, COL_TGT_FOLDER, _("Target folder")); + vbox4 = gtkut_get_options_frame(vbox2, &frame_diff, _("Patch messages and attachments")); + SET_TOGGLE_SENSITIVITY(checkbtn_enable_colors, frame_diff); hbox = gtk_hbox_new(FALSE, VBOX_BORDER); gtk_widget_show (hbox); - gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0); - - COLOR_BUTTON_PACK_START(hbox, COL_NEW, - C_("Tooltip", "Pick color for folders " - "containing new messages")); - - COLOR_LABEL_PACK_START(hbox, COL_NEW, - _("Folder containing new messages")); - - vbox2 = gtkut_get_options_frame(vbox1, &frame_folder, _("Patch messages/attachments")); - - hbox = gtk_hbox_new(FALSE, VBOX_BORDER); - gtk_widget_show (hbox); - gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0); + gtk_box_pack_start (GTK_BOX (vbox4), hbox, FALSE, TRUE, 0); COLOR_BUTTON_PACK_START(hbox, COL_DIFF_ADDED, C_("Tooltip", "Pick color for inserted lines")); @@ -344,7 +322,7 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window, hbox = gtk_hbox_new(FALSE, VBOX_BORDER); gtk_widget_show (hbox); - gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox4), hbox, FALSE, FALSE, 0); COLOR_BUTTON_PACK_START(hbox, COL_DIFF_DELETED, C_("Tooltip", "Pick color for removed lines")); @@ -354,7 +332,7 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window, hbox = gtk_hbox_new(FALSE, VBOX_BORDER); gtk_widget_show (hbox); - gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0); + gtk_box_pack_start (GTK_BOX (vbox4), hbox, FALSE, FALSE, 0); COLOR_BUTTON_PACK_START(hbox, COL_DIFF_HUNK, C_("Tooltip", "Pick color for hunk lines")); @@ -362,6 +340,31 @@ static void prefs_msg_colors_create_widget(PrefsPage *_page, GtkWindow *window, COLOR_LABEL_PACK_START(hbox, COL_DIFF_HUNK, _("Hunk lines")); + vbox2 = gtkut_get_options_frame(vbox1, &frame_folder, _("Folder list")); + + hbox = gtk_hbox_new(FALSE, VBOX_BORDER); + gtk_widget_show (hbox); + gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, TRUE, 0); + + COLOR_BUTTON_PACK_START(hbox, COL_TGT_FOLDER, + C_("Tooltip", "Pick color for Target folder. " + "Target folder is used when the option " + "'Execute immediately when moving or " + "deleting messages' is turned off")); + + COLOR_LABEL_PACK_START(hbox, COL_TGT_FOLDER, _("Target folder")); + + hbox = gtk_hbox_new(FALSE, VBOX_BORDER); + gtk_widget_show (hbox); + gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0); + + COLOR_BUTTON_PACK_START(hbox, COL_NEW, + C_("Tooltip", "Pick color for folders " + "containing new messages")); + + COLOR_LABEL_PACK_START(hbox, COL_NEW, + _("Folder containing new messages")); + /* custom colors */ vbox_custom_colors = gtk_vbox_new (FALSE, VSPACING_NARROW); gtk_widget_show (vbox_custom_colors);