summaryrefslogtreecommitdiffstats
path: root/perl-install/ugtk2.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-11 10:37:52 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-11 10:37:52 +0000
commit11fbfb07ee9bb95d69f94e684051a413ff7a7cb3 (patch)
tree5d11417629f23e736a4b13dfc9978362afea8821 /perl-install/ugtk2.pm
parent0c97e6812c0860771d876dbc6d7d46613f016e17 (diff)
downloaddrakx-backup-do-not-use-11fbfb07ee9bb95d69f94e684051a413ff7a7cb3.tar
drakx-backup-do-not-use-11fbfb07ee9bb95d69f94e684051a413ff7a7cb3.tar.gz
drakx-backup-do-not-use-11fbfb07ee9bb95d69f94e684051a413ff7a7cb3.tar.bz2
drakx-backup-do-not-use-11fbfb07ee9bb95d69f94e684051a413ff7a7cb3.tar.xz
drakx-backup-do-not-use-11fbfb07ee9bb95d69f94e684051a413ff7a7cb3.zip
(gtktext_insert) if we want anonymous tags, just create anonymous tags
instead of creating fake tag names that we just discard after (rand is not guarranted to not return the same number twice...)
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r--perl-install/ugtk2.pm7
1 files changed, 3 insertions, 4 deletions
diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm
index 881f4bb8f..02e3ac23e 100644
--- a/perl-install/ugtk2.pm
+++ b/perl-install/ugtk2.pm
@@ -613,15 +613,14 @@ sub gtktext_insert {
$opts{append} or $buffer->set_text('');
foreach my $token (@$t) {
my $iter1 = $buffer->get_end_iter;
- my $c = $buffer->get_char_count;
if ($token->[0] =~ /^Gtk2::Gdk::Pixbuf/) {
$buffer->insert_pixbuf($iter1, $token->[0]);
next;
}
- $buffer->insert($iter1, $token->[0]);
if ($token->[1]) {
- my $tag = $buffer->create_tag(rand(), %{$token->[1]});
- $buffer->apply_tag($tag, $iter1 = $buffer->get_iter_at_offset($c), $buffer->get_end_iter);
+ $buffer->insert_with_tags($iter1, $token->[0], $buffer->create_tag(undef, %{$token->[1]}));
+ } else {
+ $buffer->insert($iter1, $token->[0]);
}
}
} else {