diff options
-rwxr-xr-x | perl-install/standalone/drakbug | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/standalone/drakbug b/perl-install/standalone/drakbug index f93a32939..cb6678832 100755 --- a/perl-install/standalone/drakbug +++ b/perl-install/standalone/drakbug @@ -88,6 +88,7 @@ $table = create_packtable({ col_spacings => 5, row_spacings => 10 }, [ Gtk2::Label->new(N("Kernel:")), gtkset_editable(Gtk2::Entry->new_with_text($kernel_release), 0) ] ); $comb_app->set_popdown_strings("", sort(@generic_tool)); +$comb_app->set_text(""); gtkadd($window->{window}, gtkpack_(Gtk2::VBox->new(0,5), @@ -109,12 +110,10 @@ gtkadd($window->{window}, my $p = $package->get_text; my ($product, $version) = $p =~ /^(.*)-([^-]+-[^-]+mdk)$/; my $app = $comb_app->entry->get_text; - my $component = if_(member($app, @all_drakxtools), $app) || $mdk_app->{$app}; + my $component = $app ? + if_(member($app, @all_drakxtools), $app) || $mdk_app->{$app} : + $product; $options .= "&product=$product" if $product; - # this could probably be cleaner but whatever, it works (vdanen) - if ($component eq "scannerdrake" && $product ne "drakxtools") { - $component = $product; - } $options .= "&component=$component"; $options .= "&version=$version" if $version; $options .= "&distro_code=$distrocode"; @@ -131,9 +130,13 @@ if (defined $prog) { update_app($prog); $comb_app->set_text($prog); } -$comb_app->entry->signal_connect('changed', sub { update_app($comb_app->entry->get_text) }); +$comb_app->entry->signal_connect('changed', sub { + my $text = $comb_app->entry->get_text; + $text and update_app($text); + }); $button_pkg->signal_connect('clicked', sub { + $comb_app->set_text(""); my $pkg_name = get_package($com_app->get_text); $package->set_text($pkg_name); }); |