summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakfloppy
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2003-07-09 16:01:00 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2003-07-09 16:01:00 +0000
commitbdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce (patch)
tree508433b3a3d1eea11fa8b96623b7cdde3616a01e /perl-install/standalone/drakfloppy
parent2403c1c4d98749fbef5740c7dcaccc017da890a9 (diff)
downloaddrakx-backup-do-not-use-bdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce.tar
drakx-backup-do-not-use-bdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce.tar.gz
drakx-backup-do-not-use-bdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce.tar.bz2
drakx-backup-do-not-use-bdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce.tar.xz
drakx-backup-do-not-use-bdd3c581cde1d9fed4cf5c42062a83cec3fbb1ce.zip
switch from gtk2-perl to gtk2-perl-xs
Diffstat (limited to 'perl-install/standalone/drakfloppy')
-rwxr-xr-xperl-install/standalone/drakfloppy17
1 files changed, 11 insertions, 6 deletions
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";
}