… | |
… | |
310 | |
310 | |
311 | sub append_entry { |
311 | sub append_entry { |
312 | my ($self, $ref, $width, $cb) = @_; |
312 | my ($self, $ref, $width, $cb) = @_; |
313 | |
313 | |
314 | my $widget = new Gtk2::Entry; |
314 | my $widget = new Gtk2::Entry; |
315 | $widget->set (text => $$ref, width_chars => $width, xalign => 1); |
315 | $widget->set (text => $$ref, width_chars => $width); |
|
|
316 | eval { $widget->set (xalign => 1) }; # workaround für 2.2 |
316 | $widget->signal_connect (changed => sub { |
317 | $widget->signal_connect (changed => sub { |
317 | $$ref = $_[0]->get_text; |
318 | $$ref = $_[0]->get_text; |
318 | $cb->($$ref) if $cb; |
319 | $cb->($$ref) if $cb; |
319 | }); |
320 | }); |
320 | |
321 | |