From a3f578efbce1bc645499611f0f1cc13c996f3275 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 8 Aug 2004 23:45:02 +0000 Subject: simplify code through Gtk2::ComboBox->new_with_strings() --- perl-install/standalone/drakfloppy | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'perl-install/standalone/drakfloppy') diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy index 3249276f2..2734286e1 100755 --- a/perl-install/standalone/drakfloppy +++ b/perl-install/standalone/drakfloppy @@ -62,15 +62,11 @@ eval { %options = getVarsFromSh($conffile) }; ######## up part # device part -my $device_combo = Gtk2::ComboBox->new_text; -$device_combo->set_popdown_strings(map { "/dev/" . $_->{device} } detect_devices::floppies()); +my $device_combo = Gtk2::ComboBox->new_with_strings([ map { "/dev/" . $_->{device} } detect_devices::floppies() ]); $device_combo->set_active(0); - # kernel part -my $kernel_combo = Gtk2::ComboBox->new_text; -$kernel_combo->set_popdown_strings(sort grep { !/^\.\.?$/ } sort(all("/lib/modules"))); -$kernel_combo->entry->set_text(chomp_(`uname -r`)); +my $kernel_combo = Gtk2::ComboBox->new_with_strings([ sort grep { !/^\.\.?$/ } sort(all("/lib/modules")) ], chomp_(`uname -r`)); ########################################################## -- cgit v1.2.1