From 476c5b6dfa66b638093124277d2a2e10f1454417 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 2 Dec 2002 07:28:08 +0000 Subject: - use useless when needed - gtktext_insert() : add an append argument to prevent overwriting already present text in TextBuffer - gtkfontinfo() is bugged since it uses a C macro which is (oh surprise) not in binary library .... : $fontinfo{$_} = Gtk2::Pango->PANGO_PIXELS($metrics->$func); --- perl-install/ugtk2.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/perl-install/ugtk2.pm b/perl-install/ugtk2.pm index 4433f0650..a3168db53 100644 --- a/perl-install/ugtk2.pm +++ b/perl-install/ugtk2.pm @@ -30,7 +30,7 @@ use common; use Gtk2; -if (!$::no_ugtk_init) { +unless ($::no_ugtk_init) { !$ENV{DISPLAY} || system('/usr/X11R6/bin/xtest') and die "Cannot be run in console mode.\n"; Gtk2->init(\@ARGV); } @@ -497,10 +497,10 @@ sub gtkcreate_pixbuf { # [ 'third', { 'font' => 'Serif 15', ... } ], # ... ]); sub gtktext_insert { - my ($textview, $t, $opts) = @_; + my ($textview, $t, $opts, $append) = @_; if (ref($t) eq 'ARRAY') { my $buffer = $textview->get_buffer; - $buffer->set_text('', -1); + $buffer->set_text('', -1) unless $append; foreach my $token (@$t) { my $c = $buffer->get_char_count; $buffer->insert($buffer->get_end_iter, $token->[0], -1); -- cgit v1.2.1