<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::Progress;
use strict;
use Gtk3;
use utf8;
use Debconf::Encoding qw(to_Unicode);
use base qw(Debconf::Element::Gnome);


sub _fraction {
	my $this=shift;

	return (($this-&gt;progress_cur() - $this-&gt;progress_min()) / ($this-&gt;progress_max() - $this-&gt;progress_min()));
}

sub start {
	my $this=shift;
	my $description=to_Unicode($this-&gt;question-&gt;description);
	my $frontend=$this-&gt;frontend;

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

	$frontend-&gt;title($description);

	$this-&gt;widget(Gtk3::ProgressBar-&gt;new());
	$this-&gt;widget-&gt;show;
	$this-&gt;widget-&gt;set_text(' ');
	$this-&gt;addwidget($this-&gt;widget);
	$this-&gt;addhelp;
}

sub set {
	my $this=shift;
	my $value=shift;

	$this-&gt;progress_cur($value);
	$this-&gt;widget-&gt;set_fraction($this-&gt;_fraction);

	return 1;
}

sub info {
	my $this=shift;
	my $question=shift;

	$this-&gt;widget-&gt;set_text(to_Unicode($question-&gt;description));
	
	return 1;
}

sub stop {
	my $this=shift;
	my $frontend=$this-&gt;frontend;

	$frontend-&gt;title($frontend-&gt;requested_title);
}

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