diff options
author | Guillaume Cottenceau <gc@mandriva.com> | 2003-05-21 15:18:37 +0000 |
---|---|---|
committer | Guillaume Cottenceau <gc@mandriva.com> | 2003-05-21 15:18:37 +0000 |
commit | 742c60441a713dcecf0071ff19e9d52be51c8954 (patch) | |
tree | 1b9a51e9888ddf78d17b53adda550d3760111b97 | |
parent | c93e4be1c68cd8b039dba98abd2280d709b560da (diff) | |
download | drakx-742c60441a713dcecf0071ff19e9d52be51c8954.tar drakx-742c60441a713dcecf0071ff19e9d52be51c8954.tar.gz drakx-742c60441a713dcecf0071ff19e9d52be51c8954.tar.bz2 drakx-742c60441a713dcecf0071ff19e9d52be51c8954.tar.xz drakx-742c60441a713dcecf0071ff19e9d52be51c8954.zip |
gtktext_insert: fix indenting of one line, takes that as a
pretext to redo whole function identing without tabs
-rw-r--r-- | perl-install/ugtk2.pm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 53b2eb81d..d7091b4ec 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -526,22 +526,22 @@ sub gtktext_append { gtktext_insert(@_, append => 1) } sub gtktext_insert { my ($textview, $t, %opts) = @_; my $buffer = $textview->get_buffer; + $opts{append} or $buffer->set_text('', -1); if (ref($t) eq 'ARRAY') { - $opts{append} or $buffer->set_text('', -1); - foreach my $token (@$t) { - my ($iter1, $iter2); - my $c = $buffer->get_char_count; - $buffer->insert($iter1 = $buffer->get_end_iter, $token->[0], -1); + foreach my $token (@$t) { + my ($iter1, $iter2); + my $c = $buffer->get_char_count; + $buffer->insert($iter1 = $buffer->get_end_iter, $token->[0], -1); $iter1->free; - if ($token->[1]) { - my $tag = $buffer->create_tag(undef); - $tag->set(%{$token->[1]}); - $buffer->apply_tag($tag, $iter1 = $buffer->get_iter_at_offset($c), $iter2 = $buffer->get_end_iter); + if ($token->[1]) { + my $tag = $buffer->create_tag(undef); + $tag->set(%{$token->[1]}); + $buffer->apply_tag($tag, $iter1 = $buffer->get_iter_at_offset($c), $iter2 = $buffer->get_end_iter); $iter1->free; $iter2->free; - } - } + } + } } else { - $buffer->set_text($t, -1); + $buffer->set_text($t, -1); } #- the following line is needed to move the cursor to the beginning, so that if the #- textview has a scrollbar, it won't scroll to the bottom when focusing (#3633) |