summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-07-01 08:11:18 +0000
committerOlivier Blin <oblin@mandriva.org>2005-07-01 08:11:18 +0000
commit5438a724ca092fcc3a1a7fa89197eb42bb38e12c (patch)
tree8b49e4f44c602012b8787b638cdad4a5fc3f6294
parent1d92ae482c1537a946ef2f15edea636397b095f0 (diff)
downloaddrakx-5438a724ca092fcc3a1a7fa89197eb42bb38e12c.tar
drakx-5438a724ca092fcc3a1a7fa89197eb42bb38e12c.tar.gz
drakx-5438a724ca092fcc3a1a7fa89197eb42bb38e12c.tar.bz2
drakx-5438a724ca092fcc3a1a7fa89197eb42bb38e12c.tar.xz
drakx-5438a724ca092fcc3a1a7fa89197eb42bb38e12c.zip
set the "" string as active in the combo box when a custom binary is
selected, to avoid default selection of the last combo box item (this allow to remove the "scannerdrake" hack)
-rwxr-xr-xperl-install/standalone/drakbug15
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);
});