summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-05-23 16:10:03 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-05-23 16:10:03 +0000
commitd6f5330ee63311a3e5c8ef52693ac7193ea83ede (patch)
tree597f252be23c47345b40109c08f58b8fa849b524 /perl-install/standalone
parent9731f6a53e8701039a1fa0102427fbdd5eb60df0 (diff)
downloaddrakx-d6f5330ee63311a3e5c8ef52693ac7193ea83ede.tar
drakx-d6f5330ee63311a3e5c8ef52693ac7193ea83ede.tar.gz
drakx-d6f5330ee63311a3e5c8ef52693ac7193ea83ede.tar.bz2
drakx-d6f5330ee63311a3e5c8ef52693ac7193ea83ede.tar.xz
drakx-d6f5330ee63311a3e5c8ef52693ac7193ea83ede.zip
perl_checker fixes
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakTermServ84
-rwxr-xr-xperl-install/standalone/drakautoinst43
-rwxr-xr-xperl-install/standalone/drakbackup274
-rwxr-xr-xperl-install/standalone/drakboot34
-rwxr-xr-xperl-install/standalone/drakbug8
-rwxr-xr-xperl-install/standalone/drakconnect53
-rwxr-xr-xperl-install/standalone/drakfloppy30
-rwxr-xr-xperl-install/standalone/drakfont67
-rwxr-xr-xperl-install/standalone/drakgw10
-rwxr-xr-xperl-install/standalone/drakperm14
-rwxr-xr-xperl-install/standalone/drakpxe6
-rwxr-xr-xperl-install/standalone/draksec16
-rwxr-xr-xperl-install/standalone/draksplash4
-rwxr-xr-xperl-install/standalone/fileshareset14
-rwxr-xr-xperl-install/standalone/harddrake26
-rwxr-xr-xperl-install/standalone/logdrake18
-rwxr-xr-xperl-install/standalone/net_monitor40
17 files changed, 359 insertions, 362 deletions
diff --git a/perl-install/standalone/drakTermServ b/perl-install/standalone/drakTermServ
index e5a4a95d2..03e7a2982 100755
--- a/perl-install/standalone/drakTermServ
+++ b/perl-install/standalone/drakTermServ
@@ -214,13 +214,13 @@ sub cursor_norm() {
sub display_error {
my ($message) = @_;
my $error_box;
- $$central_widget->destroy();
+ $$central_widget->destroy;
gtkpack($status_box,
$error_box = gtkpack_(new Gtk2::VBox(0,0),
1, new Gtk2::Label($message),
0, gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
gtksignal_connect(new Gtk2::Button(N("OK")), clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
}),
),
)
@@ -246,64 +246,64 @@ sub interactive_mode() {
$main_box = new Gtk2::VBox(0,10),
),
1, gtkpack_(new Gtk2::HBox(0,2),
- 0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new(), 'end'),
+ 0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new, 'end'),
gtksignal_connect(new Gtk2::Button(N("Enable Server")), clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
$windows = 1;
cursor_wait();
enable_ts();
cursor_norm();
}),
gtksignal_connect(new Gtk2::Button(N("Disable Server")), clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
cursor_wait();
disable_ts();
cursor_norm();
}),
),
- 0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new(), 'end'),
+ 0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new, 'end'),
gtksignal_connect(new Gtk2::Button(N("Start Server")), clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
$windows = 0;
cursor_wait();
start_ts();
cursor_norm();
}),
gtksignal_connect(new Gtk2::Button(N("Stop Server")), clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
cursor_wait();
stop_ts();
cursor_norm();
}),
),
- 0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new(), 'end'),
+ 0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new, 'end'),
gtksignal_connect(new Gtk2::Button(N("Etherboot Floppy/ISO")), clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
$windows = 1;
make_boot();
}),
gtksignal_connect(new Gtk2::Button(N("Net Boot Images")), clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
make_nbi();
}),
),
- 0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new(), 'end'),
+ 0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new, 'end'),
gtksignal_connect(new Gtk2::Button(N("Add/Del Users")), clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
$windows = 0;
maintain_users();
}),
- gtksignal_connect(new Gtk2::Button(N("Add/Del Clients")), clicked => sub { $$central_widget->destroy(); maintain_clients() }),
+ gtksignal_connect(new Gtk2::Button(N("Add/Del Clients")), clicked => sub { $$central_widget->destroy; maintain_clients() }),
),
1, new Gtk2::HBox(0,2),
- 0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new(), 'end'),
+ 0, gtkadd(gtkset_layout(Gtk2::VButtonBox->new, 'end'),
gtksignal_connect(new Gtk2::Button(N("Help")),clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
help();
}),
gtksignal_connect(new Gtk2::Button(N("Close")), clicked => sub {
write_conf_file();
- Gtk2->main_quit();
+ Gtk2->main_quit;
}),
),
),
@@ -314,7 +314,7 @@ sub interactive_mode() {
$central_widget = \$main_box;
$window1->{rwindow}->show_all;
$window1->{rwindow}->realize;
- $window1->{rwindow}->show_all();
+ $window1->{rwindow}->show_all;
$window1->main;
ugtk2->exit(0);
@@ -349,12 +349,12 @@ sub text_view {
),
0, gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
gtksignal_connect(new Gtk2::Button(N("OK")), clicked =>
- sub { $$central_widget->destroy() }),
+ sub { $$central_widget->destroy }),
),
)
);
$central_widget = \$box;
- $status_box->show_all();
+ $status_box->show_all;
}
sub help() {
@@ -493,7 +493,7 @@ sub make_boot() {
);
$central_widget = \$boot_box;
- $boot_box->show_all();
+ $boot_box->show_all;
}
sub make_nbi() {
@@ -639,7 +639,7 @@ sub make_nbi() {
);
$central_widget = \$nbi_box;
- $nbi_box->show_all();
+ $nbi_box->show_all;
}
sub maintain_users() {
@@ -661,7 +661,7 @@ sub maintain_users() {
foreach (@sys_users) {
my ($s_label) = split(/:/, $_, 2);
- if (grep { /$s_label/ } @homes) {
+ if (any { /$s_label/ } @homes) {
$list_model->append($iter);
$list_model->set($iter, [ 0 => $s_label ]);
}
@@ -721,7 +721,7 @@ sub maintain_users() {
);
$central_widget = \$user_box;
- $user_box->show_all();
+ $user_box->show_all;
}
sub maintain_clients() {
@@ -819,10 +819,10 @@ sub maintain_clients() {
),
# new Gtk2::HBox(1,1),
gtksignal_connect(new Gtk2::Button(N("Add Client -->")), clicked =>
- sub { my $hostname = $entry_host->get_text();
- my $mac = $entry_mac->get_text();
- my $ip = $entry_ip->get_text();
- my $nbi = $entry_nbi->entry->get_text();
+ sub { my $hostname = $entry_host->get_text;
+ my $mac = $entry_mac->get_text;
+ my $ip = $entry_ip->get_text;
+ my $nbi = $entry_nbi->entry->get_text;
if ($hostname && $mac && $ip) {
my $result = addclient(0, $hostname, $mac, $ip, $nbi, $is_thin);
@@ -880,7 +880,7 @@ sub maintain_clients() {
}
}),
gtksignal_connect(new Gtk2::Button(N("dhcpd Config...")), clicked =>
- sub { $$central_widget->destroy(); dhcpd_config() }),
+ sub { $$central_widget->destroy; dhcpd_config }),
# new Gtk2::HBox(1,1),
),
create_scrolled_window($tree_clients),
@@ -916,7 +916,7 @@ sub maintain_clients() {
}
);
$central_widget = \$client_box;
- $client_box->show_all();
+ $client_box->show_all;
}
sub dhcpd_config() {
@@ -1055,17 +1055,17 @@ sub dhcpd_config() {
gtkadd(new Gtk2::HBox),
gtksignal_connect(new Gtk2::Button(N("Write Config")), clicked =>
sub { write_dhcpd_config(
- $entry_subnet->get_text(),
- $entry_netmask->get_text(),
- $entry_routers->get_text(),
- $entry_subnet_mask->get_text(),
- $entry_broadcast->get_text(),
- $entry_domain->get_text(),
- $entry_name_server1->get_text(),
- $entry_name_server2->get_text(),
- $entry_name_server3->get_text(),
- $entry_ip_range_start->get_text(),
- $entry_ip_range_end->get_text(),
+ $entry_subnet->get_text,
+ $entry_netmask->get_text,
+ $entry_routers->get_text,
+ $entry_subnet_mask->get_text,
+ $entry_broadcast->get_text,
+ $entry_domain->get_text,
+ $entry_name_server1->get_text,
+ $entry_name_server2->get_text,
+ $entry_name_server3->get_text,
+ $entry_ip_range_start->get_text,
+ $entry_ip_range_end->get_text,
) }),
new Gtk2::HBox(0,10),
),
@@ -1073,7 +1073,7 @@ sub dhcpd_config() {
);
$central_widget = \$dhcpd_box;
- $dhcpd_box->show_all();
+ $dhcpd_box->show_all;
}
sub get_mask_from_sys() {
diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst
index 789f57d3c..b46f89d3f 100755
--- a/perl-install/standalone/drakautoinst
+++ b/perl-install/standalone/drakautoinst
@@ -73,7 +73,7 @@ my $dev = devices::make($floppy);
$in->ask_okcancel('', N("Insert a blank floppy in drive %s", $floppy), 1) or quit_global($in, 0);
{
log::explanations(N("Creating auto install floppy"));
- my $w = $in->wait_message('', N("Creating auto install floppy"));
+ my $_w = $in->wait_message('', N("Creating auto install floppy"));
commands::dd("if=$imagefile", "of=$dev", "bs=1440", "count=1024");
common::sync();
}
@@ -95,7 +95,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
$struct_gui{$_} = 'Users' foreach qw(superuser users authentication);
$struct_gui{$_} = 'Hardware' foreach qw(keyboard mouse X printer wacom nomouseprobe);
- %pixmap = ( lang => 'language',
+ %pixmap = (lang => 'language',
isUpgrade => '',
security => 'security',
autoExitInstall => '',
@@ -151,7 +151,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
$box->{vis} = 0;
my @button_to_hide;
0, gtksignal_connect(new Gtk2::Button($_), clicked => sub {
- if ($box->{vis}) { $box->hide(); $box->{vis} = 0; $notebook->set_page(0) }
+ if ($box->{vis}) { $box->hide; $box->{vis} = 0; $notebook->set_page(0) }
else {
$_->hide, $_->{vis}=0 foreach @box_to_hide;
$box->show; $box->{vis} = 1;
@@ -177,7 +177,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
translate($_->[0]),
)
), released => sub {
- $button->get_active() or $button->set_active(1),return;
+ $button->get_active or $button->set_active(1), return;
$_->set_active(0) foreach @button_to_hide;
$button->set_active(1);
$box->{active_function} = $function;
@@ -249,8 +249,8 @@ sub h2widget {
my $vb;
my @widget_list;
my $i = -1;
- my @list_keys = keys(%{$k});
- if (ref(${$k}{$list_keys[0]}) =~ /HASH/) {
+ my @list_keys = keys(%$k);
+ if (ref($k->{$list_keys[0]}) =~ /HASH/) {
$i++;
my ($button_add, $button_remove);
$w = gtkpack_(new Gtk2::VBox(0,0),
@@ -258,27 +258,27 @@ sub h2widget {
$widget_list[$i] = create_packtable({ col_spacings => 10, row_spacings => 3 },
map {
my $e;
- $e = h2widget(${$k}{$_}, "$label\{$_\}");
+ $e = h2widget($k->{$_}, "$label\{$_\}");
[ "$_ : ", $e ] } @list_keys
),
)
),
- control_buttons(${$k}{$list_keys[0]},
+ control_buttons($k->{$list_keys[0]},
sub { my ($vb, $widget_list2, $ref_local_k, $i) = @_;
- my @widget_list = @{$widget_list2};
+ my @widget_list = @$widget_list2;
my $field = $in->ask_from_entry(N("Auto Install"), ("Enter the name of the new field you want to add")) or return undef;
$field eq '' and return undef;
gtkpack__($vb,
$widget_list[$i] = create_packtable({ col_spacings => 10, row_spacings => 3 },
[ "$field : ", h2widget($ref_local_k, "$label\{$field\}") ])
);
- @{$widget_list2} = @widget_list;
+ @$widget_list2 = @widget_list;
},
$vb, \$i, \@widget_list)
);
} else {
$w = create_packtable({ col_spacings => 10, row_spacings => 3 },
- map { create_entry_element(${$k}{$_}, "$label\{$_\}", $_) } @list_keys
+ map { create_entry_element($k->{$_}, "$label\{$_\}", $_) } @list_keys
)
}
} elsif (ref($k) =~ /ARRAY/) {
@@ -288,21 +288,20 @@ sub h2widget {
$w = gtkpack_(new Gtk2::VBox(0,0),
1, create_scrolled_window(
gtkpack__($vb = new Gtk2::VBox(0,5),
- map { $i++; $widget_list[$i] = h2widget($_, "$label\[$i\]") } @{$k},
+ map { $i++; $widget_list[$i] = h2widget($_, "$label\[$i\]") } @$k,
)
),
- control_buttons(@{$k}[0],
+ control_buttons($k->[0],
sub { my ($vb, $widget_list2, $ref_local_k, $i) = @_;
- my @widget_list = @{$widget_list2};
+ my @widget_list = @$widget_list2;
gtkpack__($vb, $widget_list[$i] = h2widget($ref_local_k, "$label\[$i\]"));
- @{$widget_list2} = @widget_list;
+ @$widget_list2 = @widget_list;
},
$vb, \$i, \@widget_list)
);
} else {
- $label =~ /\$o->\{(.+)\}/;
$w = create_packtable({ col_spacings => 10, row_spacings => 3 },
- create_entry_element($k, $label, $1))
+ create_entry_element($k, $label, $1)) if $label =~ /\$o->\{(.+)\}/;
}
return $w;
}
@@ -320,7 +319,7 @@ sub create_entry_element {
$e->{value} = $value;
my $tag = Gtk2->timeout_add(1000, sub { $e->set_text($text); 0 });
gtksignal_connect($e, changed => sub {
- my $exe = $e->{value} . "='" . $e->get_text() . "'";
+ my $exe = $e->{value} . "='" . $e->get_text . "'";
print "EXEC : $exe\n ";
eval $exe;
});
@@ -330,10 +329,10 @@ sub create_entry_element {
sub control_buttons {
my ($ref_local_k, $local_gui, $vb, $j, $widget_list2) = @_;
- my @widget_list = @{$widget_list2};
- my $i = ${$j};
+ my @widget_list = @$widget_list2;
+ my $i = $$j;
ref($ref_local_k) =~ /HASH/ or return();
- my (%local_k) = %{$ref_local_k};
+ my (%local_k) = %$ref_local_k;
my ($button_add, $button_remove);
0, gtkadd(gtkset_border_width(gtkset_layout(new Gtk2::HButtonBox, 'spread'), 5),
gtksignal_connect($button_add = new Gtk2::Button(N("Add an item")), clicked => sub {
@@ -345,7 +344,7 @@ sub control_buttons {
),
gtksignal_connect($button_remove = new Gtk2::Button(N("Remove the last item")), clicked => sub {
$i >= 0 or return;
- $widget_list[$i]->destroy();
+ $widget_list[$i]->destroy;
$i--;
$i >= 0 or $button_remove->set_sensitive(0);
}
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup
index c268fa33e..178cda96d 100755
--- a/perl-install/standalone/drakbackup
+++ b/perl-install/standalone/drakbackup
@@ -410,18 +410,18 @@ sub all_user_list() {
sub the_time() {
$the_time = "_";
- $the_time .= localtime->year() + 1900;
- if (localtime->mon() < 9) { $the_time .= "0" }
- $the_time .= localtime->mon() + 1;
- if (localtime->mday() < 10) { $the_time .= "0" }
- $the_time .= localtime->mday();
+ $the_time .= localtime->year + 1900;
+ if (localtime->mon < 9) { $the_time .= "0" }
+ $the_time .= localtime->mon + 1;
+ if (localtime->mday < 10) { $the_time .= "0" }
+ $the_time .= localtime->mday;
$the_time .= "_";
- if (localtime->hour() < 10) { $the_time .= "0" }
- $the_time .= localtime->hour();
- if (localtime->min() < 10) { $the_time .= "0" }
- $the_time .= localtime->min();
- if (localtime->sec() < 10) { $the_time .= "0" }
- $the_time .= localtime->sec();
+ if (localtime->hour < 10) { $the_time .= "0" }
+ $the_time .= localtime->hour;
+ if (localtime->min < 10) { $the_time .= "0" }
+ $the_time .= localtime->min;
+ if (localtime->sec < 10) { $the_time .= "0" }
+ $the_time .= localtime->sec;
}
sub get_tape_info() {
@@ -859,7 +859,7 @@ sub do_expect {
my $exit_stat = $exp->exitstatus;
$in->ask_warn('', N("Transfer successful\nYou may want to verify you can login to the server with:\n\nssh -i %s %s\@%s\n\nwithout being prompted for a password.", $backup_key, $login_user, $host_name)) if $exit_stat == 0 && $mode eq "sendkey";
$log_buff .= "$_\n" if $exit_stat == 0 && $mode eq "backup";
- $exp->hard_close();
+ $exp->hard_close;
}
$interactive and progress($pbar, $plabel, 0.5, "Done...");
$interactive = 1 if $mode eq "sendkey";
@@ -1193,7 +1193,7 @@ sub build_backup_files() {
$nonroot_user and $tar_cmd_user .= " --exclude .drakbackup";
-d $save_path and @dir_content = all($save_path);
- grep { /^backup_base_sys/ } @dir_content and $base_sys_exist = 1;
+ any { /^backup_base_sys/ } @dir_content and $base_sys_exist = 1;
if ($where_hd && !$daemon || $daemon) {
$interactive and progress($pbar, $plabel, 0.5, N("Backup system files..."));
@@ -1203,7 +1203,7 @@ sub build_backup_files() {
$incr =~ s/incr/diff/ if $sys_diff_mode;
#- 8/19/2002 - changed these greps to look at the list, rather than the tar file
#- we retain the list for other media backups, but the tar file goes away, potentially
- if ((grep { /^list_incr_sys/ } @dir_content) && !$sys_diff_mode) {
+ if ((any { /^list_incr_sys/ } @dir_content) && !$sys_diff_mode) {
my @more_recent = grep { /^list_incr_sys/ } sort @dir_content;
$more_recent = pop @more_recent;
$DEBUG and print "more recent file: $more_recent\n";
@@ -1217,7 +1217,7 @@ sub build_backup_files() {
$results .= "\nfile: $save_path/backup_incr_sys$the_time.$tar_ext\n";
$results .= cat_("$save_path/list_incr_sys$the_time.txt");
}
- } elsif (grep { /^list_base_sys/ } @dir_content) {
+ } elsif (any { /^list_base_sys/ } @dir_content) {
my @more_recent = grep { /^list_base_sys/ } sort @dir_content;
$more_recent = pop @more_recent;
$DEBUG and print "more recent file: $more_recent\n";
@@ -1258,7 +1258,7 @@ sub build_backup_files() {
$incr =~ s/incr/diff/ if $user_diff_mode;
#- 8/19/2002 - changed these greps to look at the list, rather than the tar file
#- we retain the list for other media backups, but the tar file goes away, potentially
- if ((grep { /^list_incr_user_$user/ } @dir_content) && !$user_diff_mode) {
+ if ((any { /^list_incr_user_$user/ } @dir_content) && !$user_diff_mode) {
my @more_recent = grep { /^list_incr_user_$user/ } sort @dir_content;
$more_recent = pop @more_recent;
$DEBUG and print "more recent file: $more_recent\n";
@@ -1272,7 +1272,7 @@ sub build_backup_files() {
$results .= " \nfile: $save_path/backup_incr_user_$user$the_time.$tar_ext\n";
$results .= cat_("$save_path/list_incr_user_$user$the_time.txt");
}
- } elsif (grep { /^list_base_user_$user/ } @dir_content) {
+ } elsif (any { /^list_base_user_$user/ } @dir_content) {
my @more_recent = grep { /^list_base_user_$user/ } sort @dir_content;
$more_recent = pop @more_recent;
$DEBUG and print "more recent file: $more_recent\n";
@@ -1309,7 +1309,7 @@ sub build_backup_files() {
if ($backup_other_versions) {
$incr = "incr_other";
$incr =~ s/incr/diff/ if $other_diff_mode;
- if ((grep { /^list_incr_other/ } @dir_content) && !$user_diff_mode) {
+ if ((any { /^list_incr_other/ } @dir_content) && !$user_diff_mode) {
my @more_recent = grep { /^list_incr_other/ } sort @dir_content;
$more_recent = pop @more_recent;
$DEBUG and print "more recent file: $more_recent\n";
@@ -1323,7 +1323,7 @@ sub build_backup_files() {
$results .= "\nfile: $save_path/backup_incr_other$the_time.$tar_ext\n";
$results .= cat_("$save_path/list_incr_other$the_time.txt");
}
- } elsif (grep { /^list_base_other/ } @dir_content) {
+ } elsif (any { /^list_base_other/ } @dir_content) {
my @more_recent = grep { /^list_base_other/ } sort @dir_content;
$more_recent = pop @more_recent;
$DEBUG and print "more recent file: $more_recent\n";
@@ -1532,12 +1532,12 @@ sub show_status() {
$table = gtkpack_(new Gtk2::VBox(0,10), 1, $scrolled_window)
);
$central_widget = \$table;
- $table->show_all();
+ $table->show_all;
}
sub file_ok_sel {
my ($file_selection) = @_;
- my $file_name = $file_selection->get_filename();
+ my $file_name = $file_selection->get_filename;
if (!member($file_name, @list_other)) {
push(@list_other, $file_name);
$list_model->append($iter);
@@ -1548,24 +1548,24 @@ sub file_ok_sel {
sub filedialog_where_hd() {
my $file_dialog;
- $file_dialog = gtksignal_connect(new Gtk2::FileSelection(N("File Selection")), destroy => sub { $file_dialog->destroy() });
+ $file_dialog = gtksignal_connect(new Gtk2::FileSelection(N("File Selection")), destroy => sub { $file_dialog->destroy });
$file_dialog->ok_button->signal_connect(clicked => sub {
$save_path_entry->set_text($file_dialog->get_filename());
- $file_dialog->destroy() });
- $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy() });
- $file_dialog->show();
+ $file_dialog->destroy });
+ $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy });
+ $file_dialog->show;
}
sub filedialog_restore_find_path() {
my $file_dialog;
- $file_dialog = gtksignal_connect(new Gtk2::FileSelection(N("File Selection")), destroy => sub { $file_dialog->destroy() });
+ $file_dialog = gtksignal_connect(new Gtk2::FileSelection(N("File Selection")), destroy => sub { $file_dialog->destroy });
$file_dialog->ok_button->signal_connect(clicked => sub {
- $restore_find_path_entry->set_text($file_dialog->get_filename());
- $file_dialog->destroy()
+ $restore_find_path_entry->set_text($file_dialog->get_filename);
+ $file_dialog->destroy;
});
- $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy() });
- $file_dialog->show();
+ $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy });
+ $file_dialog->show;
}
sub filedialog_generic {
@@ -1574,23 +1574,23 @@ sub filedialog_generic {
my ($prompt, $widget, $set_var) = @_;
my $file_dialog;
- $file_dialog = gtksignal_connect(new Gtk2::FileSelection(translate($prompt)), destroy => sub { $file_dialog->destroy() });
+ $file_dialog = gtksignal_connect(new Gtk2::FileSelection(translate($prompt)), destroy => sub { $file_dialog->destroy });
$file_dialog->ok_button->signal_connect(clicked => sub {
- $$set_var = $file_dialog->get_filename();
+ $$set_var = $file_dialog->get_filename;
$$widget->set_text($$set_var);
- $file_dialog->destroy()
+ $file_dialog->destroy;
});
- $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy() });
- $file_dialog->show();
+ $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy });
+ $file_dialog->show;
}
sub filedialog() {
my $file_dialog;
- $file_dialog = gtksignal_connect(new Gtk2::FileSelection(N("Select the files or directories and click on 'OK'")), destroy => sub { $file_dialog->destroy() });
+ $file_dialog = gtksignal_connect(new Gtk2::FileSelection(N("Select the files or directories and click on 'OK'")), destroy => sub { $file_dialog->destroy });
$file_dialog->ok_button->signal_connect(clicked => sub { file_ok_sel($file_dialog) });
- $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy() });
- $file_dialog->show();
+ $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy });
+ $file_dialog->show;
}
################################################ ADVANCED ################################################
@@ -1636,11 +1636,11 @@ sub advanced_what_sys() {
});
$mode_buttons[1]->set_active($sys_diff_mode);
- $mode_buttons[0]->signal_connect('toggled' => sub { $sys_diff_mode = $mode_buttons[1]->get_active() });
+ $mode_buttons[0]->signal_connect('toggled' => sub { $sys_diff_mode = $mode_buttons[1]->get_active });
$mode_buttons[0]->set_sensitive($backup_sys_versions);
$mode_buttons[1]->set_sensitive($backup_sys_versions);
fonction_env(\$box_what_sys, \&advanced_what_sys, \&advanced_what, "what");
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_what_user {
@@ -1658,7 +1658,7 @@ sub advanced_what_user {
map { my $name = $_;
my @user_list_tmp;
my $b = new Gtk2::CheckButton($name);
- if (grep { /^$name$/ } @user_list) {
+ if (any { /^$name$/ } @user_list) {
$check_what_user{$_}[1] = 1;
gtkset_active($b, 1);
} else {
@@ -1693,12 +1693,12 @@ sub advanced_what_user {
$mode_buttons[1]->set_sensitive($backup_user_versions);
});
$mode_buttons[1]->set_active($user_diff_mode);
- $mode_buttons[0]->signal_connect('toggled' => sub { $user_diff_mode = $mode_buttons[1]->get_active() });
+ $mode_buttons[0]->signal_connect('toggled' => sub { $user_diff_mode = $mode_buttons[1]->get_active });
$mode_buttons[0]->set_sensitive($backup_user_versions);
$mode_buttons[1]->set_sensitive($backup_user_versions);
if ($previous_function) { fonction_env(\$box_what_user, \&advanced_what_user, \&$previous_function, "what", \&$previous_function) }
else { fonction_env(\$box_what_user, \&advanced_what_user, \&advanced_what, "what") }
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_what_other() {
@@ -1757,11 +1757,11 @@ sub advanced_what_other() {
$mode_buttons[1]->set_sensitive($backup_other_versions);
});
$mode_buttons[1]->set_active($other_diff_mode);
- $mode_buttons[0]->signal_connect('toggled' => sub { $other_diff_mode = $mode_buttons[1]->get_active() });
+ $mode_buttons[0]->signal_connect('toggled' => sub { $other_diff_mode = $mode_buttons[1]->get_active });
$mode_buttons[0]->set_sensitive($backup_other_versions);
$mode_buttons[1]->set_sensitive($backup_other_versions);
fonction_env(\$box_what_other, \&advanced_what_other, \&advanced_what, "what");
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_what_entire_sys() {
@@ -1792,7 +1792,7 @@ sub advanced_what_entire_sys() {
new Gtk2::HBox(0, 5)
));
fonction_env(\$box_what, \&advanced_what_entire_sys, \&advanced_what, "");
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_what() {
@@ -1804,7 +1804,7 @@ sub advanced_what() {
1, gtkpack_(new Gtk2::VBox(0, 15),
1, new Gtk2::VBox(0, 5),
1, gtksignal_connect(my $button_what_sys = new Gtk2::Button(),
- clicked => sub { $box_what->destroy(); advanced_what_sys() }),
+ clicked => sub { $box_what->destroy(); advanced_what_sys }),
1, gtksignal_connect(my $button_what_user = new Gtk2::Button(),
clicked => sub { destroy_widget(); advanced_what_user() }),
1, gtksignal_connect(my $button_what_other = new Gtk2::Button(),
@@ -1838,7 +1838,7 @@ sub advanced_what() {
# ));
fonction_env(\$box_what, \&advanced_what, \&advanced_box, "");
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_where_net_types {
@@ -1899,15 +1899,15 @@ sub advanced_where_net_types {
});
$passwd_user_entry->set_visibility(0);
$passwd_user_entry->set_text($passwd_user);
- $passwd_user_entry->signal_connect('changed', sub { $passwd_user = $passwd_user_entry->get_text() });
+ $passwd_user_entry->signal_connect('changed', sub { $passwd_user = $passwd_user_entry->get_text });
$host_path_entry->set_text($host_path);
$host_name_entry->set_text($host_name);
$login_user_entry->set_text($login_user);
- $host_name_entry->signal_connect('changed', sub { $host_name = $host_name_entry->get_text() });
- $host_path_entry->signal_connect('changed', sub { $host_path = $host_path_entry->get_text() });
- $login_user_entry->signal_connect('changed', sub { $login_user = $login_user_entry->get_text() });
+ $host_name_entry->signal_connect('changed', sub { $host_name = $host_name_entry->get_text });
+ $host_path_entry->signal_connect('changed', sub { $host_path = $host_path_entry->get_text });
+ $login_user_entry->signal_connect('changed', sub { $login_user = $login_user_entry->get_text });
$entry_net_type->entry->signal_connect('changed', sub {
- $net_proto = $entry_net_type->entry->get_text();
+ $net_proto = $entry_net_type->entry->get_text;
my $sensitive = 0;
$sensitive = 1 if $net_proto eq 'ssh';
$check_use_expect->set_sensitive($sensitive);
@@ -1962,7 +1962,7 @@ sub advanced_where_net_types {
} else {
fonction_env(\$box_where_net, \&advanced_where_net_types, \&advanced_where, "net");
}
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_where_cd {
@@ -2077,10 +2077,10 @@ sub advanced_where_cd {
}
});
$combo_where_cdrecord_device->entry->set_text($cd_device);
- $combo_where_cdrecord_device->entry->signal_connect('changed', sub { $cd_device = $combo_where_cdrecord_device->entry->get_text() });
+ $combo_where_cdrecord_device->entry->signal_connect('changed', sub { $cd_device = $combo_where_cdrecord_device->entry->get_text });
$combo_where_cd_time->entry->set_text($cd_time);
- $combo_where_cd_time->entry->signal_connect('changed', sub { $cd_time = $combo_where_cd_time->entry->get_text() });
+ $combo_where_cd_time->entry->signal_connect('changed', sub { $cd_time = $combo_where_cd_time->entry->get_text });
#- this one drives changes in the other entries
#- still not getting quite the desired behavior, but combo box signals seem to be limited
@@ -2088,7 +2088,7 @@ sub advanced_where_cd {
#- $combo_where_cd_device->entry->set_text($std_device);
$combo_where_cd_device->entry->signal_connect('activate', sub {
- $std_device = $combo_where_cd_device->entry->get_text();
+ $std_device = $combo_where_cd_device->entry->get_text;
$combo_where_cdrecord_device->entry->set_text($cd_devices{$std_device}{rec_dev});
$check_dvdr->set_active($cd_devices{$std_device}{dvdr});
$check_dvdram->set_active($cd_devices{$std_device}{dvdram});
@@ -2101,7 +2101,7 @@ sub advanced_where_cd {
} else {
fonction_env(\$box_where_cd, \&advanced_where_cd, \&advanced_where, "");
}
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_where_tape {
@@ -2191,14 +2191,14 @@ sub advanced_where_tape {
});
$combo_where_tape_device->entry->set_text($tape_device);
$combo_where_tape_device->entry->signal_connect('changed', sub {
- $tape_device = $combo_where_tape_device->entry->get_text();
+ $tape_device = $combo_where_tape_device->entry->get_text;
});
if ($previous_function) {
fonction_env(\$box_where_tape, \&advanced_where_tape, \&$previous_function, "");
} else {
fonction_env(\$box_where_tape, \&advanced_where_tape, \&advanced_where, "");
}
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_where_hd {
@@ -2246,13 +2246,13 @@ sub advanced_where_hd {
# });
$button->add(gtkpack(new Gtk2::HBox(0,10), gtkcreate_img("ic82-dossier-32")));
$save_path_entry->set_text($save_path);
- $save_path_entry->signal_connect('changed', sub { $save_path = $save_path_entry->get_text() });
+ $save_path_entry->signal_connect('changed', sub { $save_path = $save_path_entry->get_text });
if ($previous_function) {
fonction_env(\$box_where_hd, \&advanced_where_hd, \&$previous_function, "");
} else {
fonction_env(\$box_where_hd, \&advanced_where_hd, \&advanced_where, "");
}
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_where() {
@@ -2310,7 +2310,7 @@ sub advanced_where() {
new Gtk2::HBox(0, 5)
));
fonction_env(\$box_where, \&advanced_where, \&advanced_box, "");
- $up_box->show_all();
+ $up_box->show_all;
}
#- 7/7/2002 - S.Benedict reworked when - drop all the checkboxes and use a list
@@ -2369,12 +2369,12 @@ sub advanced_when() {
advanced_when();
});
$combo_when_space->entry->set_text($trans2{$when_space});
- $combo_when_space->entry->signal_connect('changed', sub { $when_space = $trans{$combo_when_space->entry->get_text()} });
+ $combo_when_space->entry->signal_connect('changed', sub { $when_space = $trans{$combo_when_space->entry->get_text} });
$entry_media_type->entry->signal_connect('changed', sub {
- $daemon_media = $entry_media_type->entry->get_text();
+ $daemon_media = $entry_media_type->entry->get_text;
});
fonction_env(\$box_when, \&advanced_when, \&advanced_box, "");
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_options() {
@@ -2407,9 +2407,9 @@ sub advanced_options() {
check_list([$check_mail, \$send_mail], [$check_del_hd_files, \$del_hd_files]);
# check_list([$check_mail, \$send_mail], [$check_tar_bz2, \$comp_mode], [$check_backupignore, \$backupignore]);
$mail_entry->set_text($user_mail);
- $mail_entry->signal_connect('changed', sub { $user_mail = $mail_entry->get_text() });
+ $mail_entry->signal_connect('changed', sub { $user_mail = $mail_entry->get_text });
fonction_env(\$box_options, \&advanced_options, \&advanced_box, "options");
- $up_box->show_all();
+ $up_box->show_all;
}
sub advanced_box() {
@@ -2454,7 +2454,7 @@ sub advanced_box() {
new Gtk2::HBox(0, 5)
));
fonction_env(\$box_adv, \&advanced_box, \&interactive_mode_box, "");
- $up_box->show_all();
+ $up_box->show_all;
}
################################################ WIZARD ################################################
@@ -2478,7 +2478,7 @@ sub wizard_step3() {
);
fonction_env(\$box2, \&wizard_step3, \&wizard_step2, "");
button_box_wizard_end();
- $up_box->show_all();
+ $up_box->show_all;
}
sub wizard_step2() {
@@ -2551,7 +2551,7 @@ sub wizard_step2() {
if (!$where_hd && !$where_cd && !$where_net) { fonction_env(\$box2, \&wizard_step2, \&wizard, "", \&message_noselect_box) }
else { fonction_env(\$box2, \&wizard_step2, \&wizard, "", \&wizard_step3) }
button_box_wizard();
- $up_box->show_all();
+ $up_box->show_all;
}
sub wizard() {
@@ -2590,7 +2590,7 @@ sub wizard() {
if ($backup_sys || $backup_user && @user_list) { fonction_env(\$box2, \&wizard, \&interactive_mode_box, "", \&wizard_step2) }
else { fonction_env(\$box2, \&wizard, \&interactive_mode_box, "", \&message_noselect_what_box) }
button_box_wizard();
- $up_box->show_all();
+ $up_box->show_all;
}
################################################ RESTORE ################################################
@@ -2610,8 +2610,8 @@ sub find_backup_to_restore() {
s/_incr//gi;
push @list_backup , $_;
}
- if (grep { /^backup_other/ } @list_backup) { $other_backuped = 1 }
- if (grep { /^backup_sys/ } @list_backup) { $sys_backuped = 1 }
+ if (any { /^backup_other/ } @list_backup) { $other_backuped = 1 }
+ if (any { /^backup_sys/ } @list_backup) { $sys_backuped = 1 }
foreach (grep { /^backup_sys_/ } @list_backup) {
chomp;
s/^backup_sys_//gi;
@@ -2641,7 +2641,7 @@ sub find_backup_to_restore() {
# my $to_put = " $nom, (date: $date, hour: $heure)";
$to_put = "$_ user: $nom, date: $day/$month/$year, hour: $hour:$min";
push @user_backuped , $to_put;
- grep { /^$nom$/ } @user_list_backuped or push @user_list_backuped, $nom;
+ any { /^$nom$/ } @user_list_backuped or push @user_list_backuped, $nom;
}
}
@@ -2849,7 +2849,7 @@ sub show_backup_details {
)
);
$central_widget = \$advanced_box_archive;
- $up_box->show_all();
+ $up_box->show_all;
}
sub valid_backup_test {
@@ -2890,7 +2890,7 @@ sub restore_aff_backup_problems() {
);
button_box_restore_pbs_end();
fonction_env(\$do_restore, \&restore_aff_backup_problems, "", "restore_pbs");
- $up_box->show_all();
+ $up_box->show_all;
}
sub restore_aff_result() {
@@ -2909,7 +2909,7 @@ sub restore_aff_result() {
);
button_box_build_backup_end();
$central_widget = \$do_restore;
- $up_box->show_all();
+ $up_box->show_all;
}
@@ -2938,7 +2938,7 @@ sub restore_backend() {
my $theure2;
local $_;
- if (grep { /tar.gz$/ } all($path_to_find_restore)) {
+ if (any { /tar.gz$/ } all($path_to_find_restore)) {
$untar_cmd = 0;
} else {
$untar_cmd = 1;
@@ -3008,7 +3008,7 @@ sub restore_do() {
build_backup_status();
read_conf_file();
build_backup_files();
- $table->destroy();
+ $table->destroy;
}
restore_do2();
}
@@ -3028,7 +3028,7 @@ sub restore_do2() {
);
button_box_restore_end();
fonction_env(\$do_restore, \&restore_do2, \&restore_box, "restore");
- $up_box->show_all();
+ $up_box->show_all;
}
sub restore_step_other() {
@@ -3046,7 +3046,7 @@ sub restore_step_other() {
);
check_list([$check_restore_other_sure, \$restore_other]);
fonction_env(\$retore_step_other, \&restore_step_other, \&restore_step2, "restore", \&restore_do);
- $up_box->show_all();
+ $up_box->show_all;
}
my %check_user_to_restore;
@@ -3096,7 +3096,7 @@ sub restore_step_user() {
$b->signal_connect(toggled => sub {
if (!$check_user_to_restore{$name_complet}[1]) {
$check_user_to_restore{$name_complet}[1] = 1;
- if (!grep { /$name/ } @user_list_to_restore2) {
+ if (!any { /$name/ } @user_list_to_restore2) {
push @user_list_to_restore2, $name_complet
}
} else {
@@ -3124,7 +3124,7 @@ sub restore_step_user() {
if ($restore_other) { fonction_env(\$retore_step_user, \&restore_step_user, "", "restore", \&restore_step_other) }
elsif ($restore_sys) { fonction_env(\$retore_step_user, \&restore_step_user, \&restore_step_sys, "restore", \&restore_step_other) }
else { fonction_env(\$retore_step_user, \&restore_step_user, \&restore_step2, "restore", \&restore_do) }
- $up_box->show_all();
+ $up_box->show_all;
}
sub restore_step_sys() {
@@ -3148,12 +3148,12 @@ sub restore_step_sys() {
),
);
$combo_restore_step_sys->entry->signal_connect('changed', sub {
- $restore_step_sys_date = $combo_restore_step_sys->entry->get_text();
+ $restore_step_sys_date = $combo_restore_step_sys->entry->get_text;
});
$details->signal_connect('clicked', sub {
#- we're only passing a portion of the filename to
#- the subroutine so we need to let it know this
- my $backup_date = $combo_restore_step_sys->entry->get_text();
+ my $backup_date = $combo_restore_step_sys->entry->get_;
destroy_widget();
show_backup_details(\&restore_step_sys, "sys", $backup_date);
});
@@ -3162,7 +3162,7 @@ sub restore_step_sys() {
if ($restore_user) { fonction_env(\$restore_step_sys, \&restore_step_sys, \&restore_step2, "restore", \&restore_step_user) }
elsif ($restore_other) { fonction_env(\$restore_step_sys, \&restore_step_sys, \&restore_step2, "restore", \&restore_step_other) }
else { fonction_env(\$restore_step_sys, \&restore_step_sys, \&restore_step2, "restore", \&restore_do) }
- $up_box->show_all();
+ $up_box->show_all;
}
sub restore_other_media_hd {
@@ -3205,10 +3205,10 @@ sub restore_other_media_hd {
});
$button->add(gtkpack(new Gtk2::HBox(0,10), gtkcreate_img("ic82-dossier-32")));
$save_path_entry->set_text($save_path);
- $save_path_entry->signal_connect('changed', sub { $save_path = $save_path_entry->get_text() });
+ $save_path_entry->signal_connect('changed', sub { $save_path = $save_path_entry->get_text });
if ($previous_function) { fonction_env(\$box_where_hd, \&advanced_where_hd, \&$previous_function, "") }
else { fonction_env(\$box_where_hd, \&advanced_where_hd, \&advanced_where, "") }
- $up_box->show_all();
+ $up_box->show_all;
}
sub restore_other_media() {
@@ -3255,10 +3255,10 @@ sub restore_other_media() {
# });
$button->add(gtkpack(new Gtk2::HBox(0,10), gtkcreate_img("ic82-dossier-32")));
$restore_find_path_entry->set_text($path_to_find_restore);
- $restore_find_path_entry->signal_connect('changed', sub { $path_to_find_restore = $restore_find_path_entry->get_text() });
+ $restore_find_path_entry->signal_connect('changed', sub { $path_to_find_restore = $restore_find_path_entry->get_text });
#- not sure if this was the original intent - address the crash at "Next"
fonction_env(\$box_find_restore, \&restore_other_media, \&restore_step2, "other_media", \&restore_do);
- $up_box->show_all();
+ $up_box->show_all;
}
sub restore_step2() {
@@ -3275,9 +3275,9 @@ sub restore_step2() {
if (-f "$restore_info_path/$info_prefix" . "_other*") { $other_exist = 1 }
else { $other_exist = 0; $restore_other = 0 }
- if (grep { /_sys_/ } grep { /^$info_prefix/ } all("$restore_info_path/")) { $sys_exist = 1 }
+ if (any { /_sys_/ } grep { /^$info_prefix/ } all("$restore_info_path/")) { $sys_exist = 1 }
else { $sys_exist = 0; $restore_sys = 0 }
- if (grep { /_user_/ } grep { /^$info_prefix/ } all("$restore_info_path/")) { $user_exist = 1 }
+ if (any { /_user_/ } grep { /^$info_prefix/ } all("$restore_info_path/")) { $user_exist = 1 }
else { $user_exist = 0; $restore_user = 0 }
# disabling this (sb) - very nicely wipes out your backup media if the user isn't very careful
@@ -3344,8 +3344,8 @@ sub restore_step2() {
elsif ($restore_other) { $next_widget = \&restore_step_other }
else { $next_widget = \&restore_do }
$restore_path_entry->set_text($restore_path);
- $restore_path_entry->signal_connect('changed', sub { $restore_path = $restore_path_entry->get_text() });
- $up_box->show_all();
+ $restore_path_entry->signal_connect('changed', sub { $restore_path = $restore_path_entry->get_text });
+ $up_box->show_all;
}
sub catalog_restore() {
@@ -3462,12 +3462,12 @@ sub catalog_restore() {
);
$restore_path_entry->set_text($restore_path);
- gtksignal_connect($restore_path_entry, changed => sub { $restore_path = $restore_path_entry->get_text() });
+ gtksignal_connect($restore_path_entry, changed => sub { $restore_path = $restore_path_entry->get_text });
button_box_restore();
fonction_env(\$catalog_box, \&catalog_restore, \&restore_find_media_box, "restore", \&catalog_restore);
$central_widget = \$catalog_box;
- $up_box->show_all();
+ $up_box->show_all;
}
sub restore_catalog_entry {
@@ -3838,7 +3838,7 @@ sub restore_box() {
1, new Gtk2::VBox(0,10),
1, new Gtk2::VBox(0,10),
1, gtksignal_connect(new Gtk2::Button(N("Restore all backups")), clicked => sub {
- $retore_box->destroy();
+ $retore_box->destroy;
button_box_restore();
@user_list_to_restore2 = sort @user_backuped;
$restore_sys = 1;
@@ -3847,7 +3847,7 @@ sub restore_box() {
restore_do()
}),
1, gtksignal_connect(new Gtk2::Button(N("Custom Restore")), clicked => sub {
- $retore_box->destroy();
+ $retore_box->destroy;
button_box_restore();
restore_step2();
}),
@@ -3863,7 +3863,7 @@ sub restore_box() {
}
fonction_env(\$retore_box, \&restore_box, \&interactive_mode_box, "restore");
$central_widget = \$retore_box;
- $up_box->show_all();
+ $up_box->show_all;
}
sub restore_find_media_box() {
@@ -3891,7 +3891,7 @@ sub restore_find_media_box() {
gtkpack(new Gtk2::VBox(0, 10),
gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("CD in place - continue.")), clicked => sub {
$good_restore_path = 1;
- $box2->destroy();
+ $box2->destroy;
interactive_mode_box("restore");
}), $mount_media),
$new_path_entry = gtkset_sensitive(new Gtk2::Entry(), $mount_media),
@@ -3899,7 +3899,7 @@ sub restore_find_media_box() {
filedialog_generic("Directory To Restore From", \$new_path_entry, \$path_to_find_restore);
}), $mount_media),
gtksignal_connect(new Gtk2::Button(N("Restore From Catalog")), clicked => sub {
- $box2->destroy();
+ $box2->destroy;
catalog_restore();
}),
),
@@ -3911,7 +3911,7 @@ sub restore_find_media_box() {
$new_path_entry->set_text($path_to_find_restore);
button_box_find_media($mount_media);
- $up_box->show_all();
+ $up_box->show_all;
}
sub restore_status() {
@@ -3940,14 +3940,14 @@ sub restore_status() {
);
$custom_help = "options";
$central_widget = \$table;
- $up_box->show_all();
+ $up_box->show_all;
gtkflush();
}
################################################ BUTTON_BOX ################################################
sub button_box_adv() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
0, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
@@ -3973,7 +3973,7 @@ sub button_box_adv() {
}
sub button_box_restore_main() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(gtkpack_(new Gtk2::HButtonBox,
@@ -3998,7 +3998,7 @@ sub button_box_restore_main() {
}
sub button_box_backup_end() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
@@ -4024,7 +4024,7 @@ sub button_box_backup_end() {
}
sub button_box_wizard_end() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
@@ -4050,7 +4050,7 @@ sub button_box_wizard_end() {
}
sub button_box_restore_end() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
@@ -4075,7 +4075,7 @@ sub button_box_restore_end() {
}
sub button_box_build_backup_end() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
@@ -4090,7 +4090,7 @@ sub button_box_build_backup_end() {
}
sub button_box_restore_pbs_end() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
@@ -4108,7 +4108,7 @@ sub button_box_restore_pbs_end() {
}
sub button_box_build_backup() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
@@ -4134,7 +4134,7 @@ sub button_box_build_backup() {
sub button_box_restore() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
@@ -4163,12 +4163,12 @@ sub button_box_find_media {
my ($mount_media) = @_;
#- $central_widget is not known yet?
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
1, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
- $box2->destroy();
+ $box2->destroy;
interactive_mode_box();
}),
1, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
@@ -4177,11 +4177,11 @@ sub button_box_find_media {
}),
1, new Gtk2::HBox(0, 0),
0, gtksignal_connect(new Gtk2::Button(N("Previous")), clicked => sub {
- $box2->destroy();
+ $box2->destroy;
interactive_mode_box();
}),
1, gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("Next")), clicked => sub {
- $box2->destroy();
+ $box2->destroy;
interactive_mode_box("restore");
}), $mount_media),
),
@@ -4189,7 +4189,7 @@ sub button_box_find_media {
}
sub button_box_wizard() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
@@ -4214,7 +4214,7 @@ sub button_box_wizard() {
}
sub button_box_main() {
- $button_box_tmp->destroy();
+ $button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack(gtkset_layout(new Gtk2::HButtonBox, 'start'),
@@ -4229,7 +4229,7 @@ sub button_box_main() {
################################################ MESSAGES ################################################
sub dialog_one {
- $table->destroy();
+ $table->destroy;
my ($label) = @_;
gtkadd($advanced_box,
@@ -4246,7 +4246,7 @@ sub dialog_one {
button_box_restore_main();
$custom_help = "mail_pb";
$central_widget = \$box2;
- $up_box->show_all();
+ $up_box->show_all;
}
sub send_mail_pb() {
@@ -4280,12 +4280,12 @@ sub install_rpm {
),
);
fonction_env(\$box_what_user, \&install_rpm, \&$previous_function, "what");
- $up_box->show_all();
+ $up_box->show_all;
}
sub message_norestore_box() {
- $box2->destroy();
+ $box2->destroy;
gtkadd($advanced_box,
$box2 = gtkpack_(new Gtk2::HBox(0, 15),
@@ -4301,12 +4301,12 @@ sub message_norestore_box() {
);
button_box_restore_main();
$central_widget = \$box2;
- $up_box->show_all();
+ $up_box->show_all;
}
sub message_common_box {
- $box2->destroy();
+ $box2->destroy;
my ($label) = @_;
gtkadd($advanced_box,
@@ -4324,7 +4324,7 @@ sub message_common_box {
$previous_widget = \&wizard;
$next_widget = \&wizard;
$central_widget = \$box2;
- $up_box->show_all();
+ $up_box->show_all;
}
sub message_noselect_box() {
@@ -4332,7 +4332,7 @@ sub message_noselect_box() {
$previous_widget = \&wizard_step2;
$next_widget = \&wizard_step2;
$central_widget = \$box2;
- $up_box->show_all();
+ $up_box->show_all;
}
sub message_noselect_what_box() {
@@ -4340,13 +4340,13 @@ sub message_noselect_what_box() {
$previous_widget = \&wizard;
$next_widget = \&wizard;
$central_widget = \$box2;
- $up_box->show_all();
+ $up_box->show_all;
}
sub message_common_box_2 {
my ($label, $restore_main) = @_;
- $box2->destroy();
+ $box2->destroy;
gtkadd($advanced_box,
$box2 = gtkpack_(new Gtk2::HBox(0, 15),
@@ -4362,7 +4362,7 @@ sub message_common_box_2 {
);
button_box_restore_main() if $restore_main;
$central_widget = \$box2;
- $up_box->show_all();
+ $up_box->show_all;
}
sub message_noconf_box() {
message_common_box_2(N("No configuration file found \nplease click Wizard or Advanced."), 1);
@@ -4465,7 +4465,7 @@ sub build_backup_status() {
$custom_help = "options";
$central_widget = \$tbox;
- $up_box->show_all();
+ $up_box->show_all;
gtkflush();
}
@@ -4498,7 +4498,7 @@ sub build_backup_ftp_status() {
);
$custom_help = "options";
$central_widget = \$table;
- $up_box->show_all();
+ $up_box->show_all;
gtkflush();
}
@@ -4522,7 +4522,7 @@ sub build_backup_box_see_conf() {
$central_widget = \$box2;
$current_widget = \&build_backup_box_see_conf;
$previous_widget = \&build_backup_box;
- $up_box->show_all();
+ $up_box->show_all;
}
sub build_backup_box_progress() {
@@ -4578,7 +4578,7 @@ sub build_backup_box() {
button_box_restore_main();
fonction_env(\$box2, \&build_backup_box, \&interactive_mode_box, "options");
- $up_box->show_all();
+ $up_box->show_all;
}
################################################ INTERACTIVE ################################################
@@ -4622,7 +4622,7 @@ sub interactive_mode_box {
button_box_main();
$custom_help = "main";
$central_widget = \$box2;
- $up_box->show_all();
+ $up_box->show_all;
if ($mode eq "restore") {
destroy_widget();
restore_box();
@@ -4671,7 +4671,7 @@ sub interactive_mode() {
$central_widget = \$box2;
$window1->show_all;
$window1->realize;
- $window1->show_all();
+ $window1->show_all;
$my_win->main;
$my_win->exit(0);
}
@@ -4874,7 +4874,7 @@ backup data files by hand.
)
);
$central_widget = \$advanced_box_help;
- $up_box->show_all();
+ $up_box->show_all;
}
sub to_ok() {
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index d720a1a43..52942002f 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -89,7 +89,7 @@ my %themes = ('path' => '/usr/share/bootsplash/themes/',
);
my $cur_res = top(cat_('/etc/lilo.conf') =~ /[^#]*vga=(.*)/);
#- verify that current resolution is ok
-if (member( $cur_res, qw( 785 788 791 794))) {
+if (member($cur_res, qw( 785 788 791 794))) {
($cur_res) = $bootloader::vga_modes{$cur_res} =~ /^([0-9x]+).*?$/;
} else {
$no_bootsplash = 1; #- we can't select any theme we're not in Framebuffer mode :-/
@@ -137,14 +137,14 @@ $B_create->signal_connect(clicked => sub {
#- ******** action to take on changing combos values
$combo{thms}->entry->signal_connect(changed => sub {
- my $thm_txt = $combo{thms}->entry->get_text();
+ my $thm_txt = $combo{thms}->entry->get_text;
$combo{lilo}->entry->set_text(member($thm_txt, @lilo_thms) ? $thm_txt : $themes{default} || 'default');
$combo{boot}->entry->set_text(member($thm_txt, @boot_thms) ? $thm_txt : $themes{default} || 'default');
});
$combo{lilo}->entry->signal_connect(changed => sub {
- my $new_file = $themes{path} . $combo{lilo}->entry->get_text() . $themes{lilo}{thumb};
+ my $new_file = $themes{path} . $combo{lilo}->entry->get_text . $themes{lilo}{thumb};
undef($lilo_pixbuf);
$lilo_pixbuf = gtkcreate_pixbuf(-r $new_file ? $new_file : $themes{def_thmb});
$lilo_pixbuf = $lilo_pixbuf->scale_simple(155, 116, 'nearest');
@@ -152,9 +152,9 @@ $combo{lilo}->entry->signal_connect(changed => sub {
});
$no_bootsplash == 0
- and $combo{boot}->entry->signal_connect( changed => sub {
- my $img_file = $themes{path}.$combo{boot}->entry->get_text().$themes{boot}{path}."bootsplash-$cur_res.jpg";
- $boot_pic = gtkcreate_img( $img_file);
+ and $combo{boot}->entry->signal_connect(changed => sub {
+ my $img_file = $themes{path}.$combo{boot}->entry->get_text.$themes{boot}{path}."bootsplash-$cur_res.jpg";
+ $boot_pic = gtkcreate_img($img_file);
});
$combo{thms}->entry->set_text($themes{default});
@@ -165,18 +165,18 @@ $thm_button->signal_connect('clicked',
my $boot_conf_file = '/etc/sysconfig/bootsplash';
my $lilomsg = '/boot/message-graphic';
#lilo installation
- if (-f $themes{path}.$combo{lilo}->entry->get_text() . $themes{lilo}{file}) {
+ if (-f $themes{path}.$combo{lilo}->entry->get_text . $themes{lilo}{file}) {
use MDK::Common::File;
cp_af($lilomsg, "/boot/message-graphic.old");
#can't use this anymore or $in->ask_warn(N("Error"), N("unable to backup lilo message"));
- cp_af($themes{path} . $combo{lilo}->entry->get_text() . $themes{lilo}{file}, $lilomsg);
+ cp_af($themes{path} . $combo{lilo}->entry->get_text . $themes{lilo}{file}, $lilomsg);
#can't use this anymore or $in->ask_warn(N("Error"), N("can't change lilo message"));
} else {
$error = 1;
$in->ask_warn(N("Error"), N("Lilo message not found"));
}
#bootsplash install
- if ($::testing || -f $themes{path} . $combo{boot}->entry->get_text() . $themes{boot}{path} . "bootsplash-$cur_res.jpg") {
+ if ($::testing || -f $themes{path} . $combo{boot}->entry->get_text . $themes{boot}{path} . "bootsplash-$cur_res.jpg") {
my $bootsplash_cont = "# -*- Mode: shell-script -*-
# Specify here if you want add the splash logo to initrd when
# generating an initrd. You can specify :
@@ -190,7 +190,7 @@ $thm_button->signal_connect('clicked',
SPLASH=$cur_res
# Choose the themes. The should be based in
# /usr/share/bootsplash/themes/
-THEME=" . $combo{boot}->entry->get_text() . "
+THEME=" . $combo{boot}->entry->get_text . "
# Say yes here if you want to leave the logo on the console.
# Three options :
#
@@ -247,7 +247,7 @@ gtkadd($window,
),
#Splash Selector
- gtkadd(my $thm_frame = new Gtk2::Frame( N("Splash selection")),
+ gtkadd(my $thm_frame = new Gtk2::Frame(N("Splash selection")),
gtkpack(gtkset_border_width(new Gtk2::HBox(0, 5), 5),
gtkpack__(new Gtk2::VBox(0, 5),
N("Themes"),
@@ -296,15 +296,15 @@ gtkadd($window,
)
);
-$auto_buttons[0]->signal_connect('toggled' => sub { $auto_box->set_sensitive($auto_buttons[0]->get_active()) });
-$auto_buttons[1]->signal_connect('toggled' => sub { $auto_box->set_sensitive(!$auto_buttons[1]->get_active()) });
+$auto_buttons[0]->signal_connect('toggled' => sub { $auto_box->set_sensitive($auto_buttons[0]->get_active) });
+$auto_buttons[1]->signal_connect('toggled' => sub { $auto_box->set_sensitive(!$auto_buttons[1]->get_active) });
$auto_buttons[0]->set_active(1) if $auto_mode->{autologin};
$auto_buttons[1]->set_active(1) if !$auto_mode->{autologin};
$x_box->set_sensitive($x_mode);
$auto_box->set_sensitive($auto_mode->{autologin} ? 1 : 0);
-$window->show_all();
-$no_bootsplash and $thm_frame->hide();
+$window->show_all;
+$no_bootsplash and $thm_frame->hide;
update_bootloader_label($lilogrub);
gtkflush();
$w->main;
@@ -346,8 +346,8 @@ sub lilo_choice() {
#-------------------------------------------------------------
sub updateAutologin() {
- my ($usern, $deskt) = ($user_combo->entry->get_text(), $desktop_combo->entry->get_text());
- if ($auto_buttons[0]->get_active()) {
+ my ($usern, $deskt) = ($user_combo->entry->get_text, $desktop_combo->entry->get_text);
+ if ($auto_buttons[0]->get_active) {
$in->do_pkgs->install('autologin') if $x_mode;
any::set_autologin($usern, $deskt);
} else {
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index 3f34eaadc..a18606d74 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -65,7 +65,7 @@ push(@generic_tool,@all_drakxtools);
my $kernel_release = chomp_(`uname -r`);
my $table = create_packtable({ col_spacings => 5, row_spacings => 10 },
- [ new Gtk2::Label(N("Application:")), my $comb_app = gtkset_size_request(Gtk2::Combo->new(), 270, -1) ],
+ [ new Gtk2::Label(N("Application:")), my $comb_app = gtkset_size_request(Gtk2::Combo->new, 270, -1) ],
[ new Gtk2::Label(N("Package: ")), my $package = new Gtk2::Entry("...") ],
[ Gtk2::Label->new(N("Kernel:")), gtkset_editable(Gtk2::Entry->new($kernel_release), 0) ],
[ Gtk2::Label->new(N("Release: ")), gtkset_editable(Gtk2::Entry->new(mandrake_release()), 0) ]
@@ -86,7 +86,7 @@ gtkadd(
0, gtksignal_connect(Gtk2::Button->new(N("Report")), clicked => sub {
my $options = "mdkbugreport=1";
$options .= "&incident=1" if $incident;
- my $p = $package->get_text();
+ my $p = $package->get_text;
(my $r = parse_release()) =~ s/\s//;
$options .= "&package=$p" if $p =~ /mdk/;
$options .= "&kernel=$kernel_release";
@@ -105,8 +105,8 @@ if (defined $prog) {
$comb_app->entry->set_text($prog);
};
-$comb_app->entry->signal_connect('changed', sub { update_app($comb_app->entry->get_text()) });
-$window->{window}->show_all();
+$comb_app->entry->signal_connect('changed', sub { update_app($comb_app->entry->get_text) });
+$window->{window}->show_all;
$window->main;
ugtk2->exit(0);
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index badc76f5a..3338133fd 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -96,17 +96,17 @@ $button_del->signal_connect(clicked => sub {
$bbox_dialog->set_layout('end');
my $button_ok = new Gtk2::Button(N("OK"));
$button_ok->signal_connect(clicked => sub {
- network::netconnect::del_profile($netcnx, $combo_dialog->entry->get_text());
- $netcnx->{PROFILE} eq $combo_dialog->entry->get_text() and $netcnx->{PROFILE} = "default";
- Gtk2->main_quit();
+ network::netconnect::del_profile($netcnx, $combo_dialog->entry->get_text);
+ $netcnx->{PROFILE} eq $combo_dialog->entry->get_text and $netcnx->{PROFILE} = "default";
+ Gtk2->main_quit;
});
$bbox_dialog->add($button_ok);
my $button_cancel = new Gtk2::Button(N("Cancel"));
- $button_cancel->signal_connect(clicked => sub { Gtk2->main_quit() });
+ $button_cancel->signal_connect(clicked => sub { Gtk2->main_quit });
$bbox_dialog->add($button_cancel);
$dialog->show_all;
$dialog->set_modal(1);
- Gtk2->main();
+ Gtk2->main;
$dialog->destroy;
$combo1->entry->set_text(-e "/etc/sysconfig/network-scripts/drakconnect_conf." . $combo1->entry->get_text ? $combo1->entry->get_text : "default");
$combo1->set_popdown_strings(network::netconnect::get_profiles());
@@ -124,17 +124,17 @@ $button_new->signal_connect(clicked => sub {
$bbox_dialog->set_layout('end');
my $button_ok = new Gtk2::Button(N("OK"));
$button_ok->signal_connect(clicked => sub {
- network::netconnect::add_profile($netcnx, $entry_dialog->get_text());
- $netcnx->{PROFILE} = $entry_dialog->get_text();
- Gtk2->main_quit();
+ network::netconnect::add_profile($netcnx, $entry_dialog->get_text);
+ $netcnx->{PROFILE} = $entry_dialog->get_text;
+ Gtk2->main_quit;
});
$bbox_dialog->add($button_ok);
my $button_cancel = new Gtk2::Button(N("Cancel"));
- $button_cancel->signal_connect(clicked => sub { Gtk2->main_quit() });
+ $button_cancel->signal_connect(clicked => sub { Gtk2->main_quit });
$bbox_dialog->add($button_cancel);
$dialog->show_all;
$dialog->set_modal(1);
- Gtk2->main();
+ Gtk2->main;
$dialog->destroy;
$combo1->entry->set_text(-e "/etc/sysconfig/network-scripts/drakconnect_conf." . $netcnx->{PROFILE} ? $netcnx->{PROFILE} : "default");
$combo1->set_popdown_strings(network::netconnect::get_profiles());
@@ -236,7 +236,7 @@ $window1->{window}->add(
my $button_expert = new Gtk2::Button(N("Expert Mode"));
$button_expert->signal_connect(clicked => sub {
- foreach ($button_internet, $button_lan) { $expert_mode ? $_->hide() : $_->show() }
+ foreach ($button_internet, $button_lan) { $expert_mode ? $_->hide : $_->show }
$button_expert->child->set($expert_mode ? N("Expert Mode") : N("Normal Mode"));
$expert_mode = !$expert_mode;
});
@@ -268,14 +268,14 @@ $button_ok->signal_connect(clicked => sub {
$bbox0->add($button_ok);
$combo1->entry->signal_connect('changed', sub {
# connected() and disconnect_backend();
- network::netconnect::set_profile($netcnx, $combo1->entry->get_text());
+ network::netconnect::set_profile($netcnx, $combo1->entry->get_text);
network::netconnect::load_conf($netcnx, $netc, $intf);
$netcnx->{$_} = $netc->{$_} foreach qw(NET_DEVICE NET_INTERFACE);
update();
$button_apply->set_sensitive(1);
});
-$window1->{rwindow}->show_all();
+$window1->{rwindow}->show_all;
$_->hide foreach $button_internet, $button_lan;
gtkflush();
my $tag = Gtk2->timeout_add(4000, \&update2);
@@ -382,12 +382,12 @@ sub configure_lan {
Configure them first by clicking on 'Configure'")),1,1,0);
$dialog->action_area->add(gtkadd(gtkset_layout(Gtk2::HButtonBox->new, 'end'),
gtksignal_connect(new Gtk2::Button(N("OK")),
- clicked => sub { Gtk2->main_quit() })
+ clicked => sub { Gtk2->main_quit })
)
);
$dialog->show_all;
$dialog->set_modal(1);
- Gtk2->main();
+ Gtk2->main;
$dialog->destroy;
return;
}
@@ -469,7 +469,7 @@ Configure them first by clicking on 'Configure'")),1,1,0);
foreach (0..$#all_cards) {
my @infos = @{$card_tab[2*$_]};
each_index {
- ${$_->[1]} = $infos[2*$::i+1]->get_text();
+ ${$_->[1]} = $infos[2*$::i+1]->get_text;
} @{$card_tab[2*$_+1]};
if ($intf->{"eth$_"}{BOOTPROTO} eq "dhcp") {
delete @{$intf->{"eth$_"}}{qw(IPADDR NETWORK NETMASK BROADCAST)};
@@ -477,16 +477,16 @@ Configure them first by clicking on 'Configure'")),1,1,0);
}
update();
$button_apply->set_sensitive(1);
- $window->destroy(); Gtk2->main_quit;
+ $window->destroy; Gtk2->main_quit;
});
$bbox8->add($button_ok);
my $button_cancel = new Gtk2::Button(N("Cancel"));
- $button_cancel->signal_connect(clicked => sub { $window->destroy(); Gtk2->main_quit });
+ $button_cancel->signal_connect(clicked => sub { $window->destroy; Gtk2->main_quit });
$bbox8->add($button_cancel);
$window->set_modal(1);
- $window->show_all();
+ $window->show_all;
foreach (0..$#all_cards) {
my @infos = @{$card_tab[2*$_]};
$intf->{"eth$_"}{BOOTPROTO} eq "dhcp" or $infos[8]->hide;
@@ -507,12 +507,12 @@ Create one first by clicking on 'Configure'")),1,1,0);
$bbox_dialog->set_layout('end');
my $button_ok = new Gtk2::Button(N("OK"));
$button_ok->signal_connect(clicked => sub {
- Gtk2->main_quit();
+ Gtk2->main_quit;
});
$bbox_dialog->add($button_ok);
$dialog->show_all;
$dialog->set_modal(1);
- Gtk2->main();
+ Gtk2->main;
$dialog->destroy;
return;
}
@@ -604,14 +604,14 @@ Create one first by clicking on 'Configure'")),1,1,0);
my $button_ok = new Gtk2::Button(N("OK"));
$button_ok->signal_connect(clicked => sub {
each_index {
- ${$conf_data[$::i][1]} = $infos[2*$::i+1]->get_text() if $_;
+ ${$conf_data[$::i][1]} = $infos[2*$::i+1]->get_text if $_;
} @mask;
update();
$button_apply->set_sensitive(1);
- $window->destroy(); Gtk2->main_quit;
+ $window->destroy; Gtk2->main_quit;
});
my $button_cancel = new Gtk2::Button(N("Cancel"));
- $button_cancel->signal_connect(clicked => sub { $window->destroy(); Gtk2->main_quit });
+ $button_cancel->signal_connect(clicked => sub { $window->destroy; Gtk2->main_quit });
$window->set_modal(1);
@@ -630,14 +630,13 @@ Create one first by clicking on 'Configure'")),1,1,0);
),
);
- $window->show_all();
- Gtk2->main;
+ $window->show_all->main;
}
sub new_dialog() {
my $dialog = new Gtk2::Dialog();
$dialog->set_position('center-on-parent');
$dialog->vbox->set_border_width(10);
- $dialog->signal_connect(delete_event => sub { Gtk2->main_quit() });
+ $dialog->signal_connect(delete_event => sub { Gtk2->main_quit });
$dialog;
}
diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy
index c3a7575ef..4f5d87886 100755
--- a/perl-install/standalone/drakfloppy
+++ b/perl-install/standalone/drakfloppy
@@ -76,12 +76,12 @@ $device_combo->set_popdown_strings(map { "/dev/" . $_->{device} } detect_devices
# kernel part
my $kernel_combo = new Gtk2::Combo();
-$kernel_combo->disable_activate();
+$kernel_combo->disable_activate;
$kernel_combo->set_popdown_strings(sort grep { !/^\.\.?$/ } all("/lib/modules"));
$kernel_combo->entry->set_text(chomp_(`uname -r`));
$kernel_combo->entry->signal_connect(changed => sub {
- change_tree($kernel_combo->entry->get_text());
- $list_model->clear();
+ change_tree($kernel_combo->entry->get_text);
+ $list_model->clear;
});
@@ -93,10 +93,10 @@ $tree->set_headers_visible(0);
$tree->append_column(my $textcolumn = Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
#$tree->append_column(my $dummy_textcolumn = Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$tree->signal_connect('row-expanded', \&expand_tree);
-$tree->get_selection()->signal_connect('changed' => \&selected_tree);
+$tree->get_selection->signal_connect('changed' => \&selected_tree);
-fill_tree($kernel_combo->entry->get_text());
+fill_tree($kernel_combo->entry->get_text);
###
@@ -125,7 +125,7 @@ $window->{window}->add(
gtksignal_connect(Gtk2::Button->new("default"),
clicked => sub {
$kernel_combo->entry->set_text(chomp_(`uname -r`));
- $list_model->clear();
+ $list_model->clear;
}),
),
),
@@ -185,7 +185,7 @@ $window->{window}->add(
),
);
-$window->{rwindow}->show_all();
+$window->{rwindow}->show_all;
toggle_expert_button();
$window->main;
@@ -194,10 +194,10 @@ ugtk2->exit(0);
sub toggle_expert_button() {
if ($expert_mode) {
- $expert_mod_frame->show();
+ $expert_mod_frame->show;
$expert_button->child->set(N("Normal Mode"));
} else {
- $expert_mod_frame->hide();
+ $expert_mod_frame->hide;
$expert_button->child->set(N("Expert Mode"));
}
}
@@ -225,7 +225,7 @@ sub change_tree {
# Called whenever an item is clicked on the tree widget.
sub selected_tree {
my ($select) = @_;
- my ($model, $iter) = $select->get_selected();
+ my ($model, $iter) = $select->get_selected;
return unless $model; # no real selection
my $file = $model->get($iter, 1);
$iter->free;
@@ -277,7 +277,7 @@ sub expand_tree {
#-------------------------------------------------------------
sub build_it() {
my $y;
- my $co = "/sbin/mkbootdisk --noprompt --verbose --device " . $device_combo->entry->get_text();
+ my $co = "/sbin/mkbootdisk --noprompt --verbose --device " . $device_combo->entry->get_text;
if ($expert_mode) {
$co .= " --mkinitrdargs -f" if $force_button->get_active;
$co .= " --mkinitrdargs --ifneeded" if $needed_button->get_active;
@@ -292,15 +292,15 @@ sub build_it() {
return 0;
}, $val);
}
- $co .= " " . $kernel_combo->entry->get_text();
+ $co .= " " . $kernel_combo->entry->get_text;
$co .= " 2>&1 |";
- create_dialog(N("Warning"), N("Be sure a media is present for the device %s", $device_combo->entry->get_text()), 1) or return;
+ create_dialog(N("Warning"), N("Be sure a media is present for the device %s", $device_combo->entry->get_text), 1) or return;
# we test if the media is present
test:
- my $a = "dd count=1 if=/dev/null of=" . $device_combo->entry->get_text() . " 2>&1";
+ my $a = "dd count=1 if=/dev/null of=" . $device_combo->entry->get_text . " 2>&1";
my $b = `$a`;
if ($b =~ /dd/) {
- create_dialog(N("Error"), N("There is no medium or it is write-protected for device %s.\nPlease insert one.", $device_combo->entry->get_text()), 1) ? goto test : return 0;
+ create_dialog(N("Error"), N("There is no medium or it is write-protected for device %s.\nPlease insert one.", $device_combo->entry->get_text), 1) ? goto test : return 0;
}
local *STATUS;
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index c06188c66..92909a6fc 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -232,7 +232,7 @@ sub search_windows_font() {
}
}
!$replace && any { /$i/ } @installed_fonts and next;
- grep { /$i$/ } @font_list or push @font_list, "$win_dir/$_->[1]/fonts/$i";
+ any { /$i$/ } @font_list or push @font_list, "$win_dir/$_->[1]/fonts/$i";
}
}
$interactive && $nb_dir and progress($pbar, 1, N("done"));
@@ -266,14 +266,14 @@ sub search_dir_font() {
push @font_list_tmp, $i;
foreach my $i (@font_list_tmp) {
!$replace && any { /$i/ } @installed_fonts and next;
- grep { /$i/ } @font_list or push @font_list, "$fn/$i";
+ any { /$i/ } @font_list or push @font_list, "$fn/$i";
}
}
}
}
elsif (is_a_font($fn)) {
!$replace && any { /$fn/ } @installed_fonts and next;
- !grep { /$fn/ } @installed_fonts and push @font_list, $fn;
+ !any { /$fn/ } @installed_fonts and push @font_list, $fn;
}
}
interactive_progress($pbar, 0.50 / @install, N("Reselect correct fonts"));
@@ -395,7 +395,7 @@ sub remove_gs_fonts() {
my @FontmapGS_list = cat_($FontmapGS);
foreach my $font_gs (@FontmapGS_list) {
my @tmp_list = split(' ', $font_gs);
- grep { /$tmp_list[0]/ } @Fontmap_out or push @Fontmap_new, $font_gs;
+ any { /$tmp_list[0]/ } @Fontmap_out or push @Fontmap_new, $font_gs;
}
print $_ foreach @Fontmap_new;
output($FontmapGS, @Fontmap_new);
@@ -420,7 +420,7 @@ sub remove_fonts() {
} else { rm_rf($i) }
}
$i =~ s!/\w*\.\w*!!gi;
- grep { $i } @list_dir or push @list_dir, $i;
+ any { $i } @list_dir or push @list_dir, $i;
interactive_progress($pbar1, 1 / @font_list, N("Suppress Fonts Files"));
}
interactive_progress($pbar1, 0.01, N("done"));
@@ -488,13 +488,13 @@ sub create_fontsel() {
sub display_error {
my ($message) = @_;
my $error_box;
- $$central_widget->destroy();
+ $$central_widget->destroy;
gtkpack($font_box,
$error_box = gtkpack_(new Gtk2::VBox(0, 0), 1,
new Gtk2::Label($message), 0,
gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
gtksignal_connect(new Gtk2::Button(N("OK")),
- clicked => sub { $$central_widget->destroy(); create_fontsel() }
+ clicked => sub { $$central_widget->destroy; create_fontsel() }
),
),
)
@@ -521,13 +521,13 @@ sub interactive_mode() {
gtkadd(gtkset_layout(new Gtk2::VButtonBox, 'end'),
gtksignal_connect(new Gtk2::Button(N("Get Windows Fonts")),
clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
$windows = 1;
appli_choice();
}),
gtksignal_connect(new Gtk2::Button(N("Uninstall Fonts")),
clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
uninstall();
}),
), 0,
@@ -536,7 +536,7 @@ sub interactive_mode() {
clicked => sub {
$font_button->set_sensitive(1);
$adv_opt_button->set_sensitive(0);
- $$central_widget->destroy();
+ $$central_widget->destroy;
$windows = 0;
advanced_install();
}),
@@ -544,14 +544,14 @@ sub interactive_mode() {
clicked => sub {
$font_button->set_sensitive(0);
$adv_opt_button->set_sensitive(1);
- $$central_widget->destroy();
+ $$central_widget->destroy;
create_fontsel();
}),
), 1,
new Gtk2::HBox(0, 2), 0,
gtkadd(gtkset_layout(new Gtk2::VButtonBox, 'end'),
gtksignal_connect(new Gtk2::Button(N("About")), clicked => \&help),
- gtksignal_connect(new Gtk2::Button(N("Close")), clicked => sub { Gtk2->main_quit() }),
+ gtksignal_connect(new Gtk2::Button(N("Close")), clicked => sub { Gtk2->main_quit }),
),
),
),
@@ -578,12 +578,12 @@ sub text_view {
), 0,
gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
gtksignal_connect(new Gtk2::Button(N("OK")),
- clicked => sub { $$central_widget->destroy() }),
+ clicked => sub { $$central_widget->destroy }),
),
)
);
$central_widget = \$box;
- $font_box->show_all();
+ $font_box->show_all;
}
sub help() {
@@ -664,13 +664,13 @@ sub appli_choice() {
gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
gtksignal_connect(new Gtk2::Button(N("OK")),
clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
import_status();
}),
gtksignal_connect(new Gtk2::Button(N("Cancel")),
clicked => sub {
@install = ();
- $$central_widget->destroy();
+ $$central_widget->destroy;
create_fontsel();
}),
),
@@ -684,7 +684,7 @@ sub appli_choice() {
gtksignal_connect(gtkset_active($_->[0], $$ref), toggled => sub { $$ref = $$ref ? 0 : 1 });
}
$central_widget = \$choice_box;
- $font_box->show_all();
+ $font_box->show_all;
}
my $select_font_msg;
@@ -692,18 +692,18 @@ my $select_font_msg;
sub font_choice() {
my $file_dialog;
$select_font_msg = N("Select the font file or directory and click on 'Add'");
- $file_dialog = gtksignal_connect(new Gtk2::FileSelection(N("File Selection")), destroy => sub { $file_dialog->destroy() });
+ $file_dialog = gtksignal_connect(new Gtk2::FileSelection(N("File Selection")), destroy => sub { $file_dialog->destroy });
$file_dialog->ok_button->signal_connect(clicked => \&file_ok_sel, $file_dialog);
$file_dialog->ok_button->set_label(N("Add"));
- $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy() });
+ $file_dialog->cancel_button->signal_connect(clicked => sub { $file_dialog->destroy });
$file_dialog->cancel_button->set_label(N("Close"));
$file_dialog->set_filename($select_font_msg);
- $file_dialog->show();
+ $file_dialog->show;
}
sub file_ok_sel {
my ($_widget, $file_selection) = @_;
- my $file_name = $file_selection->get_filename();
+ my $file_name = $file_selection->get_filename;
if ($file_name =~ /\Q$select_font_msg/) {
create_dialog(N("Error"), N("You've not selected any font"));
} else {
@@ -741,7 +741,7 @@ sub advanced_install() {
gtksignal_connect(new Gtk2::Button(N("Install List")),
clicked => sub {
if (@install) {
- $$central_widget->destroy();
+ $$central_widget->destroy;
appli_choice();
}
})
@@ -749,16 +749,16 @@ sub advanced_install() {
)
);
$central_widget = \$adv_box;
- $adv_box->show_all();
+ $adv_box->show_all;
}
sub list_to_remove() {
#my @files_path = grep(!/fonts/, all($current_path)); garbage ?
gtkflush();
- my ($tree, @tux) = $left_list->get_selection->get_selected_rows(); #- get tree & paths
+ my ($tree, @tux) = $left_list->get_selection->get_selected_rows; #- get tree & paths
push @uninstall, map { $tree->get($tree->get_iter($_), 0) } @tux;
#push @uninstall, $current_path . "/" . $files_path[$_] foreach @number_to_remove; garbage ?
- $$central_widget->destroy();
+ $$central_widget->destroy;
show_list_to_remove();
}
@@ -779,18 +779,18 @@ sub show_list_to_remove() {
gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
gtksignal_connect(new Gtk2::Button(N("click here if you are sure.")),
clicked => sub {
- $$central_widget->destroy();
+ $$central_widget->destroy;
import_status_uninstall();
}),
gtksignal_connect(new Gtk2::Button(N("here if no.")),
clicked =>
- sub { $$central_widget->destroy(); create_fontsel() }
+ sub { $$central_widget->destroy; create_fontsel() }
),
),
)
);
$central_widget = \$show_box;
- $show_box->show_all();
+ $show_box->show_all;
}
sub uninstall() { #- TODO : add item to right list with gtksignal_connect
@@ -826,17 +826,17 @@ sub uninstall() { #- TODO : add item to right list with gtksignal_connect
), 0,
gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
gtksignal_connect(new Gtk2::Button(N("Unselected All")),
- clicked => sub { $left_list->get_selection->unselect_all() }
+ clicked => sub { $left_list->get_selection->unselect_all }
),
gtksignal_connect(new Gtk2::Button(N("Selected All")),
- clicked => sub { $left_list->get_selection->select_all() }
+ clicked => sub { $left_list->get_selection->select_all }
),
gtksignal_connect(new Gtk2::Button(N("Remove List")), clicked => sub { list_to_remove() }),
),
)
);
$central_widget = \$uninst_box;
- $uninst_box->show_all();
+ $uninst_box->show_all;
}
sub import_status() {
@@ -856,7 +856,7 @@ sub import_status() {
),
);
$central_widget = \$table;
- $font_box->show_all();
+ $font_box->show_all;
gtkflush();
backend_mod();
}
@@ -877,8 +877,7 @@ sub import_status_uninstall() {
),
);
$central_widget = \$table;
- $font_box->show_all();
- gtkflush();
+ $font_box->show_all;
backend_mod();
}
diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw
index 881cb279b..adfedc197 100755
--- a/perl-install/standalone/drakgw
+++ b/perl-install/standalone/drakgw
@@ -264,7 +264,7 @@ my $internal_domain_name = network::network::read_dhcpd_conf()->{domain_name}[0]
my $reconf_dhcp_server_intf = 1;
-if (grep { /$device/ } @configured_devices) {
+if (any { /$device/ } @configured_devices) {
step_warning_already_conf:
my $auto = N("Yes");
my $_dhcp_details = N("Yes");
@@ -332,7 +332,7 @@ log::explanations("Using LAN address <$lan_address>");
#- test for potential conflict with other networks
foreach (grep { $_ ne $device } @configured_devices) {
- grep { /$lan_address/ } cat_("/etc/sysconfig/network-scripts/ifcfg-$_") and
+ any { /$lan_address/ } cat_("/etc/sysconfig/network-scripts/ifcfg-$_") and
($in->ask_warn('', N("Potential LAN address conflict found in current config of %s!\n", $_)) or goto step_detectsetup);
}
@@ -377,7 +377,7 @@ my %rpm2file = ('dhcp-server' => '/usr/sbin/dhcpd',
my @needed_to_install = grep { !-e $rpm2file{$_} } keys %rpm2file;
@needed_to_install and $in->do_pkgs->install(@needed_to_install);
#- second: try one by one if failure detected
-if (grep { !-e $rpm2file{$_} } keys %rpm2file) {
+if (any { !-e $rpm2file{$_} } keys %rpm2file) {
foreach (keys %rpm2file) {
-e $rpm2file{$_} or $in->do_pkgs->install($_);
-e $rpm2file{$_} or fatal_quit(N("Problems installing package %s", $_));
@@ -467,7 +467,7 @@ if (-f $cups_conf) {
# Cut out the root location block so that it can be treated seperately
# without affecting the rest of the file
- if (grep { m|^\s*<Location\s+/\s*>| } @cups_conf_content) {
+ if (any { m|^\s*<Location\s+/\s*>| } @cups_conf_content) {
$root_location_start = -1;
$root_location_end = -1;
# Go through all the lines, bail out when start and end line found
@@ -568,7 +568,7 @@ Click on Configure to launch the setup wizard.", $setup_state));
my $button_cancel = Gtk2::Button->new(N("Cancel"));
$button_cancel->signal_connect(clicked => sub { ugtk2->exit(0) });
$bbox1->add($button_cancel);
- $window1->{rwindow}->show_all();
+ $window1->{rwindow}->show_all;
$window1->main;
ugtk2->exit(0);
diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm
index 552e63ede..166eea7bc 100755
--- a/perl-install/standalone/drakperm
+++ b/perl-install/standalone/drakperm
@@ -62,7 +62,7 @@ sub edit_callback() {
my @buttons;
sub del_callback() {
- my ($tree, $iter) = $permList->get_selection->get_selected();
+ my ($tree, $iter) = $permList->get_selection->get_selected;
$tree->remove($iter);
$iter->free;
sensitive_buttons(0);
@@ -102,7 +102,7 @@ sub up_callback() {
CLEAN1: $iter->free;
}
-my $combo_sig = $combo_perm->entry->signal_connect( changed => sub { display_perm($combo_perm->entry->get_text , @_) });
+my $combo_sig = $combo_perm->entry->signal_connect(changed => sub { display_perm($combo_perm->entry->get_text , @_) });
$permList->signal_connect(button_press_event => sub {
return unless $editable;
my (undef, $event) = @_;
@@ -148,9 +148,9 @@ $w->{rwindow}->set_position('center') unless $::isEmbedded;
display_perm($default_perm_level);
$combo_perm->entry->set_text($default_perm_level);
-$permList->get_selection()->signal_connect('changed' => sub {
+$permList->get_selection->signal_connect('changed' => sub {
my ($select) = @_;
- my (undef, $iter) = $select->get_selected();
+ my (undef, $iter) = $select->get_selected;
my $editable = $editable;
$editable = 0 unless $iter;
sensitive_buttons($editable);
@@ -183,7 +183,7 @@ sub display_perm {
$editable = $perm_level =~ /^level \d/ ? 0 : 1;
- $treeModel->clear();
+ $treeModel->clear;
local *F;
open F, $file;
local $_;
@@ -307,8 +307,8 @@ sub row_setting_dialog {
$file_dlg->set_transient_for($dlg);
$file_dlg->show;
$file_dlg->set_filename($file->get_text);
- $file_dlg->cancel_button->signal_connect( clicked => sub { $file_dlg->destroy });
- $file_dlg->ok_button->signal_connect( clicked => sub {
+ $file_dlg->cancel_button->signal_connect(clicked => sub { $file_dlg->destroy });
+ $file_dlg->ok_button->signal_connect(clicked => sub {
$file->set_text($file_dlg->get_filename);
$file_dlg->destroy;
});
diff --git a/perl-install/standalone/drakpxe b/perl-install/standalone/drakpxe
index 636965f0c..7ffe84d58 100755
--- a/perl-install/standalone/drakpxe
+++ b/perl-install/standalone/drakpxe
@@ -226,7 +226,7 @@ my %rpm2file = ('dhcp-server' => '/usr/sbin/dhcpd',
my @needed_to_install = grep { !-e $rpm2file{$_} } keys %rpm2file;
@needed_to_install and $in->do_pkgs->install(@needed_to_install);
#- second: try one by one if failure detected
-if (grep { !-e $rpm2file{$_} } keys %rpm2file) {
+if (any { !-e $rpm2file{$_} } keys %rpm2file) {
foreach (keys %rpm2file) {
-e $rpm2file{$_} or $in->do_pkgs->install($_);
-e $rpm2file{$_} or fatal_quit(N("Problems installing package %s", $_));
@@ -235,7 +235,7 @@ if (grep { !-e $rpm2file{$_} } keys %rpm2file) {
#- check if a pool already exist allowing PXE, else create one wich will be correct.
if ($pool) {
- @{$pool}{qw(start_ip end_ip)} = ($start_ip, $end_ip);
+ @$pool{qw(start_ip end_ip)} = ($start_ip, $end_ip);
} else {
$pool = { start_ip => $start_ip, end_ip => $end_ip };
foreach (keys %{$dhcpd_conf->{class}}) {
@@ -482,7 +482,7 @@ sub parse_pxelinux_cfg {
close F;
}
#- try to fix bad file (first version of drakpxe for example).
- my %default_pxelinux_cfg = ( PROMPT => 1,
+ my %default_pxelinux_cfg = (PROMPT => 1,
DEFAULT => "local",
DISPLAY => "messages",
TIMEOUT => 50,
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index 0e8f2b636..4ff1b691b 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -101,8 +101,8 @@ unless ($::isEmbedded) {
}
# Connect the signals
-$window->signal_connect('delete_event', sub { $window->destroy() });
-$window->signal_connect('destroy', sub { ugtk2->exit() });
+$window->signal_connect('delete_event', sub { $window->destroy });
+$window->signal_connect('destroy', sub { ugtk2->exit });
$window->add(my $vbox = gtkshow(new Gtk2::VBox(0, 0)));
@@ -188,9 +188,9 @@ $notebook->append_page(gtkshow(create_scrolled_window(gtkpack_(new Gtk2::VBox(0,
####################### OK CANCEL BUTTONS ##################################
my $bok = gtksignal_connect(new Gtk2::Button(N("Ok")),
'clicked' => sub {
- my $seclevel_value = $seclevel_entry->entry->get_text();
- my $secadmin_check_value = $secadmin_check->get_active();
- my $secadmin_value = $secadmin_entry->get_text();
+ my $seclevel_value = $seclevel_entry->entry->get_text;
+ my $secadmin_check_value = $secadmin_check->get_active;
+ my $secadmin_value = $secadmin_entry->get_text;
my $w;
log::explanations("Configuring msec");
@@ -213,7 +213,7 @@ my $bok = gtksignal_connect(new Gtk2::Button(N("Ok")),
log::explanations("Setting security periodic checks");
foreach my $key (keys %security_checks_value) {
- $msec->set_check($key, $security_checks_value{$key}->entry->get_text());
+ $msec->set_check($key, $security_checks_value{$key}->entry->get_text);
}
$msec->apply_checks;
@@ -221,7 +221,7 @@ my $bok = gtksignal_connect(new Gtk2::Button(N("Ok")),
log::explanations("Setting msec functions related to $domain");
foreach my $key (keys %{$options_values{$domain}}) {
my $opt = $options_values{$domain}{$key};
- $msec->set_function($key, $opt =~ /Combo/ ? $opt->entry->get_text() : $opt->get_text());
+ $msec->set_function($key, $opt =~ /Combo/ ? $opt->entry->get_text : $opt->get_text);
}
}
$msec->apply_functions;
@@ -241,7 +241,7 @@ gtkpack_($vbox,
$bok),
$bcancel));
$bcancel->can_default(1);
-$bcancel->grab_default();
+$bcancel->grab_default;
$w->main;
ugtk2->exit(0);
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash
index cebc80d3b..0f571f51a 100755
--- a/perl-install/standalone/draksplash
+++ b/perl-install/standalone/draksplash
@@ -182,7 +182,7 @@ unless ($::isEmbedded) {
$window->{rwindow}->set_border_width(5);
$window->{window}->add($first_vbox);
$window->{rwindow}->set_position('center');
- $window->{rwindow}->show_all();
+ $window->{rwindow}->show_all;
#&show_act(\%first);
}
@@ -430,7 +430,7 @@ sub make_boot_frame() {
$color->colorsel->set_current_color(Gtk2::Gdk::Color->new(@rgb));
$color->cancel_button->signal_connect(clicked => sub { $color->destroy });
$color->ok_button->signal_connect(clicked => sub {
- my $colour = $color->colorsel->get_current_color();
+ my $colour = $color->colorsel->get_current_color;
@rgb = map { dec2hex($_*255) } ($colour->red, $colour->green, $colour->blue);
$theme{boot_conf}{pc} = "0x$rgb[0]$rgb[1]$rgb[2]";
$color->destroy;
diff --git a/perl-install/standalone/fileshareset b/perl-install/standalone/fileshareset
index 18277d95f..51f4625d3 100755
--- a/perl-install/standalone/fileshareset
+++ b/perl-install/standalone/fileshareset
@@ -84,10 +84,10 @@ if ($modify) {
if ($cmd eq '--add') {
my @errs = map { eval { $_->add($dir) }; $@ } @exports;
- grep { !$_ } @errs or error("already exported");
+ any { !$_ } @errs or error("already exported");
} else {
my @errs = map { eval { $_->remove($dir) }; $@ } @exports;
- grep { !$_ } @errs or error("not exported");
+ any { !$_ } @errs or error("not exported");
}
foreach my $export (@exports) {
$export->write;
@@ -189,7 +189,7 @@ package nfs_exports;
use vars qw(@ISA $conf_file $default_options);
BEGIN { @ISA = 'exports' }
-sub read {
+sub read() {
my $file = $conf_file;
local *F;
open F, $file or return [];
@@ -253,7 +253,7 @@ sub write {
print F $_->{raw} foreach @$nfs_exports;
}
-sub update_server {
+sub update_server() {
if (fork()) {
system('/usr/sbin/exportfs', '-r');
if (system('/sbin/pidof rpc.mountd >/dev/null') != 0 ||
@@ -272,7 +272,7 @@ package smb_exports;
use vars qw(@ISA $conf_file);
BEGIN { @ISA = 'exports' }
-sub read {
+sub read() {
my ($s, @l);
local *F;
open F, $conf_file;
@@ -338,7 +338,7 @@ sub name_mangle {
# 4. if size is too big, shorten it
while (length > 12) {
my ($s) = m|.*?/(.*)|;
- if (length($s) > 8 && !grep { /\Q$s/ } @others) {
+ if (length($s) > 8 && !any { /\Q$s/ } @others) {
# dropping leading directories when the resulting is still long and meaningful
$_ = $s;
next;
@@ -376,7 +376,7 @@ sub name_mangle {
$_;
}
-sub update_server {
+sub update_server() {
if (fork()) {
system('/usr/bin/killall -HUP smbd 2>/dev/null');
if (system('/sbin/pidof smbd >/dev/null') != 0 ||
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index bb8e810f1..37c05b2f6 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -175,7 +175,7 @@ $w->{window}->add(gtkpack_(0, Gtk2::VBox->new(0, 0),
}
})
),
- ( 'resize1' => 0, shrink1 => 1, resize2 => 0, shrink2 => 1)
+ ('resize1' => 0, shrink1 => 1, resize2 => 0, shrink2 => 1)
),
0, $statusbar = Gtk2::Statusbar->new,
if_($::isEmbedded, 0, gtkpack(create_hbox(),
@@ -194,9 +194,9 @@ my (@data, @configurators);
$tree->append_column(my $pixcolumn = Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererPixbuf->new, 'pixbuf' => 0));
$tree->append_column(my $textcolumn = Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 1));
$tree->set_headers_visible(0);
-$tree->get_selection()->signal_connect('changed' => sub {
+$tree->get_selection->signal_connect('changed' => sub {
my ($select) = @_;
- my ($model, $iter) = $select->get_selected();
+ my ($model, $iter) = $select->get_selected;
if ($model) {
my $idx = $model->get($iter, 2);
$iter->free;
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake
index 7cc5c2a83..cbde5da75 100755
--- a/perl-install/standalone/logdrake
+++ b/perl-install/standalone/logdrake
@@ -144,7 +144,7 @@ my %files = (
my $yy = gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("search")) , clicked => \&search),0);
my $log_text = gtktext_insert(Gtk2::TextView->new, [ [ '' ] ]);
-my $log_buf = $log_text->get_buffer();
+my $log_buf = $log_text->get_buffer;
my $refcount_search;
#### far from window
@@ -206,7 +206,7 @@ gtkadd($my_win->{window},
$::isFile && !$::isEmbedded and gtkset_size_request($log_text, 400, 500);
-$my_win->{window}->show_all();
+$my_win->{window}->show_all;
search() if $::isFile;
$my_win->main;
@@ -216,7 +216,7 @@ sub quit() { ugtk2->exit(0) }
# search functions
#-------------------------------------------------------------
sub search() {
- $log_text->window->freeze_updates();
+ $log_text->window->freeze_updates;
$log_buf->set_text('', -1);
if ($::isFile) {
parse_file($::File);
@@ -225,8 +225,8 @@ sub search() {
parse_file($files{$_}{file}, $files{$_}{desc}) if $toggle{$_}->active;
}
}
- $log_text->window->thaw_updates();
- $log_text->show();
+ $log_text->window->thaw_updates;
+ $log_text->show;
gtkflush();
}
@@ -248,8 +248,8 @@ sub parse_file {
);
$win_pb->set_transient_for($my_win->{rwindow}) unless $::isEmbedded;
$win_pb->set_position('center');
- $win_pb->realize();
- $win_pb->show_all();
+ $win_pb->realize;
+ $win_pb->show_all;
gtkflush();
}
my $ey = $e_yes->get_chars(0, -1);
@@ -260,7 +260,7 @@ sub parse_file {
$ey = $ey . $::Word if $::isWord;
if ($cal_mode) {
- my (undef, $month, $day) = $cal->get_date();
+ my (undef, $month, $day) = $cal->get_date;
$ey = $months[$month]."\\s{1,2}$day\\s.*$ey.*\n";
}
@@ -290,7 +290,7 @@ sub parse_file {
if (! /$en/i && /$ey/i) { logcolorize($_); next }
if (! /$en/i && $ey eq "") { logcolorize($_); next }
}
- $win_pb->destroy() if !$::isEmbedded || !$::isExplain;
+ $win_pb->destroy if !$::isEmbedded || !$::isExplain;
if ($::isTail) {
close F;
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor
index 2df918780..170a70bee 100755
--- a/perl-install/standalone/net_monitor
+++ b/perl-install/standalone/net_monitor
@@ -53,7 +53,7 @@ require_root_capability();
my $window1 = my_gtk->new('net_monitor');
$window1->{rwindow}->signal_connect(delete_event => sub { my_gtk->exit(0) });
unless ($::isEmbedded) {
- $window1->{rwindow}->set_position(1) ;
+ $window1->{rwindow}->set_position(1);
$window1->{rwindow}->set_title(N("Network Monitoring"));
$window1->{rwindow}->set_policy(1, 1, 1);
$window1->{rwindow}->set_border_width(5);
@@ -104,9 +104,9 @@ gtkadd($window1->{window},
1, gtkadd(gtkset_shadow_type(new Gtk::Frame(N("Statistics")), 'etched_out'),
gtkpack__(new Gtk::VBox(0,0),
create_packtable({ col_spacings => 1, row_spacings => 1 },
- [ "", "instantaneous" , "average"],
- [ N("Sending Speed:"), my $label_st = new Gtk::Label(""), my $label_sta = new Gtk::Label("na")],
- [ N("Receiving Speed:"),my $label_sr = new Gtk::Label(""), my $label_sra = new Gtk::Label("na")],
+ [ "", "instantaneous" , "average" ],
+ [ N("Sending Speed:"), my $label_st = new Gtk::Label(""), my $label_sta = new Gtk::Label("na") ],
+ [ N("Receiving Speed:"), my $label_sr = new Gtk::Label(""), my $label_sra = new Gtk::Label("na") ],
),
gtkpack__(new Gtk::HBox(0,0), " " . N("Connection Time: "), my $label_ct = new Gtk::Label("")),
)
@@ -131,7 +131,7 @@ gtkadd($window1->{window},
$window1->{rwindow}->show_all;
$window1->{rwindow}->realize;
$combo1->entry->signal_connect(changed => sub {
- network::netconnect::set_profile($netcnx, $combo1->entry->get_text());
+ network::netconnect::set_profile($netcnx, $combo1->entry->get_text);
network::netconnect::load_conf($netcnx, $netc, $intf);
network::netconnect::set_net_conf($netcnx, $netc, $intf);
network::netconnect::read_net_conf('', $netcnx, $netc);
@@ -150,7 +150,7 @@ $button_connect->add(gtkpack__(new Gtk::VBox(0,3),
my $label_c = new Gtk::Label(N("Wait please"))
));
$statusbar->push(1, N("Wait please, testing your connection..."));
-$window1->{rwindow}->show_all();
+$window1->{rwindow}->show_all;
#$window1->{rwindow}->set_policy (1, 1, 1);
my $time_tag = Gtk->timeout_add(1000, \&rescan);
@@ -184,8 +184,8 @@ sub connection {
if ($wasconnected == 1) {
$c_time = time();
$ct_tag = Gtk->timeout_add(1000, sub {
- my ($sec,$min,$hour) = gmtime(time() - $c_time);
- my $e = sprintf ("%02d:%02d:%02d", $hour, $min, $sec);
+ my ($sec, $min, $hour) = gmtime(time() - $c_time);
+ my $e = sprintf("%02d:%02d:%02d", $hour, $min, $sec);
$label_ct->set($e); 1 })
} else { Gtk->timeout_remove($ct_tag) }
my $nb_point = 1;
@@ -219,7 +219,7 @@ sub connection {
}
}
# either we got a result, or we timed out.
- if ($isconnect != -2 or $nb_point > 20) {
+ if ($isconnect != -2 || $nb_point > 20) {
$isconnected = $isconnect;
$ret = 0;
$statusbar->pop(1);
@@ -319,7 +319,7 @@ sub get_val {
foreach (@line) {
s/\s*(\w*)://;
my $intf = $1;
- push (@ret,$intf);
+ push @ret,$intf;
$monitor->{$intf}{val} = [split()];
$monitor->{$intf}{intf} = $intf;
}
@@ -328,9 +328,9 @@ sub get_val {
sub change_color {
my ($color) = @_;
- my $window = new Gtk::Window -toplevel;
+ my $window = Gtk::Window->new('toplevel');
my $doit;
- $window->signal_connect(delete_event => sub { Gtk->main_quit() });
+ $window->signal_connect(delete_event => sub { Gtk->main_quit });
$window->set_position(1);
$window->set_title(N("Color configuration"));
$window->set_border_width(5);
@@ -338,17 +338,17 @@ sub change_color {
gtkpack_(new Gtk::VBox(0,5),
1, my $colorsel = new Gtk::ColorSelection,
0, gtkadd(gtkset_layout(new Gtk::HButtonBox, -end),
- gtksignal_connect(new Gtk::Button(N("OK")), clicked => sub { $doit = 1; Gtk->main_quit() }),
- gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { Gtk->main_quit() }),
+ gtksignal_connect(new Gtk::Button(N("OK")), clicked => sub { $doit = 1; Gtk->main_quit }),
+ gtksignal_connect(new Gtk::Button(N("Cancel")), clicked => sub { Gtk->main_quit }),
)
)
);
- $colorsel->set_color($color->red()/65535, $color->green()/65535, $color->blue()/65535, $color->pixel());
- $window->show_all();
+ $colorsel->set_color($color->red/65535, $color->green/65535, $color->blue/65535, $color->pixel);
+ $window->show_all;
Gtk->main;
- $window->destroy();
+ $window->destroy;
$doit or return $color;
- my (@color) = $colorsel->get_color();
+ my (@color) = $colorsel->get_color;
my_gtk::gtkcolor($color[0]*65535, $color[1]*65535, $color[2]*65535);
}
@@ -422,7 +422,7 @@ sub update {
$i->[0]->add(gtksignal_connect(gtkshow(gtksize(gtkset_usize(new Gtk::DrawingArea(), 10, 10), 10, 10)), expose_event => sub { $_[0]->window->draw_rectangle($i->[1], 1, 0, 0, 10, 10) }));
}
$notebook->set_page($notebook->page_num($page));
- $monitor->{$intf}{page} = ($notebook->page_num($page));
+ $monitor->{$intf}{page} = $notebook->page_num($page);
$monitor->{$intf}{pixmap_db} = new Gtk::Gdk::Pixmap($monitor->{$intf}{darea}->window, 300, 150);
$monitor->{$intf}{referencer} = $monitor->{$intf}{val}[0];
$monitor->{$intf}{referencet} = $monitor->{$intf}{val}[8];
@@ -530,7 +530,7 @@ sub draw_monitor {
my $switch = 1;
my $gcl = new Gtk::Gdk::GC($o->{darea}->window);
- $gcl->set_foreground($o->{darea}->window->get_colormap->color_white());
+ $gcl->set_foreground($o->{darea}->window->get_colormap->color_white);
$gcl->set_line_attributes(1, 'on-off-dash', 'not-last', 'round');
for (my $i = 30; $i <= 120; $i += 30) {
$o->{pixmap_db}->draw_line($gcl, 50, $i, 300, $i);