3 Tails::Persistence::Role::SetupStep - role for persistence setup steps
7 package Tails
::Persistence
::Role
::SetupStep
;
13 use Glib
qw{TRUE FALSE
};
18 setlocale
(LC_MESSAGES
, "");
19 textdomain
("tails-persistence-setup");
25 with
'Tails::Role::HasEncoding';
26 with
'Tails::Persistence::Role::HasStatusArea';
28 requires
'_build_main_box';
29 requires
'go_button_pressed';
48 foreach (qw{title subtitle description
}) {
59 isa
=> 'Gtk3::Button',
61 foreach (qw{go_callback success_callback
}) {
69 foreach (qw{drive_vendor drive_model
}) {
85 my $label = Gtk3
::Label
->new('');
86 $label->set_alignment(0.0, 0.5);
87 my $attrlist = Pango
::AttrList
->new;
89 foreach ( Pango
::AttrScale
->new(1.3),Pango
::AttrWeight
->new('bold') );
90 $label->set_attributes($attrlist);
91 $label->set_padding(10, 10);
99 my $label = Gtk3
::Label
->new('');
100 $label->set_alignment(0.0, 0.5);
101 my $attrlist = Pango
::AttrList
->new;
102 $attrlist->insert($_)
103 foreach ( Pango
::AttrScale
->new(1.1),Pango
::AttrWeight
->new('bold') );
104 $label->set_attributes($attrlist);
105 $label->set_padding(10, 10);
106 $label->set_line_wrap(TRUE
);
107 $label->set_line_wrap_mode('word');
108 $label->set_single_line_mode(FALSE
);
113 sub _build_description
{
116 my $label = Gtk3
::Label
->new('');
117 $label->set_alignment(0.0, 0.5);
118 $label->set_padding(10, 10);
119 $label->set_line_wrap(TRUE
);
120 $label->set_line_wrap_mode('word');
121 $label->set_single_line_mode(FALSE
);
126 sub _build_go_button
{
129 my $button = Gtk3
::Button
->new;
130 $button->set_sensitive(FALSE
);
131 $button->set_can_default(TRUE
);
132 $button->signal_connect('clicked', sub { $self->go_button_pressed });