home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / perl5 / Debconf / Element / Gnome / Note.pm < prev    next >
Encoding:
Perl POD Document  |  2006-07-24  |  1.1 KB  |  49 lines

  1. #!/usr/bin/perl -w
  2. # This file was preprocessed, do not edit!
  3.  
  4.  
  5. package Debconf::Element::Gnome::Note;
  6. use strict;
  7. use Debconf::Gettext;
  8. use Gtk2;
  9. use utf8;
  10. use Debconf::Encoding qw(to_Unicode);
  11. use Debconf::Element::Noninteractive::Note;
  12. use base qw(Debconf::Element::Gnome);
  13.  
  14.  
  15. sub init {
  16.     my $this=shift;
  17.     my $extended_description = to_Unicode($this->question->extended_description);
  18.  
  19.     $this->SUPER::init(@_);
  20.     $this->multiline(1);
  21.     $this->fill(1);
  22.     $this->expand(1);
  23.     $this->widget(Gtk2::HBox->new(0, 0));
  24.  
  25.     my $text = Gtk2::TextView->new();
  26.     my $textbuffer = $text->get_buffer;
  27.     $text->show;
  28.     $text->set_wrap_mode ("word");
  29.     $text->set_editable (0);
  30.  
  31.     my $scrolled_window = Gtk2::ScrolledWindow->new();
  32.     $scrolled_window->show;
  33.     $scrolled_window->set_policy('automatic', 'automatic');
  34.     $scrolled_window->set_shadow_type('in');
  35.     $scrolled_window->add ($text);
  36.  
  37.     $this->widget->show;
  38.     $this->widget->pack_start($scrolled_window, 1, 1, 0);
  39.  
  40.     $textbuffer->set_text($extended_description);
  41.  
  42.     $this->widget->show;
  43.     $this->adddescription;
  44.     $this->addwidget($this->widget);
  45. }
  46.  
  47.  
  48. 1
  49.