Add support for summary_from_show
[clawsker.git] / clawsker
index 24633923b3a161f99d0920b22348bf3eb173967c..f628046e6847bc952356bd5cd2096997ca1f9f3c 100755 (executable)
--- a/clawsker
+++ b/clawsker
@@ -1,7 +1,6 @@
 #!/usr/bin/perl -w
 #
 # Clawsker :: A Claws Mail Tweaker
-# $Id$
 #
 use strict;
 use encoding 'utf8';
@@ -91,9 +90,14 @@ sub _ {
     l_gui_v_scroll_show => _('Show always'),
     l_gui_v_scroll_auto => _('Automatic'),
     l_gui_v_scroll_hide => _('Hide always'),
+    l_gui_from_show => _('From column displays'),
+    h_gui_from_show => _('Selects the data displayed in the From column of the Message List: name, address or both'),
+    l_gui_from_show_name => _('Name only'),
+    l_gui_from_show_addr => _('Address only'),
+    l_gui_from_show_both => _('Both name and address'),
     l_gui_strip_off => _('Coloured lines contrast'),
     h_gui_strip_off => _('Specify the value to use when creating alternately coloured lines in tree view components. The smaller the value, the less visible the difference in the alternating colours of the lines.'),
-    l_gui_cursor_v => _('Show cursor in message view'),
+    l_gui_cursor_v => _('Show cursor'),
     h_gui_cursor_v => _('Display the cursor in the Message View.'),
     l_gui_toolbar_d => _('Detachable toolbars'),
     h_gui_toolbar_d => _('Show handles in the toolbars.'),
@@ -105,7 +109,7 @@ sub _ {
     h_gui_two_line_v => _('Spread Message List information over two lines when using the three column mode.'),
     l_gui_margin_co => _('Show compose margin'),
     h_gui_margin_co => _('Shows a small margin in the Compose View.'),
-    l_gui_mview_date => _('Don\'t display localized date in Message View'),
+    l_gui_mview_date => _('Don\'t display localized date'),
     h_gui_mview_date => _('Toggles localization of date format in Message View'),
 
     l_beh_hover_t => _('Drag \'n\' drop hover timeout (ms)'),
@@ -620,6 +624,15 @@ sub new_other_page() {
         '0',
         undef,
     ],
+    from_show => [
+        'summary_from_show',
+        $xl::s{l_gui_from_show},
+        $xl::s{h_gui_from_show},
+        '0=l_gui_from_show_name;1=l_gui_from_show_addr;2=l_gui_from_show_both',
+        '3.7.10',
+        '0',
+        undef,
+    ],
     strip_off => [
         'stripes_color_offset',
         $xl::s{l_gui_strip_off},
@@ -712,17 +725,18 @@ sub new_gui_page() {
                          &new_vbox_pack (
                              &new_check_button_for (\%pr::gui, 'b_unread'),
                              &new_check_button_for (\%pr::gui, 'swp_from'),
-                             &new_check_button_for (\%pr::gui, 'two_linev')),
+                             &new_check_button_for (\%pr::gui, 'two_linev'),
+                             &new_selection_box_for (\%pr::gui, 'from_show')),
                          $xl::s{mlist_frame}, 'not-packed'), 
                      FALSE, FALSE, FRAME_SPC);
     $gf->pack_start (&new_subpage_frame (
-                         &new_vbox_pack (
+                         &new_hbox_pack (
                              &new_check_button_for (\%pr::gui, 'cursor_v'),
                              &new_check_button_for (\%pr::gui, 'mview_date')),
                          $xl::s{mview_frame}, 'not-packed'), 
                      FALSE, FALSE, FRAME_SPC);
     $gf->pack_start (&new_subpage_frame (
-                         &new_vbox_pack (
+                         &new_hbox_pack (
                              &new_check_button_for (\%pr::gui, 'no_markup'),
                              &new_check_button_for (\%pr::gui, 'margin_co')),
                          $xl::s{compo_frame}, 'not-packed'),