summaryrefslogtreecommitdiffstats
path: root/perl-install
diff options
context:
space:
mode:
authorSebastien Dupont <sdupont@mandriva.com>2001-10-29 14:14:04 +0000
committerSebastien Dupont <sdupont@mandriva.com>2001-10-29 14:14:04 +0000
commitde545eb9fbd24465ade9ee65d5dbb9beaaab59d9 (patch)
tree776aeb1535f9ab515d6680647498a818e01061fe /perl-install
parent404b0394ecd411a4901236c60f27626906926e51 (diff)
downloaddrakx-de545eb9fbd24465ade9ee65d5dbb9beaaab59d9.tar
drakx-de545eb9fbd24465ade9ee65d5dbb9beaaab59d9.tar.gz
drakx-de545eb9fbd24465ade9ee65d5dbb9beaaab59d9.tar.bz2
drakx-de545eb9fbd24465ade9ee65d5dbb9beaaab59d9.tar.xz
drakx-de545eb9fbd24465ade9ee65d5dbb9beaaab59d9.zip
updated
Diffstat (limited to 'perl-install')
-rwxr-xr-xperl-install/standalone/drakfont55
1 files changed, 32 insertions, 23 deletions
diff --git a/perl-install/standalone/drakfont b/perl-install/standalone/drakfont
index a4e3423d7..30dee8270 100755
--- a/perl-install/standalone/drakfont
+++ b/perl-install/standalone/drakfont
@@ -394,7 +394,6 @@ sub remove_gs_fonts {
sub remove_fonts {
my @list_dir;
- my @toto;
-e $drakfont_dir . "/remove" || mkdir_p($drakfont_dir . "/remove");
foreach my $i (@font_list) {
$_ = $i;
@@ -542,7 +541,6 @@ sub license {
my ($function) = @_,
my $text = new Gtk::Text(undef, undef);
my $license_box;
-#$scrolled_window->set_usize( 440, 300 ),
gtkpack($font_box,
$license_box = gtkpack_(new Gtk::VBox(0,10),
1, gtkpack_(new Gtk::HBox(0,0),
@@ -724,29 +722,42 @@ sub advanced_install {
$adv_box->show_all();
}
-# sub list_remove {
-# my($widget, $list) = @_;
-# my @to_remove;
-# push @to_remove, $list->child_position($_) foreach($list->selection);
-# splice @install, $_, 1 foreach(reverse sort @to_remove);
-# $list->remove_items($list->selection);
-# }
-
-
sub show_path_list {
- my($widget, $list) = @_;
-# my $list = @_;
- print "$list->selection\n";
-# $list->add(gtkshow(new Gtk::ListItem($_))) foreach (all($list->selection));
+ my($widget, $list) = @_;
+ my @to_remove;
+ push @to_remove, $list->child_position($_) foreach($list->selection);
+ splice @install, $_, 1 foreach(reverse sort @to_remove);
+ $list->remove_items($list->selection);
+}
-# Gtk->main_iteration while Gtk->events_pending;
+# sub show_path_list {
+# my($widget, $list) = @_;
+# # my $list = @_;
+# # print "$_\n" foreach ($list->selected);
+# # $list->add(gtkshow(new Gtk::ListItem($_))) foreach (all($list->selection));
+
+# # Gtk->main_iteration while Gtk->events_pending;
# my @to_remove;
-# push @to_remove, $list->child_position($_) foreach($list->selection);
-# splice @install, $_, 1 foreach(reverse sort @to_remove);
-# $list->remove_items($list->selection);
+# push @to_remove, $list->child_position($_) foreach($list->selection);
+# print "$_\n" foreach (@to_remove);
+# # my @to_remove;
+# # push @to_remove, $list->child_position($_) foreach($list->selection);
+# # splice @install, $_, 1 foreach(reverse sort @to_remove);
+# # $list->remove_items($list->selection);
+# }
+
+sub list_to_remove {
+ my($widget, $list) = @_;
+ my @to_remove;
+ push @to_remove, $list->child_position($_) foreach($list->selection);
+# splice @install, $_, 1 foreach(reverse sort @to_remove);
+# $list->remove_items($list->selection);
+ print "$_ \n" foreach (@to_remove);
}
+
+
sub uninstall {
my $scrolled_window;
my $scrolled_window2;
@@ -759,11 +770,9 @@ sub uninstall {
my $t = $_;
$list_path->add(gtkshow(gtksignal_connect(new Gtk::ListItem($t), select => sub {
$path_list->clear_items(0, -1);
- $path_list->append_items(map { /fonts/ ? () : gtkshow(new Gtk::ListItem($_)) } all($t));
- })));
+ $path_list->append_items(map { /fonts/ ? () : gtkshow(new Gtk::ListItem($_)) } all($t)); })));
}
$list_path->set_selection_mode(-single);
-
$path_list = new Gtk::List();
$path_list->set_selection_mode(-extended);
@@ -779,7 +788,7 @@ sub uninstall {
gtksignal_connect(new Gtk::Button(_("Selected All")), clicked =>
sub {$path_list->select_all (); } ),
gtksignal_connect(new Gtk::Button(_("Remove List")), clicked =>
- sub { ${$central_widget}->destroy(); import_status_uninstall() }),
+ sub { ${$central_widget}->destroy(); \&list_to_remove(), $path_list}),
),
)
);