diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-12-02 07:28:08 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-12-02 07:28:08 +0000 |
commit | 476c5b6dfa66b638093124277d2a2e10f1454417 (patch) | |
tree | e63f11a1533c5b0b9108272f3314648d0657d0d6 /perl-install/ugtk2.pm | |
parent | eeb05046a350f5e8c16eba914c17cc8bf61f49da (diff) | |
download | drakx-476c5b6dfa66b638093124277d2a2e10f1454417.tar drakx-476c5b6dfa66b638093124277d2a2e10f1454417.tar.gz drakx-476c5b6dfa66b638093124277d2a2e10f1454417.tar.bz2 drakx-476c5b6dfa66b638093124277d2a2e10f1454417.tar.xz drakx-476c5b6dfa66b638093124277d2a2e10f1454417.zip |
- 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);
Diffstat (limited to 'perl-install/ugtk2.pm')
-rw-r--r-- | perl-install/ugtk2.pm | 6 |
1 files 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); |