summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-08-09 01:39:27 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-08-09 01:39:27 +0000
commit0bcef6753fff40efc1638452575b07eb7fb1c4f5 (patch)
tree582afdee2ddaf72c35553fb154a6dafbeb2e5244
parentd1b4c0820761179bbcb2d066483236606c67fb7a (diff)
downloaddrakx-backup-do-not-use-0bcef6753fff40efc1638452575b07eb7fb1c4f5.tar
drakx-backup-do-not-use-0bcef6753fff40efc1638452575b07eb7fb1c4f5.tar.gz
drakx-backup-do-not-use-0bcef6753fff40efc1638452575b07eb7fb1c4f5.tar.bz2
drakx-backup-do-not-use-0bcef6753fff40efc1638452575b07eb7fb1c4f5.tar.xz
drakx-backup-do-not-use-0bcef6753fff40efc1638452575b07eb7fb1c4f5.zip
prefer obj->new rather than new obj for gtk+ widgets
-rw-r--r--perl-install/Xconfig/resolution_and_depth.pm10
-rwxr-xr-xperl-install/standalone/drakTermServ270
-rwxr-xr-xperl-install/standalone/drakautoinst58
-rwxr-xr-xperl-install/standalone/drakbackup840
-rwxr-xr-xperl-install/standalone/drakbug28
-rwxr-xr-xperl-install/standalone/drakconnect8
-rwxr-xr-xperl-install/standalone/drakfloppy16
-rwxr-xr-xperl-install/standalone/drakperm10
-rwxr-xr-xperl-install/standalone/draksec14
-rwxr-xr-xperl-install/standalone/logdrake44
-rw-r--r--perl-install/standalone/net_applet2
-rwxr-xr-xperl-install/standalone/net_monitor2
12 files changed, 651 insertions, 651 deletions
diff --git a/perl-install/Xconfig/resolution_and_depth.pm b/perl-install/Xconfig/resolution_and_depth.pm
index 3ddb931cc..b3c71ff2c 100644
--- a/perl-install/Xconfig/resolution_and_depth.pm
+++ b/perl-install/Xconfig/resolution_and_depth.pm
@@ -269,13 +269,13 @@ sub choose_gtk {
gtkpack_($W->create_box_with_title(N("Choose the resolution and the color depth"),
if_($card->{BoardName}, "(" . N("Graphics card: %s", $card->{BoardName}) . ")"),
),
- 1, gtkpack2(new Gtk2::VBox(0,0),
- gtkpack2__(new Gtk2::VBox(0, 15),
+ 1, gtkpack2(Gtk2::VBox->new(0,0),
+ gtkpack2__(Gtk2::VBox->new(0, 15),
$pixmap_mo,
- gtkpack2(new Gtk2::HBox(0,0),
+ gtkpack2(Gtk2::HBox->new(0,0),
create_packtable({ col_spacings => 5, row_spacings => 5 },
- [ $x_res_combo, new Gtk2::Label("") ],
- [ $depth_combo, gtkadd(gtkset_shadow_type(new Gtk2::Frame, 'etched_out'), $pix_colors) ],
+ [ $x_res_combo, Gtk2::Label->new("") ],
+ [ $depth_combo, gtkadd(gtkset_shadow_type(Gtk2::Frame->new, 'etched_out'), $pix_colors) ],
),
),
),
diff --git a/perl-install/standalone/drakTermServ b/perl-install/standalone/drakTermServ
index a0cb72103..e00d0e9df 100755
--- a/perl-install/standalone/drakTermServ
+++ b/perl-install/standalone/drakTermServ
@@ -201,13 +201,13 @@ x:5:respawn:/usr/X11R6/bin/X -ac -query $server_ip\n";
sub cursor_wait() {
# turn the cursor to a watch
- $window1->{rwindow}->window->set_cursor(new Gtk2::Gdk::Cursor("GDK_WATCH"));
+ $window1->{rwindow}->window->set_cursor(Gtk2::Gdk->new::Cursor("GDK_WATCH"));
gtkflush();
}
sub cursor_norm() {
# restore normal cursor
- $window1->{rwindow}->window->set_cursor(new Gtk2::Gdk::Cursor("GDK_LEFT_PTR"));
+ $window1->{rwindow}->window->set_cursor(Gtk2::Gdk->new::Cursor("GDK_LEFT_PTR"));
gtkflush();
}
@@ -216,10 +216,10 @@ sub display_error {
my $error_box;
destroy_widget();
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 {
+ $error_box = gtkpack_(Gtk2::VBox->new(0,0),
+ 1, Gtk2::Label->new($message),
+ 0, gtkadd(gtkset_layout(Gtk2::HButtonBox->new, 'spread'),
+ gtksignal_connect(Gtk2::Button->new(N("OK")), clicked => sub {
destroy_widget();
}),
),
@@ -238,75 +238,75 @@ sub interactive_mode() {
$window1->{rwindow}->set_border_width(5);
gtkadd($window1->{window},
- gtkpack_(gtkset_size_request(new Gtk2::VBox(0,2), 620, 400),
- 1, gtkpack_(new Gtk2::HBox(0,2),
- 1, gtkpack_(new Gtk2::VBox(0,2),
- 1, gtkpack($status_box = new Gtk2::VBox(0,5),
- $main_box = new Gtk2::VBox(0,10),
+ gtkpack_(gtkset_size_request(Gtk2::VBox->new(0,2), 620, 400),
+ 1, gtkpack_(Gtk2::HBox->new(0,2),
+ 1, gtkpack_(Gtk2::VBox->new(0,2),
+ 1, gtkpack($status_box = Gtk2::VBox->new(0,5),
+ $main_box = Gtk2::VBox->new(0,10),
),
- 0, $wizard_buttons = gtkpack_(new Gtk2::HBox(1,2)),
- 0, gtkpack_($main_buttons = new Gtk2::VBox(0,2),
- 1, gtkpack_(new Gtk2::HBox(1,2),
- 1, gtkpack_(new Gtk2::VBox(1,0),
- 1, gtksignal_connect(new Gtk2::Button(N("Enable Server")), clicked => sub {
+ 0, $wizard_buttons = gtkpack_(Gtk2::HBox->new(1,2)),
+ 0, gtkpack_($main_buttons = Gtk2::VBox->new(0,2),
+ 1, gtkpack_(Gtk2::HBox->new(1,2),
+ 1, gtkpack_(Gtk2::VBox->new(1,0),
+ 1, gtksignal_connect(Gtk2::Button->new(N("Enable Server")), clicked => sub {
destroy_widget();
cursor_wait();
enable_ts();
cursor_norm();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Disable Server")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new(N("Disable Server")), clicked => sub {
destroy_widget();
cursor_wait();
disable_ts();
cursor_norm();
}),
),
- 1, gtkpack_(new Gtk2::VBox(1,0),
- 1, gtksignal_connect(new Gtk2::Button(N("Start Server")), clicked => sub {
+ 1, gtkpack_(Gtk2::VBox->new(1,0),
+ 1, gtksignal_connect(Gtk2::Button->new(N("Start Server")), clicked => sub {
destroy_widget();
cursor_wait();
start_ts();
cursor_norm();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Stop Server")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new(N("Stop Server")), clicked => sub {
destroy_widget();
cursor_wait();
stop_ts();
cursor_norm();
}),
),
- 1, gtkpack_(new Gtk2::VBox(1,0),
- 1, gtksignal_connect(new Gtk2::Button(N("Etherboot Floppy/ISO")), clicked => sub {
+ 1, gtkpack_(Gtk2::VBox->new(1,0),
+ 1, gtksignal_connect(Gtk2::Button->new(N("Etherboot Floppy/ISO")), clicked => sub {
destroy_widget();
make_boot();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Net Boot Images")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new(N("Net Boot Images")), clicked => sub {
destroy_widget();
make_nbi();
}),
),
- 1, gtkpack_(new Gtk2::VBox(1,0),
- 1, gtksignal_connect(new Gtk2::Button(N("Add/Del Users")), clicked => sub {
+ 1, gtkpack_(Gtk2::VBox->new(1,0),
+ 1, gtksignal_connect(Gtk2::Button->new(N("Add/Del Users")), clicked => sub {
destroy_widget();
maintain_users();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Add/Del Clients")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new(N("Add/Del Clients")), clicked => sub {
destroy_widget();
maintain_clients()
}),
),
),
- 0, gtkpack_(new Gtk2::HBox,
- 0, gtksignal_connect(new Gtk2::Button(N("Help")),clicked => sub {
+ 0, gtkpack_(Gtk2::HBox->new,
+ 0, gtksignal_connect(Gtk2::Button->new(N("Help")),clicked => sub {
destroy_widget();
help();
}),
- 0, gtksignal_connect(new Gtk2::Button(N("First Time Wizard")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new(N("First Time Wizard")), clicked => sub {
destroy_widget();
start_wizard();
}),
1, "",
- 0, gtksignal_connect(new Gtk2::Button(N("Close")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new(N("Close")), clicked => sub {
write_conf_file();
restart_server() if $changes_made == 1;
Gtk2->main_quit;
@@ -369,7 +369,7 @@ sub wizard_step {
my ($do_step, $step) = @_;
&$do_step();
gtkadd($wizard_buttons,
- gtksignal_connect($previous_button = new Gtk2::Button(N("Previous")), clicked => sub {
+ gtksignal_connect($previous_button = Gtk2::Button->new(N("Previous")), clicked => sub {
clear_buttons();
if ($step == 1) {
exit_wizard();
@@ -385,12 +385,12 @@ sub wizard_step {
})
);
gtkadd($wizard_buttons,
- gtksignal_connect($cancel_button = new Gtk2::Button(N("Cancel Wizard")), clicked => sub {
+ gtksignal_connect($cancel_button = Gtk2::Button->new(N("Cancel Wizard")), clicked => sub {
exit_wizard();
})
);
gtkadd($wizard_buttons,
- gtksignal_connect($next_button = new Gtk2::Button(N("Next")), clicked => sub {
+ gtksignal_connect($next_button = Gtk2::Button->new(N("Next")), clicked => sub {
clear_buttons();
wizard_step(\&dhcpd_config, 2) if $step == 1;
if ($step == 2) {
@@ -425,13 +425,13 @@ sub clear_buttons() {
}
sub client_type() {
- my $check_allow_thin = new Gtk2::CheckButton(N("Use thin clients."));
+ my $check_allow_thin = Gtk2::CheckButton->new(N("Use thin clients."));
$check_allow_thin->set_active($conf{ALLOW_THIN});
text_view(N("Please select default client type.
'Thin' clients run everything off the server's CPU/RAM, using the client display.
'Fat' clients use their own CPU/RAM but the server's filesystem."), "wizard");
gtkpack_($$central_widget,
- 0, gtkpack_(new Gtk2::HBox(1,0),
+ 0, gtkpack_(Gtk2::HBox->new(1,0),
1, Gtk2::VBox->new,
0, gtksignal_connect($check_allow_thin, clicked => sub {
invbool \$conf{ALLOW_THIN};
@@ -439,9 +439,9 @@ sub client_type() {
}),
0, Gtk2::VBox->new,
),
- 0, gtksignal_connect(new Gtk2::Button(N("Sync client X keyboard settings with server.")),
+ 0, gtksignal_connect(Gtk2::Button->new(N("Sync client X keyboard settings with server.")),
clicked => sub { client_X_keyboard() }),
- 1, new Gtk2::HBox(0,0),
+ 1, Gtk2::HBox->new(0,0),
);
}
@@ -486,14 +486,14 @@ sub text_view {
my ($text, $option) = @_;
my $box;
gtkpack($status_box,
- $box = gtkpack_(new Gtk2::VBox(0,10),
- 1, gtkpack_(new Gtk2::HBox(0,0),
+ $box = gtkpack_(Gtk2::VBox->new(0,10),
+ 1, gtkpack_(Gtk2::HBox->new(0,0),
1, create_scrolled_window(gtktext_insert(
- new Gtk2::TextView, [ [ $text ] ])
+ Gtk2::TextView->new, [ [ $text ] ])
),
),
- 0, gtkpack(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
- gtksignal_connect(my $ok_button = new Gtk2::Button(N("OK")), clicked => sub {
+ 0, gtkpack(gtkset_layout(Gtk2::HButtonBox->new, 'spread'),
+ gtksignal_connect(my $ok_button = Gtk2::Button->new(N("OK")), clicked => sub {
destroy_widget() if $option eq "close";
do_wizard() if $option eq "wizard";
}),
@@ -626,32 +626,32 @@ sub make_boot() {
my $rom_path = "/usr/share/etherboot";
#- doesn't return list sorted
my @nics = sort(all("/usr/share/etherboot/zimg"));
- my $list_nics = new Gtk2::List();
+ my $list_nics = Gtk2::List->new;
my $nic;
foreach (@nics) {
my $t = $_;
- $list_nics->add(gtkshow(gtksignal_connect(new Gtk2::ListItem($t),
+ $list_nics->add(gtkshow(gtksignal_connect(Gtk2::ListItem->new($t),
select => sub { $nic = $t })));
}
$list_nics->set_selection_mode('single');
gtkpack($status_box,
- $boot_box = gtkpack_(new Gtk2::VBox(0,10),
- 0, gtkadd(new Gtk2::HBox(0,10),
- new Gtk2::HBox(0,5),
+ $boot_box = gtkpack_(Gtk2::VBox->new(0,10),
+ 0, gtkadd(Gtk2::HBox->new(0,10),
+ Gtk2::HBox->new(0,5),
create_scrolled_window($list_nics),
- gtkadd(new Gtk2::VBox(1,10),
- new Gtk2::HBox(0,20),
- gtksignal_connect(new Gtk2::Button(N("Boot Floppy")), clicked =>
+ gtkadd(Gtk2::VBox->new(1,10),
+ Gtk2::HBox->new(0,20),
+ gtksignal_connect(Gtk2::Button->new(N("Boot Floppy")), clicked =>
sub { write_eb_image($nic, $rom_path, "floppy") }),
- gtksignal_connect(new Gtk2::Button(N("Boot ISO")), clicked =>
+ gtksignal_connect(Gtk2::Button->new(N("Boot ISO")), clicked =>
sub { write_eb_image($nic, $rom_path, "iso") }),
- gtksignal_connect(new Gtk2::Button(N("PXE Image")), clicked =>
+ gtksignal_connect(Gtk2::Button->new(N("PXE Image")), clicked =>
sub { write_eb_image($nic, $rom_path, "pxe") }),
- new Gtk2::HBox(0,20),
+ Gtk2::HBox->new(0,20),
),
- new Gtk2::HBox(0,5),
+ Gtk2::HBox->new(0,5),
),
),
);
@@ -739,11 +739,11 @@ sub make_nbi() {
});
gtkpack($status_box,
- $nbi_box = gtkpack_(new Gtk2::VBox(1,10),
- 0, gtkadd(new Gtk2::HBox(0,10),
+ $nbi_box = gtkpack_(Gtk2::VBox->new(1,10),
+ 0, gtkadd(Gtk2::HBox->new(0,10),
create_scrolled_window($tree_kernels),
- gtkadd(new Gtk2::VBox(1,10),
- gtksignal_connect(new Gtk2::Button(N("Build Whole Kernel -->")), clicked => sub {
+ gtkadd(Gtk2::VBox->new(1,10),
+ gtksignal_connect(Gtk2::Button->new(N("Build Whole Kernel -->")), clicked => sub {
if ($kernel) {
$in->ask_warn(N("Information"), N("This will take a few minutes."));
cursor_wait();
@@ -753,29 +753,29 @@ sub make_nbi() {
$in->ask_warn(N("Error"), N("No kernel selected!")) if !($kernel);
}
}),
- gtksignal_connect(new Gtk2::Button(N("Build Single NIC -->")), clicked => sub {
+ gtksignal_connect(Gtk2::Button->new(N("Build Single NIC -->")), clicked => sub {
if ($nic) {
build_n_update($list_model, "-k /boot/$kernel -r $nic");
} else {
$in->ask_warn(N("Error"), N("No NIC selected!"));
}
}),
- gtksignal_connect(new Gtk2::Button(N("Build All Kernels -->")), clicked => sub {
+ gtksignal_connect(Gtk2::Button->new(N("Build All Kernels -->")), clicked => sub {
$in->ask_warn(N("Information"), N("This will take a few minutes."));
cursor_wait();
build_n_update($list_model, "-k /boot/$_") foreach @kernels;
cursor_norm();
}),
$combo_default_kernel,
- new Gtk2::HBox(1,1),
- gtksignal_connect(new Gtk2::Button(N("<-- Delete")), clicked => sub {
+ Gtk2::HBox->new(1,1),
+ gtksignal_connect(Gtk2::Button->new(N("<-- Delete")), clicked => sub {
my $nbi = $tftpboot . "/" . $nbi;
my $result = unlink($nbi) or warn("Can't delete $nbi...");
if ($result == 1) {
$list_model->remove($nbi_iter);
}
}),
- gtksignal_connect(new Gtk2::Button(N("Delete All NBIs")), clicked => sub {
+ gtksignal_connect(Gtk2::Button->new(N("Delete All NBIs")), clicked => sub {
cursor_wait();
foreach (grep { /\.nbi/ } all($tftpboot)) {
my $nbi = $tftpboot . "/" . $_;
@@ -784,7 +784,7 @@ sub make_nbi() {
$list_model->clear;
cursor_norm();
}),
- new Gtk2::HBox(1,1),
+ Gtk2::HBox->new(1,1),
),
create_scrolled_window($list_nbis),
),),
@@ -861,23 +861,23 @@ sub maintain_users() {
});
gtkpack($status_box,
- $user_box = gtkpack_(new Gtk2::VBox(0,10),
- 0, gtkadd(new Gtk2::Label(N("!!! Indicates the password in the system database is different than\n the one in the Terminal Server database.\nDelete/re-add the user to the Terminal Server to enable login."))),
- 0, gtkadd(new Gtk2::HBox(0,20),
+ $user_box = gtkpack_(Gtk2::VBox->new(0,10),
+ 0, gtkadd(Gtk2::Label->new(N("!!! Indicates the password in the system database is different than\n the one in the Terminal Server database.\nDelete/re-add the user to the Terminal Server to enable login."))),
+ 0, gtkadd(Gtk2::HBox->new(0,20),
create_scrolled_window($list_sys_users),
- gtkadd(new Gtk2::VBox(1,10),
- new Gtk2::HBox(0,10),
- gtksignal_connect(new Gtk2::Button(N("Add User -->")), clicked =>
+ gtkadd(Gtk2::VBox->new(1,10),
+ Gtk2::HBox->new(0,10),
+ gtksignal_connect(Gtk2::Button->new(N("Add User -->")), clicked =>
sub { my $result = adduser(0, $sys_user);
if ($result == 0) {
$list_model->append_set(0, $sys_user);
}
}),
- gtksignal_connect(new Gtk2::Button(N("<-- Del User")), clicked =>
+ gtksignal_connect(Gtk2::Button->new(N("<-- Del User")), clicked =>
sub { deluser(0, $ts_user);
$list_model->remove($titer);
}),
- new Gtk2::HBox(0,10),
+ Gtk2::HBox->new(0,10),
),
create_scrolled_window($list_ts_users),
),),
@@ -934,16 +934,16 @@ sub maintain_clients() {
});
#- entry boxes for client data entry
- my $label_host = new Gtk2::Label("Client Name:");
- my $entry_host = new Gtk2::Entry();
- my $label_mac = new Gtk2::Label("MAC Address:");
- my $entry_mac = new Gtk2::Entry();
- my $label_ip = new Gtk2::Label("IP Address:");
- my $entry_ip = new Gtk2::Entry();
- my $label_nbi = new Gtk2::Label("Kernel Netboot Image:");
- my $entry_nbi = new Gtk2::Combo();
-
- gtksignal_connect(my $check_hdw_config = new Gtk2::CheckButton(N("Allow local hardware\nconfiguration.")),
+ my $label_host = Gtk2::Label->new("Client Name:");
+ my $entry_host = Gtk2::Entry->new;
+ my $label_mac = Gtk2::Label->new("MAC Address:");
+ my $entry_mac = Gtk2::Entry->new;
+ my $label_ip = Gtk2::Label->new("IP Address:");
+ my $entry_ip = Gtk2::Entry->new;
+ my $label_nbi = Gtk2::Label->new("Kernel Netboot Image:");
+ my $entry_nbi = Gtk2::Combo->new;
+
+ gtksignal_connect(my $check_hdw_config = Gtk2::CheckButton->new(N("Allow local hardware\nconfiguration.")),
clicked => sub { invbool \$local_config });
my @images = grep { /\.nbi/ } all($tftpboot);
@@ -962,20 +962,20 @@ sub maintain_clients() {
my $is_thin = 0;
gtkpack($status_box,
- $client_box = gtkpack_(new Gtk2::VBox(0,10),
- 0, gtkadd(new Gtk2::HBox(1,5),
- gtkadd(new Gtk2::VBox(0,5),
+ $client_box = gtkpack_(Gtk2::VBox->new(0,10),
+ 0, gtkadd(Gtk2::HBox->new(1,5),
+ gtkadd(Gtk2::VBox->new(0,5),
gtkadd($label_host), gtkadd($entry_host),
gtkadd($label_mac), gtkadd($entry_mac),
gtkadd($label_ip), gtkadd($entry_ip),
gtkadd($label_nbi), gtkadd($entry_nbi),
gtkadd($check_hdw_config),
- gtksignal_connect($check_thin = new Gtk2::CheckButton(N("Thin Client")),
+ gtksignal_connect($check_thin = Gtk2::CheckButton->new(N("Thin Client")),
clicked => sub { invbool \$is_thin }),
),
- gtkadd(new Gtk2::VBox(1,10),
- $check_allow_thin = new Gtk2::CheckButton(N("Allow Thin Clients")),
- gtksignal_connect(new Gtk2::Button(N("Add Client -->")), clicked =>
+ gtkadd(Gtk2::VBox->new(1,10),
+ $check_allow_thin = Gtk2::CheckButton->new(N("Allow Thin Clients")),
+ gtksignal_connect(Gtk2::Button->new(N("Add Client -->")), clicked =>
sub { my $hostname = $entry_host->get_text;
my $mac = $entry_mac->get_text;
my $ip = $entry_ip->get_text;
@@ -1006,7 +1006,7 @@ sub maintain_clients() {
}
}
}),
- gtksignal_connect($button_edit = new Gtk2::Button(N("<-- Edit Client")), clicked =>
+ gtksignal_connect($button_edit = Gtk2::Button->new(N("<-- Edit Client")), clicked =>
sub { $entry_host->set_text($client);
$entry_mac->set_text($clients{$client}{hardware});
$entry_ip->set_text($clients{$client}{address});
@@ -1032,14 +1032,14 @@ sub maintain_clients() {
$button_delete->set_sensitive(0);
}
}),
- gtksignal_connect($button_config = new Gtk2::Button(N("Disable Local Config")), clicked =>
+ gtksignal_connect($button_config = Gtk2::Button->new(N("Disable Local Config")), clicked =>
sub {
my $hdw_config = $clients{$client}{hdw_config};
if ($hdw_config eq "true") {
client_hdw_config($clients{$client}{address}, 0);
}
}),
- gtksignal_connect($button_delete = new Gtk2::Button(N("Delete Client")), clicked =>
+ gtksignal_connect($button_delete = Gtk2::Button->new(N("Delete Client")), clicked =>
sub { my $result = delclient(0, $client);
if ($result == 0) {
$model->remove($citer);
@@ -1048,12 +1048,12 @@ sub maintain_clients() {
$button_delete->set_sensitive(0);
}
}),
- gtksignal_connect(new Gtk2::Button(N("dhcpd Config...")), clicked =>
+ gtksignal_connect(Gtk2::Button->new(N("dhcpd Config...")), clicked =>
sub { $client_box->destroy; dhcpd_config() }),
),
create_scrolled_window($tree_clients),
),
- 0, gtksignal_connect(new Gtk2::Button(N("Sync client X keyboard settings with server.")),
+ 0, gtksignal_connect(Gtk2::Button->new(N("Sync client X keyboard settings with server.")),
clicked => sub { client_X_keyboard() }),
),
);
@@ -1151,65 +1151,65 @@ sub dhcpd_config() {
my $new_config = 0;
#- entry boxes for data entry
- my $box_subnet = new Gtk2::HBox(0,0);
- my $label_subnet = new Gtk2::Label(N("Subnet:"));
+ my $box_subnet = Gtk2::HBox->new(0,0);
+ my $label_subnet = Gtk2::Label->new(N("Subnet:"));
$label_subnet->set_justify('right');
- my $entry_subnet = new Gtk2::Entry();
+ my $entry_subnet = Gtk2::Entry->new;
$box_subnet->pack_end($entry_subnet, 0, 0, 10);
$box_subnet->pack_end($label_subnet, 0, 0, 10);
- my $box_netmask = new Gtk2::HBox(0,0);
- my $label_netmask = new Gtk2::Label(N("Netmask:"));
+ my $box_netmask = Gtk2::HBox->new(0,0);
+ my $label_netmask = Gtk2::Label->new(N("Netmask:"));
$label_netmask->set_justify('left');
- my $entry_netmask = new Gtk2::Entry();
+ my $entry_netmask = Gtk2::Entry->new;
$box_netmask->pack_end($entry_netmask, 0, 0, 10);
$box_netmask->pack_end($label_netmask, 0, 0, 10);
- my $box_routers = new Gtk2::HBox(0,0);
- my $label_routers = new Gtk2::Label(N("Routers:"));
+ my $box_routers = Gtk2::HBox->new(0,0);
+ my $label_routers = Gtk2::Label->new(N("Routers:"));
$label_routers->set_justify('left');
- my $entry_routers = new Gtk2::Entry();
+ my $entry_routers = Gtk2::Entry->new;
$box_routers->pack_end($entry_routers, 0, 0, 10);
$box_routers->pack_end($label_routers, 0, 0, 10);
- my $box_subnet_mask = new Gtk2::HBox(0,0);
- my $label_subnet_mask = new Gtk2::Label(N("Subnet Mask:"));
+ my $box_subnet_mask = Gtk2::HBox->new(0,0);
+ my $label_subnet_mask = Gtk2::Label->new(N("Subnet Mask:"));
$label_subnet_mask->set_justify('left');
- my $entry_subnet_mask = new Gtk2::Entry();
+ my $entry_subnet_mask = Gtk2::Entry->new;
$box_subnet_mask->pack_end($entry_subnet_mask, 0, 0, 10);
$box_subnet_mask->pack_end($label_subnet_mask, 0, 0, 10);
- my $box_broadcast = new Gtk2::HBox(0,0);
- my $label_broadcast = new Gtk2::Label(N("Broadcast Address:"));
+ my $box_broadcast = Gtk2::HBox->new(0,0);
+ my $label_broadcast = Gtk2::Label->new(N("Broadcast Address:"));
$label_broadcast->set_justify('left');
- my $entry_broadcast = new Gtk2::Entry();
+ my $entry_broadcast = Gtk2::Entry->new;
$box_broadcast->pack_end($entry_broadcast, 0, 0, 10);
$box_broadcast->pack_end($label_broadcast, 0, 0, 10);
- my $box_domain = new Gtk2::HBox(0,0);
- my $label_domain = new Gtk2::Label(N("Domain Name:"));
+ my $box_domain = Gtk2::HBox->new(0,0);
+ my $label_domain = Gtk2::Label->new(N("Domain Name:"));
$label_domain->set_justify('left');
- my $entry_domain = new Gtk2::Entry();
+ my $entry_domain = Gtk2::Entry->new;
$box_domain->pack_end($entry_domain, 0, 0, 10);
$box_domain->pack_end($label_domain, 0, 0, 10);
- my $box_name_servers = new Gtk2::HBox(0,0);
- my $box_name_servers_entry = new Gtk2::VBox(0,0);
- my $label_name_servers = new Gtk2::Label(N("Name Servers:"));
+ my $box_name_servers = Gtk2::HBox->new(0,0);
+ my $box_name_servers_entry = Gtk2::VBox->new(0,0);
+ my $label_name_servers = Gtk2::Label->new(N("Name Servers:"));
$label_name_servers->set_justify('left');
- my $entry_name_server1 = new Gtk2::Entry();
- my $entry_name_server2 = new Gtk2::Entry();
- my $entry_name_server3 = new Gtk2::Entry();
+ my $entry_name_server1 = Gtk2::Entry->new;
+ my $entry_name_server2 = Gtk2::Entry->new;
+ my $entry_name_server3 = Gtk2::Entry->new;
$box_name_servers_entry->pack_start($entry_name_server1, 0, 0, 0);
$box_name_servers_entry->pack_start($entry_name_server2, 0, 0, 0);
$box_name_servers_entry->pack_start($entry_name_server3, 0, 0, 0);
$box_name_servers->pack_end($box_name_servers_entry, 0, 0, 10);
$box_name_servers->pack_end($label_name_servers, 0, 0, 10);
- my $label_ip_range_start = new Gtk2::Label(N("IP Range Start:"));
- my $label_ip_range_end = new Gtk2::Label(N("IP Range End:"));
- my $entry_ip_range_start = new Gtk2::Entry();
- my $entry_ip_range_end = new Gtk2::Entry();
+ my $label_ip_range_start = Gtk2::Label->new(N("IP Range Start:"));
+ my $label_ip_range_end = Gtk2::Label->new(N("IP Range End:"));
+ my $entry_ip_range_start = Gtk2::Entry->new;
+ my $entry_ip_range_end = Gtk2::Entry->new;
#- grab some default entries from the running system
@@ -1256,8 +1256,8 @@ sub dhcpd_config() {
}
gtkpack($status_box,
- $dhcpd_box = gtkpack_(new Gtk2::HBox(1,10),
- 0, gtkadd(new Gtk2::VBox,
+ $dhcpd_box = gtkpack_(Gtk2::HBox->new(1,10),
+ 0, gtkadd(Gtk2::VBox->new,
gtkadd($box_subnet),
gtkadd($box_netmask),
gtkadd($box_routers),
@@ -1266,25 +1266,25 @@ sub dhcpd_config() {
gtkadd($box_domain),
gtkadd($box_name_servers),
),
- 0, gtkadd(new Gtk2::VBox(0,0),
- new Gtk2::Label(N("dhcpd Server Configuration") . "\n\n" .
+ 0, gtkadd(Gtk2::VBox->new(0,0),
+ Gtk2::Label->new(N("dhcpd Server Configuration") . "\n\n" .
N("Most of these values were extracted\nfrom your running system.\nYou can modify as needed.")),
- new Gtk2::HSeparator,
- gtkadd(new Gtk2::HBox,
- new Gtk2::Label(N("Dynamic IP Address Pool:")),
+ Gtk2::HSeparator->new,
+ gtkadd(Gtk2::HBox->new,
+ Gtk2::Label->new(N("Dynamic IP Address Pool:")),
),
- gtkadd(new Gtk2::HBox(0,0),
- gtkadd(new Gtk2::VBox,
+ gtkadd(Gtk2::HBox->new(0,0),
+ gtkadd(Gtk2::VBox->new,
gtkadd($label_ip_range_start),
gtkadd($entry_ip_range_start),
),
- gtkadd(new Gtk2::VBox,
+ gtkadd(Gtk2::VBox->new,
gtkadd($label_ip_range_end),
gtkadd($entry_ip_range_end),
),
),
- gtkadd(new Gtk2::HBox),
- gtksignal_connect(new Gtk2::Button($button_msg), clicked =>
+ gtkadd(Gtk2::HBox->new),
+ gtksignal_connect(Gtk2::Button->new($button_msg), clicked =>
sub {
if ($new_config == 1) {
write_dhcpd_config("full",
@@ -1304,7 +1304,7 @@ sub dhcpd_config() {
}
}
),
- new Gtk2::HBox(0,10),
+ Gtk2::HBox->new(0,10),
),
),
);
diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst
index 27c59bbbb..a9c9e54a3 100755
--- a/perl-install/standalone/drakautoinst
+++ b/perl-install/standalone/drakautoinst
@@ -144,34 +144,34 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
my $W = ugtk2->new('$o edition');
my @box_to_hide;
my $nb_pages=0;
- my $notebook = new Gtk2::Notebook;
+ my $notebook = Gtk2::Notebook->new;
$notebook->set_show_border(0);
$notebook->set_show_tabs(0);
- $notebook->append_page(gtkpack_(gtkset_border_width(new Gtk2::VBox(0,0), 10),
- 1, new Gtk2::VBox(0,0),
- 0, gtkpack_(new Gtk2::HBox(0,0),
- 1, new Gtk2::VBox(0,0),
- 0, gtkadd(gtkset_shadow_type(new Gtk2::Frame, 'etched-in'),
+ $notebook->append_page(gtkpack_(gtkset_border_width(Gtk2::VBox->new(0,0), 10),
+ 1, Gtk2::VBox->new(0,0),
+ 0, gtkpack_(Gtk2::HBox->new(0,0),
+ 1, Gtk2::VBox->new(0,0),
+ 0, gtkadd(gtkset_shadow_type(Gtk2::Frame->new, 'etched-in'),
gtkcreate_img('mdk_logo')),
- 1, new Gtk2::VBox(0,0),
+ 1, Gtk2::VBox->new(0,0),
),
0, N("\nWelcome.\n\nThe parameters of the auto-install are available in the sections on the left"),
- 1, new Gtk2::VBox(0,0),
+ 1, Gtk2::VBox->new(0,0),
), undef);
$notebook->show_all;
$notebook->set_current_page(0);
gtkadd($W->{window},
- gtkpack_(new Gtk2::VBox(0,5),
- 1, gtkpack_(new Gtk2::HBox(0,0),
- 0, gtkadd(gtkset_size_request(gtkset_shadow_type(new Gtk2::Frame, 'in'), 130, 470),
- gtkpack_(new Gtk2::VBox(0,0),
+ gtkpack_(Gtk2::VBox->new(0,5),
+ 1, gtkpack_(Gtk2::HBox->new(0,0),
+ 0, gtkadd(gtkset_size_request(gtkset_shadow_type(Gtk2::Frame->new, 'in'), 130, 470),
+ gtkpack_(Gtk2::VBox->new(0,0),
map {
- my $box = new Gtk2::VBox(0,0);
+ my $box = Gtk2::VBox->new(0,0);
push @box_to_hide, $box;
$box->{vis} = 0;
my @button_to_hide;
- 0, gtksignal_connect(new Gtk2::Button($_), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new($_), clicked => sub {
if ($box->{vis}) { $box->hide; $box->{vis} = 0; $notebook->set_current_page(0) }
else {
$_->hide, $_->{vis}=0 foreach @box_to_hide;
@@ -180,7 +180,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
}
}), 1, gtkpack__($box,
map {
- my $button = gtkset_relief(new Gtk2::ToggleButton(), 'none');
+ my $button = gtkset_relief(Gtk2::ToggleButton->new, 'none');
push @button_to_hide, $button;
my $gru = $_->[0];
$notebook->append_page(gtkshow($_->[2]), undef);
@@ -193,7 +193,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
my $b;
if ($_->[1] ne "") { $b = gtkcreate_img($_->[1]) } else { undef $b };
gtksignal_connect(gtkadd($button,
- gtkpack__(new Gtk2::VBox(0,3),
+ gtkpack__(Gtk2::VBox->new(0,3),
$b,
translate($gru),
)
@@ -211,10 +211,10 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
),
1, $notebook,
),
- 0, new Gtk2::HSeparator,
- 0, gtkadd(gtkset_border_width(gtkset_layout(new Gtk2::HButtonBox, 'end'), 5),
- gtksignal_connect(new Gtk2::Button(N("Accept")), clicked => sub { Gtk2->main_quit }),
- gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub { $o = $o_old; Gtk2->main_quit; quit_global($in, 0) }),
+ 0, Gtk2::HSeparator->new,
+ 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk2::HButtonBox->new, 'end'), 5),
+ gtksignal_connect(Gtk2::Button->new(N("Accept")), clicked => sub { Gtk2->main_quit }),
+ gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => sub { $o = $o_old; Gtk2->main_quit; quit_global($in, 0) }),
)
)
);
@@ -223,7 +223,7 @@ if (!$::isEmbedded && $in->isa('interactive::gtk')) {
# gtkadd($W->{window},
# gtkpack_($W->create_box_with_title(N("Edit variables")),
# 1, my $notebook = create_notebook( map { $_, h2widget($o->{$_}, "\$o->\{$_\}") } keys %$o ),
-# 0, gtkpack(gtkset_border_width(new Gtk2::HBox(0,0),5), $W->create_okcancel),
+# 0, gtkpack(gtkset_border_width(Gtk2::HBox->new(0,0),5), $W->create_okcancel),
# ),
# );
# $notebook->set_tab_pos('left');
@@ -273,8 +273,8 @@ sub h2widget {
my @list_keys = keys(%$k);
if (ref($k->{$list_keys[0]}) =~ /HASH/) {
$i++;
- $w = gtkpack_(new Gtk2::VBox(0,0),
- 1, create_scrolled_window(gtkpack__($vb = new Gtk2::VBox(0,10),
+ $w = gtkpack_(Gtk2::VBox->new(0,0),
+ 1, create_scrolled_window(gtkpack__($vb = Gtk2::VBox->new(0,10),
$widget_list[$i] = create_packtable({ col_spacings => 10, row_spacings => 3 },
map {
my $e;
@@ -305,9 +305,9 @@ sub h2widget {
my $vb;
my @widget_list;
my $i = -1;
- $w = gtkpack_(new Gtk2::VBox(0,0),
+ $w = gtkpack_(Gtk2::VBox->new(0,0),
1, create_scrolled_window(
- gtkpack__($vb = new Gtk2::VBox(0,5),
+ gtkpack__($vb = Gtk2::VBox->new(0,5),
map { $i++; $widget_list[$i] = h2widget($_, "$label\[$i]") } @$k,
)
),
@@ -335,7 +335,7 @@ sub create_entry_element {
} elsif (ref $text =~ /ARRAY/) {
return [ "$label : ", h2widget($text, $label) ];
} else {
- $e = new Gtk2::Entry;
+ $e = Gtk2::Entry->new;
$e->{value} = $value;
my $_tag = Glib::Timeout->add(1000, sub { $e->set_text($text); 0 });
gtksignal_connect($e, changed => sub {
@@ -354,15 +354,15 @@ sub control_buttons {
ref($ref_local_k) =~ /HASH/ or return();
my %local_k = %$ref_local_k;
my ($button_remove);
- 0, gtkadd(gtkset_border_width(gtkset_layout(new Gtk2::HButtonBox, 'spread'), 5),
- gtksignal_connect(new Gtk2::Button(N("Add an item")), clicked => sub {
+ 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk2::HButtonBox->new, 'spread'), 5),
+ gtksignal_connect(Gtk2::Button->new(N("Add an item")), clicked => sub {
$local_k{$_} = undef foreach keys %local_k;
$i++;
$local_gui->($vb, \@widget_list, \%local_k, $i) or $i--, return;
$i >= 0 and $button_remove->set_sensitive(1);
}
),
- gtksignal_connect($button_remove = new Gtk2::Button(N("Remove the last item")), clicked => sub {
+ gtksignal_connect($button_remove = Gtk2::Button->new(N("Remove the last item")), clicked => sub {
$i >= 0 or return;
$widget_list[$i]->destroy;
$i--;
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup
index 4961da489..18cb2cee8 100755
--- a/perl-install/standalone/drakbackup
+++ b/perl-install/standalone/drakbackup
@@ -194,7 +194,7 @@ if (check_for_xserver()) {
sub set_help_tip {
my ($entry, $key) = @_;
- gtkset_tip(new Gtk2::Tooltips, $entry, formatAlaTeX($help{$key}));
+ gtkset_tip(Gtk2::Tooltips->new, $entry, formatAlaTeX($help{$key}));
}
sub all_user_list() {
@@ -1337,7 +1337,7 @@ sub check_pkg_needs() {
}
sub show_status() {
- my $text = new Gtk2::TextView;
+ my $text = Gtk2::TextView->new;
destroy_widget();
my $scrolled_window = Gtk2::ScrolledWindow->new;
$scrolled_window->set_border_width(10);
@@ -1345,7 +1345,7 @@ sub show_status() {
gtktext_insert(gtkset_editable($text, 0), [ [ $results ] ]);
gtkpack($advanced_box,
- $table = gtkpack_(new Gtk2::VBox(0,10), 1, $scrolled_window)
+ $table = gtkpack_(Gtk2::VBox->new(0,10), 1, $scrolled_window)
);
$central_widget = \$table;
$table->show_all;
@@ -1371,7 +1371,7 @@ sub filedialog_generic {
my ($prompt, $widget) = @_;
my $file_dialog;
- $file_dialog = gtksignal_connect(new Gtk2::FileSelection($prompt), destroy => sub { $file_dialog->destroy });
+ $file_dialog = gtksignal_connect(Gtk2::FileSelection->new($prompt), destroy => sub { $file_dialog->destroy });
$file_dialog->ok_button->signal_connect(clicked => sub {
if (defined($widget)) {
$$widget->set_text($file_dialog->get_filename);
@@ -1410,17 +1410,17 @@ sub advanced_what_sys() {
my $box_what_sys;
gtkpack($advanced_box,
- $box_what_sys = gtkpack_(new Gtk2::VBox(0, 15),
+ $box_what_sys = gtkpack_(Gtk2::VBox->new(0, 15),
1, N("\nPlease check all options that you need.\n"),
1, N("These options can backup and restore all files in your /etc directory.\n"),
- 0, my $check_what_sys = new Gtk2::CheckButton(N("Backup your System files. (/etc directory)")),
- 0, my $check_what_versions = new Gtk2::CheckButton(N("Use Incremental/Differential Backups (do not replace old backups)")),
- 0, gtkpack__(new Gtk2::HBox(0,0),
+ 0, my $check_what_sys = Gtk2::CheckButton->new(N("Backup your System files. (/etc directory)")),
+ 0, my $check_what_versions = Gtk2::CheckButton->new(N("Use Incremental/Differential Backups (do not replace old backups)")),
+ 0, gtkpack__(Gtk2::HBox->new(0,0),
my @mode_buttons = gtkradio((N("Use Incremental Backups")) x 2, N("Use Differential Backups")),
),
- 0, my $check_what_critical = new Gtk2::CheckButton(N("Do not include critical files (passwd, group, fstab)")),
+ 0, my $check_what_critical = Gtk2::CheckButton->new(N("Do not include critical files (passwd, group, fstab)")),
0, N("With this option you will be able to restore any version\n of your /etc directory."),
- 1, new Gtk2::VBox(0, 15),
+ 1, Gtk2::VBox->new(0, 15),
),
);
check_list([$check_what_sys, \$conf{NO_SYS_FILES}, 1], [$check_what_critical, \$conf{NO_CRITICAL_SYS}]);
@@ -1449,14 +1449,14 @@ sub advanced_what_user {
all_user_list();
gtkpack($advanced_box,
- $box_what_user = gtkpack_(new Gtk2::VBox(0, 15),
+ $box_what_user = gtkpack_(Gtk2::VBox->new(0, 15),
0, N("Please check all users that you want to include in your backup."),
- 0, new Gtk2::HSeparator,
+ 0, Gtk2::HSeparator->new,
1, create_scrolled_window(
- gtkpack__(new Gtk2::VBox(0,0),
+ gtkpack__(Gtk2::VBox->new(0,0),
map { my $name = $_;
my @user_list_tmp;
- my $b = new Gtk2::CheckButton($name);
+ my $b = Gtk2::CheckButton->new($name);
if (any { /^$name$/ } @user_list) {
$check_what_user{$_}[1] = 1;
gtkset_active($b, 1);
@@ -1477,9 +1477,9 @@ sub advanced_what_user {
$b } (@user_list_all)
),
),
- 0, my $check_what_browser = new Gtk2::CheckButton(N("Do not include the browser cache")),
- 0, my $check_what_user_versions = new Gtk2::CheckButton(N("Use Incremental/Differential Backups (do not replace old backups)")),
- 0, gtkpack__(new Gtk2::HBox(0,0),
+ 0, my $check_what_browser = Gtk2::CheckButton->new(N("Do not include the browser cache")),
+ 0, my $check_what_user_versions = Gtk2::CheckButton->new(N("Use Incremental/Differential Backups (do not replace old backups)")),
+ 0, gtkpack__(Gtk2::HBox->new(0,0),
my @mode_buttons = gtkradio((N("Use Incremental Backups")) x 2, N("Use Differential Backups")),
),
),
@@ -1526,11 +1526,11 @@ sub advanced_what_other() {
});
gtkpack($advanced_box,
- $box_what_other = gtkpack_(new Gtk2::VBox(0, 15),
- 1, gtkpack_(new Gtk2::HBox(0,4),
+ $box_what_other = gtkpack_(Gtk2::VBox->new(0, 15),
+ 1, gtkpack_(Gtk2::HBox->new(0,4),
1, create_scrolled_window($list_others),
),
- 0, gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
+ 0, gtkadd(gtkset_layout(Gtk2::HButtonBox->new, 'spread'),
gtksignal_connect(Gtk2::Button->new(N("Add")), clicked => sub { filedialog_generic(N("Select the files or directories and click on 'OK'"), undef) }),
gtksignal_connect(Gtk2::Button->new(N("Remove Selected")), clicked => sub {
$list_model->remove($file_iter) if $file_iter;
@@ -1544,8 +1544,8 @@ sub advanced_what_other() {
}
}),
),
- 0, my $check_what_other_versions = new Gtk2::CheckButton(N("Use Incremental/Differential Backups (do not replace old backups)")),
- 0, gtkpack__(new Gtk2::HBox(0,0),
+ 0, my $check_what_other_versions = Gtk2::CheckButton->new(N("Use Incremental/Differential Backups (do not replace old backups)")),
+ 0, gtkpack__(Gtk2::HBox->new(0,0),
my @mode_buttons = gtkradio((N("Use Incremental Backups")) x 2, N("Use Differential Backups")),
),
),
@@ -1573,35 +1573,35 @@ sub advanced_what() {
my $box_what;
gtkpack($advanced_box,
- $box_what = gtkpack_(new Gtk2::HBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
- 1, gtkpack_(new Gtk2::VBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
+ $box_what = gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
+ 1, gtkpack_(Gtk2::VBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
1, gtksignal_connect(my $button_what_sys = Gtk2::Button->new,
clicked => sub { $box_what->destroy; advanced_what_sys() }),
1, gtksignal_connect(my $button_what_user = Gtk2::Button->new,
clicked => sub { destroy_widget(); advanced_what_user() }),
1, gtksignal_connect(my $button_what_other = Gtk2::Button->new,
clicked => sub { destroy_widget(); advanced_what_other() }),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
);
- $button_what_sys->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_what_sys->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-system-40"),
- new Gtk2::Label(N("System")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("System")),
+ Gtk2::HBox->new(0, 5)
));
- $button_what_user->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_what_user->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-users-40"),
- new Gtk2::Label(N("Users")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("Users")),
+ Gtk2::HBox->new(0, 5)
));
- $button_what_other->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_what_other->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-others-40"),
- new Gtk2::Label(N("Other")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("Other")),
+ Gtk2::HBox->new(0, 5)
));
gtkset_sensitive($button_what_sys, !$conf{NO_SYS_FILES});
fonction_env(\$box_what, \&advanced_what, \&advanced_box);
@@ -1613,42 +1613,42 @@ sub advanced_where_net_types {
my $box_where_net;
gtkpack($advanced_box,
- $box_where_net = gtkpack_(new Gtk2::VBox(0, 10),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, my $check_where_use_net = new Gtk2::CheckButton(N("Use network connection to backup")),
- 1, new Gtk2::HBox(0,10),
- 0, new Gtk2::Label(N("Net Method:")),
+ $box_where_net = gtkpack_(Gtk2::VBox->new(0, 10),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, my $check_where_use_net = Gtk2::CheckButton->new(N("Use network connection to backup")),
+ 1, Gtk2::HBox->new(0,10),
+ 0, Gtk2::Label->new(N("Net Method:")),
0, gtkset_sensitive(my $entry_net_type = Gtk2::ComboBox->new_text, $conf{USE_NET}),
),
- 0, gtkpack_(new Gtk2::HBox(0,5),
- 0, gtkset_sensitive(my $check_use_expect = new Gtk2::CheckButton(N("Use Expect for SSH")), ($conf{USE_NET} && $conf{NET_PROTO} eq 'ssh')),
- 0, gtkset_sensitive(my $check_xfer_keys = new Gtk2::CheckButton(N("Create/Transfer backup keys for SSH")), ($conf{USE_NET} && $conf{NET_PROTO} eq 'ssh')),
- 1, new Gtk2::HBox(0,10),
+ 0, gtkpack_(Gtk2::HBox->new(0,5),
+ 0, gtkset_sensitive(my $check_use_expect = Gtk2::CheckButton->new(N("Use Expect for SSH")), ($conf{USE_NET} && $conf{NET_PROTO} eq 'ssh')),
+ 0, gtkset_sensitive(my $check_xfer_keys = Gtk2::CheckButton->new(N("Create/Transfer backup keys for SSH")), ($conf{USE_NET} && $conf{NET_PROTO} eq 'ssh')),
+ 1, Gtk2::HBox->new(0,10),
0, gtkset_sensitive(my $button_xfer_keys = Gtk2::Button->new(N("Transfer Now")), $conf{DRAK_KEYS}),
),
- 0, gtkset_sensitive(my $check_user_keys = new Gtk2::CheckButton(N("Other (not drakbackup) keys in place already")), ($conf{USE_NET} && $conf{NET_PROTO} eq 'ssh')),
- 0, new Gtk2::HSeparator,
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Host name or IP.")), $conf{USE_NET}),
- 1, new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(my $host_name_entry = new Gtk2::Entry(), $conf{USE_NET}),
+ 0, gtkset_sensitive(my $check_user_keys = Gtk2::CheckButton->new(N("Other (not drakbackup) keys in place already")), ($conf{USE_NET} && $conf{NET_PROTO} eq 'ssh')),
+ 0, Gtk2::HSeparator->new,
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Host name or IP.")), $conf{USE_NET}),
+ 1, Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(my $host_name_entry = Gtk2::Entry->new, $conf{USE_NET}),
),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Directory (or module) to put the backup on this host.")), $conf{USE_NET}),
- 1, new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(my $host_path_entry = new Gtk2::Entry(), $conf{USE_NET}),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Directory (or module) to put the backup on this host.")), $conf{USE_NET}),
+ 1, Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(my $host_path_entry = Gtk2::Entry->new, $conf{USE_NET}),
),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Login name")), $conf{USE_NET}),
- 1, new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(my $login_user_entry = new Gtk2::Entry(), $conf{USE_NET}),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Login name")), $conf{USE_NET}),
+ 1, Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(my $login_user_entry = Gtk2::Entry->new, $conf{USE_NET}),
),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Password")), $conf{USE_NET}),
- 1, new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(my $check_remember_pass = new Gtk2::CheckButton(N("Remember this password")), $conf{USE_NET}),
- 1, new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(my $passwd_user_entry = new Gtk2::Entry(), $conf{USE_NET}),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Password")), $conf{USE_NET}),
+ 1, Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(my $check_remember_pass = Gtk2::CheckButton->new(N("Remember this password")), $conf{USE_NET}),
+ 1, Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(my $passwd_user_entry = Gtk2::Entry->new, $conf{USE_NET}),
),
),
);
@@ -1753,43 +1753,43 @@ sub advanced_where_cd {
my $combo_where_cd_time = Gtk2::ComboBox->new_with_strings([ "650 MB", "700 MB", "750 MB", "800 MB", "4.7 GB" ]);
gtkpack($advanced_box,
- $box_where_cd = gtkpack_(new Gtk2::VBox(0, 6),
- 0, my $check_where_cd = new Gtk2::CheckButton(N("Use CD-R/DVD-R to backup")),
- 0, new Gtk2::HSeparator,
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Choose your CD/DVD device")), $conf{USE_CD}),
- 1, new Gtk2::VBox(0, 5),
+ $box_where_cd = gtkpack_(Gtk2::VBox->new(0, 6),
+ 0, my $check_where_cd = Gtk2::CheckButton->new(N("Use CD-R/DVD-R to backup")),
+ 0, Gtk2::HSeparator->new,
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Choose your CD/DVD device")), $conf{USE_CD}),
+ 1, Gtk2::VBox->new(0, 5),
0, gtkset_sensitive($combo_where_cd_device, $conf{USE_CD}),
),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Choose your CD/DVD media size")), $conf{USE_CD}),
- 1, new Gtk2::VBox(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Choose your CD/DVD media size")), $conf{USE_CD}),
+ 1, Gtk2::VBox->new(0, 5),
0, gtkset_sensitive($combo_where_cd_time, $conf{USE_CD}),
),
- 0, new Gtk2::VBox(0, 5),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 1, new Gtk2::VBox(0, 5),
- 0, gtkset_sensitive(new Gtk2::Label(N("Multisession CD")), $conf{USE_CD}),
- 0, gtkset_sensitive(my $check_multisession = new Gtk2::CheckButton(), $conf{USE_CD}),
- 0, gtkset_sensitive(new Gtk2::Label(N("CDRW media")), $conf{USE_CD}),
- 0, gtkset_sensitive(my $check_cdrw = new Gtk2::CheckButton(), $conf{USE_CD}),
+ 0, Gtk2::VBox->new(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 1, Gtk2::VBox->new(0, 5),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Multisession CD")), $conf{USE_CD}),
+ 0, gtkset_sensitive(my $check_multisession = Gtk2::CheckButton->new, $conf{USE_CD}),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("CDRW media")), $conf{USE_CD}),
+ 0, gtkset_sensitive(my $check_cdrw = Gtk2::CheckButton->new, $conf{USE_CD}),
),
- 0, new Gtk2::VBox(0, 5),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 1, new Gtk2::VBox(0, 5),
- 0, gtkset_sensitive(new Gtk2::Label(N("Erase your RW media (1st Session)")), $conf{CDRW} && $conf{USE_CD}),
+ 0, Gtk2::VBox->new(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 1, Gtk2::VBox->new(0, 5),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Erase your RW media (1st Session)")), $conf{CDRW} && $conf{USE_CD}),
0, gtkset_sensitive(my $button_erase_now = Gtk2::Button->new(N(" Erase Now ")), $conf{CDRW}),
- 0, gtkset_sensitive(my $check_cdrw_erase = new Gtk2::CheckButton(), $conf{CDRW} && $conf{USE_CD}),
+ 0, gtkset_sensitive(my $check_cdrw_erase = Gtk2::CheckButton->new, $conf{CDRW} && $conf{USE_CD}),
),
- 0, new Gtk2::VBox(0, 5),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 1, new Gtk2::VBox(0, 5),
- 0, gtkset_sensitive(new Gtk2::Label(N("DVD+RW media")), $conf{USE_CD}),
- 0, gtkset_sensitive(my $check_dvdrw = new Gtk2::CheckButton(), $conf{USE_CD}),
- 0, gtkset_sensitive(new Gtk2::Label(N("DVD-R media")), $conf{USE_CD}),
- 0, gtkset_sensitive(my $check_dvdr = new Gtk2::CheckButton(), $conf{USE_CD}),
- 0, gtkset_sensitive(new Gtk2::Label(N("DVDRAM device")), $conf{USE_CD}),
- 0, gtkset_sensitive(my $check_dvdram = new Gtk2::CheckButton(), $conf{USE_CD}),
+ 0, Gtk2::VBox->new(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 1, Gtk2::VBox->new(0, 5),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("DVD+RW media")), $conf{USE_CD}),
+ 0, gtkset_sensitive(my $check_dvdrw = Gtk2::CheckButton->new, $conf{USE_CD}),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("DVD-R media")), $conf{USE_CD}),
+ 0, gtkset_sensitive(my $check_dvdr = Gtk2::CheckButton->new, $conf{USE_CD}),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("DVDRAM device")), $conf{USE_CD}),
+ 0, gtkset_sensitive(my $check_dvdram = Gtk2::CheckButton->new, $conf{USE_CD}),
),
),
);
@@ -1859,41 +1859,41 @@ sub advanced_where_tape {
local $_;
gtkpack($advanced_box,
- $box_where_tape = gtkpack_(new Gtk2::VBox(0, 6),
- 0, new Gtk2::HSeparator,
- 0, my $check_where_tape = new Gtk2::CheckButton(N("Use tape to backup")),
- 0, new Gtk2::HSeparator,
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Device name to use for backup")), $conf{USE_TAPE}),
- 1, new Gtk2::VBox(0, 6),
+ $box_where_tape = gtkpack_(Gtk2::VBox->new(0, 6),
+ 0, Gtk2::HSeparator->new,
+ 0, my $check_where_tape = Gtk2::CheckButton->new(N("Use tape to backup")),
+ 0, Gtk2::HSeparator->new,
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Device name to use for backup")), $conf{USE_TAPE}),
+ 1, Gtk2::VBox->new(0, 6),
0, gtkset_sensitive($combo_where_tape_device, $conf{USE_TAPE}),
),
- 0, new Gtk2::VBox(0, 5),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Backup directly to tape")), $conf{USE_TAPE}),
- 1, new Gtk2::VBox(0, 5),
- 0, gtkset_sensitive(my $direct_to_tape = new Gtk2::CheckButton(), $conf{USE_TAPE}),
+ 0, Gtk2::VBox->new(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Backup directly to tape")), $conf{USE_TAPE}),
+ 1, Gtk2::VBox->new(0, 5),
+ 0, gtkset_sensitive(my $direct_to_tape = Gtk2::CheckButton->new, $conf{USE_TAPE}),
),
- 0, new Gtk2::VBox(0, 5),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Don't rewind tape after backup")), $conf{USE_TAPE}),
- 1, new Gtk2::VBox(0, 5),
- 0, gtkset_sensitive(my $check_tape_rewind = new Gtk2::CheckButton(), $conf{USE_TAPE}),
+ 0, Gtk2::VBox->new(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Don't rewind tape after backup")), $conf{USE_TAPE}),
+ 1, Gtk2::VBox->new(0, 5),
+ 0, gtkset_sensitive(my $check_tape_rewind = Gtk2::CheckButton->new, $conf{USE_TAPE}),
),
- 0, new Gtk2::VBox(0, 5),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Erase tape before backup")), $conf{USE_TAPE}),
- 1, new Gtk2::VBox(0, 5),
- 0, gtkset_sensitive(my $check_tape_erase = new Gtk2::CheckButton(), $conf{USE_TAPE}),
+ 0, Gtk2::VBox->new(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Erase tape before backup")), $conf{USE_TAPE}),
+ 1, Gtk2::VBox->new(0, 5),
+ 0, gtkset_sensitive(my $check_tape_erase = Gtk2::CheckButton->new, $conf{USE_TAPE}),
),
- 0, new Gtk2::VBox(0, 5),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Eject tape after the backup")), $conf{USE_TAPE}),
- 1, new Gtk2::VBox(0, 5),
- 0, gtkset_sensitive(my $check_tape_eject = new Gtk2::CheckButton(), $conf{USE_TAPE}),
+ 0, Gtk2::VBox->new(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Eject tape after the backup")), $conf{USE_TAPE}),
+ 1, Gtk2::VBox->new(0, 5),
+ 0, gtkset_sensitive(my $check_tape_eject = Gtk2::CheckButton->new, $conf{USE_TAPE}),
),
- 0, new Gtk2::VBox(0, 6),
- 0, gtkpack_(new Gtk2::HBox(0,10),),
+ 0, Gtk2::VBox->new(0, 6),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),),
),
);
gtksignal_connect(gtkset_active($check_where_tape, $conf{USE_TAPE}), toggled => sub {
@@ -1953,29 +1953,29 @@ sub advanced_where_hd {
if ($conf{MAX_SPACE} == 1000.0) {
$conf{MAX_SPACE} = int(0.8 * get_free_space($conf{PATH_TO_SAVE})) if -d $conf{PATH_TO_SAVE};
}
- my $adj = new Gtk2::Adjustment($conf{MAX_SPACE}, 0.0, $conf{MAX_SPACE}, 10.0, 5.0, 0.0);
+ my $adj = Gtk2::Adjustment->new($conf{MAX_SPACE}, 0.0, $conf{MAX_SPACE}, 10.0, 5.0, 0.0);
my $spinner;
gtkpack($advanced_box,
- $box_where_hd = gtkpack_(new Gtk2::VBox(0, 6),
- 0, new Gtk2::HSeparator,
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Enter the directory to save to:")), $conf{USE_HD}),
- 1, new Gtk2::VBox(0, 6),
- 0, gtkset_size_request(gtkset_sensitive($save_path_entry = new Gtk2::Entry(), $conf{USE_HD}), 152, 20),
+ $box_where_hd = gtkpack_(Gtk2::VBox->new(0, 6),
+ 0, Gtk2::HSeparator->new,
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Enter the directory to save to:")), $conf{USE_HD}),
+ 1, Gtk2::VBox->new(0, 6),
+ 0, gtkset_size_request(gtkset_sensitive($save_path_entry = Gtk2::Entry->new, $conf{USE_HD}), 152, 20),
0, gtkset_sensitive($button = gtksignal_connect(Gtk2::Button->new, clicked => sub {
filedialog_generic(N("Directory to save to"), \$save_path_entry)
}), $conf{USE_HD}),
),
- 0, new Gtk2::VBox(0, 6),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Maximum size\n allowed for Drakbackup (MB)")), $conf{USE_HD}),
- 1, new Gtk2::VBox(0, 6),
- 0, gtkset_size_request(gtkset_sensitive($spinner = new Gtk2::SpinButton($adj, 0, 0), $conf{USE_HD}), 200, 20),
+ 0, Gtk2::VBox->new(0, 6),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Maximum size\n allowed for Drakbackup (MB)")), $conf{USE_HD}),
+ 1, Gtk2::VBox->new(0, 6),
+ 0, gtkset_size_request(gtkset_sensitive($spinner = Gtk2::SpinButton->new($adj, 0, 0), $conf{USE_HD}), 200, 20),
),
),
);
- $button->add(gtkpack(new Gtk2::HBox(0,10), gtkcreate_img("ic82-dossier-32")));
+ $button->add(gtkpack(Gtk2::HBox->new(0,10), gtkcreate_img("ic82-dossier-32")));
$save_path_entry->set_text($conf{PATH_TO_SAVE});
$spinner->signal_connect('changed', sub { $conf{MAX_SPACE} = $spinner->get_text });
$save_path_entry->signal_connect('changed', sub {
@@ -2001,10 +2001,10 @@ sub advanced_where() {
my $box_where;
gtkpack($advanced_box,
- $box_where = gtkpack_(new Gtk2::HBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
- 1, gtkpack_(new Gtk2::VBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
+ $box_where = gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
+ 1, gtkpack_(Gtk2::VBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
1, gtksignal_connect(my $button_where_net = Gtk2::Button->new, clicked => sub {
destroy_widget();
advanced_where_net_types();
@@ -2021,30 +2021,30 @@ sub advanced_where() {
destroy_widget();
advanced_where_tape()
}),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
);
- $button_where_net->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_where_net->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-network-40"),
- new Gtk2::Label(N("Network")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("Network")),
+ Gtk2::HBox->new(0, 5)
));
- $button_where_cd->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_where_cd->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-CD-40"),
- new Gtk2::Label(N("CD-R / DVD-R")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("CD-R / DVD-R")),
+ Gtk2::HBox->new(0, 5)
));
- $button_where_hd->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_where_hd->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-discdurwhat-40"),
- new Gtk2::Label(N("HardDrive / NFS")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("HardDrive / NFS")),
+ Gtk2::HBox->new(0, 5)
));
- $button_where_tape->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_where_tape->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-tape-40"),
- new Gtk2::Label(N("Tape")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("Tape")),
+ Gtk2::HBox->new(0, 5)
));
fonction_env(\$box_where, \&advanced_where, \&advanced_box);
$up_box->show_all;
@@ -2079,7 +2079,7 @@ sub advanced_when() {
$combo_hour_when->set_popdown_strings("*", (0..23));
my $combo_minute_when = Gtk2::ComboBox->new_with_strings([ "*", (0..59) ]);
- my $entry_crontab = new Gtk2::Entry();
+ my $entry_crontab = Gtk2::Entry->new;
gtkset_editable($entry_crontab, 0);
my @time_list = split(" ", $time_string);
@@ -2101,57 +2101,57 @@ sub advanced_when() {
my $entry_media_type = Gtk2::ComboBox->new_with_strings([ sort(@net_methods, @media_types) ], $conf{DAEMON_MEDIA});
gtkpack($advanced_box,
- $box_when = gtkpack_(new Gtk2::VBox(0, 10),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 1, new Gtk2::HBox(0,10),
+ $box_when = gtkpack_(Gtk2::VBox->new(0, 10),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 1, Gtk2::HBox->new(0,10),
1, gtkcreate_img("ic82-when-40"),
- 0, my $check_when_daemon = new Gtk2::CheckButton(N("Use daemon")),
- 1, new Gtk2::HBox(0,10),
+ 0, my $check_when_daemon = Gtk2::CheckButton->new(N("Use daemon")),
+ 1, Gtk2::HBox->new(0,10),
),
- 0, new Gtk2::HSeparator,
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Please choose the time interval between each backup")), $backup_daemon),
- 1, new Gtk2::HBox(0,10),
+ 0, Gtk2::HSeparator->new,
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Please choose the time interval between each backup")), $backup_daemon),
+ 1, Gtk2::HBox->new(0,10),
0, gtkset_sensitive($combo_when_space, $backup_daemon),
),
- 0, new Gtk2::HSeparator,
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Custom setup/crontab entry:")), $allow_custom),
+ 0, Gtk2::HSeparator->new,
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Custom setup/crontab entry:")), $allow_custom),
1, gtkset_sensitive($entry_crontab, $allow_custom),
),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 1, gtkpack_(new Gtk2::VBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Minute")), $allow_custom),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 1, gtkpack_(Gtk2::VBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Minute")), $allow_custom),
0, gtkset_sensitive($combo_minute_when, $allow_custom),
),
- 1, gtkpack_(new Gtk2::VBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Hour")), $allow_custom),
+ 1, gtkpack_(Gtk2::VBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Hour")), $allow_custom),
0, gtkset_sensitive($combo_hour_when, $allow_custom),
),
- 1, gtkpack_(new Gtk2::VBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Day")), $allow_custom),
+ 1, gtkpack_(Gtk2::VBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Day")), $allow_custom),
0, gtkset_sensitive($combo_day_when, $allow_custom),
),
- 1, gtkpack_(new Gtk2::VBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Month")), $allow_custom),
+ 1, gtkpack_(Gtk2::VBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Month")), $allow_custom),
0, gtkset_sensitive($combo_month_when, $allow_custom),
),
- 1, gtkpack_(new Gtk2::VBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Weekday")), $allow_custom),
+ 1, gtkpack_(Gtk2::VBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Weekday")), $allow_custom),
0, gtkset_sensitive($combo_weekday_when, $allow_custom),
),
),
- 0, new Gtk2::HSeparator,
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Please choose the media for backup.")), $backup_daemon),
- 1, new Gtk2::HBox(0,10),
- 0, gtkpack_(new Gtk2::VBox(0,10),
+ 0, Gtk2::HSeparator->new,
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Please choose the media for backup.")), $backup_daemon),
+ 1, Gtk2::HBox->new(0,10),
+ 0, gtkpack_(Gtk2::VBox->new(0,10),
0, gtkset_sensitive($entry_media_type, $backup_daemon),
),
),
- 0, new Gtk2::HSeparator,
- 0, gtkset_sensitive(new Gtk2::Label(N("Please be sure that the cron daemon is included in your services.")), $backup_daemon),
- 0, gtkset_sensitive(new Gtk2::Label(N("Note that currently all 'net' media also use the hard drive.")), $backup_daemon),
+ 0, Gtk2::HSeparator->new,
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Please be sure that the cron daemon is included in your services.")), $backup_daemon),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Note that currently all 'net' media also use the hard drive.")), $backup_daemon),
),
);
@@ -2197,26 +2197,26 @@ sub advanced_options() {
my $box_options;
my $entry_comp_mode = Gtk2::ComboBox->new_with_strings([ "tar", "tar.gz", "tar.bz2" ], $conf{OPTION_COMP});
gtkpack($advanced_box,
- $box_options = gtkpack_(new Gtk2::VBox(0, 15),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, new Gtk2::Label(N("Please choose the compression type")),
- 1, new Gtk2::HBox(0,10),
+ $box_options = gtkpack_(Gtk2::VBox->new(0, 15),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, Gtk2::Label->new(N("Please choose the compression type")),
+ 1, Gtk2::HBox->new(0,10),
0, $entry_comp_mode,
),
- 0, my $check_backupignore = new Gtk2::CheckButton(N("Use .backupignore files")),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, my $check_mail = new Gtk2::CheckButton(N("Send mail report after each backup to:")),
- 1, new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(my $mail_entry = new Gtk2::Entry(), $conf{SEND_MAIL}),
+ 0, my $check_backupignore = Gtk2::CheckButton->new(N("Use .backupignore files")),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, my $check_mail = Gtk2::CheckButton->new(N("Send mail report after each backup to:")),
+ 1, Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(my $mail_entry = Gtk2::Entry->new, $conf{SEND_MAIL}),
),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 1, new Gtk2::HBox(0,10),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 1, Gtk2::HBox->new(0,10),
0, N("SMTP server for mail:"),
- 1, new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(my $smtp_entry = new Gtk2::Entry(), $conf{SEND_MAIL}),
+ 1, Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(my $smtp_entry = Gtk2::Entry->new, $conf{SEND_MAIL}),
),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, my $check_del_hd_files = new Gtk2::CheckButton(N("Delete Hard Drive tar files after backup to other media.")),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, my $check_del_hd_files = Gtk2::CheckButton->new(N("Delete Hard Drive tar files after backup to other media.")),
),
),
);
@@ -2237,10 +2237,10 @@ sub advanced_box() {
my $box_adv;
gtkpack($advanced_box,
- $box_adv = gtkpack_(new Gtk2::HBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
- 1, gtkpack_(new Gtk2::VBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
+ $box_adv = gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
+ 1, gtkpack_(Gtk2::VBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
1, gtksignal_connect(my $button_what = Gtk2::Button->new, clicked => sub {
destroy_widget(); advanced_what() }),
1, gtksignal_connect(my $button_where = Gtk2::Button->new, clicked => sub {
@@ -2249,30 +2249,30 @@ sub advanced_box() {
destroy_widget(); advanced_when() }),
1, gtksignal_connect(my $button_options = Gtk2::Button->new, clicked => sub {
destroy_widget(); advanced_options() }),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
);
- $button_what->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_what->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-discdurwhat-40"),
- new Gtk2::Label(N("What")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("What")),
+ Gtk2::HBox->new(0, 5)
));
- $button_where->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_where->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-where-40"),
- new Gtk2::Label(N("Where")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("Where")),
+ Gtk2::HBox->new(0, 5)
));
- $button_when->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_when->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-when-40"),
- new Gtk2::Label(N("When")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("When")),
+ Gtk2::HBox->new(0, 5)
));
- $button_options->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_options->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-moreoption-40"),
- new Gtk2::Label(N("More Options")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("More Options")),
+ Gtk2::HBox->new(0, 5)
));
fonction_env(\$box_adv, \&advanced_box, \&interactive_mode_box);
$up_box->show_all;
@@ -2292,7 +2292,7 @@ sub wizard_step3() {
install_rpm(\&wizard_step3, undef);
return;
}
- my $text = new Gtk2::TextView;
+ my $text = Gtk2::TextView->new;
save_conf_file();
read_conf_file();
system_state();
@@ -2300,8 +2300,8 @@ sub wizard_step3() {
button_box_restore_main();
gtkpack($advanced_box,
- $box2 = gtkpack_(new Gtk2::HBox(0, 15),
- 1, gtkpack_(new Gtk2::VBox(0,10),
+ $box2 = gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, gtkpack_(Gtk2::VBox->new(0,10),
0, N("Drakbackup Configuration"),
1, create_scrolled_window($text),
),
@@ -2314,46 +2314,46 @@ sub wizard_step3() {
sub wizard_step2() {
gtkpack($advanced_box,
- $box2 = gtkpack_(new Gtk2::HBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
- 1, gtkpack_(new Gtk2::VBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
+ $box2 = gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
+ 1, gtkpack_(Gtk2::VBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
0, N("Please choose where you want to backup"),
- 0, gtkpack_(new Gtk2::HBox(0, 15),
+ 0, gtkpack_(Gtk2::HBox->new(0, 15),
0, N("Hard Drive used to prepare backups for all media"),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
0, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new(N("Configure")), clicked => sub {
destroy_widget();
advanced_where_hd(\&wizard_step2);
}), $use_hd),
),
- 0, gtkpack_(new Gtk2::HBox(0, 15),
- 0, my $check_wizard_net = new Gtk2::CheckButton(N("Across Network")),
- 1, new Gtk2::VBox(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0, 15),
+ 0, my $check_wizard_net = Gtk2::CheckButton->new(N("Across Network")),
+ 1, Gtk2::VBox->new(0, 5),
0, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new(N("Configure")), clicked => sub {
destroy_widget();
advanced_where_net_types(\&wizard_step2);
}), $conf{USE_NET}),
),
- 0, gtkpack_(new Gtk2::HBox(0, 15),
- 0, my $check_wizard_cd = new Gtk2::CheckButton(N("On CD-R")),
- 1, new Gtk2::VBox(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0, 15),
+ 0, my $check_wizard_cd = Gtk2::CheckButton->new(N("On CD-R")),
+ 1, Gtk2::VBox->new(0, 5),
0, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new(N("Configure")), clicked => sub {
destroy_widget();
advanced_where_cd(\&wizard_step2);
}), $conf{USE_CD}),
),
- 0, gtkpack_(new Gtk2::HBox(0, 15),
- 0, my $check_wizard_tape = new Gtk2::CheckButton(N("On Tape Device")),
- 1, new Gtk2::VBox(0, 5),
+ 0, gtkpack_(Gtk2::HBox->new(0, 15),
+ 0, my $check_wizard_tape = Gtk2::CheckButton->new(N("On Tape Device")),
+ 1, Gtk2::VBox->new(0, 5),
0, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new(N("Configure")), clicked => sub {
destroy_widget();
advanced_where_tape(\&wizard_step2);
}), $conf{USE_TAPE}),
),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
);
gtksignal_connect(gtkset_active($check_wizard_cd, $conf{USE_CD}), toggled => sub {
@@ -2392,21 +2392,21 @@ sub wizard() {
}
gtkpack($advanced_box,
- $box2 = gtkpack_(new Gtk2::HBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
- 1, gtkpack_(new Gtk2::VBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
+ $box2 = gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
+ 1, gtkpack_(Gtk2::VBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
0, N("Please choose what you want to backup"),
- 0, my $check_wizard_sys = new Gtk2::CheckButton(N("Backup System")),
- 0, my $check_wizard_user = new Gtk2::CheckButton($user_string),
+ 0, my $check_wizard_sys = Gtk2::CheckButton->new(N("Backup System")),
+ 0, my $check_wizard_user = Gtk2::CheckButton->new($user_string),
0, gtksignal_connect(Gtk2::Button->new(N("Select user manually")), clicked => sub {
$manual_user = 1;
destroy_widget();
advanced_what_user(\&wizard);
}),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
);
foreach ([$check_wizard_sys, \$conf{NO_SYS_FILES}], [$check_wizard_user, \$conf{NO_USER_FILES}]) {
@@ -2707,15 +2707,15 @@ sub show_backup_details {
}
close $TMP;
- my $text = new Gtk2::TextView;
+ my $text = Gtk2::TextView->new;
my $advanced_box_archive;
gtktext_insert(gtkset_editable($text, 0), $archive_file_detail);
gtkpack($advanced_box,
- $advanced_box_archive = gtkpack_(new Gtk2::VBox(0,10),
- 1, gtkpack_(new Gtk2::HBox(0,0),
+ $advanced_box_archive = gtkpack_(Gtk2::VBox->new(0,10),
+ 1, gtkpack_(Gtk2::HBox->new(0,0),
1, create_scrolled_window($text),
),
- 0, gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
+ 0, gtkadd(gtkset_layout(Gtk2::HButtonBox->new, 'spread'),
gtksignal_connect(Gtk2::Button->new(N("Done")), clicked => sub {
destroy_widget();
$function->() }),
@@ -2743,7 +2743,7 @@ sub valid_backup_test {
sub restore_aff_backup_problems() {
my $do_restore;
- my $text = new Gtk2::TextView;
+ my $text = Gtk2::TextView->new;
my $restore_pbs_state = N("List of data corrupted:\n\n");
$restore_pbs_state .= "\t\t$_\n" foreach @files_corrupted;
$restore_pbs_state .= N("Please uncheck or remove it on next time.");
@@ -2751,15 +2751,15 @@ sub restore_aff_backup_problems() {
button_box_restore_main();
gtkpack($advanced_box,
- $do_restore = gtkpack_(new Gtk2::VBox(0,10),
- 0, new Gtk2::VBox(0,10),
- 1, gtkpack_(new Gtk2::HBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
+ $do_restore = gtkpack_(Gtk2::VBox->new(0,10),
+ 0, Gtk2::VBox->new(0,10),
+ 1, gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
0, gtkcreate_img('warning'),
0, N("Backup files are corrupted"),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
- 0, new Gtk2::VBox(0,10),
+ 0, Gtk2::VBox->new(0,10),
1, create_scrolled_window($text),
),
);
@@ -2770,16 +2770,16 @@ sub restore_aff_backup_problems() {
sub restore_aff_result() {
my $do_restore;
- my $text = new Gtk2::TextView;
+ my $text = Gtk2::TextView->new;
gtktext_insert($text, [ [ $restore_state ] ]);
button_box_restore_main();
gtkpack($advanced_box,
- $do_restore = gtkpack_(new Gtk2::VBox(0,10),
- 1, new Gtk2::VBox(0,10),
+ $do_restore = gtkpack_(Gtk2::VBox->new(0,10),
+ 1, Gtk2::VBox->new(0,10),
0, N(" All of your selected data have been "),
0, N(" Successfuly Restored on %s ", $restore_path),
- 1, new Gtk2::VBox(0,10),
+ 1, Gtk2::VBox->new(0,10),
),
);
button_box_ok_only();
@@ -2891,13 +2891,13 @@ sub restore_do() {
sub restore_do2() {
destroy_widget();
my $do_restore;
- my $text = new Gtk2::TextView;
+ my $text = Gtk2::TextView->new;
restore_state();
gtktext_insert($text, [ [ $restore_state ] ]);
button_box_restore_main();
gtkpack($advanced_box,
- $do_restore = gtkpack_(new Gtk2::VBox(0,10),
+ $do_restore = gtkpack_(Gtk2::VBox->new(0,10),
0, N(" Restore Configuration "),
1, create_scrolled_window($text),
),
@@ -2909,7 +2909,7 @@ sub restore_do2() {
sub restore_step_other() {
my $retore_step_other;
- my $text = new Gtk2::TextView;
+ my $text = Gtk2::TextView->new;
my $untar_cmd = "tar tzf";
my $other_rest = "";
select_other_data_to_restore();
@@ -2923,11 +2923,11 @@ sub restore_step_other() {
}
gtktext_insert($text, [ [ $other_rest ] ]);
gtkpack($advanced_box,
- $retore_step_other = gtkpack_(new Gtk2::VBox(0,10),
- 1, new Gtk2::VBox(0,10),
+ $retore_step_other = gtkpack_(Gtk2::VBox->new(0,10),
+ 1, Gtk2::VBox->new(0,10),
1, create_scrolled_window($text),
- 0, my $check_restore_other_sure = new Gtk2::CheckButton(N("OK to restore the other files.")),
- 1, new Gtk2::VBox(0,10),
+ 0, my $check_restore_other_sure = Gtk2::CheckButton->new(N("OK to restore the other files.")),
+ 1, Gtk2::VBox->new(0,10),
),
);
check_list([$check_restore_other_sure, \$restore_other]);
@@ -2940,21 +2940,21 @@ sub restore_step_user() {
my @tmp_list = sort @user_backuped;
@user_backuped = @tmp_list;
gtkpack($advanced_box,
- $retore_step_user = gtkpack_(new Gtk2::VBox(0,10),
- 0, new Gtk2::VBox(0,10),
+ $retore_step_user = gtkpack_(Gtk2::VBox->new(0,10),
+ 0, Gtk2::VBox->new(0,10),
0, N("User list to restore (only the most recent date per user is important)"),
- 1, create_scrolled_window(gtkpack__(new Gtk2::VBox(0,0),
+ 1, create_scrolled_window(gtkpack__(Gtk2::VBox->new(0,0),
map { my $name;
my $var2;
my $name_complet = $_;
$name = (split(' ', $name_complet))[0];
my @user_list_tmp;
- my $restore_row = new Gtk2::HBox(0,5);
- my $b = new Gtk2::CheckButton($name_complet);
+ my $restore_row = Gtk2::HBox->new(0,5);
+ my $b = Gtk2::CheckButton->new($name_complet);
my $details = Gtk2::Button->new(N("Details"));
$restore_row->pack_start($b, 1, 1, 0);
- $restore_row->pack_end(new Gtk2::VBox(1,5), 0, 0, 0);
+ $restore_row->pack_end(Gtk2::VBox->new(1,5), 0, 0, 0);
$restore_row->pack_end($details, 0, 0, 0);
foreach (@user_list_to_restore2) {
@@ -3006,13 +3006,13 @@ sub restore_step_sys() {
my $restore_step_sys;
my $combo_restore_step_sys = Gtk2::ComboBox->new_with_strings(\@sys_backuped, $restore_step_sys_date);
gtkpack($advanced_box,
- $restore_step_sys = gtkpack_(new Gtk2::VBox(0,10),
+ $restore_step_sys = gtkpack_(Gtk2::VBox->new(0,10),
0, N("Please choose the date to restore:"),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 1, new Gtk2::HBox(0,10),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 1, Gtk2::HBox->new(0,10),
0, $combo_restore_step_sys,
0, my $details = Gtk2::Button->new(N("Details")),
- 1, new Gtk2::HBox(0,10),
+ 1, Gtk2::HBox->new(0,10),
),
),
);
@@ -3042,19 +3042,19 @@ sub restore_other_media() {
my $button;
gtkpack($advanced_box,
- $box_find_restore = gtkpack_(new Gtk2::VBox(0, 6),
- 0, new Gtk2::HSeparator,
- 0, my $check_other_media_hd = new Gtk2::CheckButton(N("Restore from Hard Disk.")),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, gtkset_sensitive(new Gtk2::Label(N("Enter the directory where backups are stored")), $other_media_hd),
- 1, new Gtk2::VBox(0, 6),
- 0, gtkset_size_request(gtkset_sensitive($restore_find_path_entry = new Gtk2::Entry(), $other_media_hd), 152, 20),
+ $box_find_restore = gtkpack_(Gtk2::VBox->new(0, 6),
+ 0, Gtk2::HSeparator->new,
+ 0, my $check_other_media_hd = Gtk2::CheckButton->new(N("Restore from Hard Disk.")),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, gtkset_sensitive(Gtk2::Label->new(N("Enter the directory where backups are stored")), $other_media_hd),
+ 1, Gtk2::VBox->new(0, 6),
+ 0, gtkset_size_request(gtkset_sensitive($restore_find_path_entry = Gtk2::Entry->new, $other_media_hd), 152, 20),
0, gtkset_sensitive($button = gtksignal_connect(Gtk2::Button->new, clicked => sub {
filedialog_generic(N("Directory with backups"), \$restore_find_path_entry);
}), $other_media_hd),
),
- 1, new Gtk2::VBox(0, 6),
- 0, new Gtk2::VBox(0, 6),
+ 1, Gtk2::VBox->new(0, 6),
+ 0, Gtk2::VBox->new(0, 6),
),
);
gtksignal_connect(gtkset_active($check_other_media_hd, $other_media_hd), toggled => sub {
@@ -3062,7 +3062,7 @@ sub restore_other_media() {
destroy_widget();
$current_widget->();
});
- $button->add(gtkpack(new Gtk2::HBox(0,10), gtkcreate_img("ic82-dossier-32")));
+ $button->add(gtkpack(Gtk2::HBox->new(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 });
fonction_env(\$box_find_restore, \&restore_other_media, \&restore_step2, \&restore_do);
@@ -3098,34 +3098,34 @@ sub restore_step2() {
$user_exist = 0; $restore_user = 0;
}
- my $restore_path_entry = new Gtk2::Entry();
+ my $restore_path_entry = Gtk2::Entry->new;
gtkpack($advanced_box,
- $retore_step2 = gtkpack_(new Gtk2::VBox(0,10),
- 1, new Gtk2::VBox(0,10),
- 1, new Gtk2::VBox(0,10),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, my $check_restore_other_src = new Gtk2::CheckButton(N("Select another media to restore from")),
- 1, new Gtk2::HBox(0,10),
+ $retore_step2 = gtkpack_(Gtk2::VBox->new(0,10),
+ 1, Gtk2::VBox->new(0,10),
+ 1, Gtk2::VBox->new(0,10),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, my $check_restore_other_src = Gtk2::CheckButton->new(N("Select another media to restore from")),
+ 1, Gtk2::HBox->new(0,10),
0, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new(N("Other Media")), clicked => sub {
destroy_widget();
restore_other_media();
}), $restore_other_src),
),
- 0, gtkset_sensitive(my $check_restore_sys = new Gtk2::CheckButton(N("Restore system")), $sys_exist),
- 0, gtkset_sensitive(my $check_restore_user = new Gtk2::CheckButton(N("Restore Users")), $user_exist),
- 0, gtkset_sensitive(my $check_restore_other = new Gtk2::CheckButton(N("Restore Other")), $other_exist),
- 0, gtkpack_(new Gtk2::HBox(0,10),
- 0, my $check_restore_other_path = new Gtk2::CheckButton(N("Select path to restore (instead of /)")),
- 1, new Gtk2::HBox(0,10),
+ 0, gtkset_sensitive(my $check_restore_sys = Gtk2::CheckButton->new(N("Restore system")), $sys_exist),
+ 0, gtkset_sensitive(my $check_restore_user = Gtk2::CheckButton->new(N("Restore Users")), $user_exist),
+ 0, gtkset_sensitive(my $check_restore_other = Gtk2::CheckButton->new(N("Restore Other")), $other_exist),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
+ 0, my $check_restore_other_path = Gtk2::CheckButton->new(N("Select path to restore (instead of /)")),
+ 1, Gtk2::HBox->new(0,10),
0, gtkset_sensitive($restore_path_entry, $restore_other_path),
- 0, gtksignal_connect(my $button = new Gtk2::Button->new, clicked => sub {
+ 0, gtksignal_connect(my $button = Gtk2::Button->new->new, clicked => sub {
filedialog_generic(N("Path To Restore To"), \$restore_path_entry);
}),
),
- 0, gtkset_sensitive(my $check_backup_bef_restore = new Gtk2::CheckButton(N("Do new backup before restore (only for incremental backups.)")),
+ 0, gtkset_sensitive(my $check_backup_bef_restore = Gtk2::CheckButton->new(N("Do new backup before restore (only for incremental backups.)")),
$conf{SYS_INCREMENTAL_BACKUPS} || $conf{USER_INCREMENTAL_BACKUPS}),
- 0, gtkset_sensitive(my $check_remove_user_dir = new Gtk2::CheckButton(N("Remove user directories before restore.")), $user_exist),
- 1, new Gtk2::VBox(0,10),
+ 0, gtkset_sensitive(my $check_remove_user_dir = Gtk2::CheckButton->new(N("Remove user directories before restore.")), $user_exist),
+ 1, Gtk2::VBox->new(0,10),
),
);
@@ -3173,7 +3173,7 @@ sub restore_step2() {
} else {
$next_widget = \&restore_do;
}
- $button->add(gtkpack(new Gtk2::HBox(0,10), gtkcreate_img("ic82-dossier-32")));
+ $button->add(gtkpack(Gtk2::HBox->new(0,10), gtkcreate_img("ic82-dossier-32")));
$restore_path_entry->set_text($restore_path);
$restore_path_entry->signal_connect('changed', sub {
$restore_path = $restore_path_entry->get_text;
@@ -3205,14 +3205,14 @@ sub find_files_to_restore() {
$valcolumn->set_visible(0);
my $unselected = gtkcreate_pixbuf('unselected');
my $selected = gtkcreate_pixbuf('selected');
- my $file_wildcard_entry = new Gtk2::Entry();
+ my $file_wildcard_entry = Gtk2::Entry->new;
gtkpack($advanced_box,
- $file_restore = gtkpack_(new Gtk2::VBox(0,10),
- 0, new Gtk2::Label(N("Filename text substring to search for (empty string matches all):")),
- 0, gtkpack_(new Gtk2::HBox(0,10),
+ $file_restore = gtkpack_(Gtk2::VBox->new(0,10),
+ 0, Gtk2::Label->new(N("Filename text substring to search for (empty string matches all):")),
+ 0, gtkpack_(Gtk2::HBox->new(0,10),
1, $file_wildcard_entry,
- 0, gtksignal_connect(new Gtk2::Button(N("Search Backups")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new(N("Search Backups")), clicked => sub {
local $_ = $file_wildcard_entry->get_text;
s|^\*|\\*|g;
my $wildcard = $_;
@@ -3234,7 +3234,7 @@ sub find_files_to_restore() {
}),
),
1, create_scrolled_window($file_list),
- 0, gtkset_sensitive(gtksignal_connect($start_restore = new Gtk2::Button(N("Restore Selected")), clicked => sub {
+ 0, gtkset_sensitive(gtksignal_connect($start_restore = Gtk2::Button->new(N("Restore Selected")), clicked => sub {
@files_to_restore = ();
my $last_entry = '';
my $catalog_entry;
@@ -3367,14 +3367,14 @@ sub catalog_restore {
});
gtkpack($advanced_box,
- $catalog_box = gtkpack_(new Gtk2::HBox(0,10),
- 1, gtkpack_(new Gtk2::VBox(0,5),
+ $catalog_box = gtkpack_(Gtk2::HBox->new(0,10),
+ 1, gtkpack_(Gtk2::VBox->new(0,5),
0, N("Click date/time to see backup files.\nCtrl-Click files to select multiple files."),
- 1, gtkpack_(new Gtk2::VBox(0, 10),
+ 1, gtkpack_(Gtk2::VBox->new(0, 10),
1, create_scrolled_window($tree_catalog),
1, create_scrolled_window($tree_files),
),
- 0, gtkpack_(new Gtk2::HBox(1, 10),
+ 0, gtkpack_(Gtk2::HBox->new(1, 10),
1, gtksignal_connect(Gtk2::Button->new(N("Restore Selected\nCatalog Entry")), clicked => sub {
if ($cat_entry) {
my $media_check = restore_catalog_entry($cat_entry, ());
@@ -3396,17 +3396,17 @@ sub catalog_restore {
}
}
}),
- 1, gtkpack_(new Gtk2::VBox(0, 5),
- 0, new Gtk2::Label("Restore To Path"),
- 0, $restore_path_entry = new Gtk2::Entry(),
+ 1, gtkpack_(Gtk2::VBox->new(0, 5),
+ 0, Gtk2::Label->new("Restore To Path"),
+ 0, $restore_path_entry = Gtk2::Entry->new,
),
- 0, gtksignal_connect(my $button = new Gtk2::Button(), clicked => sub {
+ 0, gtksignal_connect(my $button = Gtk2::Button->new, clicked => sub {
filedialog_generic(N("Path To Restore To"), \$restore_path_entry);
}),
),
- 0, new Gtk2::VBox(0,10),
+ 0, Gtk2::VBox->new(0,10),
),
- 0, new Gtk2::VBox(0,10),
+ 0, Gtk2::VBox->new(0,10),
),
);
@@ -3415,7 +3415,7 @@ sub catalog_restore {
$restore_path = $restore_path_entry->get_text;
$untar_prefix = "tar -C $restore_path -x";
});
- $button->add(gtkpack(new Gtk2::HBox(0,10), gtkcreate_img("ic82-dossier-32")));
+ $button->add(gtkpack(Gtk2::HBox->new(0,10), gtkcreate_img("ic82-dossier-32")));
button_box_restore();
fonction_env(\$catalog_box, \&catalog_restore, \&restore_find_media_box, \&catalog_restore) if $call_method eq "need media";;
fonction_env(\$catalog_box, \&catalog_restore, \&restore_box, \&catalog_restore) if $call_method eq "button";
@@ -3773,11 +3773,11 @@ sub restore_box() {
if (@other_backuped || @sys_backuped || @user_backuped) {
gtkpack($advanced_box,
- $box2 = gtkpack_(new Gtk2::HBox(0,1),
- 1, new Gtk2::VBox(0,10),
- 1, gtkpack_(new Gtk2::VBox(0,10),
- 1, new Gtk2::VBox(0,10),
- 1, new Gtk2::VBox(0,10),
+ $box2 = gtkpack_(Gtk2::HBox->new(0,1),
+ 1, Gtk2::VBox->new(0,10),
+ 1, gtkpack_(Gtk2::VBox->new(0,10),
+ 1, Gtk2::VBox->new(0,10),
+ 1, Gtk2::VBox->new(0,10),
1, gtksignal_connect(Gtk2::Button->new(N("Search for files to restore")), clicked => sub {
button_box_file_restore();
find_files_to_restore()
@@ -3797,10 +3797,10 @@ sub restore_box() {
1, gtksignal_connect(Gtk2::Button->new(N("Restore From Catalog")), clicked => sub {
catalog_restore("button");
}),
- 1, new Gtk2::VBox(0,10),
- 1, new Gtk2::VBox(0,10),
+ 1, Gtk2::VBox->new(0,10),
+ 1, Gtk2::VBox->new(0,10),
),
- 1, new Gtk2::HBox(0,10),
+ 1, Gtk2::HBox->new(0,10),
),
);
} else {
@@ -3825,21 +3825,21 @@ sub restore_find_media_box() {
$message .= ".";
gtkpack($advanced_box,
- $box2 = gtkpack_(new Gtk2::VBox(0, 5),
- 1, gtkpack(new Gtk2::HBox(0, 15),
- new Gtk2::VBox(0, 5),
+ $box2 = gtkpack_(Gtk2::VBox->new(0, 5),
+ 1, gtkpack(Gtk2::HBox->new(0, 15),
+ Gtk2::VBox->new(0, 5),
gtkcreate_img('warning'),
translate($message),
- new Gtk2::VBox(0, 5),
+ Gtk2::VBox->new(0, 5),
),
- 1, gtkpack(new Gtk2::HBox(0, 15),
- new Gtk2::VBox(0, 5),
- gtkpack(new Gtk2::VBox(0, 10),
+ 1, gtkpack(Gtk2::HBox->new(0, 15),
+ Gtk2::VBox->new(0, 5),
+ gtkpack(Gtk2::VBox->new(0, 10),
gtkset_sensitive(gtksignal_connect(Gtk2::Button->new(N("CD in place - continue.")), clicked => sub {
$good_restore_path = 1;
interactive_mode_box("restore");
}), $mount_media),
- $new_path_entry = gtkset_sensitive(new Gtk2::Entry(), $mount_media),
+ $new_path_entry = gtkset_sensitive(Gtk2::Entry->new, $mount_media),
gtkset_sensitive(gtksignal_connect(Gtk2::Button->new(N("Browse to new restore repository.")), clicked => sub {
filedialog_generic(N("Directory To Restore From"), \$new_path_entry);
}), $mount_media),
@@ -3853,9 +3853,9 @@ sub restore_find_media_box() {
find_files_to_restore()
}),
),
- new Gtk2::VBox(0, 5),
+ Gtk2::VBox->new(0, 5),
),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
);
$new_path_entry->set_text($path_to_find_restore);
@@ -3867,11 +3867,11 @@ sub restore_find_media_box() {
sub restore_status() {
destroy_widget();
- $pbar3 = new Gtk2::ProgressBar;
- $stext = new Gtk2::Label("");
+ $pbar3 = Gtk2::ProgressBar->new;
+ $stext = Gtk2::Label->new("");
gtkpack($advanced_box,
- $table = gtkpack(new Gtk2::VBox(0, 5),
- new Gtk2::HBox(0,5),
+ $table = gtkpack(Gtk2::VBox->new(0, 5),
+ Gtk2::HBox->new(0,5),
create_packtable({ col_spacings => 10, row_spacings => 5 },
[""],
[""],
@@ -3883,7 +3883,7 @@ sub restore_status() {
[$pbar3],
[""],
[""],
- [$plabel3 = new Gtk2::Label(' ')],
+ [$plabel3 = Gtk2::Label->new(' ')],
[""],
),
$stext,
@@ -3921,13 +3921,13 @@ sub pbutton() {
}
sub hspace() {
- 1, new Gtk2::HBox(0, 1);
+ 1, Gtk2::HBox->new(0, 1);
}
sub button_box_adv() {
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
cbutton(),
hbutton(),
hspace(),
@@ -3949,7 +3949,7 @@ sub button_box_adv() {
sub button_box_restore_main() {
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
cbutton(),
hbutton(),
hspace(),
@@ -3962,7 +3962,7 @@ sub button_box_restore_main() {
sub button_box_file_restore() {
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
0, gtksignal_connect(Gtk2::Button->new(N("Cancel")), clicked => \&restore_box),
hbutton(),
hspace(),
@@ -3973,7 +3973,7 @@ sub button_box_file_restore() {
sub button_box_ok_only() {
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
hspace(),
ibutton(N("Ok")),
),
@@ -3983,7 +3983,7 @@ sub button_box_ok_only() {
sub button_box_backup_end() {
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
cbutton(),
hbutton(),
hspace(),
@@ -4000,7 +4000,7 @@ sub button_box_backup_end() {
sub button_box_wizard_end() {
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
cbutton(),
hbutton(),
hspace(),
@@ -4016,7 +4016,7 @@ sub button_box_wizard_end() {
sub button_box_restore_end() {
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
cbuttonr(),
hbutton(),
hspace(),
@@ -4032,7 +4032,7 @@ sub button_box_restore_end() {
sub button_box_restore_pbs_end() {
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
hspace(),
hbutton(),
ibutton(N("Ok")),
@@ -4043,7 +4043,7 @@ sub button_box_restore_pbs_end() {
sub button_box_restore() {
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
cbuttonr(),
hbutton(),
hspace(),
@@ -4060,7 +4060,7 @@ sub button_box_find_media {
my ($mount_media) = @_;
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
cbutton(),
hbutton(),
hspace(),
@@ -4075,7 +4075,7 @@ sub button_box_find_media {
sub button_box_wizard() {
$button_box_tmp->destroy;
gtkpack($button_box,
- $button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
+ $button_box_tmp = gtkpack_(Gtk2::HButtonBox->new,
cbutton(),
hbutton(),
hspace(),
@@ -4108,9 +4108,9 @@ sub install_rpm {
my ($calling_widget, $previous) = @_;
destroy_widget();
gtkpack($advanced_box,
- my $rpm_box = gtkpack_(new Gtk2::VBox(0, 15),
+ my $rpm_box = gtkpack_(Gtk2::VBox->new(0, 15),
0, N("The following packages need to be installed:\n") . join(' ', @list_of_rpm_to_install),
- 0, new Gtk2::HSeparator,
+ 0, Gtk2::HSeparator->new,
0, gtksignal_connect(Gtk2::Button->new(N("Install")), clicked => sub {
my $installed = system("/usr/sbin/urpmi --X @list_of_rpm_to_install");
if ($installed == 0) {
@@ -4131,15 +4131,15 @@ sub message_norestore_box() {
$box2->destroy;
gtkadd($advanced_box,
- $box2 = gtkpack_(new Gtk2::HBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
- 1, gtkpack(new Gtk2::HBox(0, 15),
- new Gtk2::VBox(0, 5),
+ $box2 = gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
+ 1, gtkpack(Gtk2::HBox->new(0, 15),
+ Gtk2::VBox->new(0, 5),
gtkcreate_img('warning'),
N("Please select data to restore..."),
- new Gtk2::VBox(0, 5),
+ Gtk2::VBox->new(0, 5),
),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
);
button_box_restore_main();
@@ -4160,37 +4160,37 @@ sub progress {
}
sub build_backup_status() {
- $pbar = new Gtk2::ProgressBar;
- $pbar1 = new Gtk2::ProgressBar;
- $pbar2 = new Gtk2::ProgressBar;
- $pbar3 = new Gtk2::ProgressBar;
- $plabel = new Gtk2::Label(" ");
- $plabel1 = new Gtk2::Label(" ");
- $plabel2 = new Gtk2::Label(" ");
- $plabel3 = new Gtk2::Label(" ");
+ $pbar = Gtk2::ProgressBar->new;
+ $pbar1 = Gtk2::ProgressBar->new;
+ $pbar2 = Gtk2::ProgressBar->new;
+ $pbar3 = Gtk2::ProgressBar->new;
+ $plabel = Gtk2::Label->new(" ");
+ $plabel1 = Gtk2::Label->new(" ");
+ $plabel2 = Gtk2::Label->new(" ");
+ $plabel3 = Gtk2::Label->new(" ");
- $stext = new Gtk2::Label("");
+ $stext = Gtk2::Label->new("");
button_box_ok_only();
my $table = Gtk2::Table->new(10, 2, 1);
$table->set_row_spacings(5);
$table->set_col_spacings(10);
- $table->attach_defaults(new Gtk2::Label(N("Backup system files")), 0, 1, 0, 1);
+ $table->attach_defaults(Gtk2::Label->new(N("Backup system files")), 0, 1, 0, 1);
$table->attach_defaults($pbar, 0, 1, 1, 2);
$table->attach_defaults($plabel, 1, 2, 1, 2);
- $table->attach_defaults(new Gtk2::Label(N("Backup user files")), 0, 1, 2, 3);
+ $table->attach_defaults(Gtk2::Label->new(N("Backup user files")), 0, 1, 2, 3);
$table->attach_defaults($pbar1, 0, 1, 3, 4);
$table->attach_defaults($plabel1, 1, 2, 3, 4);
- $table->attach_defaults(new Gtk2::Label(N("Backup other files")), 0, 1, 4, 5);
+ $table->attach_defaults(Gtk2::Label->new(N("Backup other files")), 0, 1, 4, 5);
$table->attach_defaults($pbar2, 0, 1, 5, 6);
$table->attach_defaults($plabel2, 1, 2, 5, 6);
- $table->attach_defaults(new Gtk2::Label(N("Total Progress")), 0, 1, 6, 7);
+ $table->attach_defaults(Gtk2::Label->new(N("Total Progress")), 0, 1, 6, 7);
$table->attach_defaults($pbar3, 0, 1, 7, 8);
$table->attach_defaults($plabel3, 1, 2, 7, 8);
gtkpack($advanced_box,
- my $tbox = gtkpack(new Gtk2::VBox(0, 5),
+ my $tbox = gtkpack(Gtk2::VBox->new(0, 5),
$table,
$stext,
),
@@ -4202,28 +4202,28 @@ sub build_backup_status() {
}
sub build_backup_ftp_status() {
- $pbar = new Gtk2::ProgressBar;
- $pbar3 = new Gtk2::ProgressBar;
+ $pbar = Gtk2::ProgressBar->new;
+ $pbar3 = Gtk2::ProgressBar->new;
destroy_widget();
button_box_ok_only();
$pbar->set_fraction(0);
$pbar3->set_fraction(0);
gtkpack($advanced_box,
- $table = gtkpack_(new Gtk2::VBox(0, 15),
+ $table = gtkpack_(Gtk2::VBox->new(0, 15),
1, N("Sending files by FTP"),
- 1, new Gtk2::VBox(0, 15),
+ 1, Gtk2::VBox->new(0, 15),
1, create_packtable ({ col_spacings => 10, row_spacings => 5 },
[N("Sending files...")],
[""],
- [ $plabel = new Gtk2::Label(' ') ],
+ [ $plabel = Gtk2::Label->new(' ') ],
[ $pbar ],
[""],
[N("Total Progress")],
- [ $plabel3 = new Gtk2::Label(' ') ],
+ [ $plabel3 = Gtk2::Label->new(' ') ],
[$pbar3],
),
- 1, new Gtk2::VBox(0, 15),
+ 1, Gtk2::VBox->new(0, 15),
),
);
$central_widget = \$table;
@@ -4233,15 +4233,15 @@ sub build_backup_ftp_status() {
sub build_backup_box_see_conf {
my ($caller) = @_;
- my $text = new Gtk2::TextView;
+ my $text = Gtk2::TextView->new;
read_conf_file();
system_state();
gtktext_insert($text, [ [ $system_state ] ]);
button_box_restore_main();
gtkpack($advanced_box,
- $box2 = gtkpack_(new Gtk2::HBox(0, 15),
- 1, gtkpack_(new Gtk2::VBox(0,10),
+ $box2 = gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, gtkpack_(Gtk2::VBox->new(0,10),
0, N("Drakbackup Configuration"),
1, create_scrolled_window($text),
),
@@ -4262,35 +4262,35 @@ sub build_backup_box() {
destroy_widget();
gtkadd($advanced_box,
- $box2 = gtkpack_(new Gtk2::HBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
- 1, gtkpack_(new Gtk2::VBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
+ $box2 = gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
+ 1, gtkpack_(Gtk2::VBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
1, gtksignal_connect(my $button_from_conf_file = Gtk2::Button->new, clicked => sub {
destroy_widget();
build_backup_status();
build_backup_files();
}),
- 0, new Gtk2::VBox(0, 5),
+ 0, Gtk2::VBox->new(0, 5),
1, gtksignal_connect(my $button_see_conf = Gtk2::Button->new, clicked => sub {
destroy_widget();
build_backup_box_see_conf();
}),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
);
- $button_from_conf_file->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_from_conf_file->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-discdurwhat-40"),
- new Gtk2::Label(N("Backup Now from configuration file")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("Backup Now from configuration file")),
+ Gtk2::HBox->new(0, 5)
));
- $button_see_conf->add(gtkpack(new Gtk2::HBox(0,10),
+ $button_see_conf->add(gtkpack(Gtk2::HBox->new(0,10),
gtkcreate_img("ic82-moreoption-40"),
- new Gtk2::Label(N("View Backup Configuration.")),
- new Gtk2::HBox(0, 5)
+ Gtk2::Label->new(N("View Backup Configuration.")),
+ Gtk2::HBox->new(0, 5)
));
button_box_restore_main();
@@ -4311,10 +4311,10 @@ sub interactive_mode_box {
destroy_widget();
gtkadd($advanced_box,
- $box2 = gtkpack_(new Gtk2::HBox(0, 15),
- 1, new Gtk2::VBox(0, 5),
- 1, gtkpack_(new Gtk2::VBox(0, 5),
- 1, new Gtk2::VBox(0, 5),
+ $box2 = gtkpack_(Gtk2::HBox->new(0, 15),
+ 1, Gtk2::VBox->new(0, 5),
+ 1, gtkpack_(Gtk2::VBox->new(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
0, gtksignal_connect(Gtk2::Button->new(N("Wizard Configuration")), clicked => sub {
destroy_widget();
read_conf_file();
@@ -4344,9 +4344,9 @@ sub interactive_mode_box {
0, gtksignal_connect(Gtk2::Button->new(N("Restore")), clicked => sub {
restore_box();
}),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
- 1, new Gtk2::VBox(0, 5),
+ 1, Gtk2::VBox->new(0, 5),
),
);
$central_widget = \$box2;
@@ -4368,15 +4368,15 @@ sub interactive_mode() {
read_conf_file();
gtkadd($window1,
- gtkpack(new Gtk2::VBox(0,0),
- gtkpack($up_box = new Gtk2::VBox(0, 5),
- gtkpack_(new Gtk2::VBox(0, 3),
- 1, gtkpack_(new Gtk2::HBox(0, 3),
- 1, $advanced_box = new Gtk2::HBox(0, 15),
+ gtkpack(Gtk2::VBox->new(0,0),
+ gtkpack($up_box = Gtk2::VBox->new(0, 5),
+ gtkpack_(Gtk2::VBox->new(0, 3),
+ 1, gtkpack_(Gtk2::HBox->new(0, 3),
+ 1, $advanced_box = Gtk2::HBox->new(0, 15),
),
- 0, new Gtk2::HSeparator,
- 0, $button_box = gtkpack(new Gtk2::VBox(0, 15),
- $button_box_tmp = gtkpack(new Gtk2::VBox(0, 0),),
+ 0, Gtk2::HSeparator->new,
+ 0, $button_box = gtkpack(Gtk2::VBox->new(0, 15),
+ $button_box_tmp = gtkpack(Gtk2::VBox->new(0, 0),),
),
),
),
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index a4c7eaed4..558eea134 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -80,8 +80,8 @@ if ($mandrake_release =~ /(official|community)/i) {
if ($stable_release == 0) {
$table = create_packtable({ col_spacings => 5, row_spacings => 10 },
- [ new Gtk2::Label(N("Application:")), $comb_app = Gtk2::ComboBox->new_text ],
- [ new Gtk2::Label(N("Package: ")), $package = Gtk2::Entry->new_with_text("...") ], # complain on gtk-perl@ml
+ [ Gtk2::Label->new(N("Application:")), $comb_app = Gtk2::ComboBox->new_text ],
+ [ Gtk2::Label->new(N("Package: ")), $package = Gtk2::Entry->new_with_text("...") ], # complain on gtk-perl@ml
[ Gtk2::Label->new(N("Kernel:")), gtkset_editable(Gtk2::Entry->new_with_text($kernel_release), 0) ],
[ Gtk2::Label->new(N("Release: ")), gtkset_editable(Gtk2::Entry->new_with_text($mandrake_release), 0) ]
);
@@ -89,7 +89,7 @@ if ($stable_release == 0) {
} else {
$table = create_packtable({ col_spacings => 5, row_spacings => 5 },
[Gtk2::Label->new(N("Application Name\nor Full Path:")),
- gtkpack_(new Gtk2::HBox(0,5),
+ gtkpack_(Gtk2::HBox->new(0,5),
1, $comb_app = gtkset_editable(Gtk2::Entry->new, 1),
0, $button_pkg = Gtk2::Button->new(N("Find Package")),
)],
@@ -100,16 +100,16 @@ if ($stable_release == 0) {
$textview = Gtk2::TextView->new;
- $extra_data = gtkpack_(new Gtk2::VBox(0,1),
+ $extra_data = gtkpack_(Gtk2::VBox->new(0,1),
0, Gtk2::Label->new(N("Bug Description/System Information")),
1, create_scrolled_window(gtktext_insert($textview, N("YOUR TEXT HERE"), editable => 1, visible => 1)),
- 0, gtkpack_(new Gtk2::HBox(0,20),
- 0, new Gtk2::HBox(0,0),
- 1, $kversion = new Gtk2::CheckButton(N("Submit kernel version")),
- 1, $cpuinfo = new Gtk2::CheckButton(N("Submit cpuinfo")),
- 1, $lspci = new Gtk2::CheckButton(N("Submit lspci")),
+ 0, gtkpack_(Gtk2::HBox->new(0,20),
+ 0, Gtk2::HBox->new(0,0),
+ 1, $kversion = Gtk2::CheckButton->new(N("Submit kernel version")),
+ 1, $cpuinfo = Gtk2::CheckButton->new(N("Submit cpuinfo")),
+ 1, $lspci = Gtk2::CheckButton->new(N("Submit lspci")),
),
- 0, new Gtk2::HSeparator,
+ 0, Gtk2::HSeparator->new,
);
$kversion->set_active(1);
$cpuinfo->set_active(1);
@@ -117,13 +117,13 @@ if ($stable_release == 0) {
}
gtkadd($window->{window},
- gtkpack_(new Gtk2::VBox(0,5),
+ gtkpack_(Gtk2::VBox->new(0,5),
0, gtkadd($table),
1, gtkadd($extra_data),
- 0, gtkpack(new Gtk2::HBox(0,0),
- gtkpack(gtkset_justify(new Gtk2::Label($upload_info), "left")),
+ 0, gtkpack(Gtk2::HBox->new(0,0),
+ gtkpack(gtkset_justify(Gtk2::Label->new($upload_info), "left")),
),
- 0, gtkpack(new Gtk2::HSeparator),
+ 0, gtkpack(Gtk2::HSeparator->new),
0, gtkpack_(Gtk2::HBox->new(0,0),
0, gtksignal_connect(Gtk2::Button->new(N("Help")), clicked => sub { system("drakhelp --id drakbug &") }),
1, Gtk2::Label->new(""),
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index d912c84ab..a74abd6a5 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -428,12 +428,12 @@ sub build_notebook {
),
if_($interface eq 'isdn',
gtkpack(Gtk2::HBox->new(0,0),
- gtkpack__(new Gtk2::VBox(0,0),
+ gtkpack__(Gtk2::VBox->new(0,0),
Gtk2::Label->new(N("Dialing mode")),
my @dialing_mode_radio = gtkradio(("auto") x 2, "manual"),
),
Gtk2::VSeparator->new,
- gtkpack__(new Gtk2::VBox(0,0),
+ gtkpack__(Gtk2::VBox->new(0,0),
Gtk2::Label->new(N("Connection speed")),
my @speed_radio = gtkradio(("64 Kb/s") x 2, "128 Kb/s"),
),
@@ -503,7 +503,7 @@ sub build_notebook {
# ),
),
Gtk2::VSeparator->new,
- gtkpack__(new Gtk2::VBox(0,10),
+ gtkpack__(Gtk2::VBox->new(0,10),
gtkpack__(Gtk2::HBox->new(0,5),
Gtk2::Label->new(N("Modem timeout")),
$gui->{intf}{Timeout} = gtksignal_connect(Gtk2::SpinButton->new(Gtk2::Adjustment->new($intf->{Timeout}, 0, 120, 1, 5, 0), 0, 0),
@@ -539,7 +539,7 @@ sub build_notebook {
),
),
Gtk2::VSeparator->new,
- gtkpack__(new Gtk2::VBox(0,0),
+ gtkpack__(Gtk2::VBox->new(0,0),
Gtk2::Label->new(N("Protocol")),
my @protocol_radio = gtkradio('', N("European protocol (EDSS1)"),
N("Protocol for the rest of the world\nNo D-Channel (leased lines)")),
diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy
index 2734286e1..5f0fbd007 100755
--- a/perl-install/standalone/drakfloppy
+++ b/perl-install/standalone/drakfloppy
@@ -74,16 +74,16 @@ my $kernel_combo = Gtk2::ComboBox->new_with_strings([ sort grep { !/^\.\.?$/ } s
### main window
$window->{window}->add(
gtkpack_(Gtk2::VBox->new,
- if_($::isEmbedded, 0, new Gtk2::Label(N("Boot disk creation"))),
+ if_($::isEmbedded, 0, Gtk2::Label->new(N("Boot disk creation"))),
0, gtkadd(Gtk2::Frame->new(N("General")),
- gtkpack__(new Gtk2::VBox(0, 0),
- gtkpack__(new Gtk2::HBox(1, 0),
+ gtkpack__(Gtk2::VBox->new(0, 0),
+ gtkpack__(Gtk2::HBox->new(1, 0),
Gtk2::Label->new(N("Device")),
$device_combo,
gtksignal_connect(Gtk2::Button->new(N("Default")),
clicked => sub { $device_combo->entry->set_text("/dev/fd0") }),
),
- gtkpack__(new Gtk2::HBox(1, 0),
+ gtkpack__(Gtk2::HBox->new(1, 0),
Gtk2::Label->new(N("Kernel version")),
$kernel_combo,
gtksignal_connect(Gtk2::Button->new(N("Default")),
@@ -137,10 +137,10 @@ sub pref_dialog() {
gtkpack_($dialog->vbox,
0, gtkadd(Gtk2::Frame->new(N("Mkinitrd optional arguments")),
gtkpack__(Gtk2::VBox->new(0, 5),
- $buttons{force} = new Gtk2::CheckButton(N("force")),
- $buttons{raid} = new Gtk2::CheckButton(N("omit raid modules")),
- $buttons{needed} = new Gtk2::CheckButton(N("if needed")),
- $buttons{scsi} = new Gtk2::CheckButton(N("omit scsi modules")),
+ $buttons{force} = Gtk2::CheckButton->new(N("force")),
+ $buttons{raid} = Gtk2::CheckButton->new(N("omit raid modules")),
+ $buttons{needed} = Gtk2::CheckButton->new(N("if needed")),
+ $buttons{scsi} = Gtk2::CheckButton->new(N("omit scsi modules")),
),
),
1, gtkadd(Gtk2::Frame->new(N("Add a module")),
diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm
index 5e3d22df5..dc000abc8 100755
--- a/perl-install/standalone/drakperm
+++ b/perl-install/standalone/drakperm
@@ -100,7 +100,7 @@ $permList->signal_connect(button_press_event => sub {
});
-my $tips = new Gtk2::Tooltips;
+my $tips = Gtk2::Tooltips->new;
$W->add(gtkpack_(Gtk2::VBox->new(0,5),
0, Gtk2::WrappedLabel->new(N("Here you can see files to use in order to fix permissions, owners, and groups via msec.\nYou can also edit your own rules which will owerwrite the default rules."), 0.5),
@@ -234,12 +234,12 @@ sub load_perms() {
sub row_setting_dialog {
my ($iter) = @_;
- my $dlg = new Gtk2::Dialog();
+ my $dlg = Gtk2::Dialog->new;
$dlg->set_transient_for($w->{rwindow}) unless $::isEmbedded;
$dlg->set_modal(1);
# $dlg->set_resizable(0);
- my $browse = new Gtk2::Button(N("browse"));
- my $file = new Gtk2::Entry;
+ my $browse = Gtk2::Button->new(N("browse"));
+ my $file = Gtk2::Entry->new;
my ($other, $group, $user, $s) = reverse(split(//, $model->get($iter, 4))) if $iter;
my @bits = qw(sticky gid suid);
my @rights = qw(read write execute);
@@ -303,7 +303,7 @@ sub row_setting_dialog {
$browse->signal_connect(clicked => sub {
- my $file_dlg = new Gtk2::FileSelection(N("Path selection"));
+ my $file_dlg = Gtk2::FileSelection->new(N("Path selection"));
$file_dlg->set_modal(1);
$file_dlg->set_transient_for($dlg);
$file_dlg->show;
diff --git a/perl-install/standalone/draksec b/perl-install/standalone/draksec
index cc9474b85..89cac5a95 100755
--- a/perl-install/standalone/draksec
+++ b/perl-install/standalone/draksec
@@ -62,7 +62,7 @@ my %inv_fields = reverse %fields;
# factorize this with rpmdrake and harddrake2
sub wait_msg {
my $mainw = ugtk2->new(N("Please wait"), (modal => 1, if_(!$::isEmbedded, transient => $w->{rwindow})));
- $mainw->{window}->add(new Gtk2::WrappedLabel($_[0]));
+ $mainw->{window}->add(Gtk2::WrappedLabel->new($_[0]));
$mainw->{rwindow}->show_all;
gtkset_mousecursor_wait($mainw->{rwindow}->window);
gtkflush();
@@ -132,7 +132,7 @@ sub new_nonedit_combo {
sub set_help_tip {
my ($entry, $default, $opt) = @_;
my $help = $security::help::help{$opt};
- gtkset_tip(new Gtk2::Tooltips, $entry, formatAlaTeX($help) . "\n" . N("(default value: %s)", to_i18n($default)));
+ gtkset_tip(Gtk2::Tooltips->new, $entry, formatAlaTeX($help) . "\n" . N("(default value: %s)", to_i18n($default)));
}
my $msec = new security::msec;
@@ -152,7 +152,7 @@ unless ($::isEmbedded) {
$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)));
+$window->add(my $vbox = gtkshow(Gtk2::VBox->new(0, 0)));
# Create the notebook (for bookmarks at the top)
my $notebook = create_notebook();
@@ -162,7 +162,7 @@ my $common_opts = { col_spacings => 10, row_spacings => 5, mcc => 1 };
######################## BASIC OPTIONS PAGE ################################
my ($seclevel_entry, $secadmin_entry);
-$notebook->append_page(gtkshow(gtkpack_(new Gtk2::VBox(0, 0),
+$notebook->append_page(gtkshow(gtkpack_(Gtk2::VBox->new(0, 0),
1, basic_seclevel_explanations(),
0, create_packtable($common_opts,
[
@@ -182,7 +182,7 @@ $notebook->append_page(gtkshow(gtkpack_(new Gtk2::VBox(0, 0),
}) ],
[ Gtk2::WrappedLabel->new(N("Security Administrator:")),
$secadmin_entry = Gtk2::Entry->new_with_text($msec->get_check_value("MAIL_USER")) ]))),
- new Gtk2::Label(N("Basic options")));
+ Gtk2::Label->new(N("Basic options")));
if ($msec->get_check_value("MAIL_WARN") eq "yes") {
$secadmin_check->set_active(1);
@@ -213,7 +213,7 @@ foreach ([ 'network', N("Network Options") ], [ 'system', N("System Options") ])
$values{$i} = new_nonedit_combo(member($default, @yesno_choices) ? \@yesno_choices : if_(member($default, @alllocal_choices), \@alllocal_choices));
$entry = $values{$i}->entry;
} else {
- $values{$i} = new Gtk2::Entry();
+ $values{$i} = Gtk2::Entry->new;
$entry = $values{$i};
}
$entry->set_text(to_i18n($msec->get_function_value($opt)));
@@ -243,7 +243,7 @@ gtkappend_page($notebook, gtkshow(gtkpack_(Gtk2::VBox->new,
set_help_tip($entry, $msec->get_check_default($opt), $opt);
[ gtkshow(Gtk2::WrappedLabel->new($i)), resize($security_checks_value{$i}) ];
} sort map { $fields{$_} || $_ } $msec->list_checks)))),
- new Gtk2::Label(N("Periodic Checks")));
+ Gtk2::Label->new(N("Periodic Checks")));
####################### OK CANCEL BUTTONS ##################################
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake
index 1c7c75a7e..f1b66e939 100755
--- a/perl-install/standalone/logdrake
+++ b/perl-install/standalone/logdrake
@@ -55,12 +55,12 @@ unless ($::isEmbedded) {
}
$my_win->{window}->signal_connect(delete_event => \&quit);
-my $cal = gtkset_sensitive(new Gtk2::Calendar(), 0);
+my $cal = gtkset_sensitive(Gtk2::Calendar->new, 0);
my $mday = (localtime(time()))[3];
$cal->select_day($mday);
my @months = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec);
my $cal_mode = 0;
-my $cal_butt = gtksignal_connect(new Gtk2::CheckButton(N("Show only for the selected day")), clicked => sub { $cal_mode = !$cal_mode; gtkset_sensitive($cal,$cal_mode) });
+my $cal_butt = gtksignal_connect(Gtk2::CheckButton->new(N("Show only for the selected day")), clicked => sub { $cal_mode = !$cal_mode; gtkset_sensitive($cal,$cal_mode) });
### menus definition
# the menus are not shown
@@ -112,7 +112,7 @@ my %files = (
"explanations" => { file => "/var/log/explanations", desc => $explain_title }
);
-my $yy = gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("search")) , clicked => \&search),0);
+my $yy = gtkset_sensitive(gtksignal_connect(Gtk2::Button->new(N("search")) , clicked => \&search),0);
my $log_text = gtktext_insert(Gtk2::TextView->new, [ [ '' ] ]);
@@ -123,29 +123,29 @@ my $refcount_search;
my %toggle;
gtkadd($my_win->{window},
- gtkpack_(new Gtk2::VBox(0,0),
+ gtkpack_(Gtk2::VBox->new(0,0),
if_(!$isExplain && !$::isEmbedded, 0, N("A tool to monitor your logs")),
- if_(!$isFile, 0, gtkadd(new Gtk2::Frame(N("Settings")),
- gtkpack__(new Gtk2::VBox(0,2),
- gtkpack__(new Gtk2::VBox(0,2),
+ if_(!$isFile, 0, gtkadd(Gtk2::Frame->new(N("Settings")),
+ gtkpack__(Gtk2::VBox->new(0,2),
+ gtkpack__(Gtk2::VBox->new(0,2),
# N("Show lines"),
- gtkpack__(new Gtk2::HBox(0,0),
- " " . N("Matching") . " ", my $e_yes = new Gtk2::Entry(),
- " " . N("but not matching") . " ", my $e_no = new Gtk2::Entry()
+ gtkpack__(Gtk2::HBox->new(0,0),
+ " " . N("Matching") . " ", my $e_yes = Gtk2::Entry->new,
+ " " . N("but not matching") . " ", my $e_no = Gtk2::Entry->new
)
),
- gtkpack_(new Gtk2::HBox(0,0),
- 1, gtkadd(gtkset_border_width(new Gtk2::Frame(N("Choose file")),2),
+ gtkpack_(Gtk2::HBox->new(0,0),
+ 1, gtkadd(gtkset_border_width(Gtk2::Frame->new(N("Choose file")),2),
gtkpack(gtkset_border_width(Gtk2::VBox->new(0,0),0),
- map { $toggle{$_} = gtksignal_connect(new Gtk2::CheckButton($files{$_}{desc}),
+ map { $toggle{$_} = gtksignal_connect(Gtk2::CheckButton->new($files{$_}{desc}),
clicked => sub {
$refcount_search++;
gtkset_sensitive($yy, $refcount_search);
}) } sort keys %files,
)
),
- 0, gtkadd(gtkset_border_width(new Gtk2::Frame(N("Calendar")),2),
- gtkpack__(gtkset_border_width(new Gtk2::VBox(0,0),5),
+ 0, gtkadd(gtkset_border_width(Gtk2::Frame->new(N("Calendar")),2),
+ gtkpack__(gtkset_border_width(Gtk2::VBox->new(0,0),5),
$cal_butt, $cal
)
)
@@ -154,11 +154,11 @@ gtkadd($my_win->{window},
)
)
),
- !$isExplain ? (1, gtkadd(new Gtk2::Frame(N("Content of the file")),
+ !$isExplain ? (1, gtkadd(Gtk2::Frame->new(N("Content of the file")),
create_scrolled_window($log_text)
)) : (1, create_scrolled_window($log_text)),
if_(!$isExplain, 0, gtkadd(gtkset_border_width(gtkset_layout(Gtk2::HButtonBox->new, 'end'), 5),
- if_(!$isFile, gtksignal_connect(new Gtk2::Button(N("Mail alert")),
+ if_(!$isFile, gtksignal_connect(Gtk2::Button->new(N("Mail alert")),
clicked => sub {
eval { alert_config() };
my $err = $@;
@@ -215,10 +215,10 @@ sub parse_file {
$file =~ s/\.gz$//;
my ($pbar, $win_pb);
unless ($::isEmbedded && $isExplain) {
- gtkadd($win_pb = gtkset_modal(new Gtk2::Window('toplevel'), 1),
- gtkpack(new Gtk2::VBox(2,0),
- new Gtk2::Label(" " . N("please wait, parsing file: %s", $descr) . " "),
- $pbar = new Gtk2::ProgressBar()
+ gtkadd($win_pb = gtkset_modal(Gtk2::Window->new('toplevel'), 1),
+ gtkpack(Gtk2::VBox->new(2,0),
+ Gtk2::Label->new(" " . N("please wait, parsing file: %s", $descr) . " "),
+ $pbar = Gtk2::ProgressBar->new
)
);
$win_pb->set_transient_for($my_win->{rwindow}) unless $::isEmbedded;
@@ -311,7 +311,7 @@ sub logcolorize {
}
# Extract PID if present
if ($rec[1] =~ /\[(\d+)\]:/) {
- my ($pid) = $1;
+ my $pid = $1;
$rec[1] =~ s/\[$1\]://;
log_output($rec[1] . "[", undef, 'green');
log_output($pid, 'Bold', 'black');
diff --git a/perl-install/standalone/net_applet b/perl-install/standalone/net_applet
index 3ed171489..1f81589ac 100644
--- a/perl-install/standalone/net_applet
+++ b/perl-install/standalone/net_applet
@@ -132,7 +132,7 @@ sub setState {
my $arr = $appletstate{$state_type}{menu};
my $tmp = gtkcreate_pixbuf($appletstate{$state_type}{colour}[0]);
$img->set_from_pixbuf($tmp);
- gtkset_tip(new Gtk2::Tooltips, $eventbox, formatAlaTeX(common::sprintf_fixutf8(translate($appletstate{$state_type}{tt}[0]), $interface)));
+ gtkset_tip(Gtk2::Tooltips->new, $eventbox, formatAlaTeX(common::sprintf_fixutf8(translate($appletstate{$state_type}{tt}[0]), $interface)));
my $menu = Gtk2::Menu->new;
foreach (@$arr) {
$menu->append(gtksignal_connect(gtkshow(Gtk2::MenuItem->new_with_label($actions{$_}{name})), activate => $actions{$_}{launch}));
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor
index ba0a671a8..1b14b273c 100755
--- a/perl-install/standalone/net_monitor
+++ b/perl-install/standalone/net_monitor
@@ -112,7 +112,7 @@ gtkadd($window1->{window},
),
)
),
- 0, gtksignal_connect(gtkset_active(new Gtk2::CheckButton(N("Use same scale for received and transmitted")), $use_same_scale), clicked => sub { $use_same_scale = !$use_same_scale }),
+ 0, gtksignal_connect(gtkset_active(Gtk2::CheckButton->new(N("Use same scale for received and transmitted")), $use_same_scale), clicked => sub { $use_same_scale = !$use_same_scale }),
0, gtkpack(create_hbox('edge'),
gtksignal_connect(my $button_connect = gtkset_sensitive(Gtk2::Button->new(N("Wait please")), 0), clicked => \&connection),
gtksignal_connect(my $button_close = Gtk2::Button->new(N("Close")), clicked => \&main_quit),