<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">#!/usr/bin/perl -w
# This file was preprocessed, do not edit!


package Debconf::Element::Gnome::Select;
use strict;
use Gtk2;
use utf8;
use Debconf::Encoding qw(to_Unicode);
use base qw(Debconf::Element::Gnome Debconf::Element::Select);


sub init {
	my $this=shift;

	my $default=$this-&gt;translate_default;
	my @choices=$this-&gt;question-&gt;choices_split;

	$this-&gt;SUPER::init(@_);

	$this-&gt;widget(Gtk2::ComboBox-&gt;new_text);
	$this-&gt;widget-&gt;show;

	foreach my $choice (@choices) {
		$this-&gt;widget-&gt;append_text(to_Unicode($choice));
	}

	$this-&gt;widget-&gt;set_active(0);
	for (my $choice=0; $choice &lt;= $#choices; $choice++) {
		if ($choices[$choice] eq $default) {
			$this-&gt;widget-&gt;set_active($choice);
			last;
		}
	}

	$this-&gt;adddescription;
	$this-&gt;addwidget($this-&gt;widget);
	$this-&gt;tip( $this-&gt;widget );
	$this-&gt;addhelp;
}


sub value {
	my $this=shift;

	return $this-&gt;translate_to_C_uni($this-&gt;widget-&gt;get_active_text);
}

*visible = \&amp;Debconf::Element::Select::visible;


1
</pre></body></html>