added old hidden property zero_replacement_char
authorRicardo Mones <ricardo@mones.org>
Tue, 17 Jan 2012 00:52:36 +0000 (01:52 +0100)
committerRicardo Mones <ricardo@mones.org>
Tue, 17 Jan 2012 00:52:36 +0000 (01:52 +0100)
ChangeLog
VC
VERSION
clawsker

index 195522a47ef4b0ada2718fa0e8a84d90b79681c9..0d8ab6c6a6015a1b5daf6016496f71bfafef84c4 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-01-17 01:48  mones   0.7.5git456
+
+       * clawsker
+               Support forgotten property 'zero_replacement_char'
+
 2012-01-09 00:57  mones   0.7.5git455
 
        * clawsker
diff --git a/VC b/VC
index 4930863bdb2d45d2cd8b38f6b3f5c94ba1acacb7..8d38505c168687ee1b42c6b49f30d45468ab5638 100644 (file)
--- a/VC
+++ b/VC
@@ -1 +1 @@
-455
+456
diff --git a/VERSION b/VERSION
index e3ebf5bdca1826e820a9b9897262b0c2e7b608ce..a5a61e6d0236491e90472c27bdde61b9b70c5366 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.7.5git455
+0.7.5git456
index 8fa67976b4a833da21169cd81c2202f60543b18d..2086375669bdf709cc9de22fe0bf23cfd93d20d8 100755 (executable)
--- a/clawsker
+++ b/clawsker
@@ -112,6 +112,8 @@ sub _ {
     h_gui_margin_co => _('Shows a small margin in the Compose View.'),
     l_gui_mview_date => _('Don\'t display localized date'),
     h_gui_mview_date => _('Toggles localization of date format in Message View'),
+    l_gui_zero_char => _('Zero replacement character'),
+    h_gui_zero_char => _('Replaces \'0\' with the given character in Folder List'),
 
     l_beh_hover_t => _('Drag \'n\' drop hover timeout (ms)'),
     h_beh_hover_t => _('Time in milliseconds that will cause a folder tree to expand when the mouse cursor is held over it during drag and drop.'),
@@ -271,6 +273,13 @@ sub handle_string_value {
     $$dataref = $widget->get_text ();
 }
 
+sub handle_nchar_value {
+    my ($widget, $event, $dataref, $minlen) = @_;
+    $_ = substr ($widget->get_text (), 0, $minlen);
+    $widget->set_text ($_);
+    $$dataref = $_;
+}
+
 sub gdk_color_from_str {
     my ($str) = @_;
     my ($rr, $gg, $bb) = (0, 0 ,0);
@@ -422,6 +431,31 @@ sub new_text_box_for_int {
     return $hbox;
 }
 
+sub new_text_box_for_nchar {
+    my ($hash, $key) = @_;
+    my $name = $$hash{$key}[NAME];
+    my $label = $$hash{$key}[LABEL];
+    my @type = split (/,/, $$hash{$key}[TYPE]); # char,minlen,maxlen
+    my $hbox = Gtk2::HBox->new (FALSE, 5);
+    my $glabel = Gtk2::Label->new ($label);
+    my $gentry = Gtk2::Entry->new ();
+    $gentry->set_max_length($type[2]) if defined ($type[2]);
+    $gentry->set_width_chars(int ($type[2]) + 2) if defined ($type[2]);
+    $gentry->set_text ($HPVALUE{$name});
+    $$hash{$key}[GUI] = $gentry;
+    $gentry->signal_connect('key-release-event' => sub {
+            my ($w, $e) = @_;
+            &handle_nchar_value($w, $e, \$HPVALUE{$name}, $type[1]);
+        });
+    &set_widget_hint ($gentry, $$hash{$key}[DESC]);
+    &set_widget_sens ($gentry, $$hash{$key}[CMVER]);
+    $glabel->set_sensitive ($gentry->sensitive);
+    $hbox->pack_start ($glabel, FALSE, FALSE, HBOX_SPC);
+    $hbox->pack_start ($gentry, FALSE, FALSE, HBOX_SPC);
+    #
+    return $hbox;
+}
+
 sub new_color_button_for {
     my ($hash, $key) = @_;
     my $name = $$hash{$key}[NAME];
@@ -707,6 +741,15 @@ sub new_other_page() {
         '0',
         undef,
     ],
+    zero_char => [
+        'zero_replacement_char',
+        $xl::s{l_gui_zero_char},
+        $xl::s{h_gui_zero_char},
+        'char,1,1',
+        '2.8.1.77',
+        '0',
+        undef,
+    ],
 );
 
 sub new_gui_page() {
@@ -715,6 +758,7 @@ sub new_gui_page() {
 
     my $cb_dot_lines = &new_check_button_for (\%pr::gui, 'dot_lines'); 
     my $cb_toolbar_d = &new_check_button_for (\%pr::gui, 'toolbar_d');
+    my $tb_zero_char = &new_text_box_for_nchar (\%pr::gui, 'zero_char');
 
     $gf->pack_start (&new_subpage_frame (
                          &new_vbox_pack (
@@ -751,6 +795,7 @@ sub new_gui_page() {
                              &new_selection_box_for (\%pr::gui, 'v_scroll')),
                          $xl::s{sbar_frame}, 'not-packed'),
                      FALSE, FALSE, FRAME_SPC);
+    $gf->pack_start ($tb_zero_char, FALSE, FALSE, 0);
 
     return $gf;
 }