summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-xperl-install/standalone/drakTermServ12
-rwxr-xr-xperl-install/standalone/drakautoinst2
-rwxr-xr-xperl-install/standalone/drakbackup191
-rwxr-xr-xperl-install/standalone/drakboot5
-rwxr-xr-xperl-install/standalone/drakbug2
-rwxr-xr-xperl-install/standalone/drakconnect28
-rwxr-xr-xperl-install/standalone/drakfloppy17
-rwxr-xr-xperl-install/standalone/drakfont8
-rwxr-xr-xperl-install/standalone/drakperm22
-rwxr-xr-xperl-install/standalone/harddrake219
-rwxr-xr-xperl-install/standalone/logdrake15
-rwxr-xr-xperl-install/standalone/mousedrake2
12 files changed, 157 insertions, 166 deletions
diff --git a/perl-install/standalone/drakTermServ b/perl-install/standalone/drakTermServ
index 25af2a1cf..751c7bf58 100755
--- a/perl-install/standalone/drakTermServ
+++ b/perl-install/standalone/drakTermServ
@@ -531,7 +531,7 @@ sub make_nbi() {
"via-rhine", "winbond-840", "xircom_cb", "xircom_tulip_cb", "yellowfin");
#- kernel/module info in tree view
- my $model = Gtk2::TreeStore->new(Gtk2::GType->STRING);
+ my $model = Gtk2::TreeStore->new("Glib::String");
my $tree_kernels = Gtk2::TreeView->new_with_model($model);
$tree_kernels->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$tree_kernels->set_headers_visible(0);
@@ -546,7 +546,6 @@ sub make_nbi() {
$model->append($k_detail, $t_kernel);
$model->set($k_detail, [ 0 => $_ ]);
}
- $k_detail->free;
}
$tree_kernels->get_selection->signal_connect(changed => sub {
@@ -566,7 +565,7 @@ sub make_nbi() {
});
# existing nbi images in list
- my $list_model = Gtk2::ListStore->new(Gtk2::GType->STRING);
+ my $list_model = Gtk2::ListStore->new("Glib::String");
my $list_nbis = Gtk2::TreeView->new_with_model($list_model);
$list_nbis->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$list_nbis->set_headers_visible(0);
@@ -671,7 +670,7 @@ sub maintain_users() {
#- use /homes to filter system daemons
my @homes = all("/home");
- my $list_model = Gtk2::ListStore->new(Gtk2::GType->STRING);
+ my $list_model = Gtk2::ListStore->new("Glib::String");
my $list_sys_users = Gtk2::TreeView->new_with_model($list_model);
$list_sys_users->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$list_sys_users->set_headers_visible(0);
@@ -686,7 +685,6 @@ sub maintain_users() {
$list_model->set($iter, [ 0 => $s_label ]);
}
}
- $iter->free;
$list_sys_users->get_selection->signal_connect(changed => sub {
my ($model, $iter) = $_[0]->get_selected;
@@ -694,7 +692,7 @@ sub maintain_users() {
$sys_user = $model->get($iter, 0);
});
- $list_model = Gtk2::ListStore->new(Gtk2::GType->STRING);
+ $list_model = Gtk2::ListStore->new("Glib::String");
my $list_ts_users = Gtk2::TreeView->new_with_model($list_model);
$list_ts_users->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$list_ts_users->set_headers_visible(0);
@@ -757,7 +755,7 @@ sub maintain_clients() {
my $button_delete;
#- client info in tree view
- my $model = Gtk2::TreeStore->new(Gtk2::GType->STRING);
+ my $model = Gtk2::TreeStore->new("Glib::String");
my $tree_clients = Gtk2::TreeView->new_with_model($model);
$tree_clients->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$tree_clients->set_headers_visible(0);
diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst
index b46f89d3f..f181d1e97 100755
--- a/perl-install/standalone/drakautoinst
+++ b/perl-install/standalone/drakautoinst
@@ -317,7 +317,7 @@ sub create_entry_element {
} else {
$e = new Gtk2::Entry;
$e->{value} = $value;
- my $tag = Gtk2->timeout_add(1000, sub { $e->set_text($text); 0 });
+ my $tag = Glib::Timeout->add(1000, sub { $e->set_text($text); 0 });
gtksignal_connect($e, changed => sub {
my $exe = $e->{value} . "='" . $e->get_text . "'";
print "EXEC : $exe\n ";
diff --git a/perl-install/standalone/drakbackup b/perl-install/standalone/drakbackup
index e0b1b01dd..8242a1c72 100755
--- a/perl-install/standalone/drakbackup
+++ b/perl-install/standalone/drakbackup
@@ -1036,7 +1036,7 @@ sub spawn_progress {
$interactive and progress($pbar3, $plabel3, 0, translate($descr));
$interactive and $pbar3->set_fraction(0);
- $interactive and $timer = Gtk2->timeout_add(2, \&progress_timeout);
+ $interactive and $timer = Glib::Timeout->add(2, \&progress_timeout);
$log_buff .= "\n" . $descr . ":\n";
$log_buff .= $command . "\n\n";
@@ -1051,7 +1051,7 @@ sub spawn_progress {
}
}
close TMP;
- $interactive and Gtk2->timeout_remove($timer);
+ $interactive and Glib::Source->remove($timer);
}
sub progress_timeout() {
@@ -1772,7 +1772,7 @@ sub advanced_what_other() {
$iter = Gtk2::TreeIter->new;
my $other_file;
- $list_model = Gtk2::ListStore->new(Gtk2::GType->STRING);
+ $list_model = Gtk2::ListStore->new("Glib::String");
my $list_others = Gtk2::TreeView->new_with_model($list_model);
$list_others->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$list_others->set_headers_visible(0);
@@ -1795,8 +1795,8 @@ sub advanced_what_other() {
1, create_scrolled_window($list_others),
),
0, gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
- gtksignal_connect(new Gtk2::Button(N("Add")), clicked => sub { filedialog() }),
- gtksignal_connect(new Gtk2::Button(N("Remove Selected")), clicked => sub {
+ gtksignal_connect(Gtk2::Button->new(N("Add")), clicked => sub { filedialog() }),
+ gtksignal_connect(Gtk2::Button->new(N("Remove Selected")), clicked => sub {
$list_model->remove($file_iter);
my $iindex = 0;
foreach (@list_other) {
@@ -1837,9 +1837,9 @@ sub advanced_what_entire_sys() {
1, new Gtk2::VBox(0, 5),
1, gtkpack_(new Gtk2::VBox(0, 15),
1, new Gtk2::VBox(0, 5),
- 1, gtksignal_connect(my $button_what_other = new Gtk2::Button(),
+ 1, gtksignal_connect(my $button_what_other = Gtk2::Button->new,
clicked => sub { destroy_widget(); message_underdevel() }),
- 1, gtksignal_connect(my $button_what_all = new Gtk2::Button(),
+ 1, gtksignal_connect(my $button_what_all = Gtk2::Button->new,
clicked => sub { destroy_widget(); message_underdevel() }),
1, new Gtk2::VBox(0, 5),
),
@@ -1868,13 +1868,13 @@ sub advanced_what() {
1, new Gtk2::VBox(0, 5),
1, gtkpack_(new Gtk2::VBox(0, 15),
1, new Gtk2::VBox(0, 5),
- 1, gtksignal_connect(my $button_what_sys = new Gtk2::Button(),
+ 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 = new Gtk2::Button(),
+ 1, gtksignal_connect(my $button_what_user = Gtk2::Button->new,
clicked => sub { destroy_widget(); advanced_what_user() }),
- 1, gtksignal_connect(my $button_what_other = new Gtk2::Button(),
+ 1, gtksignal_connect(my $button_what_other = Gtk2::Button->new,
clicked => sub { destroy_widget(); advanced_what_other() }),
-# 1, gtksignal_connect(my $button_what_all = new Gtk2::Button(),
+# 1, gtksignal_connect(my $button_what_all = Gtk2::Button->new,
# clicked => sub { destroy_widget(); advanced_what_entire_sys(); }),
1, new Gtk2::VBox(0, 5),
),
@@ -1922,7 +1922,7 @@ sub advanced_where_net_types {
0, gtkpack_(new Gtk2::HBox(0,5),
0, gtkset_sensitive(my $check_use_expect = new Gtk2::CheckButton(N("Use Expect for SSH")), ($where_net && $net_proto eq 'ssh')),
0, gtkset_sensitive(my $check_xfer_keys = new Gtk2::CheckButton(N("Create/Transfer\nbackup keys for SSH")), ($where_net && $net_proto eq 'ssh')),
- 0, gtkset_sensitive(my $button_xfer_keys = new Gtk2::Button(N(" Transfer \nNow")), $xfer_keys),
+ 0, gtkset_sensitive(my $button_xfer_keys = Gtk2::Button->new_from_stock(N(" Transfer \nNow")), $xfer_keys),
0, gtkset_sensitive(my $check_user_keys = new Gtk2::CheckButton(N("Other (not drakbackup)\nkeys in place already")), ($where_net && $net_proto eq 'ssh')),
),
0, new Gtk2::HSeparator,
@@ -2076,7 +2076,7 @@ sub advanced_where_cd {
0, new Gtk2::VBox(0, 5),
0, gtkpack_(new Gtk2::HBox(0,10),
0, gtkset_sensitive(new Gtk2::Label(N("Please check if you want to erase your RW media (1st Session)")), $cdrw && $where_cd),
- 0, gtkset_sensitive(my $button_erase_now = new Gtk2::Button(N(" Erase Now ")), $cdrw),
+ 0, gtkset_sensitive(my $button_erase_now = Gtk2::Button->new_from_stock(N(" Erase Now ")), $cdrw),
1, new Gtk2::VBox(0, 5),
0, gtkset_sensitive(my $check_cdrw_erase = new Gtk2::CheckButton(), $cdrw && $where_cd),
),
@@ -2275,7 +2275,7 @@ sub advanced_where_hd {
0, gtkset_sensitive(new Gtk2::Label(N("Please enter the directory to save to:")), $where_hd),
1, new Gtk2::VBox(0, 6),
0, gtkset_size_request(gtkset_sensitive($save_path_entry = new Gtk2::Entry(), $where_hd), 152, 20),
- 0, gtkset_sensitive($button = gtksignal_connect(new Gtk2::Button(), clicked => sub {
+ 0, gtkset_sensitive($button = gtksignal_connect(Gtk2::Button->new, clicked => sub {
filedialog_where_hd()
}), $where_hd),
),
@@ -2327,11 +2327,11 @@ sub advanced_where() {
1, new Gtk2::VBox(0, 5),
1, gtkpack_(new Gtk2::VBox(0, 15),
1, new Gtk2::VBox(0, 5),
- 1, gtksignal_connect(my $button_where_net = new Gtk2::Button(), clicked => sub {
+ 1, gtksignal_connect(my $button_where_net = Gtk2::Button->new, clicked => sub {
destroy_widget();
advanced_where_net_types();
}),
- 1, gtksignal_connect(my $button_where_cd = new Gtk2::Button(), clicked => sub {
+ 1, gtksignal_connect(my $button_where_cd = Gtk2::Button->new, clicked => sub {
destroy_widget();
if (require_rpm("mkisofs", "cdrecord")) {
advanced_where_cd();
@@ -2340,11 +2340,11 @@ sub advanced_where() {
install_rpm(\&advanced_where);
}
}),
- 1, gtksignal_connect(my $button_where_hd = new Gtk2::Button(), clicked => sub {
+ 1, gtksignal_connect(my $button_where_hd = Gtk2::Button->new, clicked => sub {
destroy_widget();
advanced_where_hd();
}),
- 1, gtksignal_connect(my $button_where_tape = new Gtk2::Button(), clicked => sub {
+ 1, gtksignal_connect(my $button_where_tape = Gtk2::Button->new, clicked => sub {
destroy_widget();
# message_underdevel();
advanced_where_tape() }),
@@ -2484,13 +2484,13 @@ sub advanced_box() {
1, new Gtk2::VBox(0, 5),
1, gtkpack_(new Gtk2::VBox(0, 15),
1, new Gtk2::VBox(0, 5),
- 1, gtksignal_connect(my $button_what = new Gtk2::Button(), clicked => sub {
+ 1, gtksignal_connect(my $button_what = Gtk2::Button->new, clicked => sub {
destroy_widget(); advanced_what() }),
- 1, gtksignal_connect(my $button_where = new Gtk2::Button(), clicked => sub {
+ 1, gtksignal_connect(my $button_where = Gtk2::Button->new, clicked => sub {
destroy_widget(); advanced_where() }),
- 1, gtksignal_connect(my $button_when = new Gtk2::Button(), clicked => sub {
+ 1, gtksignal_connect(my $button_when = Gtk2::Button->new, clicked => sub {
destroy_widget(); advanced_when() }),
- 1, gtksignal_connect(my $button_options = new Gtk2::Button(), clicked => sub {
+ 1, gtksignal_connect(my $button_options = Gtk2::Button->new, clicked => sub {
destroy_widget(); advanced_options() }),
1, new Gtk2::VBox(0, 5),
),
@@ -2557,7 +2557,7 @@ sub wizard_step2() {
0, gtkpack_(new Gtk2::HBox(0, 15),
0, my $check_wizard_hd = new Gtk2::CheckButton(N("on Hard Drive")),
1, new Gtk2::VBox(0, 5),
- 0, gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("Configure")), clicked => sub {
+ 0, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new_from_stock(N("Configure")), clicked => sub {
destroy_widget();
to_ok();
advanced_where_hd(\&wizard_step2);
@@ -2567,7 +2567,7 @@ sub wizard_step2() {
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, gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("Configure")), clicked => sub {
+ 0, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new_from_stock(N("Configure")), clicked => sub {
destroy_widget();
to_ok();
advanced_where_net_types(\&wizard_step2);
@@ -2577,7 +2577,7 @@ sub wizard_step2() {
0, gtkpack_(new Gtk2::HBox(0, 15),
0, my $check_wizard_cd = new Gtk2::CheckButton(N("on CDROM")),
1, new Gtk2::VBox(0, 5),
- 0, gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("Configure")), clicked => sub {
+ 0, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new_from_stock(N("Configure")), clicked => sub {
destroy_widget();
advanced_where_cd(\&wizard_step2);
}), $where_cd),
@@ -2585,7 +2585,7 @@ sub wizard_step2() {
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, gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("Configure")), clicked => sub {
+ 0, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new_from_stock(N("Configure")), clicked => sub {
destroy_widget();
advanced_where_tape(\&wizard_step2);
}), $where_tape),
@@ -2631,7 +2631,7 @@ sub wizard() {
0, my $check_wizard_user = new Gtk2::CheckButton(N("Backup Users")),
0, gtkpack_(new Gtk2::HBox(0, 15),
1, new Gtk2::VBox(0, 5),
- 0, gtksignal_connect(new Gtk2::Button(N("Select user manually")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock(N("Select user manually")), clicked => sub {
destroy_widget();
advanced_what_user(\&wizard);
}),
@@ -2907,7 +2907,7 @@ sub show_backup_details {
0, new Gtk2::VScrollbar($text->vadj),
),
0, gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
- gtksignal_connect(new Gtk2::Button(N("Done")), clicked => sub {
+ gtksignal_connect(Gtk2::Button->new_from_stock(N("Done")), clicked => sub {
destroy_widget();
$function->() }),
),
@@ -3132,7 +3132,7 @@ sub restore_step_user() {
my @user_list_tmp;
my $restore_row = new Gtk2::HBox(0,5);
my $b = new Gtk2::CheckButton($name_complet);
- my $details = new Gtk2::Button(" Details ");
+ my $details = Gtk2::Button->new_from_stock(" Details ");
$restore_row->pack_start($b, 1, 1, 0);
$restore_row->pack_end(new Gtk2::VBox(1,5), 0, 0, 0);
@@ -3206,7 +3206,7 @@ sub restore_step_sys() {
0, gtkpack_(new Gtk2::HBox(0,10),
1, N("please choose the date to restore"),
0, $combo_restore_step_sys,
- 0, my $details = new Gtk2::Button(" Details "),
+ 0, my $details = Gtk2::Button->new_from_stock(" Details "),
0, new Gtk2::HBox(0,10),
),
1, new Gtk2::VBox(0,10),
@@ -3247,7 +3247,7 @@ sub restore_other_media_hd {
0, gtkset_sensitive(new Gtk2::Label(N("Please enter the directory to save:")), $where_hd),
1, new Gtk2::VBox(0, 6),
0, gtkset_size_request(gtkset_sensitive($save_path_entry = new Gtk2::Entry(), $where_hd), 152, 20),
- 0, gtkset_sensitive($button = gtksignal_connect(new Gtk2::Button(), clicked => sub {
+ 0, gtkset_sensitive($button = gtksignal_connect(Gtk2::Button->new, clicked => sub {
filedialog_where_hd() }), $where_hd),
),
0, new Gtk2::VBox(0, 6),
@@ -3289,7 +3289,7 @@ sub restore_other_media() {
0, gtkset_sensitive(new Gtk2::Label(N("Please 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),
- 0, gtkset_sensitive($button = gtksignal_connect(new Gtk2::Button(), clicked => sub {
+ 0, gtkset_sensitive($button = gtksignal_connect(Gtk2::Button->new, clicked => sub {
filedialog_restore_find_path();
}), $other_media_hd),
),
@@ -3299,7 +3299,7 @@ sub restore_other_media() {
# 0, new Gtk2::VBox(0, 6),
# 1, gtkpack(new Gtk2::HBox(0,10),
# new Gtk2::VBox(0, 6),
-# gtkset_sensitive(gtksignal_connect(new Gtk2::Button("Network"), clicked => sub {
+# gtkset_sensitive(gtksignal_connect(Gtk2::Button->new_from_stock("Network"), clicked => sub {
# destroy_widget();
# restore_find_net(\&restore_other_media);}), !$other_media_hd),
# new Gtk2::VBox(0, 6),
@@ -3357,7 +3357,7 @@ sub restore_step2() {
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),
- 0, gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("Other Media")), clicked => sub {
+ 0, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new_from_stock(N("Other Media")), clicked => sub {
destroy_widget();
restore_other_media();
}), $restore_other_src),
@@ -3421,7 +3421,7 @@ sub catalog_restore() {
my $restore_path_entry;
#- catalog info in tree view
- my $model = Gtk2::TreeStore->new(Gtk2::GType->STRING);
+ my $model = Gtk2::TreeStore->new("Glib::String");
my $tree_catalog = Gtk2::TreeView->new_with_model($model);
$tree_catalog->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$tree_catalog->set_headers_visible(0);
@@ -3478,7 +3478,6 @@ sub catalog_restore() {
}
$indexer++;
}
- $c_detail->free;
}
gtkpack($advanced_box,
@@ -3490,7 +3489,7 @@ sub catalog_restore() {
1, create_scrolled_window($list_bu_files),
),
0, gtkpack_(new Gtk2::HBox(1, 10),
- 1, gtksignal_connect(new Gtk2::Button(N("Restore Selected\nCatalog Entry")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Restore Selected\nCatalog Entry")), clicked => sub {
if ($cat_entry) {
my $media_check = restore_catalog_entry($cat_entry, ());
if ($media_check) {
@@ -3500,7 +3499,7 @@ sub catalog_restore() {
}
}
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Restore Selected\nFiles")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Restore Selected\nFiles")), clicked => sub {
my $files = @restore_files;
#- grab the array before the widget clears it
my @passed_files = @restore_files;
@@ -3517,7 +3516,7 @@ sub catalog_restore() {
0, new Gtk2::Label("Restore To Path"),
0, $restore_path_entry = new Gtk2::Entry(),
),
- 1, gtksignal_connect(new Gtk2::Button(N("Change\nRestore Path")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Change\nRestore Path")), clicked => sub {
filedialog_generic("Path To Restore To", \$restore_path_entry, \$restore_path);
}),
),
@@ -3903,7 +3902,7 @@ sub restore_box() {
1, gtkpack_(new Gtk2::VBox(0,10),
1, new Gtk2::VBox(0,10),
1, new Gtk2::VBox(0,10),
- 1, gtksignal_connect(new Gtk2::Button(N("Restore all backups")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Restore all backups")), clicked => sub {
$retore_box->destroy;
button_box_restore();
@user_list_to_restore2 = sort @user_backuped;
@@ -3912,7 +3911,7 @@ sub restore_box() {
$restore_user = 1;
restore_do()
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Custom Restore")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Custom Restore")), clicked => sub {
$retore_box->destroy;
button_box_restore();
restore_step2();
@@ -3955,15 +3954,15 @@ sub restore_find_media_box() {
1, gtkpack(new Gtk2::HBox(0, 15),
new Gtk2::VBox(0, 5),
gtkpack(new Gtk2::VBox(0, 10),
- gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("CD in place - continue.")), clicked => sub {
+ gtkset_sensitive(gtksignal_connect(Gtk2::Button->new_from_stock(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),
- gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("Browse to new restore repository.")), clicked => sub {
+ gtkset_sensitive(gtksignal_connect(Gtk2::Button->new_from_stock(N("Browse to new restore repository.")), clicked => sub {
filedialog_generic("Directory To Restore From", \$new_path_entry, \$path_to_find_restore);
}), $mount_media),
- gtksignal_connect(new Gtk2::Button(N("Restore From Catalog")), clicked => sub {
+ gtksignal_connect(Gtk2::Button->new_from_stock(N("Restore From Catalog")), clicked => sub {
$box2->destroy;
catalog_restore();
}),
@@ -4016,18 +4015,18 @@ sub button_box_adv() {
$button_box_tmp->destroy;
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
- 0, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub {
interactive_mode_box();
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
adv_help(\&$current_widget, $custom_help);
}),
1, new Gtk2::HBox(0, 1),
- 0, gtksignal_connect(new Gtk2::Button(N("Previous")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-back'), clicked => sub {
destroy_widget();
$previous_widget->();
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Save")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-save'), clicked => sub {
destroy_widget();
unless (check_pkg_needs()) {
save_conf_file();
@@ -4043,19 +4042,19 @@ sub button_box_restore_main() {
gtkpack($button_box,
$button_box_tmp = gtkpack_(gtkpack_(new Gtk2::HButtonBox,
- 0, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub {
destroy_widget();
interactive_mode_box();
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
adv_help(\&$current_widget, $custom_help);
}),
1, new Gtk2::HBox(0, 1),
- 0, gtksignal_connect(new Gtk2::Button(N("Previous")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-back'), clicked => sub {
destroy_widget();
interactive_mode_box()
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Ok")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-ok'), clicked => sub {
destroy_widget();
interactive_mode_box() }),
),
@@ -4069,7 +4068,7 @@ sub button_box_log_main() {
gtkpack($button_box,
$button_box_tmp = gtkpack_(gtkpack_(new Gtk2::HButtonBox,
1, new Gtk2::HBox(0, 1),
- 0, gtksignal_connect(new Gtk2::Button(N("Ok")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-ok'), clicked => sub {
destroy_widget();
interactive_mode_box() }),
),
@@ -4083,19 +4082,19 @@ sub button_box_backup_end() {
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
- 0, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub {
destroy_widget();
interactive_mode_box()
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
adv_help(\&$current_widget, $custom_help)
}),
1, new Gtk2::HBox(0, 1),
- 0, gtksignal_connect(new Gtk2::Button(N("Previous")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-back'), clicked => sub {
destroy_widget();
$previous_widget->()
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Build Backup")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock(N("Build Backup")), clicked => sub {
destroy_widget();
build_backup_status();
build_backup_files();
@@ -4109,19 +4108,19 @@ sub button_box_wizard_end() {
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
- 0, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub {
destroy_widget();
interactive_mode_box();
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
adv_help(\&$current_widget, $custom_help);
}),
1, new Gtk2::HBox(0, 1),
- 0, gtksignal_connect(new Gtk2::Button(N("Previous")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-back'), clicked => sub {
destroy_widget();
$previous_widget->();
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Save")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-save'), clicked => sub {
destroy_widget();
save_conf_file();
interactive_mode_box();
@@ -4135,19 +4134,19 @@ sub button_box_restore_end() {
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
- 0, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub {
destroy_widget();
interactive_mode_box();
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
adv_help(\&$current_widget, $custom_help);
}),
1, new Gtk2::HBox(0, 1),
- 0, gtksignal_connect(new Gtk2::Button(N("Previous")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-back'), clicked => sub {
destroy_widget();
$previous_widget->();
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Restore")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new(N("Restore")), clicked => sub {
destroy_widget();
restore_backend();
}),
@@ -4162,7 +4161,7 @@ sub button_box_build_backup_end() {
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
1, new Gtk2::HBox(0, 5),
1, new Gtk2::HBox(0, 5),
- 0, gtksignal_connect(new Gtk2::Button(N("Ok")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-ok'), clicked => sub {
# destroy_widget();
interactive_mode_box();
}),
@@ -4177,10 +4176,10 @@ sub button_box_restore_pbs_end() {
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
1, new Gtk2::HBox(0, 5),
1, new Gtk2::HBox(0, 5),
- 1, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
adv_help(\&$current_widget, $custom_help);
}),
- 0, gtksignal_connect(new Gtk2::Button(N("Ok")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-ok'), clicked => sub {
destroy_widget();
interactive_mode_box();
}),
@@ -4193,19 +4192,19 @@ sub button_box_build_backup() {
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
- 1, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub {
destroy_widget();
interactive_mode_box();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
adv_help(\&$current_widget, $custom_help);
}),
1, new Gtk2::HBox(0, 0),
- 0, gtksignal_connect(new Gtk2::Button(N("Previous")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-back'), clicked => sub {
destroy_widget();
$previous_widget->();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Next")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-forward'), clicked => sub {
destroy_widget();
$next_widget->();
}),
@@ -4219,19 +4218,19 @@ sub button_box_restore() {
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
- 1, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub {
destroy_widget();
interactive_mode_box();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
adv_help(\&$current_widget, $custom_help);
}),
1, new Gtk2::HBox(0, 0),
- 0, gtksignal_connect(new Gtk2::Button(N("Previous")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-back'), clicked => sub {
destroy_widget();
$previous_widget->();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Next")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-forward'), clicked => sub {
destroy_widget();
$next_widget->();
}),
@@ -4248,20 +4247,20 @@ sub button_box_find_media {
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
- 1, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub {
$central_widget = \$box2;
interactive_mode_box();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
$central_widget = \$box2;
adv_help(\&restore_find_media_box, $custom_help);
}),
1, new Gtk2::HBox(0, 0),
- 0, gtksignal_connect(new Gtk2::Button(N("Previous")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-back'), clicked => sub {
$central_widget = \$box2;
interactive_mode_box();
}),
- 1, gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("Next")), clicked => sub {
+ 1, gtkset_sensitive(gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-forward'), clicked => sub {
interactive_mode_box("restore");
}), $mount_media),
),
@@ -4273,19 +4272,19 @@ sub button_box_wizard() {
gtkpack($button_box,
$button_box_tmp = gtkpack_(new Gtk2::HButtonBox,
- 1, gtksignal_connect(new Gtk2::Button(N("Cancel")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-cancel'), clicked => sub {
destroy_widget();
interactive_mode_box()
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
adv_help(\&$current_widget, $custom_help)
}),
1, new Gtk2::HBox(0, 0),
- 0, gtksignal_connect(new Gtk2::Button($next_widget ? N("Previous") : N("OK")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock($next_widget ? 'gtk-go-back' : 'gtk-ok'), clicked => sub {
destroy_widget();
$previous_widget ? $previous_widget->() : $next_widget->();
}),
- if_($next_widget, 1, gtksignal_connect(new Gtk2::Button(N("Next")), clicked => sub {
+ if_($next_widget, 1, gtksignal_connect(Gtk2::Button->new_from_stock('gtk-go-forward'), clicked => sub {
destroy_widget();
$next_widget ? $next_widget->() : $previous_widget->();
})),
@@ -4298,8 +4297,8 @@ sub button_box_main() {
gtkpack($button_box,
$button_box_tmp = gtkpack(gtkset_layout(new Gtk2::HButtonBox, 'start'),
- gtksignal_connect(new Gtk2::Button(N("Close")), clicked => sub { ugtk2->exit(0) }),
- gtksignal_connect(new Gtk2::Button(N("Help")), clicked => sub {
+ gtksignal_connect(Gtk2::Button->new_from_stock('gtk-close'), clicked => sub { ugtk2->exit(0) }),
+ gtksignal_connect(Gtk2::Button->new_from_stock('gtk-help'), clicked => sub {
adv_help(\&interactive_mode_box, $custom_help)
}),
),
@@ -4352,7 +4351,7 @@ sub install_rpm {
$box_what_user = gtkpack_(new Gtk2::VBox(0, 15),
0, N("The following packages need to be installed:\n") . join(' ', @list_of_rpm_to_install),
0, new Gtk2::HSeparator,
- 0, gtksignal_connect(new Gtk2::Button(N("Install")), clicked => sub {
+ 0, gtksignal_connect(Gtk2::Button->new_from_stock(N("Install")), clicked => sub {
system("/usr/sbin/urpmi --X @list_of_rpm_to_install");
destroy_widget();
$previous_widget->();
@@ -4635,12 +4634,12 @@ sub build_backup_box() {
1, new Gtk2::VBox(0, 5),
1, gtkpack_(new Gtk2::VBox(0, 15),
1, new Gtk2::VBox(0, 5),
- 1, gtksignal_connect(my $button_from_conf_file = new Gtk2::Button(), clicked => sub {
+ 1, gtksignal_connect(my $button_from_conf_file = Gtk2::Button->new, clicked => sub {
destroy_widget();
build_backup_box_see_conf();
}),
0, new Gtk2::VBox(0, 5),
- 1, gtksignal_connect(my $button_see_conf = new Gtk2::Button(), clicked => sub {
+ 1, gtksignal_connect(my $button_see_conf = Gtk2::Button->new, clicked => sub {
destroy_widget();
build_backup_box_see_conf();
}),
@@ -4683,33 +4682,33 @@ sub interactive_mode_box {
1, new Gtk2::VBox(0, 5),
1, gtkpack_(new Gtk2::VBox(0, 5),
1, new Gtk2::VBox(0, 5),
- 1, gtksignal_connect(new Gtk2::Button(N("Wizard Configuration")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Wizard Configuration")), clicked => sub {
destroy_widget();
read_conf_file();
wizard();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Advanced Configuration")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Advanced Configuration")), clicked => sub {
button_box_adv();
destroy_widget();
advanced_box();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("View Configuration")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("View Configuration")), clicked => sub {
destroy_widget();
build_backup_box_see_conf("interactive");
}),
- 1, gtksignal_connect(new Gtk2::Button(N("View Last Log")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("View Last Log")), clicked => sub {
$results = cat_($log_file);
button_box_log_main();
show_status();
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Backup Now")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Backup Now")), clicked => sub {
if ($cfg_file_exist) {
build_backup_box();
} else {
message_noconf_box();
}
}),
- 1, gtksignal_connect(new Gtk2::Button(N("Restore")), clicked => sub {
+ 1, gtksignal_connect(Gtk2::Button->new_from_stock(N("Restore")), clicked => sub {
destroy_widget();
restore_box();
}),
@@ -4965,7 +4964,7 @@ backup data files by hand.
1, create_scrolled_window($text),
0, gtkadd(gtkset_layout(new Gtk2::HButtonBox, 'spread'),
- gtksignal_connect(new Gtk2::Button(N("OK")), clicked => sub {
+ gtksignal_connect(Gtk2::Button->new_from_stock(N("OK")), clicked => sub {
destroy_widget();
$function->();
}),
diff --git a/perl-install/standalone/drakboot b/perl-install/standalone/drakboot
index 52942002f..db223eb1b 100755
--- a/perl-install/standalone/drakboot
+++ b/perl-install/standalone/drakboot
@@ -61,9 +61,8 @@ unless ($::isEmbedded) {
### menus definition
# the menus are not shown but they provides shiny shortcut like C-q
- my @menu_items = ({ path => N("/_File"), type => '<Branch>' },
- {
- path => N("/File/_Quit"), accelerator => N("<control>Q"), callback => sub { ugtk2->exit(0) } },
+ my @menu_items = ([ N("/_File"), undef, undef, undef, '<Branch>' ],
+ [ N("/File/_Quit"), N("<control>Q"), sub { ugtk2->exit(0) }, undef, '<Item>' ],
);
create_factory_menu($w->{rwindow}, @menu_items);
######### menus end
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug
index d8801f32b..e6e5219ce 100755
--- a/perl-install/standalone/drakbug
+++ b/perl-install/standalone/drakbug
@@ -66,7 +66,7 @@ my $kernel_release = chomp_(`uname -r`);
my $table = create_packtable({ col_spacings => 5, row_spacings => 10 },
[ new Gtk2::Label(N("Application:")), my $comb_app = gtkset_size_request(Gtk2::Combo->new, 270, -1) ],
- [ new Gtk2::Label(N("Package: ")), my $package = new Gtk2::Entry("...") ],
+ [ new Gtk2::Label(N("Package: ")), my $package = new Gtk2::Entry("...") ], # complain on gtk-perl@ml
[ Gtk2::Label->new(N("Kernel:")), gtkset_editable(Gtk2::Entry->new($kernel_release), 0) ],
[ Gtk2::Label->new(N("Release: ")), gtkset_editable(Gtk2::Entry->new(mandrake_release()), 0) ]
);
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 79c8f3516..dc85bf894 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -81,6 +81,7 @@ $window1->{rwindow}->set_border_width(10);
my $combo1 = new Gtk2::Combo;
$combo1->set_popdown_strings(network::netconnect::get_profiles());
my $old_profile = $netcnx->{PROFILE};
+
$combo1->entry->set_text($netcnx->{PROFILE} || "default");
$combo1->entry->set_editable(0);
my $button_del = new Gtk2::Button(N("Del profile..."));
@@ -164,7 +165,7 @@ $int_connect->signal_connect(clicked => sub {
my $button_internet = gtksignal_connect(Gtk2::Button->new(N("Configure Internet Access...")),
clicked => sub { configure_net('', $netcnx, $netc, $intf) });
-my $tree_model = Gtk2::TreeStore->new(Gtk2::GType->OBJECT, map { Gtk2::GType->STRING } 2..6);
+my $tree_model = Gtk2::TreeStore->new("Gtk2::Gdk::Pixbuf", map { "Glib::String" } 2..6);
my $list = Gtk2::TreeView->new_with_model($tree_model);
$list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererPixbuf->new, 'pixbuf' => 0));
each_index {
@@ -269,19 +270,22 @@ $button_ok->signal_connect(clicked => sub {
quit_global();
});
$bbox0->add($button_ok);
-$combo1->entry->signal_connect('changed', sub {
-# connected() and disconnect_backend();
- network::netconnect::set_profile($netcnx, $combo1->entry->get_text);
- network::netconnect::load_conf($netcnx, $netc, $intf);
- $netcnx->{$_} = $netc->{$_} foreach qw(NET_DEVICE NET_INTERFACE);
- update();
- $button_apply->set_sensitive(1);
- });
+
+$combo1->signal_connect(realize => sub {
+ $combo1->entry->signal_connect(changed => sub {
+ #connected() and disconnect_backend();
+ network::netconnect::set_profile($netcnx, $combo1->entry->get_text);
+ network::netconnect::load_conf($netcnx, $netc, $intf);
+ $netcnx->{$_} = $netc->{$_} foreach qw(NET_DEVICE NET_INTERFACE);
+ update();
+ $button_apply->set_sensitive(1);
+ });
+});
$window1->{rwindow}->show_all;
$_->hide foreach $button_internet, $button_lan;
gtkflush();
-my $tag = Gtk2->timeout_add(4000, \&update2);
+my $tag = Glib::Timeout->add(4000, \&update2);
$window1->main;
ugtk2->exit(0);
@@ -302,7 +306,7 @@ sub build_list() {
$ip = $intf->{"eth$i"}{IPADDR};
$state = "n/a";
}
- $tree_model->append_set(undef, [ map_index { $::i => $_ } (gtkcreate_pixbuf("eth_card_mini2.png"), "eth$i", $ip , $intf->{"eth$i"}{BOOTPROTO}, $all_cards[$i][1], $state) ])->free;
+ $tree_model->append_set(undef, [ map_index { $::i => $_ } (gtkcreate_pixbuf("eth_card_mini2.png"), "eth$i", $ip , $intf->{"eth$i"}{BOOTPROTO}, $all_cards[$i][1], $state) ]);
}
}
@@ -329,7 +333,7 @@ sub ethisup { `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig` =~ /eth$
my $to_update;
sub update() {
my $h = chomp_(`hostname`);
- $label_host->set($h);
+ $label_host->set_label($h);
$type_label->set($netcnx->{type});
$int_label->set($netcnx->{type} eq 'lan' ? N("Gateway:") : N("Interface:"));
$interface_name->set($netcnx->{type} eq 'lan' ? $netc->{GATEWAY} : $netcnx->{NET_INTERFACE});
diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy
index 44f00fdc6..9d139555c 100755
--- a/perl-install/standalone/drakfloppy
+++ b/perl-install/standalone/drakfloppy
@@ -40,7 +40,7 @@ require_root_capability();
my $expert_mode = $::expert;
-my $list_model = Gtk2::ListStore->new((Gtk2::GType->STRING) x 2);
+my $list_model = Gtk2::ListStore->new(("Glib::String") x 2);
my $list = Gtk2::TreeView->new_with_model($list_model);
each_index {
$list->append_column(my $col = Gtk2::TreeViewColumn->new_with_attributes($_, Gtk2::CellRendererText->new, 'text' => $::i));
@@ -87,7 +87,7 @@ $kernel_combo->entry->signal_connect(changed => sub {
# Create root tree
-my $tree_model = Gtk2::TreeStore->new((Gtk2::GType->STRING) x 2);
+my $tree_model = Gtk2::TreeStore->new(("Glib::String") x 2);
my $tree = Gtk2::TreeView->new_with_model($tree_model);
#$tree->get_selection->set_mode('browse');
$tree->set_headers_visible(0);
@@ -229,7 +229,6 @@ sub selected_tree {
my ($model, $iter) = $select->get_selected;
return unless $model; # no real selection
my $file = $model->get($iter, 1);
- $iter->free;
return if -d $file;
@@ -238,21 +237,26 @@ sub selected_tree {
return if member($file, @modules);
push @modules, $file;
$file =~ s|/lib/modules/.*?/||g;
- $list_model->append_set([ 0 => $file, 1 => $size ])->free;
+ $list_model->append_set([ 0 => $file, 1 => $size ]);
}
# Callback for expanding a tree - find subdirectories, files and add them to tree
sub expand_tree {
my ($tree, $parent_iter, $path) = @_;
-
+ print "K 0\n";
my $dir = $tree_model->get($parent_iter, 1);
+ print "K 1\n";
my $child = $tree_model->iter_children($parent_iter);
#- hackish: if first child has '' as name, then we need to expand on the fly
+ print "K 2 $child\n";
if ($child && $tree_model->get($child, 0) eq '') {
+ print "K 3\n";
$tree_model->remove($child);
+ print "K 4\n";
}
+ print "K 5\n";
unless ($child && $tree_model->iter_has_child($parent_iter)) {
foreach my $dir_entry (all($dir)) {
my $entry_path = $dir . "/" . $dir_entry;
@@ -264,11 +268,12 @@ sub expand_tree {
#- if leaf is void, we may create the parent and one child (to have the [+] in front of the parent in the ctree)
#- though we use '' as the label of the child; then rpmdrake will connect on tree_expand, and whenever
#- the first child has '' as the label, it will remove the child and add all the "right" children
- $tree_model->append_set($iter, [ 0 => '' ])->free if has_sub_trees($entry_path);
+ $tree_model->append_set($iter, [ 0 => '' ]) if has_sub_trees($entry_path);
}
}
}
$tree->expand_row($path, 0);
+ print "K 9\n\n";
}
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index d954eed58..d2ccbc9f2 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -726,7 +726,7 @@ sub list_remove() { #- TODO : multi-selection
sub advanced_install() {
my $adv_box;
- $model = Gtk2::TreeStore->new(Gtk2::GType->STRING);
+ $model = Gtk2::TreeStore->new("Glib::String");
$list = Gtk2::TreeView->new_with_model($model);
$list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$list->set_headers_visible(0);
@@ -765,7 +765,7 @@ sub list_to_remove() {
sub show_list_to_remove() {
my $show_box;
- my $model = Gtk2::TreeStore->new(Gtk2::GType->STRING);
+ my $model = Gtk2::TreeStore->new("Glib::String");
my $list = Gtk2::TreeView->new_with_model($model);
$list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$list->set_headers_visible(0);
@@ -802,7 +802,7 @@ sub uninstall() { #- TODO : add item to right list with gtksignal_connect
chk_empty_xfs_path();
#- left part
- $left_model = Gtk2::TreeStore->new(Gtk2::GType->STRING);
+ $left_model = Gtk2::TreeStore->new("Glib::String");
$left_list = Gtk2::TreeView->new_with_model($left_model);
$left_list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$left_list->set_headers_visible(0);
@@ -812,7 +812,7 @@ sub uninstall() { #- TODO : add item to right list with gtksignal_connect
$left_model->append_set(undef, [ 0 => $_ ]) foreach @installed_fonts_path;
#- right part
- $right_model = Gtk2::TreeStore->new(Gtk2::GType->STRING);;
+ $right_model = Gtk2::TreeStore->new("Glib::String");;
$right_list = Gtk2::TreeView->new_with_model($right_model);
$right_list->append_column(Gtk2::TreeViewColumn->new_with_attributes(undef, Gtk2::CellRendererText->new, 'text' => 0));
$right_list->set_headers_visible(0);
diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm
index 2cdb6ca4d..aa9f5461f 100755
--- a/perl-install/standalone/drakperm
+++ b/perl-install/standalone/drakperm
@@ -32,7 +32,7 @@ my $w = ugtk2->new('drakperm');
$w->{rwindow}->set_size_request(550, 400) unless $::isEmbedded;
my $W = $w->{window};
$W->signal_connect(delete_event => sub { ugtk2->exit });
-my $treeModel = Gtk2::TreeStore->new((Gtk2::GType->STRING) x 4);
+my $treeModel = Gtk2::TreeStore->new(("Glib::String") x 4);
my $permList = Gtk2::TreeView->new_with_model($treeModel);
my @column_sizes = (150, 100, 100, 15, -1);
@@ -65,7 +65,6 @@ my @buttons;
sub del_callback() {
my ($tree, $iter) = $permList->get_selection->get_selected;
$tree->remove($iter);
- $iter->free;
sensitive_buttons(0);
$modified++;
}
@@ -74,33 +73,26 @@ sub down_callback() {
my ($model, $iter) = $permList->get_selection->get_selected;
return unless $iter;
my $new_iter = $model->iter_next($iter);
- goto CLEAN1 unless $new_iter;
+ return if !$new_iter;
$model->move_after($iter, $new_iter);
$model->move_after($iter, $new_iter);
$permList->get_selection->select_iter($iter);
$permList->queue_draw;
- $new_iter->free;
- CLEAN1: $iter->free;
}
sub up_callback() {
my ($model, $iter) = $permList->get_selection->get_selected;
- return unless $iter;
+ return if !$iter;
my $path = $model->get_path($iter);
- goto CLEAN1 unless $path;
+ return if !$path;
$path->prev;
my $prev_iter = $model->get_iter($path);
- $path->free;
- goto CLEAN2 unless $prev_iter;
+ return if !$prev_iter;
$model->move_before($iter, $prev_iter);
$model->move_before($iter, $prev_iter);
$permList->get_selection->select_iter($iter);
$permList->queue_draw;
-
- $prev_iter->free;
- CLEAN2: $path->free;
- CLEAN1: $iter->free;
}
my $combo_sig = $combo_perm->entry->signal_connect(changed => sub { display_perm($combo_perm->entry->get_text , @_) });
@@ -110,7 +102,6 @@ $permList->signal_connect(button_press_event => sub {
my (undef, $iter) = $permList->get_selection->get_selected;
return unless $iter;
row_setting_dialog($iter) if $event->type eq '2button-press';
- $iter->free;
});
@@ -155,7 +146,6 @@ $permList->get_selection->signal_connect('changed' => sub {
my $editable = $editable;
$editable = 0 unless $iter;
sensitive_buttons($editable);
- $iter->free if $iter;
});
$w->main;
@@ -210,7 +200,6 @@ sub save_perm() {
$treeModel->foreach(sub {
my ($model, $_path, $iter) = @_;
my $line = $model->get($iter, 0) . "\t" . $model->get($iter,1) . ($model->get($iter,2) ? "." . $model->get($iter,2) : "") . "\t" . $model->get($iter,3) . "\n";
- $iter->free;
print F $line;
return 0;
}, $val);
@@ -334,7 +323,6 @@ sub row_setting_dialog {
$treeModel->set($iter, [ 3 => ($s || '') . $user . $group . $other ]);
$dlg->destroy;
$modified++;
- $iter->free;
});
$usr_check->signal_connect(clicked => sub {
my $bool = $usr_check->get_active;
diff --git a/perl-install/standalone/harddrake2 b/perl-install/standalone/harddrake2
index b3d7af71a..13212171c 100755
--- a/perl-install/standalone/harddrake2
+++ b/perl-install/standalone/harddrake2
@@ -97,11 +97,11 @@ my @menu_items =
[ N("/_File"), undef, undef, undef, '<Branch>' ],
[ N("/_File").N("/_Quit"), N("<control>Q"), \&quit_global, undef, '<StockItem>', 'gtk-quit' ],
[ join('', @{$menu_options{PRINTERS_DETECTION}}), undef,
- sub { $options{PRINTERS_DETECTION} = $check_boxes{PRINTERS_DETECTION}->active }, undef, '<CheckItem>' ],
+ sub { $options{PRINTERS_DETECTION} = $check_boxes{PRINTERS_DETECTION}->get_active }, undef, '<CheckItem>' ],
[ join('', @{$menu_options{MODEMS_DETECTION}}), undef,
- sub { $options{MODEMS_DETECTION} = $check_boxes{MODEMS_DETECTION}->active }, undef, '<CheckItem>' ],
+ sub { $options{MODEMS_DETECTION} = $check_boxes{MODEMS_DETECTION}->get_active }, undef, '<CheckItem>' ],
[ join('', @{$menu_options{JAZZ_DETECTION}}), undef,
- sub { $options{JAZZ_DETECTION} = $check_boxes{JAZZ_DETECTION}->active }, undef, '<CheckItem>' ],
+ sub { $options{JAZZ_DETECTION} = $check_boxes{JAZZ_DETECTION}->get_active }, undef, '<CheckItem>' ],
[ $menus{help}, undef, undef, undef, '<Branch>' ],
[ $menus{help}.N("/_Help"), undef, sub { unless (fork()) { exec("drakhelp Drakxtools-Guide.html/harddrake.html") } }, undef, '<Item>' ],
[ $menus{help}.N("/_Fields description"), undef, sub {
@@ -148,7 +148,7 @@ if ($::isEmbedded) {
$w->{window}->set_size_request(805, 550);
}
-my $tree_model = Gtk2::TreeStore->new(Gtk2::GType->OBJECT, Gtk2::GType->STRING, Gtk2::GType->INT);
+my $tree_model = Gtk2::TreeStore->new("Gtk2::Gdk::Pixbuf", "Glib::String", "Glib::Int");
my ($statusbar, $sig_id);
$w->{window}->add(gtkpack_(0, Gtk2::VBox->new(0, 0),
if_(!$::isEmbedded, 0, $menubar),
@@ -198,16 +198,15 @@ $tree->get_selection->signal_connect('changed' => sub {
my ($model, $iter) = $select->get_selected;
if ($model) {
my $idx = $model->get($iter, 2);
- $iter->free;
$current_device = $data[$idx];
if ($idx ne -1) {
+ use Gtk2::Pango;
gtktext_insert($text, [ map {
-
# The U+200E character is to force LTR display, as what what follows the colon is always in LTR (device names, paths, etc),
# this ensures proper displaying of names like /dev/fd0 (otherwise it gets 'dev/fd0/').
# it must come *after* the space, as the space must follow the colon following the direction of writting.
- if_($_ && $fields{$_}[0], [ $fields{$_}[0] . ": \x{200e}", { 'foreground' => 'royalblue3', 'weight' => Gtk2::Pango->WEIGHT_BOLD } ],
+ if_($_ && $fields{$_}[0], [ $fields{$_}[0] . ": \x{200e}", { 'foreground' => 'royalblue3', 'weight' => Gtk2::Pango->PANGO_WEIGHT_BOLD } ],
[ ($current_device->{$_} =~ /^(unknown)/ ? N("unknown") :
$current_device->{$_} =~ /^(Unknown)/ ? N("Unknown") :
$current_device->{$_} eq 'yes' ? N("Yes") :
@@ -227,7 +226,7 @@ $tree->get_selection->signal_connect('changed' => sub {
return 1;
}
}
- $text->get_buffer->set_text(N("Click on a device in the left tree in order to display its information here."), -1);
+ $text->get_buffer->set_text(N("Click on a device in the left tree in order to display its information here."));
$config_button->hide;
$module_cfg_button->hide;
});
@@ -294,12 +293,11 @@ foreach (@harddrake::data::tree) {
foreach my $field (qw(devfs_device device)) {
$_->{$field} = '/dev/'.$_->{$field} if $_->{$field};
}
- $tree_model->append_set($parent_iter, [ 1 => $custom_id, 2 => $index++ ])->free;
+ $tree_model->append_set($parent_iter, [ 1 => $custom_id, 2 => $index++ ]);
push @data, $_;
push @configurators, $configurator;
}
$tree->expand_row($tree_model->get_path($parent_iter), 1) unless $title eq N("Unknown/Others");
- $parent_iter->free;
}
$SIG{CHLD} = sub {
@@ -327,7 +325,6 @@ $textcolumn->set_sizing('GTK_TREE_VIEW_COLUMN_AUTOSIZE');#GROW_ONLY
my $path = Gtk2::TreePath->new_first;
$path->down unless $::isEmbedded;
$tree->get_selection->select_path($path);
-$path->free;
$w->{rwindow}->show_all;
undef $wait;
gtkset_mousecursor_normal();
diff --git a/perl-install/standalone/logdrake b/perl-install/standalone/logdrake
index 94fc15f9a..92b429a2f 100755
--- a/perl-install/standalone/logdrake
+++ b/perl-install/standalone/logdrake
@@ -142,6 +142,7 @@ my %files = (
);
my $yy = gtkset_sensitive(gtksignal_connect(new Gtk2::Button(N("search")) , clicked => \&search),0);
+print "widget is $yy\n";
my $log_text = gtktext_insert(Gtk2::TextView->new, [ [ '' ] ]);
my $log_buf = $log_text->get_buffer;
@@ -168,7 +169,8 @@ gtkadd($my_win->{window},
map { $toggle{$_} = gtksignal_connect(new Gtk2::CheckButton($files{$_}{desc}),
clicked => sub {
$refcount_search++;
- gtkset_sensitive($yy,$refcount_search);
+ print "widget is $yy\n";
+ gtkset_sensitive($yy, $refcount_search);
}) } keys %files,
)
),
@@ -217,12 +219,12 @@ sub quit() { ugtk2->exit(0) }
#-------------------------------------------------------------
sub search() {
$log_text->window->freeze_updates;
- $log_buf->set_text('', -1);
+ $log_buf->set_text('');
if ($::isFile) {
parse_file($::File);
} else {
foreach (keys %files) {
- parse_file($files{$_}{file}, $files{$_}{desc}) if $toggle{$_}->active;
+ parse_file($files{$_}{file}, $files{$_}{desc}) if $toggle{$_}->get_active;
}
}
$log_text->window->thaw_updates;
@@ -298,7 +300,7 @@ sub parse_file {
local $_;
while (<F>) {}; #to prevent to output the file twice..
# $log_text->set_point($log_text->get_length());
- $timer ||= Gtk2->timeout_add(1000, sub {
+ $timer ||= Glib::Timeout->add(1000, sub {
logcolorize($_) while <F>;
seek F, 0, 1;
});
@@ -362,7 +364,6 @@ sub logcolorize {
sub log_output {
gtktext_append($log_text, [ \@_ ]);
$log_text->scroll_to_iter(my $iter = $log_buf->get_end_iter, 0, 1, 0.5, 0.5);
- $iter->free;
}
@@ -479,7 +480,7 @@ print F $r;
sub save() {
$::isWizard = 0;
- $yy = $in->ask_file(N("Save as.."), "/root") or return;
+ my $y = $in->ask_file(N("Save as.."), "/root") or return;
my $buf = $log_text->get_buffer;
- output($yy, $buf->get_text(($buf->get_bounds), 0));
+ output($y, $buf->get_text(($buf->get_bounds), 0));
}
diff --git a/perl-install/standalone/mousedrake b/perl-install/standalone/mousedrake
index 935d0db6c..635532c15 100755
--- a/perl-install/standalone/mousedrake
+++ b/perl-install/standalone/mousedrake
@@ -29,7 +29,7 @@ if (!$mouse || !$::auto) {
if ($::isEmbedded && $in->isa('interactive::gtk')) {
#- HACK: waiting for the ask_from_treelistf to attach itself
#- and adding the nice test mouse to it
- Gtk2->timeout_add(100, sub {
+ Glib::Timeout->add(100, sub {
defined $::Plug && defined $::Plug->child or return 1;
$test_hbox = Gtk2::HBox->new(0, 0);
$::WizardTable->attach($test_hbox, 2, 3, 1, 2, ['fill', 'expand'], ['fill', 'expand'], 0, 0);