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 / String.pm < prev    next >
Encoding:
Perl POD Document  |  2006-07-24  |  649 b   |  41 lines

  1. #!/usr/bin/perl -w
  2. # This file was preprocessed, do not edit!
  3.  
  4.  
  5. package Debconf::Element::Gnome::String;
  6. use strict;
  7. use Gtk2;
  8. use utf8;
  9. use Debconf::Encoding qw(to_Unicode);
  10. use base qw(Debconf::Element::Gnome);
  11.  
  12.  
  13. sub init {
  14.     my $this=shift;
  15.  
  16.     $this->SUPER::init(@_);
  17.  
  18.     $this->widget(Gtk2::Entry->new);
  19.     $this->widget->show;
  20.  
  21.     my $default='';
  22.     $default=$this->question->value if defined $this->question->value;
  23.     
  24.     $this->widget->set_text(to_Unicode($default));
  25.  
  26.     $this->adddescription;
  27.     $this->addwidget($this->widget);
  28.     $this->tip( $this->widget );
  29.     $this->addhelp;
  30. }
  31.  
  32.  
  33. sub value {
  34.     my $this=shift;
  35.  
  36.     return $this->widget->get_chars(0, -1);
  37. }
  38.  
  39.  
  40. 1
  41.