summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-27 00:45:03 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-27 00:45:03 +0000
commitf20b9ade0d8d4f992940941d3fed732770d97c50 (patch)
treeeeb19e55179ef4c475193738376f700c207ec9fa /bin
parentc1f4b3bd3042861a8ea8ae66c793662ff8f04151 (diff)
downloaddrakguard-f20b9ade0d8d4f992940941d3fed732770d97c50.tar
drakguard-f20b9ade0d8d4f992940941d3fed732770d97c50.tar.gz
drakguard-f20b9ade0d8d4f992940941d3fed732770d97c50.tar.bz2
drakguard-f20b9ade0d8d4f992940941d3fed732770d97c50.tar.xz
drakguard-f20b9ade0d8d4f992940941d3fed732770d97c50.zip
fix adding to lists (by naming $_)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/drakguard17
1 files changed, 10 insertions, 7 deletions
diff --git a/bin/drakguard b/bin/drakguard
index dd57490..847a8d8 100755
--- a/bin/drakguard
+++ b/bin/drakguard
@@ -124,24 +124,27 @@ gtkadd($w->{window},
]),
]),
(map {
- my $list = Gtk2::SimpleList->new($_->{list_title} => 'text');
- $list->get_selection->set_mode('multiple');
- @{$list->{data}} = read_url_list($_->{file});
+ my $url_list = $_;
+ $url_list->{list} = Gtk2::SimpleList->new($url_list->{list_title} => 'text');
+ $url_list->{list}->get_selection->set_mode('multiple');
+ @{$url_list->{list}{data}} = read_url_list($url_list->{file});
my $entry;
(
- gtknew('Label', text => $_->{tab_title}),
+ gtknew('Label', text => $url_list->{tab_title}),
gtknew('VBox', spacing => 5, children => [
0, gtknew('HBox', border_width => 5, spacing => 5, children_loose => [
$entry = gtknew('Entry'),
gtknew('Button', text => N("Add"), clicked => sub {
- list_add_addr($list, $entry->get_text);
+ list_add_addr($url_list->{list}, $entry->get_text);
$entry->set_text("");
}),
]),
- 1, gtknew('ScrolledWindow', width => 500, height => 300, child => $list),
+ 1, gtknew('ScrolledWindow', width => 500, height => 300, child => $url_list->{list}),
0, gtknew('HButtonBox', border_width => 5, layout => 'edge', children_loose => [
- gtknew('Button', text => $_->{remove_text}, clicked => sub { list_remove_selected($list) }),
+ gtknew('Button', text => $url_list->{remove_text}, clicked => sub {
+ list_remove_selected($url_list->{list});
+ }),
]),
]),
);