/usr/share/perl5/Debconf/Element/Gnome.pm is in debconf 1.5.49.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | #!/usr/bin/perl -w
# This file was preprocessed, do not edit!
package Debconf::Element::Gnome;
use strict;
use utf8;
use Gtk2;
use Debconf::Gettext;
use Debconf::Encoding qw(to_Unicode);
use base qw(Debconf::Element);
sub init {
my $this=shift;
$this->hbox(Gtk2::VBox->new(0, 10));
$this->hline1(Gtk2::HBox->new(0, 10));
$this->hline1->show;
$this->line1(Gtk2::VBox->new(0, 10));
$this->line1->show;
$this->line1->pack_end ($this->hline1, 1, 1, 0);
$this->hline2(Gtk2::HBox->new(0, 10));
$this->hline2->show;
$this->line2(Gtk2::VBox->new(0, 10));
$this->line2->show;
$this->line2->pack_end ($this->hline2, 1, 1, 0);
$this->vbox(Gtk2::VBox->new(0, 5));
$this->vbox->pack_start($this->line1, 0, 0, 0);
$this->vbox->pack_start($this->line2, 1, 1, 0);
$this->vbox->show;
$this->hbox->pack_start($this->vbox, 1, 1, 0);
$this->hbox->show;
$this->fill(0);
$this->expand(0);
$this->multiline(0);
}
sub addwidget {
my $this=shift;
my $widget=shift;
if ($this->multiline == 0) {
$this->hline1->pack_start($widget, 1, 1, 0);
}
else {
$this->hline2->pack_start($widget, 1, 1, 0);
}
}
sub adddescription {
my $this=shift;
my $description=to_Unicode($this->question->description);
my $label=Gtk2::Label->new($description);
$label->show;
$this->line1->pack_start($label, 0, 0, 0);
}
sub addbutton {
my $this=shift;
my $text = shift;
my $callback = shift;
my $button = Gtk2::Button->new_with_mnemonic(to_Unicode($text));
$button->show;
$button->signal_connect("clicked", $callback);
my $vbox = Gtk2::VBox->new(0, 0);
$vbox->show;
$vbox->pack_start($button, 1, 0, 0);
$this->hline1->pack_end($vbox, 0, 0, 0);
}
sub create_message_dialog {
my $this = shift;
my $type = shift;
my $title = shift;
my $text = shift;
my $dialog =
Gtk2::Dialog->new_with_buttons(to_Unicode($title), undef,
"modal", "gtk-close", "close");
$dialog->set_border_width(3);
my $hbox = Gtk2::HBox->new(0);
$dialog->vbox->pack_start($hbox, 1, 1, 5);
$hbox->show;
my $alignment = Gtk2::Alignment->new(0.5, 0.0, 1.0, 0.0);
$hbox->pack_start($alignment, 1, 1, 3);
$alignment->show;
my $image = Gtk2::Image->new_from_stock($type, "dialog");
$alignment->add($image);
$image->show;
my $label = Gtk2::Label->new(to_Unicode($text));
$label->set_line_wrap(1);
$hbox->pack_start($label, 1, 1, 2);
$label->show;
$dialog->run;
$dialog->destroy;
}
sub addhelp {
my $this=shift;
my $help=$this->question->extended_description;
return unless length $help;
$this->addbutton(gettext("_Help"), sub {
$this->create_message_dialog("gtk-dialog-info",
gettext("Help"),
to_Unicode($help));
});
if (defined $this->tip ){
$this->tooltips( Gtk2::Tooltips->new() );
$this->tooltips->set_tip($this->tip, to_Unicode($help),
undef );
$this->tooltips->enable;
}
}
sub value {
my $this=shift;
return '';
}
1
|