aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-12-29 15:55:33 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2005-12-29 15:55:33 +0000
commit8a3d08b99e8cdc5acfeda98f3104109365ad10d5 (patch)
treed4f87e8dccc3a8bd8d5173f69a5fed003dbc028c
parentf7386742c4ac4ebde9af0613dd8436c8af832d41 (diff)
downloadrpmdrake-8a3d08b99e8cdc5acfeda98f3104109365ad10d5.tar
rpmdrake-8a3d08b99e8cdc5acfeda98f3104109365ad10d5.tar.gz
rpmdrake-8a3d08b99e8cdc5acfeda98f3104109365ad10d5.tar.bz2
rpmdrake-8a3d08b99e8cdc5acfeda98f3104109365ad10d5.tar.xz
rpmdrake-8a3d08b99e8cdc5acfeda98f3104109365ad10d5.zip
Add a button to clear the search text field and to redraw the package tree
-rwxr-xr-xrpmdrake19
1 files changed, 15 insertions, 4 deletions
diff --git a/rpmdrake b/rpmdrake
index 19798587..a4930182 100755
--- a/rpmdrake
+++ b/rpmdrake
@@ -1192,10 +1192,21 @@ Is it ok to continue?",
Gtk2::HBox->new(0, 10),
Gtk2::Label->new(N("Find:")),
$search_types_optionmenu,
- gtksignal_connect($find_entry = Gtk2::Entry->new,
- key_press_event => sub { $_[1]->keyval == $Gtk2::Gdk::Keysyms{Return}
- and $find_callback->() }),
- gtksignal_connect(Gtk2::Button->new(but(N("Search"))), clicked => $find_callback)
+ gtksignal_connect(
+ $find_entry = Gtk2::Entry->new,
+ key_press_event => sub {
+ $_[1]->keyval == $Gtk2::Gdk::Keysyms{Return}
+ and $find_callback->();
+ },
+ ),
+ gtksignal_connect(Gtk2::Button->new(but(N("Search"))), clicked => $find_callback),
+ gtksignal_connect(
+ Gtk2::Button->new(but(N("Clear"))),
+ clicked => sub {
+ $find_entry->set_text("");
+ $options->{rebuild_tree}->();
+ },
+ ),
),
1, $table,
0, gtkpack_(